/* 매물비서 v2 — 메인 홈페이지(도어웹 정보형)와 같은 톤: 흰 바탕·남색·파랑, Pretendard */
:root {
  --bg: #f3f6fb; --surface: #ffffff; --ink: #16213a; --muted: #5d6782; --line: #e2e7f1;
  --accent: #2457e0; --accent-ink: #ffffff; --brand: #0d1d42; --brand-ink: #ffffff;
  --ok: #1f8a5b; --warn: #c2412d; --warn-bg: #fdf0ed; --ok-bg: #e7f6ee;
  --display: Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --body: Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --mono: Pretendard, Consolas, monospace;
  color-scheme: light;
}
* { 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; white-space: nowrap; }
.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; }


/* ---- v2 덧씌우기 ---- */
body { font-size: 16px; line-height: 1.65; }
h1 { font-weight: 800; letter-spacing: -.02em; }
.top { background: rgba(255,255,255,.97); color: var(--ink); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .wrap { padding-block: 14px; }
.logo { color: var(--ink); font-weight: 900; font-size: 22px; letter-spacing: -.04em; }
.logo b { background: var(--accent); color: #fff; }
.app-logo b { display: none; }
.app-logo::after { content: "°"; color: var(--accent); font-size: 13px; align-self: flex-start; margin-left: -6px; }
.top nav { gap: 22px; font-size: 15px; font-weight: 700; }
.top nav a { color: var(--ink); opacity: 1; }
.top nav a:hover { color: var(--accent); text-decoration: none; }
.card, fieldset, .lcard, .tbl { border-radius: 14px; }
.card, fieldset { box-shadow: 0 10px 30px -22px rgba(23,45,105,.35); }
.btn { border-radius: 10px; }
.btn.primary { box-shadow: 0 10px 22px -12px rgba(36,87,224,.75); }
.btn.dark { background: var(--brand); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill.published { background: var(--accent); color: #fff; }
.tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); }
.flash { background: #e8effd; color: var(--accent); }
.days input:checked + span, .times input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.lcard { box-shadow: 0 10px 28px -22px rgba(23,45,105,.4); transition: transform .2s, box-shadow .2s; }
.lcard:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -22px rgba(23,45,105,.5); }
footer.site { background: var(--brand); color: #b8c2dc; border-top: 0; }
footer.site b { color: #fff !important; }
footer.site a { color: #fff; }
input, select, textarea { background: #fff; border-color: var(--line); border-width: 1.5px; border-radius: 10px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
