/* Values come from design-tokens.json (measured, not official). 1dp = 1px here; phone is 384dp wide. */
:root {
  --primary: #2b61c1;
  --primary-soft: #edf3fc;
  --surface: #f8f8f9;
  --page: #ffffff;
  --ink: #1b1f27;
  --ink-sub: #667799;
  --line: #e6e8ee;
  --radius: 16px;
  --nav-h: 64px;
  --btn-h: 52px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #14161b; color: var(--ink); font: 16px/1.4 "Pretendard Variable", Pretendard, Inter, "Noto Sans KR", system-ui, sans-serif; }
#stage { display: flex; justify-content: center; align-items: flex-start; padding: 16px; height: 100%; }
#phone { position: relative; width: 384px; max-width: 100%; height: min(832px, calc(100vh - 32px)); background: var(--page); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 8px 40px #0008; }
#screen { flex: 1; overflow-y: auto; }
#nav { height: var(--nav-h); display: flex; border-top: 1px solid var(--line); background: var(--page); }
#nav[hidden] { display: none; } /* display:flex above would otherwise defeat the hidden attribute */
#nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 0 2px; border: 0; background: none; font: inherit; font-size: 12px; color: #8b93a3; cursor: pointer; }
.nav-ic-wrap { position: relative; display: block; line-height: 0; }
.nav-ic svg { display: block; }
.nav-dot { position: absolute; top: -2px; right: -5px; width: 8px; height: 8px; border-radius: 50%; background: #ee4b4b; }
#nav button[aria-current="true"] { color: var(--ink); font-weight: 700; }
@media (max-width: 759px) {
  #stage { padding-inline: 0; }
}

.screen-title { margin: 0; padding: 20px 20px 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.pad { padding: 0 20px 20px; }
.btn { display: block; width: 100%; height: var(--btn-h); border: 0; border-radius: 12px; background: var(--primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.btn.ghost { background: var(--primary-soft); color: var(--primary); }
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; font: inherit; color: inherit; }
.row small { color: var(--ink-sub); display: block; }
.row-activity { padding: 10px 0; }
.row-thumb { flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: var(--surface); display: block; }
.row-thumb svg { display: block; width: 100%; height: 100%; }
.row-text { flex: 1; min-width: 0; }
.row-text small { margin-bottom: 4px; }
.row .row-meta { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.row-chevron { flex: none; width: 9px; height: 9px; margin-right: 6px; border-top: 2px solid #8a93a6; border-right: 2px solid #8a93a6; transform: rotate(45deg); }
.chips { display: flex; gap: 8px; padding: 8px 20px; overflow-x: auto; }
.chip { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--surface); font: inherit; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 12px 12px 0; }
.topbar button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border: 0; background: none; font-size: 22px; color: var(--ink); cursor: pointer; }
.topbar-arrow { display: block; width: 11px; height: 11px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; border-radius: 1px; transform: translateX(2px) rotate(45deg); }
