/* 호가판 v2 — 승인된 시안(docs/mockup/src/template.html)의 토큰·레이아웃 그대로.
   Light and dark are designed separately (not inverted). */
/* ───────── Tokens ─────────
   Light and dark are designed separately (not inverted).
   Data colors: base / new / drop (max 3) + neutral ink for 실거래 ◆ and gray for KB. */
:root {
  color-scheme: light;
  --bg:#F1F2F4; --rail:#E9EBEE; --surface:#FFFFFF; --surface-2:#F6F7F9; --surface-3:#EAECF0;
  --line:#E3E6EA; --line-2:#CDD2D9; --text:#14171B; --text-2:#545C67; --text-3:#858C96;
  --s-base:#257de0; --s-new:#00b894; --s-drop:#f47230; --ink-mark:#14171B; --kb:#7A828D;
  --half:#D9DEE5; --good:#0aac23; --good-text:#006c10; --warn:#fbb315; --warn-text:#8a5a00;
  --crit:#dc3c3d; --crit-text:#b3261e; --focus:#257de0;
  --btn-bg:#14171B; --btn-fg:#FFFFFF; --scrim:rgba(20,23,27,.28);
  --shadow:0 1px 2px rgba(16,24,40,.05),0 0 0 1px rgba(16,24,40,.06);
  --shadow-lg:0 24px 48px -12px rgba(16,24,40,.25),0 0 0 1px rgba(16,24,40,.08);
  --hatch:rgba(20,23,27,.045);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:#0B0D10; --rail:#0F1216; --surface:#15181D; --surface-2:#1A1E24; --surface-3:#252A32;
    --line:#242931; --line-2:#363C46; --text:#ECEEF1; --text-2:#A3AAB5; --text-3:#6F7783;
    --s-base:#338ced; --s-new:#00a888; --s-drop:#e76624; --ink-mark:#ECEEF1; --kb:#8D95A1;
    --half:#2E343D; --good:#0aac23; --good-text:#53c556; --warn:#fbb315; --warn-text:#f5c451;
    --crit:#dc3c3d; --crit-text:#f08a8a; --focus:#5aa2ff;
    --btn-bg:#ECEEF1; --btn-fg:#0B0D10; --scrim:rgba(0,0,0,.5);
    --shadow:0 0 0 1px rgba(255,255,255,.05);
    --shadow-lg:0 24px 60px -10px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,.08);
    --hatch:rgba(255,255,255,.035);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#0B0D10; --rail:#0F1216; --surface:#15181D; --surface-2:#1A1E24; --surface-3:#252A32;
  --line:#242931; --line-2:#363C46; --text:#ECEEF1; --text-2:#A3AAB5; --text-3:#6F7783;
  --s-base:#338ced; --s-new:#00a888; --s-drop:#e76624; --ink-mark:#ECEEF1; --kb:#8D95A1;
  --half:#2E343D; --good:#0aac23; --good-text:#53c556; --warn:#fbb315; --warn-text:#f5c451;
  --crit:#dc3c3d; --crit-text:#f08a8a; --focus:#5aa2ff;
  --btn-bg:#ECEEF1; --btn-fg:#0B0D10; --scrim:rgba(0,0,0,.5);
  --shadow:0 0 0 1px rgba(255,255,255,.05);
  --shadow-lg:0 24px 60px -10px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,.08);
  --hatch:rgba(255,255,255,.035);
}

* { box-sizing:border-box; }
html,body { margin:0; height:100%; }
body {
  background:var(--bg); color:var(--text);
  font-family:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:13px; line-height:1.45; letter-spacing:-0.005em;
  -webkit-font-smoothing:antialiased;
}
button { font:inherit; color:inherit; cursor:pointer; }
.num { font-variant-numeric:tabular-nums; }
.t-11 { font-size:11px; } .t-12 { font-size:12px; } .t-14 { font-size:14px; } .t-16{font-size:16px;}
.c2 { color:var(--text-2); } .c3 { color:var(--text-3); }
.w6 { font-weight:600; } .w7 { font-weight:700; }

/* ───────── App shell ───────── */
#app { display:grid; grid-template-columns:212px 1fr; height:100vh; }
#nav { background:var(--rail); border-right:1px solid var(--line); display:flex; flex-direction:column; padding:16px 12px; }
.brand { display:flex; align-items:center; gap:9px; padding:2px 8px 18px; font-weight:700; font-size:15px; letter-spacing:-0.02em; }
.brand-mark { width:22px; height:22px; border-radius:6px; background:var(--text); display:grid; place-items:center; }
.brand-mark svg { display:block; }
.nav-item { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; color:var(--text-2); font-weight:500; cursor:pointer; border:0; background:none; width:100%; text-align:left; }
.nav-item:hover { background:var(--surface-2); }
.nav-item.on { background:var(--surface-3); color:var(--text); font-weight:600; }
.nav-item .cnt { margin-left:auto; font-size:11px; color:var(--text-3); }
.nav-sec { font-size:11px; color:var(--text-3); padding:16px 10px 6px; font-weight:600; }
.nav-cx { display:flex; align-items:center; gap:8px; padding:6px 10px; border-radius:8px; color:var(--text-2); font-size:12.5px; cursor:pointer; }
.nav-cx:hover { background:var(--surface-2); }
.nav-cx .dot { width:6px; height:6px; border-radius:50%; background:var(--line-2); flex:none; }
.nav-cx .dot.ok { background:var(--good); }
.nav-foot { margin-top:auto; border-top:1px solid var(--line); padding:12px 8px 0; display:grid; gap:6px; }
.conn { display:flex; align-items:center; gap:8px; font-size:12px; }
.conn .ic { width:18px; height:18px; border-radius:50%; display:grid; place-items:center; background:color-mix(in srgb,var(--good) 18%, transparent); }

#main { overflow:auto; position:relative; }
.page { padding:22px 28px 40px; max-width:1228px; }
.screen { display:none; }
.screen.on { display:block; }

/* Generic controls */
.seg { display:inline-flex; background:var(--surface-2); border:1px solid var(--line); border-radius:9px; padding:2px; gap:2px; }
.seg button { border:0; background:none; padding:5px 12px; border-radius:7px; color:var(--text-2); font-weight:500; font-size:12.5px; white-space:nowrap; }
.seg button.on { background:var(--surface); color:var(--text); font-weight:600; box-shadow:var(--shadow); }
:root[data-theme="dark"] .seg button.on { background:var(--surface-3); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .seg button.on { background:var(--surface-3);} }
.seg button .sub { color:var(--text-3); font-weight:500; margin-left:4px; font-size:11px; }
.btn { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line-2); background:var(--surface); border-radius:8px; padding:6px 12px; font-weight:600; font-size:12.5px; color:var(--text); white-space:nowrap; }
.btn:hover { background:var(--surface-2); }
.btn.primary { background:var(--btn-bg); color:var(--btn-fg); border-color:var(--btn-bg); }
.btn.sm { padding:4px 9px; font-size:12px; border-radius:7px; }
.btn.ghost { border-color:transparent; background:transparent; color:var(--text-2); }
.chip { display:inline-flex; align-items:center; gap:4px; height:22px; padding:0 8px; border-radius:6px; font-size:11.5px; font-weight:500; background:var(--surface-3); color:var(--text-2); white-space:nowrap; }
.chip svg { flex:none; }
.chip.good { background:color-mix(in srgb,var(--good) 14%, transparent); color:var(--good-text); }
.chip.warn { background:color-mix(in srgb,var(--warn) 18%, transparent); color:var(--warn-text); }
.chip.crit { background:color-mix(in srgb,var(--crit) 14%, transparent); color:var(--crit-text); }
.chip.outline { background:transparent; border:1px solid var(--line-2); }
.chip.ex { background:repeating-linear-gradient(-45deg,var(--surface-3) 0 4px,transparent 4px 8px); border:1px dashed var(--line-2); color:var(--text); font-weight:600; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); }
.h1 { font-size:22px; font-weight:700; letter-spacing:-0.025em; margin:0; }
.h2 { font-size:15px; font-weight:700; letter-spacing:-0.015em; margin:0; }
.kicker { font-size:12px; color:var(--text-2); font-weight:500; }
.sep { width:1px; height:14px; background:var(--line-2); display:inline-block; vertical-align:middle; margin:0 8px; }
.row { display:flex; align-items:center; gap:8px; }
.spacer { flex:1; }

/* ───────── Screen A: Board ───────── */
.board-head { display:flex; align-items:flex-end; gap:16px; margin-bottom:16px; }
.board-ctl { display:flex; align-items:center; gap:10px; margin-bottom:14px; flex-wrap:wrap; row-gap:8px; }
.bgrid { display:grid; grid-template-columns:212px minmax(0,1fr) 96px 108px 88px 80px 124px; column-gap:18px; align-items:center; }
.bhead { padding:0 18px 8px; font-size:11.5px; color:var(--text-3); font-weight:600; }
.bhead .r { text-align:right; }
.axis-strip { position:relative; height:16px; }
.axis-strip span { white-space:nowrap; position:absolute; transform:translateX(-50%); font-size:11px; color:var(--text-3); font-variant-numeric:tabular-nums; font-weight:500; }
.brow { padding:14px 18px; border-top:1px solid var(--line); cursor:pointer; position:relative; }
.brow:first-child { border-top:0; }
.brow:hover { background:var(--surface-2); }
.brow .nm { font-weight:700; font-size:14.5px; letter-spacing:-0.02em; display:flex; align-items:center; gap:6px; }
.brow .meta { font-size:12px; color:var(--text-2); margin-top:2px; }
.brow .badges { display:flex; gap:4px; margin-top:7px; flex-wrap:wrap; }
.bandcap { margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fig { text-align:right; }
.fig .v { font-size:18px; font-weight:700; letter-spacing:-0.02em; white-space:nowrap; }
.fig .s { font-size:11.5px; color:var(--text-2); margin-top:1px; white-space:nowrap; }
.delta { display:inline-flex; align-items:center; gap:3px; }
.brow.pending { cursor:default; }
.brow.pending:hover { background:none; }
.pending-strip { height:40px; border:1px dashed var(--line-2); border-radius:8px; display:flex; align-items:center; justify-content:center; gap:8px; color:var(--text-3); font-size:12px; }
.legend { display:flex; gap:14px; align-items:center; font-size:11.5px; color:var(--text-2); flex-wrap:wrap; }
.legend i { display:inline-block; vertical-align:middle; margin-right:5px; }
.lg-dot { width:8px; height:8px; border-radius:50%; background:var(--s-base); }
.lg-dot.new { background:var(--s-new); } .lg-dot.drop { background:var(--s-drop); }
.lg-dot.hollow { background:transparent; border:1.5px solid var(--s-base); }
.lg-half { width:18px; height:6px; border-radius:3px; background:var(--half); }
.lg-tick { width:2px; height:12px; background:var(--text); }
.lg-dia { width:8px; height:8px; background:var(--ink-mark); transform:rotate(45deg); }
.lg-dia.hollow { background:transparent; border:1.5px solid var(--ink-mark); }
.lg-dia.faint { opacity:.35; }
.lg-kb { width:0; height:12px; border-left:1.5px dashed var(--kb); }
.lg-base { width:0; height:12px; border-left:1.5px solid var(--ink-mark); }

/* ───────── Screen B: Detail ───────── */
.crumb { font-size:12px; color:var(--text-3); display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.crumb a { color:var(--text-2); cursor:pointer; }
.dhead { display:flex; align-items:flex-start; gap:16px; margin-bottom:14px; }
.dtitle { display:flex; align-items:baseline; gap:10px; }
.dtitle .pt { font-size:22px; font-weight:600; color:var(--text-2); letter-spacing:-0.02em; }
.dmeta { font-size:12.5px; color:var(--text-2); margin-top:4px; display:flex; align-items:center; flex-wrap:wrap; gap:0; }
.verdicts { display:grid; grid-template-columns:1.15fr 1fr 1fr; gap:12px; margin-bottom:12px; }
.vcard { padding:14px 16px 13px; }
.vcard .lb { font-size:12.5px; color:var(--text-2); font-weight:600; display:flex; align-items:center; gap:6px; }
.vcard .big { font-size:32px; font-weight:700; letter-spacing:-0.035em; line-height:1.15; margin-top:6px; }
.vcard .big small { font-size:17px; font-weight:600; color:var(--text-2); letter-spacing:-0.01em; margin-left:4px; }
.vcard .why { font-size:12.5px; color:var(--text); margin-top:6px; display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
.vcard .foot { font-size:12px; color:var(--text-2); margin-top:8px; padding-top:8px; border-top:1px solid var(--line); }
.stats-line { display:flex; gap:0; align-items:center; padding:9px 16px; margin-bottom:12px; font-size:12.5px; flex-wrap:wrap; }
.stats-line .k { color:var(--text-2); margin-right:6px; }
.stats-line .v { font-weight:600; }
.dgrid { display:grid; grid-template-columns:minmax(0,1fr) 336px; gap:12px; align-items:start; }
.chart-card { padding:14px 16px 6px; }
.chart-head { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
#dist { width:100%; height:356px; }
.filters { display:flex; align-items:center; gap:8px; margin:14px 0 8px; }
.fchip { display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 11px; border-radius:8px; border:1px solid var(--line-2); background:var(--surface); font-size:12.5px; font-weight:500; color:var(--text-2); }
.fchip.on { background:var(--btn-bg); color:var(--btn-fg); border-color:var(--btn-bg); }
.hidden-note { font-size:12.5px; color:var(--text); background:color-mix(in srgb,var(--warn) 16%, transparent); padding:4px 10px; border-radius:7px; display:inline-flex; gap:6px; align-items:center; }
.hidden-note a { font-weight:700; text-decoration:underline; cursor:pointer; }
.list { display:grid; gap:0; }
.lcard { display:grid; grid-template-columns:132px minmax(0,1fr) 150px; column-gap:16px; padding:11px 16px; border-top:1px solid var(--line); cursor:pointer; position:relative; }
.lcard:first-child { border-top:0; }
.lcard:hover { background:var(--surface-2); }
.lcard.sel { background:color-mix(in srgb,var(--s-base) 9%, var(--surface)); }
.lcard.sel::before { content:""; position:absolute; left:0; top:8px; bottom:8px; width:3px; border-radius:0 3px 3px 0; background:var(--text); }
.lcard .pr { font-size:20px; font-weight:700; letter-spacing:-0.03em; white-space:nowrap; }
.lcard .gap { font-size:12px; color:var(--text-2); margin-top:1px; }
.lcard .loc { font-size:13.5px; font-weight:600; display:flex; align-items:center; gap:6px; }
.lcard .loc .c2 { font-weight:500; }
.lcard .bd { display:flex; gap:4px; flex-wrap:wrap; margin-top:5px; }
.lcard .ft { font-size:12px; color:var(--text-2); margin-top:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lcard .rt { text-align:right; font-size:12px; color:var(--text-2); }
.lcard .rt b { color:var(--text); font-weight:600; }
.rng { height:4px; border-radius:2px; background:var(--surface-3); position:relative; margin:6px 0 4px auto; width:120px; }
.rng i { position:absolute; top:0; bottom:0; border-radius:2px; background:var(--s-base); opacity:.6; }
.rng b { position:absolute; top:-2px; width:8px; height:8px; border-radius:50%; background:var(--s-base); box-shadow:0 0 0 2px var(--surface); }
.side .card { padding:14px 16px; margin-bottom:12px; }
.side h3 { font-size:13.5px; font-weight:700; margin:0 0 2px; letter-spacing:-0.01em; }
.side .sub { font-size:11.5px; color:var(--text-3); margin-bottom:8px; }
.dl { width:100%; border-collapse:collapse; font-size:12.5px; }
.dl td { padding:5px 0; border-top:1px solid var(--line); font-variant-numeric:tabular-nums; }
.dl tr:first-child td { border-top:0; }
.dl td.r { text-align:right; }
.dl tr.faint td { color:var(--text-3); }
.dl .mk { display:inline-block; width:7px; height:7px; transform:rotate(45deg); background:var(--ink-mark); margin-right:6px; vertical-align:1px; }
.dl .mk.hollow { background:transparent; border:1.3px solid var(--ink-mark); }
.dl .mk.faint { opacity:.35; }
.scroll-dl { max-height:236px; overflow:auto; margin-right:-8px; padding-right:8px; }
.bandbar { display:grid; grid-template-columns:42px 1fr 74px; gap:8px; align-items:center; font-size:12.5px; padding:4px 0; }
.notice { display:flex; gap:10px; padding:10px 12px; border-radius:9px; background:color-mix(in srgb,var(--warn) 13%, transparent); font-size:12.5px; align-items:flex-start; }
.notice .ic { flex:none; margin-top:1px; }

/* Drawer C */
#scrim { position:fixed; inset:0; background:var(--scrim); display:none; z-index:20; }
#drawer { position:fixed; top:0; right:0; bottom:0; width:452px; background:var(--surface); border-left:1px solid var(--line); box-shadow:var(--shadow-lg); z-index:21; transform:translateX(105%); transition:transform .22s cubic-bezier(.2,.8,.2,1); display:flex; flex-direction:column; }
body.drawer-open #drawer { transform:none; }
body.drawer-open #scrim { display:block; }
.dr-head { padding:18px 20px 14px; border-bottom:1px solid var(--line); }
.dr-body { padding:4px 20px 20px; overflow:auto; flex:1; }
.dr-sec { padding:14px 0; border-bottom:1px solid var(--line); }
.dr-sec:last-child { border-bottom:0; }
.dr-sec h4 { margin:0 0 8px; font-size:12.5px; color:var(--text-2); font-weight:600; }
.kv { display:grid; grid-template-columns:88px 1fr; row-gap:6px; font-size:13px; }
.kv .k { color:var(--text-2); }
.x { width:30px; height:30px; border-radius:8px; border:0; background:var(--surface-2); display:grid; place-items:center; }

/* ───────── 평면도 ───────── */
.th-plan { display:flex; flex-direction:column; align-items:flex-end; gap:3px; margin-top:4px; }
.plan-btn { gap:4px; }
.plan-img { background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px; }   /* 도면은 다크 모드에서도 흰 용지 그대로 */
.plan-img img { display:block; width:100%; height:auto; max-height:62vh; object-fit:contain; }
.plan-img.big img { max-height:min(70vh, 760px); }
.plan-none { padding:40px 16px; text-align:center; color:var(--text-3); font-size:13px; border:1px dashed var(--line-2); border-radius:10px; }
#plan-scrim { position:fixed; inset:0; background:var(--scrim); display:none; z-index:30; }
#plan { position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); width:min(1100px, calc(100vw - 48px)); max-height:calc(100vh - 48px); overflow:auto; display:none; z-index:31; padding:0; box-shadow:var(--shadow-lg); }
body.plan-open #plan-scrim { display:block; }
body.plan-open #plan { display:block; }
.plan-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px 16px 10px; }
.plan-tabs { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:0 16px 10px; }
#plan > .plan-img, #plan > .plan-side, #plan > .plan-none { margin:0 16px; }
.plan-side { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:12px; }
.plan-cell .plan-cap { font-size:12.5px; margin-bottom:4px; }
.plan-cell.cur .plan-cap b { text-decoration:underline; text-underline-offset:3px; }
.plan-cell .plan-img img { max-height:360px; }
.plan-nav { display:flex; align-items:center; justify-content:center; gap:14px; padding:12px 16px 4px; }
.dr-plan { padding:12px 0; border-bottom:1px solid var(--line); }
.dr-plan > summary { list-style:none; cursor:pointer; font-size:12.5px; color:var(--text-2); font-weight:600; display:flex; align-items:center; gap:6px; min-height:28px; }
.dr-plan > summary::-webkit-details-marker { display:none; }
.dr-plan > summary::after { content:""; margin-left:auto; width:7px; height:7px; border-right:1.5px solid var(--text-3); border-bottom:1.5px solid var(--text-3); transform:rotate(45deg); }
.dr-plan[open] > summary::after { transform:rotate(-135deg); }
.dr-plan[open] > summary { margin-bottom:8px; }

/* ───────── Screen D: feed ───────── */
.empty { padding:40px 40px 34px; text-align:center; }
.empty .ill { width:56px; height:56px; border-radius:14px; margin:0 auto 14px; background:var(--surface-3); display:grid; place-items:center; }
.empty h2 { font-size:19px; margin:0 0 6px; letter-spacing:-0.02em; }
.empty p { color:var(--text-2); margin:0 auto; max-width:520px; font-size:13.5px; }
.slots { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:24px; text-align:left; }
.slot { border:1px dashed var(--line-2); border-radius:10px; padding:12px 14px; }
.slot .t { font-weight:700; font-size:13px; display:flex; gap:6px; align-items:center; }
.slot .d { font-size:12px; color:var(--text-2); margin-top:4px; }
.slot .z { font-size:20px; font-weight:700; color:var(--text-3); margin-top:6px; }
.timeline { display:grid; gap:0; }
.tl { display:grid; grid-template-columns:110px 18px 1fr; gap:10px; padding:10px 0; }
.tl .dt { color:var(--text-2); font-size:12.5px; text-align:right; font-variant-numeric:tabular-nums; }
.tl .pin { width:10px; height:10px; border-radius:50%; background:var(--text); margin:4px auto 0; box-shadow:0 0 0 3px var(--surface); }
.tl .pin.future { background:transparent; border:1.5px dashed var(--line-2); }
.more-d > summary { list-style:none; cursor:pointer; padding:8px 0 8px 138px; font-size:12.5px; font-weight:600; color:var(--text-2); }
.more-d > summary::-webkit-details-marker { display:none; }
.more-d > summary::before { content:"▸ "; } .more-d[open] > summary::before { content:"▾ "; }

/* ───────── Screen E: add dialog ───────── */
#dlg-scrim { position:fixed; inset:0 0 0 212px; background:var(--scrim); z-index:10; display:none; }
#dlg { position:fixed; left:calc(212px + (100vw - 212px) / 2); top:40px; transform:translateX(-50%); width:min(920px, calc(100vw - 212px - 48px)); max-height:calc(100vh - 80px); flex-direction:column; z-index:11; display:none; padding:0; overflow:hidden; box-shadow:var(--shadow-lg); }
body.dlg-open #dlg-scrim { display:block; }
body.dlg-open #dlg { display:flex; }
.dlg-head { display:flex; align-items:center; padding:16px 20px; border-bottom:1px solid var(--line); }
.dlg-cols { display:grid; grid-template-columns:1fr 1fr; }
.dlg-col { padding:16px 20px 20px; }
.dlg-col + .dlg-col { border-left:1px solid var(--line); background:var(--surface-2); }
.search { display:flex; align-items:center; gap:8px; height:40px; padding:0 12px; border-radius:10px; border:1.5px solid var(--focus); background:var(--surface); font-size:14px; }
.search .caret { width:1.5px; height:18px; background:var(--text); margin-left:-6px; }
.res { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; padding:10px 4px; border-top:1px solid var(--line); }
.res:first-child { border-top:0; }
.res .n { font-weight:600; font-size:13.5px; display:flex; gap:6px; align-items:center; }
.res .a { font-size:12px; color:var(--text-2); }
.q { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:11px 12px; margin-top:8px; }
.q .top { display:flex; align-items:center; gap:8px; }
.q .n { font-weight:600; }
.prog { height:5px; background:var(--surface-3); border-radius:3px; margin-top:8px; overflow:hidden; }
.prog i { display:block; height:100%; background:var(--text); border-radius:3px; }
.status { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; }
.connbox { display:flex; gap:10px; align-items:center; padding:10px 12px; border-radius:10px; background:var(--surface); border:1px solid var(--line); }
/* v2.1: board sub-rows */
.expander { width:20px; height:20px; border-radius:6px; border:1px solid var(--line-2); background:var(--surface-2); display:inline-grid; place-items:center; color:var(--text-2); padding:0; margin-right:2px; }
.expander svg { transition:transform .15s; }
.expander.open svg { transform:rotate(90deg); }
.subwrap { background:var(--surface-2); border-top:1px solid var(--line); }
.subwrap[hidden] { display:none; }
.brow.sub { padding-top:9px; padding-bottom:9px; border-top:1px dashed var(--line); }
.brow.sub:first-child { border-top:0; }
.brow.sub .fig .v { font-size:15px; }
.brow.sub.zero { cursor:default; color:var(--text-3); }
.brow.sub.zero:hover { background:none; }
.subname { display:flex; gap:8px; align-items:flex-start; padding-left:8px; }
.elbow { width:12px; height:14px; border-left:1.5px solid var(--line-2); border-bottom:1.5px solid var(--line-2); border-bottom-left-radius:4px; margin-top:-2px; flex:none; }
.subnote { padding:6px 18px 10px 46px; }
/* type selector */
.tsel { margin-bottom:12px; }
.tsel-head { display:flex; align-items:center; gap:10px; padding:10px 14px; flex-wrap:wrap; }
.selsum { display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin-left:6px; }
.selchip { display:inline-flex; align-items:center; gap:2px; height:26px; padding:0 4px 0 10px; border-radius:7px; background:var(--btn-bg); color:var(--btn-fg); font-weight:700; font-size:12.5px; }
.selchip .c2 { color:inherit; opacity:.7; font-weight:500; }
.selchip button { border:0; background:none; color:inherit; opacity:.7; width:20px; height:20px; display:grid; place-items:center; padding:0; }
.tsel-body { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:4px 14px; padding:4px 14px 14px; border-top:1px solid var(--line); }
.tcol { display:flex; flex-direction:column; gap:3px; padding-top:10px; }
.tcap { display:flex; align-items:center; gap:7px; border:0; background:none; padding:3px 6px; font-size:12px; font-weight:700; color:var(--text-2); border-radius:6px; text-align:left; margin-bottom:2px; }
.tcap:hover { background:var(--surface-2); }
.tchip { display:grid; grid-template-columns:14px auto 1fr auto; gap:7px; align-items:center; border:1px solid transparent; background:var(--surface-2); padding:5px 8px; border-radius:7px; font-size:12px; text-align:left; white-space:nowrap; }
.tchip b { font-weight:700; font-size:12.5px; }
.tchip .n { font-variant-numeric:tabular-nums; color:var(--text-2); font-weight:600; }
.tchip:hover { border-color:var(--line-2); }
.tchip.on { border-color:var(--text); background:var(--surface); }
.tchip.zero { opacity:.5; }
.tchip.zero .n { font-weight:500; font-size:11px; }
.cb { width:14px; height:14px; border-radius:4px; border:1.5px solid var(--line-2); display:inline-block; position:relative; flex:none; }
.cb.on { background:var(--text); border-color:var(--text); }
.cb.on::after { content:""; position:absolute; left:3.5px; top:0.5px; width:4px; height:8px; border:solid var(--surface); border-width:0 1.8px 1.8px 0; transform:rotate(45deg); }
.cb.some::after { content:""; position:absolute; left:2px; right:2px; top:5px; height:1.6px; background:var(--text); }
/* comparison */
.cmp { padding:14px 16px 6px; margin-bottom:12px; }
.cmp-head { display:flex; align-items:baseline; gap:10px; margin-bottom:8px; }
.cmpline { display:flex; gap:8px; align-items:center; padding:8px 12px; border-radius:8px; background:var(--surface-2); font-size:13.5px; margin-bottom:8px; }
.ctable { width:100%; border-collapse:collapse; font-size:13px; }
.ctable th { text-align:right; padding:8px 12px; border-bottom:1px solid var(--line-2); vertical-align:bottom; }
.ctable td { text-align:right; padding:7px 12px; border-top:1px solid var(--line); font-variant-numeric:tabular-nums; vertical-align:top; }
.ctable tr:first-child td { border-top:0; }
.ctable td.lb { text-align:left; color:var(--text-2); width:190px; padding-left:0; }
.ctable th:first-child { padding-left:0; }
.ctable .cbig { font-size:16px; letter-spacing:-0.02em; }
.ctable .dcol { background:var(--surface-2); font-weight:600; color:var(--text); }
.ctable th.dcol { font-size:12px; color:var(--text-2); font-weight:600; border-top-left-radius:8px; border-top-right-radius:8px; }
.tbadge { display:inline-flex; align-items:center; height:20px; padding:0 7px; border-radius:5px; border:1px solid var(--line-2); font-size:11.5px; font-weight:700; color:var(--text); }
.lgroup { padding:10px 16px; font-weight:700; font-size:13.5px; background:var(--surface-2); border-top:1px solid var(--line); }
.lgroup:first-child { border-top:0; border-radius:12px 12px 0 0; }
.sortsel { position:relative; display:inline-flex; align-items:center; gap:8px; font-size:12.5px; }
.sortsel select { appearance:none; -webkit-appearance:none; font:inherit; font-weight:600; color:var(--text); background:var(--surface); border:1px solid var(--line-2); border-radius:8px; height:28px; padding:0 28px 0 10px; }
.sortsel svg { position:absolute; right:10px; pointer-events:none; color:var(--text-2); }
.sidetype { font-size:12px; font-weight:700; margin:10px 0 2px; padding-top:8px; border-top:1px solid var(--line); }
.sidetype:first-of-type { border-top:0; padding-top:0; }
/* ads in drawer */
/* 광고 목록은 하나의 그리드: 가격 칸 너비를 모든 줄이 공유해("33억 5,000 [최저]" 가 가장 넓으면 그에 맞춰)
   중개사 이름의 시작 위치가 줄마다 같다. 줄(.ad)은 display:contents 라 칸마다 위 선을 긋는다 */
.adlist { border:1px solid var(--line); border-radius:10px; max-height:420px; overflow:auto; display:grid; grid-template-columns:max-content minmax(0,1fr) auto; column-gap:10px; align-items:start; }
.ad { display:contents; }
.ad > * { border-top:1px solid var(--line); padding-top:7px; padding-bottom:7px; }
.ad > :first-child { padding-left:12px; } .ad > :last-child { padding-right:10px; }
.ad:first-child > * { border-top:0; }
.ad-p { font-weight:700; font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; display:flex; align-items:center; }
.ad-b { font-weight:600; font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ad-s { font-size:11.5px; color:var(--text-2); font-weight:500; }
.ad-f { font-size:11.5px; color:var(--text-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ad-l { font-size:11.5px; font-weight:600; color:var(--text-2); text-decoration:none; white-space:nowrap; display:inline-flex; gap:4px; align-items:center; padding:3px 6px; border-radius:6px; }
.ad-l:hover { color:var(--text); }
.ad-l:hover { background:var(--surface-2); }

/* ───────── v2 app additions (real data, states) ───────── */
.nav-cx .dot.part { background:var(--warn); }
.nav-cx .dot.run { background:var(--s-base); box-shadow:0 0 0 3px color-mix(in srgb,var(--s-base) 25%, transparent); }
.nav-cx.on { background:var(--surface-3); color:var(--text); font-weight:600; }
.nav-cx .nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.conn .ic.off { background:color-mix(in srgb,var(--crit) 16%, transparent); }
.conn .ic.unk { background:var(--surface-3); }
.spin { display:inline-block; width:10px; height:10px; border-radius:50%; border:2px solid var(--line-2); border-top-color:var(--text); animation:spin .8s linear infinite; flex:none; }
@keyframes spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation:none; } #drawer { transition:none; } }
.search:focus-within { box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 22%, transparent); }
.search { border-color:var(--line-2); }
.search:focus-within { border-color:var(--focus); }
.search input { flex:1; min-width:0; border:0; outline:0; background:none; font:inherit; color:var(--text); height:100%; }
.search input::placeholder { color:var(--text-3); }
.dlg-cols { min-height:0; flex:1; overflow:auto; }
.dlg-col { min-width:0; }
.notice.crit { background:color-mix(in srgb,var(--crit) 12%, transparent); }
.notice.info { background:var(--surface-2); border:1px solid var(--line); }
.res-empty { padding:18px 4px; color:var(--text-2); font-size:12.5px; }
.wl-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:6px; align-items:center; padding:8px 0; border-top:1px solid var(--line); }
.wl-row:first-child { border-top:0; }
.wl-row .n { font-weight:600; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.q.done { opacity:.75; }
.q .err { color:var(--crit-text); }
.brow .runcell { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-2); }
.loading { padding:40px; text-align:center; color:var(--text-2); }
#toast { position:fixed; left:calc(212px + (100vw - 212px) / 2); bottom:24px; transform:translateX(-50%) translateY(20px); opacity:0; pointer-events:none; background:var(--btn-bg); color:var(--btn-fg); padding:9px 14px; border-radius:9px; font-size:12.5px; font-weight:600; box-shadow:var(--shadow-lg); transition:opacity .18s, transform .18s; z-index:40; }
#toast.on { opacity:1; transform:translateX(-50%); }
.fchip .x-in { display:inline-grid; place-items:center; width:16px; height:16px; margin-right:-4px; opacity:.75; }
.feed-sec { padding:14px 18px; margin-bottom:12px; }
.feed-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) minmax(0,1.1fr) minmax(0,1.1fr); gap:12px; margin-top:10px; }
.feed-col h4 { margin:0 0 6px; font-size:12.5px; display:flex; gap:6px; align-items:center; }
.feed-item { font-size:12.5px; padding:5px 0; border-top:1px solid var(--line); display:flex; gap:6px; justify-content:space-between; font-variant-numeric:tabular-nums; }
.feed-item:first-of-type { border-top:0; }
a.btn { text-decoration:none; }
:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.search input::-webkit-search-cancel-button { -webkit-appearance:none; display:none; }
.feed-item .fl { min-width:0; word-break:keep-all; overflow-wrap:anywhere; }
.feed-item .fv { flex:none; white-space:nowrap; display:inline-flex; gap:6px; align-items:center; }
.nav-list { flex:1 1 auto; min-height:0; overflow:auto; margin:0 -4px; padding:0 4px 8px; }
#nav { min-height:0; overflow:hidden; }
.nav-foot { flex:none; margin-top:0; }
