/* 매물 자동화 MVP — 관리 화면 + 사무소 홈페이지 공용 토큰 */
:root {
  --bg: #f3f5f2; --surface: #ffffff; --ink: #17302f; --muted: #5d6f6c; --line: #d9e0dc;
  --accent: #e2a53a; --accent-ink: #1b1b14; --brand: #1f4a46; --brand-ink: #f3f5f2;
  --ok: #2f7d5b; --warn: #b5482f; --warn-bg: #fbeee9; --ok-bg: #e8f3ed;
  --display: "Gothic A1", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --body: "IBM Plex Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101a19; --surface: #172422; --ink: #e6eeeb; --muted: #9db0ab; --line: #2a3b38;
    --accent: #e8b052; --brand: #24524d; --brand-ink: #eef4f1; --ok: #5cbf91; --warn: #e58067;
    --warn-bg: #3a2420; --ok-bg: #1d3329; color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--body); word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.25; margin: 0; text-wrap: balance; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 18px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.stack > * { min-width: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.top { background: var(--brand); color: var(--brand-ink); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 12px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-weight: 800; font-size: 18px; text-decoration: none; color: var(--brand-ink); display: flex; gap: 8px; align-items: center; }
.logo b { background: var(--accent); color: var(--accent-ink); border-radius: 6px; width: 28px; height: 28px; display: grid; place-items: center; font-size: 15px; }
.top nav { display: flex; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.top nav a { color: var(--brand-ink); opacity: .85; text-decoration: none; }
.top nav a:hover { opacity: 1; text-decoration: underline; }
main { padding-block: 24px 60px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.flash { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.problems { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 12px 16px; }
.problems ul { margin: 6px 0 0; padding-left: 18px; }

.btn { font: inherit; font-weight: 700; border: 0; border-radius: 9px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.dark { background: var(--brand); color: var(--brand-ink); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

label { font-size: 13.5px; font-weight: 600; display: block; margin-bottom: 4px; }
input, select, textarea { font: inherit; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.req::after { content: " *"; color: var(--warn); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0; background: var(--surface); display: grid; gap: 12px; }
legend { font-family: var(--display); font-weight: 800; padding: 0 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { font-weight: 500; display: flex; gap: 6px; align-items: center; background: var(--bg); border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; margin: 0; }
.checks input { width: auto; }

.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.lcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; }
.lcard .ph { aspect-ratio: 4/3; background: var(--line); position: relative; }
.lcard .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lcard .body { padding: 12px 14px; display: grid; gap: 3px; }
.lcard .price { font-family: var(--display); font-weight: 800; font-size: 18px; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 6px; position: absolute; left: 10px; top: 10px; }
.pill.draft { background: var(--line); color: var(--ink); }
.pill.published { background: var(--accent); color: var(--accent-ink); }
.pill.done { background: var(--ink); color: var(--bg); }
.lcard.done .ph img { filter: grayscale(1) brightness(.75); }

table.kv { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--surface); }
table.kv th, table.kv td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kv th { width: 36%; color: var(--muted); font-weight: 500; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs button { font: inherit; background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 12px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
pre.copy { white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font: 14px/1.7 var(--body); margin: 0; max-height: 520px; overflow: auto; }
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.slides img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.thumbs-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.thumbs-edit .t { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 6px; }
.thumbs-edit img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }

/* 공개 홈페이지 */
.site-hero { padding-block: 30px 14px; display: grid; gap: 6px; }
.site-hero h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; }
.gallery-main { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--line); max-width: 100%; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.gthumbs button { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--line); }
.gthumbs button[aria-pressed="true"] { border-color: var(--accent); }
.gthumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.detail > * { min-width: 0; }
@media (max-width: 860px) { .detail { grid-template-columns: minmax(0, 1fr); } .detail aside { position: static !important; } }
.days, .times { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.days label, .times label { flex: 0 0 auto; margin: 0; position: relative; }
.days input, .times input { position: absolute; opacity: 0; width: 1px; }
.days span, .times span { display: grid; place-items: center; min-width: 54px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; font-weight: 500; line-height: 1.25; font-variant-numeric: tabular-nums; }
.days input:checked + span, .times input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.days input:focus-visible + span, .times input:focus-visible + span { outline: 3px solid var(--accent); }
.times input:disabled + span { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.times[hidden] { display: none; }
footer.site { border-top: 1px solid var(--line); background: var(--surface); }
footer.site .wrap { padding-block: 20px 30px; font-size: 13.5px; color: var(--muted); display: grid; gap: 4px; }
