:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #111418;
  --muted: #5b6470;
  --line: #e3e6ea;
  --accent: #2456d6;
  --on-accent: #ffffff;
  --up: #d92d20;
  --down: #1d5fd6;
  --ok-bg: #e6f6ec;  --ok: #16794a;
  --bad-bg: #fdecec; --bad: #b42318;
  --warn-bg: #fff5d6; --warn: #8a5a00;
  --info-bg: #e8efff; --info: #2456d6;
  --neutral-bg: #eef0f3; --neutral: #3d4450;
  --grade-a: #1e3a8a; --grade-b: #2f5fb3; --grade-c: #5b7fa6; --grade-d: #8a94a3;
  --skel: #e7eaee; --skel-hi: #f3f5f7;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  --backdrop: rgba(10, 12, 16, .45);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --card: #181b21;
    --text: #eef1f5;
    --muted: #9aa4b2;
    --line: #2a2f38;
    --accent: #7ea2ff;
    --on-accent: #0f1115;
    --up: #ff6b61;
    --down: #6fa0ff;
    --ok-bg: #12301f;  --ok: #5fd394;
    --bad-bg: #3a1715; --bad: #ff8a80;
    --warn-bg: #3a2e0c; --warn: #ffd166;
    --info-bg: #16213b; --info: #9db8ff;
    --neutral-bg: #242933; --neutral: #d3d9e2;
    --skel: #20242c; --skel-hi: #2a2f38;
    --shadow: none;
    --backdrop: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115;
  --card: #181b21;
  --text: #eef1f5;
  --muted: #9aa4b2;
  --line: #2a2f38;
  --accent: #7ea2ff;
  --on-accent: #0f1115;
  --up: #ff6b61;
  --down: #6fa0ff;
  --ok-bg: #12301f;  --ok: #5fd394;
  --bad-bg: #3a1715; --bad: #ff8a80;
  --warn-bg: #3a2e0c; --warn: #ffd166;
  --info-bg: #16213b; --info: #9db8ff;
  --neutral-bg: #242933; --neutral: #d3d9e2;
  --skel: #20242c; --skel-hi: #2a2f38;
  --shadow: none;
  --backdrop: rgba(0, 0, 0, .6);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: var(--fs-6);
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-4); }
.xsmall { font-size: var(--fs-2); }
.up { color: var(--up); }
.down { color: var(--down); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.demo-band {
  background: var(--warn-bg);
  color: var(--warn);
  border-bottom: 3px dashed var(--warn);
  padding: 12px 16px;
  text-align: center;
}
.demo-band strong { display: block; font-size: var(--fs-8); line-height: 1.3; }
.demo-band p { font-size: var(--fs-4); margin-top: 4px; }
.demo-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.demo-links a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--warn); color: var(--warn);
  text-decoration: none; font-size: var(--fs-3); font-weight: 600;
}
.demo-links a[aria-current="true"] { background: var(--warn); color: var(--warn-bg); }
.demo-tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn);
  font-size: var(--fs-1); font-weight: 600; vertical-align: middle;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 480px; margin: 0 auto; min-height: 56px;
  display: flex; align-items: center; gap: 2px; padding: 0 6px 0 12px;
}
body.is-wide .topbar-inner { max-width: 720px; }
.top-title { flex: 1; min-width: 0; font-size: var(--fs-8); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 44px; height: 44px; padding: 0 8px; border: 0; border-radius: 12px;
  background: transparent; color: var(--text);
}
.icon-btn:hover { background: var(--neutral-bg); }
.icon-btn svg { width: 24px; height: 24px; }
#btn-back { margin-left: -8px; }
.icon-btn .ib-text { font-size: var(--fs-4); font-weight: 600; }
.spin svg { animation: spin .8s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.view {
  max-width: 480px; margin: 0 auto;
  padding: 12px 16px calc(96px + env(safe-area-inset-bottom));
  outline: none;
}
body.is-wide .view { max-width: 720px; }
.subhead { color: var(--muted); font-size: var(--fs-4); margin: 4px 0 8px; }
.intro-sub { color: var(--muted); margin: 4px 0 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: var(--shadow);
}
.card-h { font-size: var(--fs-7); font-weight: 600; margin-bottom: 8px; }
.sec-h { font-size: var(--fs-6); font-weight: 600; margin: 20px 0 8px; }
.sec-h small, .card-h small { font-weight: 400; color: var(--muted); font-size: var(--fs-3); }
.band {
  display: flex; align-items: flex-start; gap: 6px;
  border-radius: 12px; padding: 12px 14px; margin: 8px 0;
  font-weight: 600; font-size: var(--fs-5);
}
.band > .band-text { flex: 1; min-width: 0; }
.band-sub { display: block; font-weight: 400; font-size: var(--fs-4); margin-top: 2px; }
.band-ok { background: var(--ok-bg); color: var(--ok); }
.band-warn { background: var(--warn-bg); color: var(--warn); }
.band-bad { background: var(--bad-bg); color: var(--bad); }
.band-info { background: var(--info-bg); color: var(--info); }
.band-neutral { background: var(--neutral-bg); color: var(--neutral); }
.band .ib { color: inherit; }
.ib {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin: -6px -2px -6px 0; padding: 0;
  border: 0; background: transparent; color: var(--accent);
  vertical-align: middle; position: relative; flex: none;
}
.ib::after { content: ""; position: absolute; inset: -6px; }
.ib span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid currentColor; font-size: var(--fs-1); font-weight: 600; line-height: 1;
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 32px; padding: 4px 12px; border-radius: 999px;
  background: var(--neutral-bg); color: var(--neutral);
  font-size: var(--fs-4); font-weight: 600;
}
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-info { background: var(--info-bg); color: var(--info); }
.mark {
  display: inline-block; padding: 2px 8px; margin: 4px 4px 0 0; border-radius: 8px;
  background: var(--neutral-bg); color: var(--neutral); font-size: var(--fs-2);
}
.jbadge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 10px; font-size: var(--fs-3); font-weight: 600; line-height: 1.35;
}
.j-ok { background: var(--ok-bg); color: var(--ok); }
.j-bad { background: var(--bad-bg); color: var(--bad); }
.j-warn { background: var(--warn-bg); color: var(--warn); }
.j-info { background: var(--info-bg); color: var(--info); }
.j-neutral { background: var(--neutral-bg); color: var(--neutral); }
.code { color: var(--muted); font-weight: 400; font-size: var(--fs-3); font-variant-numeric: tabular-nums; }
.gbadge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 6px; border-radius: 10px;
  color: #fff; font-weight: 600; font-size: var(--fs-8); line-height: 1;
  border: 1px solid var(--line);
}
.g-A { background: var(--grade-a); }
.g-B { background: var(--grade-b); }
.g-C { background: var(--grade-c); }
.g-D { background: var(--grade-d); }
.g-x { background: var(--neutral-bg); color: var(--muted); }
.gbadge.lg { min-width: 3.25rem; height: 3.25rem; font-size: var(--fs-10); border-radius: 14px; }
.hero-label { font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 2px; }
.hero-num { font-size: 2.5rem; font-weight: 600; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; }
.hero-num small { font-size: var(--fs-8); font-weight: 600; margin-left: 2px; }
.hero-empty { font-size: var(--fs-7); font-weight: 600; margin-top: 4px; }
.rule { margin-top: 12px; color: var(--muted); font-size: var(--fs-4); }
.auto-note { font-size: var(--fs-2); color: var(--muted); margin-top: 6px; }
.stock { cursor: pointer; }
.stock:hover { border-color: var(--accent); }
.stock-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stock-name { font-size: var(--fs-7); line-height: 1.3; min-width: 0; }
.stock-name b { font-weight: 600; }
.stock-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 4px; }
.flu { font-size: var(--fs-10); font-weight: 600; font-variant-numeric: tabular-nums; }
.kv { margin: 6px 0 0; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.kv dt { color: var(--muted); font-size: var(--fs-4); display: inline-flex; align-items: center; }
.kv dd { margin: 0 0 0 auto; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.kv dd .muted { font-weight: 400; }
.stock-more { display: flex; justify-content: flex-end; margin-top: 4px; }
.link-btn {
  border: 0; background: transparent; color: var(--accent); font-weight: 600;
  min-height: 44px; padding: 0 4px;
}
.after-close { margin-top: 8px; font-weight: 600; }
.fold { padding: 0; }
.fold > summary {
  list-style: none; cursor: pointer; padding: 14px 16px; min-height: 52px;
  display: flex; flex-direction: column; gap: 2px; font-weight: 600;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .sum-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fold > summary .sum-row::after { content: "▾"; color: var(--muted); transition: transform .15s; }
.fold[open] > summary .sum-row::after { transform: rotate(180deg); }
.fold > summary .sum-sub { font-weight: 400; font-size: var(--fs-3); color: var(--muted); }
.fold-body { padding: 0 16px 16px; }
.fold-h { font-size: var(--fs-5); font-weight: 600; margin: 12px 0 4px; display: flex; align-items: center; }
.row-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent;
  min-height: 52px; padding: 8px 0;
}
.row-btn .rb-name { min-width: 0; }
.row-btn .rb-val { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-line { color: var(--muted); padding: 8px 0; font-size: var(--fs-4); }
.state { text-align: center; padding: 28px 20px; }
.state-emoji { font-size: 2.25rem; line-height: 1; margin-bottom: 8px; }
.state h2 { font-size: var(--fs-8); font-weight: 600; margin-bottom: 6px; }
.state p { color: var(--muted); }
.state .hint { margin-top: 8px; font-size: var(--fs-4); }
.state .btn-row { justify-content: center; }
.state-warn { background: var(--warn-bg); border-color: transparent; }
.state-warn h2, .state-warn p { color: var(--warn); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-weight: 600; text-decoration: none; font-size: var(--fs-5);
}
.btn:hover { border-color: var(--accent); }
.btn-primary {
  width: 100%; min-height: 56px; border: 0; border-radius: 14px;
  background: var(--accent); color: var(--on-accent);
  font-size: var(--fs-7); font-weight: 600;
}
.btn-primary:disabled { background: var(--neutral-bg); color: var(--muted); cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-row .btn { flex: 1 1 140px; }
.loading-text { color: var(--muted); font-weight: 600; margin: 8px 0; }
.skel {
  border-radius: 16px; margin: 12px 0;
  background: linear-gradient(90deg, var(--skel) 25%, var(--skel-hi) 50%, var(--skel) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}
.h-hero { height: 136px; }
.h-card { height: 112px; }
.h-line { height: 20px; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.wait-step { font-size: var(--fs-7); font-weight: 600; margin-top: 4px; }
.search { position: relative; }
.search input {
  width: 100%; height: 56px; padding: 0 48px 0 16px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--card);
  font-size: var(--fs-7);
}
.search input:focus { border-color: var(--accent); outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear {
  position: absolute; right: 4px; top: 6px; width: 44px; height: 44px;
  border: 0; background: transparent; color: var(--muted); font-size: var(--fs-9); border-radius: 10px;
}
.search-status { font-size: var(--fs-3); color: var(--muted); margin: 8px 2px; }
.recent { margin-top: 12px; }
.recent-h { display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--muted); font-size: var(--fs-4); }
.recent-h button { border: 0; background: transparent; color: var(--muted); font-size: var(--fs-2); min-height: 40px; text-decoration: underline; }
.chip-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-weight: 600;
}
.chip-btn:hover { border-color: var(--accent); }
.sugg-list { margin-top: 8px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.sugg-list:empty { display: none; }
.sugg {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start;
  text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent;
  min-height: 56px; padding: 8px 16px;
}
.sugg:first-child { border-top: 0; }
.sugg:hover, .sugg:focus-visible { background: var(--neutral-bg); outline: none; }
.sugg b { font-size: var(--fs-6); }
.sugg mark { background: transparent; color: var(--accent); }
.sugg .code { font-size: var(--fs-3); }
.no-result { padding: 14px 16px; color: var(--muted); }
.tip { font-size: var(--fs-3); color: var(--muted); margin-top: 12px; }
.stock-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stock-head .nm { font-size: var(--fs-8); font-weight: 600; }
.period-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.pchip {
  min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card);
  font-weight: 600; font-size: var(--fs-5); padding: 0 4px;
}
.pchip[aria-pressed="true"] { border-color: var(--accent); background: var(--info-bg); color: var(--accent); }
.pchip.span2 { grid-column: span 2; }
.range { margin-top: 10px; font-weight: 600; font-size: var(--fs-6); font-variant-numeric: tabular-nums; }
.custom { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.custom label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-3); color: var(--muted); font-weight: 600; min-width: 0; }
.custom input {
  width: 100%; min-width: 0; height: 48px; padding: 0 8px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--text); font-size: var(--fs-5);
}
.field-err { color: var(--bad); font-weight: 600; font-size: var(--fs-4); margin-top: 8px; }
.go-bar {
  position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5;
  background: var(--bg); padding: 4px 0 10px; margin: 0 -4px; padding-left: 4px; padding-right: 4px;
}
.plan-line { margin: 8px 2px; font-weight: 600; font-size: var(--fs-4); min-height: 1.5em; }
.plan-ok { color: var(--ok); }
.plan-info { color: var(--info); }
.plan-warn { color: var(--warn); }
.plan-bad { color: var(--bad); font-weight: 600; }
.link-btn.inline { min-height: 0; padding: 0; text-decoration: underline; font-size: inherit; }
.nowrap { white-space: nowrap; }
.budget { font-size: var(--fs-2); color: var(--muted); margin-top: 8px; text-align: center; }
.res-head h2 { font-size: var(--fs-9); font-weight: 600; line-height: 1.3; }
.res-head p { color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; display: flex; align-items: center; flex-wrap: wrap; }
.grade-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.grade-top .lbl { font-weight: 600; display: inline-flex; align-items: center; }
.letters { display: flex; gap: 8px; }
.grade-note { font-size: var(--fs-3); color: var(--muted); margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; }
.metrics { margin-top: 8px; }
.metric { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.metric .m-label { font-weight: 600; line-height: 1.35; }
.metric .m-label small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-2); }
.metric .m-val { font-size: var(--fs-10); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.2; }
.metric .m-val.long { font-size: var(--fs-7); }
.force-line { font-size: var(--fs-3); color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; }
.stat .s-label { font-size: var(--fs-3); color: var(--muted); font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; }
.stat .s-val { font-size: var(--fs-8); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; margin-top: 2px; }
.stat .s-sub { font-size: var(--fs-1); color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--neutral-bg); padding: 4px; border-radius: 12px; margin: 8px 0 4px; }
.seg button {
  min-height: 44px; border: 0; border-radius: 9px; background: transparent;
  font-weight: 600; font-size: var(--fs-4); color: var(--muted); padding: 0 4px;
}
.seg button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs-4); }
.tbl th, .tbl td { padding: 10px 4px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl th { font-size: var(--fs-2); color: var(--muted); font-weight: 600; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl .c-name { text-align: left; }
.tbl .c-wide { display: none; }
.tbl .t-w { display: none; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl.bt { table-layout: auto; }
.bt th:not(.c-name), .bt td:not(.c-name) { white-space: nowrap; }
.bt td.c-name { word-break: keep-all; overflow-wrap: anywhere; }
.bt th, .bt td { padding-left: 3px; padding-right: 3px; }
.bname {
  border: 0; background: transparent; padding: 0; text-align: left; font-weight: 600;
  min-height: 36px; color: var(--text); max-width: 100%;
}
.bname::after { content: " ▾"; color: var(--muted); font-size: var(--fs-1); }
.bname[aria-expanded="true"]::after { content: " ▴"; }
.tag {
  display: inline-block; padding: 0 6px; margin: 2px 2px 0 0; border-radius: 6px;
  background: var(--info-bg); color: var(--info); font-size: var(--fs-1); font-weight: 600; white-space: nowrap;
}
.tag-sell { background: var(--neutral-bg); color: var(--neutral); }
.bexp td { text-align: left; background: var(--neutral-bg); font-size: var(--fs-3); color: var(--neutral); }
.tbl-note { font-size: var(--fs-2); color: var(--muted); margin-top: 8px; }
.trust { background: var(--neutral-bg); border-color: transparent; }
.trust p + p { margin-top: 8px; }
.trust .caution { font-weight: 600; }
.notes li { position: relative; padding: 8px 0 8px 28px; border-top: 1px solid var(--line); font-size: var(--fs-4); }
.notes li:first-child { border-top: 0; }
.notes li::before { content: "🟡"; position: absolute; left: 0; top: 8px; }
.src-files { margin-top: 8px; font-size: var(--fs-2); color: var(--muted); }
.src-files summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.src-files li { overflow-wrap: anywhere; padding: 2px 0; }
.src-files p { margin-top: 4px; }
.band.in-card { margin: 10px 0 2px; font-size: var(--fs-4); }
.float-note { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; }
.src-path { margin-top: 4px; color: var(--muted); font-size: var(--fs-2); }
.src-path summary { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }
.progress { height: 10px; background: var(--neutral-bg); border-radius: 999px; overflow: hidden; margin: 6px 0 2px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.warn-list li { position: relative; padding: 6px 0 6px 26px; font-size: var(--fs-4); color: var(--warn); font-weight: 600; }
.warn-list li::before { content: "⚠"; position: absolute; left: 2px; top: 6px; }
.warn-box { background: var(--warn-bg); border-color: transparent; }
.big-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.big-pair .lbl { font-size: var(--fs-3); color: var(--muted); font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; }
.big-pair .big { font-size: 2.25rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.big-pair .sub { font-size: var(--fs-2); color: var(--muted); }
.bucket { border-left-width: 6px; }
.bucket-can { border-left-color: var(--ok); }
.bucket-unknown { border-left-color: var(--warn); }
.bucket-cannot { border-left-color: var(--bad); }
.bucket-h { font-weight: 600; font-size: var(--fs-6); }
.bucket-desc { font-size: var(--fs-2); color: var(--muted); margin-top: 2px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.trio .lbl { font-size: var(--fs-1); color: var(--muted); font-weight: 600; }
.trio .val { font-size: var(--fs-9); font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.excluded { font-size: var(--fs-3); color: var(--muted); margin: 4px 2px; }
.ref { font-size: var(--fs-4); }
.ref .src { font-size: var(--fs-1); color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.st th.c-lbl { width: 40%; }
.day-row { padding: 12px 0; border-top: 1px solid var(--line); }
.day-row:first-child { border-top: 0; }
.day-row .dr-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.day-row .dr-line { font-size: var(--fs-4); color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.day-row .dr-res { font-weight: 600; margin-top: 2px; }
.rcard { display: block; color: inherit; text-decoration: none; }
.rcard:hover { border-color: var(--accent); }
.rcard h2 { font-size: var(--fs-7); font-weight: 600; margin-top: 8px; line-height: 1.35; }
.rcard .one {
  color: var(--muted); font-size: var(--fs-4); margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rcard .rbig { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rcard .rbig b { font-size: var(--fs-9); font-weight: 600; font-variant-numeric: tabular-nums; }
.rcard .rbig span { font-size: var(--fs-3); color: var(--muted); }
.rd-title { font-size: var(--fs-9); font-weight: 600; line-height: 1.35; margin-top: 10px; }
.rd-one { margin-top: 8px; }
.big-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 14px 0; }
.big-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; }
.big-box .lbl { font-size: var(--fs-2); color: var(--muted); font-weight: 600; }
.big-box .val { font-size: var(--fs-9); font-weight: 600; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; }
.big-box .sub { font-size: var(--fs-2); color: var(--muted); margin-top: 4px; }
.dlist > div { padding: 10px 0; border-top: 1px solid var(--line); }
.dlist > div:first-child { border-top: 0; }
.dlist dt { font-weight: 600; font-size: var(--fs-4); }
.dlist dd { margin: 2px 0 0; font-size: var(--fs-4); }
.plain-list li { position: relative; padding: 6px 0 6px 18px; font-size: var(--fs-4); }
.plain-list li::before { content: "•"; position: absolute; left: 4px; top: 6px; color: var(--muted); }
.limit-list li { position: relative; padding: 6px 0 6px 28px; font-size: var(--fs-4); }
.limit-list li::before { content: "🟡"; position: absolute; left: 0; top: 6px; }
.src-list li { padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--fs-3); }
.src-list li:first-child { border-top: 0; }
.src-list .path { font-family: Consolas, "D2Coding", monospace; overflow-wrap: anywhere; word-break: break-all; font-size: var(--fs-1); }
.src-list .where { color: var(--muted); }
.src-changed { color: var(--warn); font-weight: 600; display: block; margin-top: 2px; }
.term-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.term-chip {
  min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: var(--fs-4);
}
.term-chip::before { content: "? "; color: var(--accent); font-weight: 600; }
.not-inc { font-size: var(--fs-2); color: var(--muted); margin-top: 16px; }
.not-inc li { padding: 2px 0; }
.foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-2); text-align: center; }
.foot .notice { font-weight: 600; font-size: var(--fs-3); }
.foot .src { margin-top: 2px; overflow-wrap: anywhere; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-inner { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 64px; }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; color: var(--muted); text-decoration: none; font-size: var(--fs-3); font-weight: 600;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 600; }
.tab[aria-current="page"] svg { stroke-width: 2.4; }
.sheet-back {
  position: fixed; inset: 0; z-index: 50; background: var(--backdrop);
  opacity: 0; transition: opacity .2s;
}
.sheet-back.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-width: 560px; margin: 0 auto; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); color: var(--text);
  border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .22s ease-out;
}
.sheet.open { transform: none; }
.sheet-handle { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 4px auto 12px; }
.sheet-title { font-size: var(--fs-8); font-weight: 600; outline: none; padding-right: 4px; }
.sheet-kicker { font-size: var(--fs-2); color: var(--accent); font-weight: 600; }
.sheet-body { margin: 10px 0 16px; }
.sheet-body p + p { margin-top: 8px; }
.sheet-body .why { background: var(--neutral-bg); border-radius: 12px; padding: 12px; margin-top: 12px; }
.sheet-body .why b { display: block; margin-bottom: 4px; }
.sheet .btn-primary { margin-top: 8px; }
.sheet .btn-block { margin-top: 8px; }
.noscript { padding: 24px 16px; text-align: center; }
@media (min-width: 720px) {
  .tbl .c-wide { display: table-cell; }
  .tbl .t-w { display: inline; }
  .tbl .t-m { display: none; }
  .bexp { display: none !important; }
  .bname::after { content: ""; }
  .bname[aria-expanded="true"]::after { content: ""; }
  .bt th.c-name { width: 24%; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 359px) {
  .hero-num { font-size: 2.125rem; }
  .big-pair .big { font-size: var(--fs-11); }
  .trio .val { font-size: var(--fs-8); }
  .metric .m-val { font-size: var(--fs-9); }
  .period-grid { grid-template-columns: repeat(3, 1fr); }
  .pchip.span2 { grid-column: span 3; }
}
@media (max-height: 560px) {
  .go-bar { position: static; margin: 0; padding: 4px 0 8px; }
  .tabbar-inner { min-height: 52px; }
  .tab { min-height: 48px; font-size: var(--fs-2); }
  .tab svg { width: 20px; height: 20px; }
  .view { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.fx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; flex: none; }
.state-emoji .fx-dot { width: 14px; height: 14px; margin: 0; }
.state-warn .state-emoji { color: var(--warn); }
.bucket-can .fx-dot { color: var(--ok); }
.bucket-unknown .fx-dot { color: var(--warn); }
.bucket-cannot .fx-dot { color: var(--bad); }
.bname { overflow-wrap: anywhere; }
.bname::after { white-space: nowrap; }
