/* ───────────────────────────────────────────────
   청약 알리미 — 디자인 토큰
   ─────────────────────────────────────────────── */
:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #edf0f3;
  --line: #e6e9ed;
  --line-strong: #d3d8de;
  --text: #17202a;
  --text-2: #4a5562;
  --muted: #7c8793;
  --accent: #0d7a6f;
  --accent-hover: #0a685e;
  --accent-soft: #e4f3f0;
  --accent-ink: #ffffff;
  --hero-a: #0d7a6f;
  --hero-b: #0f5d73;
  --info: #2459d6;
  --info-soft: #e9effd;
  --good: #11805a;
  --good-soft: #e5f5ed;
  --warn: #9e5b00;
  --warn-soft: #fff2dc;
  --bad: #cf3329;
  --bad-soft: #fdebea;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-2: 0 6px 16px rgba(16, 24, 40, .06), 0 16px 40px rgba(16, 24, 40, .08);
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1214;
    --surface: #171b1e;
    --surface-2: #1c2125;
    --surface-3: #242a2f;
    --line: #2a3136;
    --line-strong: #39424a;
    --text: #eef1f4;
    --text-2: #b9c2cb;
    --muted: #8893a0;
    --accent: #30bfae;
    --accent-hover: #46cdbd;
    --accent-soft: #15342f;
    --accent-ink: #04201c;
    --hero-a: #0f5f57;
    --hero-b: #123f50;
    --info: #85a8ff;
    --info-soft: #1b2643;
    --good: #5fd39a;
    --good-soft: #143223;
    --warn: #f3ba5c;
    --warn-soft: #382a11;
    --bad: #ff8b80;
    --bad-soft: #3c1c19;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 8px 28px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  word-break: keep-all;          /* 한글 단어 중간 줄바꿈 방지 */
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.pos { color: var(--good); }
.neg { color: var(--bad); }
b.good { color: var(--good); }
b.warn { color: var(--warn); }
b.bad { color: var(--bad); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* 아이콘 */
.ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 16px; height: 16px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 버튼 ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.tonal { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn.tonal:hover { background: color-mix(in srgb, var(--accent-soft) 80%, var(--accent) 20%); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.on-accent { background: #fff; color: #0d5f57; border-color: transparent; }
.btn.on-accent:hover { background: #f1f7f6; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.lg { min-height: 52px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); }

/* ── 상단 바 ─────────────────────────── */
.appbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.appbar-in { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
.brand-text span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-actions { display: flex; gap: 6px; flex-shrink: 0; }

.page { max-width: 1200px; margin: 0 auto; padding: 20px 24px 48px; }

/* ── 알림 배너 ───────────────────────── */
.banners { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.banners:empty { display: none; }
.banner {
  display: flex; align-items: center; gap: 10px 12px; padding: 12px 14px 12px 16px; flex-wrap: wrap;
  border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-size: 14px; line-height: 1.5;
}
.banner .ic { color: currentColor; }
.banner > span { flex: 1 1 220px; min-width: 0; }
.banner b { font-weight: 700; }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.info { background: var(--info-soft); color: var(--info); }

/* ── 오늘 요약 (히어로) ───────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin-bottom: 28px; }
.today {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--hero-a), var(--hero-b));
  color: #fff; border-radius: var(--r-xl); padding: 22px 24px 20px;
  box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 14px;
}
.today::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%); pointer-events: none;
}
.today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.today-head .label { font-size: 14px; font-weight: 600; opacity: .85; }
.today-head .big { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.today-head .big small { font-size: 18px; font-weight: 700; margin-left: 2px; opacity: .85; }
.today-date { font-size: 13px; opacity: .8; }
.today-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.today-list li {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .13); backdrop-filter: blur(2px);
}
.today-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.today-list b { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-list span { font-size: 13px; opacity: .85; }
.today-empty { font-size: 15px; line-height: 1.6; opacity: .95; position: relative; z-index: 1; }
.today-empty b { font-weight: 700; }
.today .btn.on-accent { align-self: flex-start; position: relative; z-index: 1; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  cursor: pointer; text-align: left; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s;
}
.kpi:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.kpi .k { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi.hot .v { color: var(--accent); }

/* ── 목록 바: 탭 + 도구 ──────────────── */
.listbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 14px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 11px; background: transparent; color: var(--text-2);
  font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap;
}
.tab .ic { width: 18px; height: 18px; }
.tab .cnt {
  min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface); color: var(--muted);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums;
}
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.tab.active .cnt { background: var(--accent); color: var(--accent-ink); }
.tab .l-short { display: none; }
.listbar-tools { display: flex; gap: 8px; align-items: center; flex: 1; justify-content: flex-end; min-width: 0; }
.field-ctl {
  height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  padding: 0 12px; color: var(--text); font-size: 14.5px;
}
select.field-ctl { padding-right: 30px; cursor: pointer; }
.search { position: relative; flex: 0 1 280px; min-width: 0; }
.search .ic { position: absolute; left: 12px; top: 12px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; padding-left: 40px; }

/* ── 공고 카드 ───────────────────────── */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ncard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  box-shadow: var(--shadow-1); cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .15s;
}
.ncard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.ncard:active { transform: scale(.995); }
.ncard.dim { opacity: .66; }
.ncard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.ncard-top > div:not(.ring) { min-width: 0; flex: 1; }
.ncard h3 { font-size: 18.5px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.35; margin: 8px 0 3px; }
.ncard .sub { font-size: 13.5px; color: var(--text-2); }

.when {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text-2);
}
.when::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.when.is-today { background: var(--accent); color: var(--accent-ink); }
.when.is-open { background: var(--accent-soft); color: var(--accent); }
.when.is-upcoming { background: var(--info-soft); color: var(--info); }
.when.is-closed, .when.is-unknown { background: var(--surface-3); color: var(--muted); }
.tagline { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.tagline span + span::before { content: "·"; margin-right: 10px; color: var(--line-strong); }
.tagline .new { color: var(--bad); font-weight: 700; }
.tagline .mine { color: var(--accent); font-weight: 700; }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface-2); border-radius: var(--r-md); padding: 12px 4px; }
.fact { padding: 0 12px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.fact .v { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.fact .v.good { color: var(--good); } .fact .v.warn { color: var(--warn); } .fact .v.bad { color: var(--bad); } .fact .v.dim { color: var(--muted); font-weight: 600; }

.alert-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--warn); }
.alert-line.bad { color: var(--bad); }
.alert-line.good { color: var(--good); }
.alert-line .ic { width: 17px; height: 17px; margin-top: 2px; }

.ncard-foot { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ncard-foot .quiet-select { min-width: 0; max-width: 100%; }
.ncard-foot .grow { flex: 1; }
.quiet-select {
  height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-2);
  padding: 0 28px 0 10px; font-size: 13.5px; cursor: pointer;
}

/* 점수 링 */
.ring { position: relative; width: var(--s, 48px); height: var(--s, 48px); flex: 0 0 var(--s, 48px); display: grid; place-items: center; }
.ring svg { width: 100%; height: 100%; }
.ring svg { position: absolute; inset: 0; }
.ring .trk { fill: none; stroke: var(--surface-3); stroke-width: 5; }
.ring .val { fill: none; stroke: var(--muted); stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray .4s; }
.ring.hi .val { stroke: var(--accent); }
.ring.mid .val { stroke: var(--info); }
.ring b { position: relative; font-size: calc(var(--s, 48px) * .34); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ring small { position: absolute; bottom: -16px; font-size: 11px; color: var(--muted); white-space: nowrap; }

.empty {
  grid-column: 1 / -1; text-align: center; padding: 56px 20px; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); line-height: 1.7;
}
.empty b { color: var(--text); display: block; font-size: 16px; margin-bottom: 4px; }
.foot { color: var(--muted); font-size: 12.5px; margin-top: 28px; text-align: center; line-height: 1.7; }

/* ── 내 자격 ─────────────────────────── */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pcard.wide { grid-column: 1 / -1; }
.pcard h3 { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.pcard .hint { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pcard-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bignum { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; color: var(--accent); line-height: 1; }
.bignum small { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; }
.meter { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.meter .bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.meter b { font-variant-numeric: tabular-nums; }
.elig { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.elig li { display: grid; grid-template-columns: 92px auto 1fr; gap: 10px; align-items: baseline; font-size: 14px; }
.elig li b { font-weight: 700; }
.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.no { background: var(--surface-3); color: var(--muted); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* ── 상세 시트 ───────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(9, 13, 16, .42); z-index: 20; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 21; width: min(620px, 100vw);
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(104%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, .18);
}
.sheet.open { transform: none; }
.sheet-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 20px 18px; }
.sheet-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sheet-title { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.sheet-title h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.3; }
.sheet-title .sub { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.sheet-foot {
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px;
}
.sheet-foot .info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.sheet-foot .info b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-foot .info span { font-size: 13px; color: var(--muted); }
.sheet-foot .btn.lg { min-width: 180px; }

.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.sec > h4 { font-size: 14px; font-weight: 700; color: var(--text-2); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec > h4 .aside { font-weight: 500; color: var(--muted); font-size: 13px; }

.seg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.seg button {
  min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; padding: 0 6px;
}
.seg button.on { background: var(--text); color: var(--surface); border-color: var(--text); }

.notes { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.note { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; color: var(--text-2); }
.note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; transform: translateY(-1px); background: var(--line-strong); }
.note.good { color: var(--good); } .note.good::before { background: var(--good); }
.note.warn { color: var(--warn); } .note.warn::before { background: var(--warn); }
.note.fail { color: var(--muted); } .note.fail::before { background: var(--muted); }

.keyfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kf { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kf .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kf .v { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kf .d { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.kf .v.good { color: var(--good); } .kf .v.warn { color: var(--warn); } .kf .v.bad { color: var(--bad); } .kf .v.dim { color: var(--muted); font-size: 15px; }
.meters { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

/* 주택형 옵션 */
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; min-height: 58px;
  transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--line-strong); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; grid-row: span 2; }
.opt .t { font-weight: 750; font-size: 16px; letter-spacing: -0.02em; }
.opt .t small { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 6px; }
.opt .p { font-weight: 750; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.opt .s { grid-column: 2 / 4; font-size: 12.5px; color: var(--text-2); }
.opt .s .w { color: var(--warn); }
.opt.off { opacity: .55; }
.opt.off .t::after { content: "조건 밖"; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-3); padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }

/* 일정 타임라인 */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; font-size: 14.5px; }
.tl li::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl li:first-child::before { top: 50%; }
.tl li:last-child::before { bottom: 50%; }
.tl .dot { position: relative; z-index: 1; width: 12px; height: 12px; margin-left: 5px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.tl .when-txt { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.tl li.past { color: var(--muted); }
.tl li.past .dot { background: var(--line-strong); border-color: var(--line-strong); }
.tl li.mine .dot { border-color: var(--accent); background: var(--accent); }
.tl li.mine b { color: var(--accent); }
.tl li.now .dot { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); }
.tl .tagm { font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 6px; margin-left: 6px; }

/* 체크리스트 */
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.progress > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 8px 4px; border-radius: 10px; }
.checklist label:hover { background: var(--surface-2); }
.checklist input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.checklist .t { font-weight: 650; font-size: 14.5px; }
.checklist .d { color: var(--muted); font-size: 13px; line-height: 1.5; }
.checklist input:checked + div .t { text-decoration: line-through; color: var(--muted); }

details.prompt-box { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
details.prompt-box > summary { list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 650; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
details.prompt-box > summary::-webkit-details-marker { display: none; }
details.prompt-box > summary::after { content: "펼치기"; font-size: 12.5px; color: var(--muted); font-weight: 500; }
details.prompt-box[open] > summary::after { content: "접기"; }
details.prompt-box textarea {
  display: block; width: calc(100% - 28px); margin: 0 14px 14px; min-height: 240px; resize: vertical;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 12px; font-size: 13px; line-height: 1.6;
}
.linkrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ── 다이얼로그 ──────────────────────── */
.modal {
  width: min(780px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 0; border-radius: var(--r-xl); background: var(--bg); color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28); overflow: hidden;
}
.modal.compact { width: min(480px, calc(100vw - 32px)); background: var(--surface); }
.modal::backdrop { background: rgba(9, 13, 16, .5); backdrop-filter: blur(2px); }
.modal form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-head, .modal-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--surface); }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.modal-foot { border-top: 1px solid var(--line); justify-content: flex-end; gap: 8px; }
.modal-body { overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }

fieldset { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 16px 18px 18px; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { font-weight: 800; font-size: 15px; padding: 0 6px; letter-spacing: -0.02em; }
legend em { font-weight: 500; color: var(--muted); font-style: normal; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; min-width: 0; }
.field > span { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.field input, .field select, .field textarea {
  min-height: 44px; padding: 8px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); width: 100%; font-weight: 500; font-size: 15px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; }
.field small { color: var(--good); font-weight: 500; }
.field code { background: var(--surface-3); padding: 0 5px; border-radius: 5px; font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; align-items: end; }
.formgrid .wide { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14.5px; cursor: pointer; min-height: 40px; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text-2); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.remote-info { font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border-radius: 11px; padding: 10px 12px; }
.remote-only { display: none; }
.is-remote .pc-only { display: none; }
.is-remote .remote-only { display: block; }

/* 7. 휴대폰 앱 접속 */
.rbox { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--text-2); }
.rurl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.rurl a { font-weight: 700; color: var(--accent); word-break: break-all; text-decoration: none; }
.rurl .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; width: 100%; }
.rstate { display: flex; gap: 6px; flex-wrap: wrap; }
.rstate .pill { font-size: 12.5px; padding: 4px 10px; }
.rnote { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.rnote.warn { background: var(--warn-soft); color: var(--warn); border-radius: 11px; padding: 10px 12px; }
.rnote code { background: var(--surface-3); padding: 0 5px; border-radius: 5px; color: var(--text); }
.rbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.rdev { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rdev li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; background: var(--surface-2); border-radius: 9px; }
.rdev li span:last-child { color: var(--muted); white-space: nowrap; }

/* 외부 접속 로그인 화면 */
body.locked { overflow: hidden; }
.gate {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px 16px;
  background: var(--bg); overflow-y: auto;
}
.gate[hidden] { display: none; }
.gate-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-2); padding: 30px 24px 24px; display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.gate-mark { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 2px; }
.gate-card h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; margin: 0; }
.gate-card > p { font-size: 14px; color: var(--text-2); line-height: 1.6; margin: 0; }
.gate-card .field { text-align: left; }
.gate-card .field input { height: 50px; font-size: 17px; }
.gate-err { font-size: 13.5px; color: var(--bad); background: var(--bad-soft); border-radius: 10px; padding: 8px 10px; margin: 0; }
.gate-card .btn.lg { width: 100%; }
.gate.nopw .field, .gate.nopw #loginBtn { display: none; }
.gate:not(.nopw) #gateRetry { display: none; }

/* 신청 안내 */
.dlg { padding: 24px 22px 18px; display: flex; flex-direction: column; gap: 18px; }
.dlg-head { display: flex; flex-direction: column; gap: 6px; }
.dlg-badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.dlg-badge .ic { width: 24px; height: 24px; }
.dlg-head h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.035em; }
.dlg-head p { font-size: 14px; color: var(--text-2); }
.steps-big { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps-big li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.steps-big .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--surface); font-weight: 800; font-size: 14px; }
.steps-big li > div { display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.steps-big b { font-size: 15.5px; font-weight: 700; }
.steps-big span { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
kbd {
  display: inline-block; min-width: 24px; padding: 1px 7px; border-radius: 7px; border: 1px solid var(--line-strong);
  border-bottom-width: 2px; background: var(--surface-2); font: 600 12.5px/1.6 var(--font); color: var(--text); text-align: center;
}
.dlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dlg-actions .full { grid-column: 1 / -1; }

/* ── 토스트 ──────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60;
  background: #1d252c; color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14.5px; font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25); max-width: calc(100vw - 32px); animation: rise .2s;
}
.toast.bad { background: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ── 반응형 ──────────────────────────── */
@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
}
@media (display-mode: standalone) {
  .appbar-in { padding-top: max(12px, env(safe-area-inset-top)); }
}
@media (max-width: 600px) {
  body { font-size: 15px; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .appbar-in { padding: 10px 16px; }
  .brand-mark { width: 32px; height: 32px; }
  .appbar-actions .btn .lbl { display: none; }
  .appbar-actions .btn { width: 44px; padding: 0; }
  .page { padding: 14px 16px 32px; }
  .hero { gap: 12px; margin-bottom: 20px; }
  .today { padding: 18px 18px 16px; border-radius: 22px; }
  .today-head .big { font-size: 34px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 10px; border-radius: 14px; gap: 2px; }
  .kpi .k { font-size: 11.5px; line-height: 1.3; }
  .kpi .v { font-size: 22px; }
  .kpi .v small { font-size: 12px; }
  .listbar { margin-bottom: 12px; }
  .listbar-tools { width: 100%; }
  .search { flex: 1; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-radius: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .tab { flex-direction: column; gap: 2px; min-height: 52px; padding: 4px 2px; font-size: 12px; border-radius: 12px; position: relative; }
  .tab .ic { width: 22px; height: 22px; }
  .tab .l-long { display: none; }
  .tab .l-short { display: inline; }
  .tab .cnt { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; line-height: 17px; font-size: 10.5px; padding: 0 5px; background: var(--surface-3); }
  .tab.active { background: transparent; box-shadow: none; color: var(--accent); }
  .ncard { padding: 16px 16px 12px; gap: 12px; }
  .ncard h3 { font-size: 17.5px; }
  .facts { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .fact:nth-child(3) { border-left: 0; }
  .sheet { width: 100vw; transform: translateY(104%); }
  .sheet.open { transform: none; }
  .sheet-head { padding: max(10px, env(safe-area-inset-top)) 16px 14px; }
  .sheet-title h2 { font-size: 20px; }
  .sheet-body { padding: 12px 14px 24px; }
  .sheet-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .sheet-foot .btn.lg { min-width: 150px; }
  .seg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid2, .formgrid, .cols2 { grid-template-columns: 1fr; }
  .modal { inset: 0; margin: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal form { max-height: 100dvh; height: 100%; }
  .modal.compact {
    top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-width: 100%; height: auto; max-height: 92dvh;
    border-radius: 22px 22px 0 0; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom);
  }
  .elig li { grid-template-columns: 80px auto; }
  .elig li span:last-child { grid-column: 1 / -1; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
