/* Tenmei — option A "Kartu bacaan" from the 31 Oct 2026 mockup. Phone first. */
:root {
  --bg: #F3F5F8; --paper: #FFFFFF; --fg: #1B2430; --muted: #66717F; --line: #DDE2EA;
  --ink: #2E4A86; --ink-fg: #FFFFFF; --gold: #B07F2E;
  --ok: #2E7D5B; --ok-bg: #E4F3EC; --warn: #A8651C; --warn-bg: #FBEEDC; --calm: #4B5D7A; --calm-bg: #E9EEF6;
  --bad: #A23B3B; --bad-bg: #F8E3E3;
  --font-body: "Figtree", system-ui, -apple-system, sans-serif;
  --font-hanzi: "Noto Serif SC", "Songti SC", "PingFang SC", serif;
  --ctl-h: 44px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121720; --paper: #1A212C; --fg: #E8ECF2; --muted: #9AA6B6; --line: #2A3442;
    --ink: #8FA8E0; --ink-fg: #0E1420; --gold: #D4A758;
    --ok: #7CC9A4; --ok-bg: #1E3A2F; --warn: #E3A862; --warn-bg: #3D2E1A; --calm: #A9B8D2; --calm-bg: #23304A;
    --bad: #E58A8A; --bad-bg: #3E2222;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  padding-top: env(safe-area-inset-top, 0px);
}
a { color: var(--ink); }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.25; margin: 0; }
.wrap { max-width: 720px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 4px 112px; }
.topbar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0 12px; }
.topbar .brand { font-family: var(--font-hanzi); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.topbar .brand small { font-family: var(--font-body); font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.topbar .date { color: var(--muted); font-size: 14px; text-align: right; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 0; }
.tile .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.tile .gz { font-family: var(--font-hanzi); font-size: 22px; font-weight: 700; line-height: 1.1; margin: 4px 0 2px; }
.tile .gz ruby rt { font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--muted); }
.tile .m { font-size: 12px; color: var(--muted); margin-bottom: 6px; line-height: 1.35; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 10px; line-height: 2; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.calm { background: var(--calm-bg); color: var(--calm); } .chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip .hz-s { font-weight: 600; opacity: .85; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.card h2 { font-size: 17px; margin-bottom: 6px; } .card h3 { font-size: 16px; margin-bottom: 4px; }
.card p { margin: 6px 0 0; }
.eyebrow { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 4px; }
.card.ink { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); }
.card.ink .eyebrow, .card.ink p, .card.ink a { color: var(--ink-fg); }
.card.ink ruby rt { color: var(--ink-fg); opacity: .8; }
.card.gold { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--paper)); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 52px; }
.row:first-child, .eyebrow + .row { border-top: 0; }
.row .dm { font-family: var(--font-hanzi); font-size: 20px; color: var(--ink); width: 34px; text-align: center; flex: none; }
.row .dm rt { font-family: var(--font-body); font-size: 10px; color: var(--muted); }
.row .nm { flex: 1; min-width: 0; } .row .nm b { display: block; font-weight: 600; } .row .nm span { font-size: 13px; color: var(--muted); }
.row .num { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; text-align: right; flex: none; }
.link { color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.hero { display: flex; gap: 14px; align-items: center; }
.hero .big { font-family: var(--font-hanzi); font-size: 64px; line-height: 1; color: var(--ink); font-weight: 700; }
.hero .big rt { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--muted); }
.hero h1 { font-size: 22px; } .hero .tag { color: var(--muted); font-size: 14px; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pillar { background: var(--paper); text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; min-width: 0; }
.pillar .pl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.pillar .pg { font-family: var(--font-hanzi); font-size: 24px; line-height: 1.2; font-weight: 700; }
.pillar .pg .b { color: var(--ink); }
.pillar .pg rt { font-family: var(--font-body); font-size: 10px; color: var(--muted); font-weight: 600; }
.pillar .ps { font-size: 11px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.pillar.unknown .pg { color: var(--muted); font-size: 15px; font-family: var(--font-body); padding: 10px 0; }
.score { display: flex; align-items: center; gap: 10px; }
.score .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.score .bar i { display: block; height: 100%; background: var(--gold); }
.score .n { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3.2em; }
.comp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; margin-top: 8px; }
.comp .v { font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); }
details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
details summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); min-height: 28px; }
details[open] summary { margin-bottom: 6px; }
.card details, details details { border: 0; padding: 0; background: none; }
.facts { width: 100%; border-collapse: collapse; font-size: 14px; }
.facts td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
.facts td:last-child { text-align: right; font-variant-numeric: tabular-nums; padding-left: 12px; }
.prose { font-size: 16px; }
.prose h2 { font-size: 19px; margin: 22px 0 6px; } .prose h3 { font-size: 17px; margin: 18px 0 4px; } .prose h4 { font-size: 15px; margin: 14px 0 4px; }
.prose p, .prose ul, .prose ol { margin: 8px 0; } .prose li { margin: 3px 0; }
.prose blockquote { margin: 10px 0; padding: 4px 14px; border-left: 3px solid var(--gold); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.prose pre { overflow-x: auto; background: var(--bg); padding: 10px; border-radius: 10px; font-size: 13px; }
.prose code { font-size: .92em; }
.tbl-wrap { overflow-x: auto; margin: 10px 0; }
.tbl-wrap table, .page-glossary table { border-collapse: collapse; font-size: 14px; width: 100%; }
.tbl-wrap th, .tbl-wrap td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl-wrap th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.page-glossary { margin-top: 18px; }
.page-glossary td { padding: 5px 6px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.page-glossary .g-h { font-family: var(--font-hanzi); font-size: 17px; white-space: nowrap; }
.page-glossary .g-p { color: var(--muted); white-space: nowrap; }
ruby.hz { cursor: help; ruby-position: over; border-radius: 3px; }
ruby.hz rt { font-size: .55em; color: var(--muted); font-family: var(--font-body); font-weight: 600; letter-spacing: .01em; }
ruby.hz:focus-visible, ruby.hz.on { outline: 2px solid var(--gold); outline-offset: 1px; }
.hz-s { font-size: .92em; }
.hz-x { border-bottom: 1px dotted var(--bad); }
.pop { position: absolute; z-index: 20; max-width: min(320px, calc(100vw - 32px)); background: var(--fg); color: var(--bg); font-size: 14px; line-height: 1.4; padding: 8px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.pop b { display: block; font-size: 12px; opacity: .8; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--paper); border-top: 1px solid var(--line);
  padding: 8px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.nav .in { max-width: 720px; margin: 0 auto; display: flex; justify-content: space-around; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; font-weight: 700; min-width: 60px; padding: 4px 0; }
.nav a.on { color: var(--ink); }
.nav svg, .ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
form.f { display: flex; flex-direction: column; gap: 12px; }
.f label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.f .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.f input, .f select, .f textarea, .btn {
  height: var(--ctl-h); font: inherit; font-size: 16px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--fg); width: 100%;
}
.f textarea { height: auto; min-height: 88px; padding: 10px 12px; }
.f .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); }
.btn.block { width: 100%; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.f input:focus-visible, .f select:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.alert { border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.alert.bad { background: var(--bad-bg); color: var(--bad); } .alert.ok { background: var(--ok-bg); color: var(--ok); } .alert.warn { background: var(--warn-bg); color: var(--warn); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.seg a { flex: 1; text-align: center; padding: 9px 0; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--ink); color: var(--ink-fg); }
.login { max-width: 380px; margin: 12vh auto 0; }
.login .brand { font-family: var(--font-hanzi); font-size: 44px; color: var(--ink); font-weight: 700; text-align: center; }
.login .brand rt { font-family: var(--font-body); font-size: 13px; color: var(--muted); }
.yr { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.yr:first-child { border-top: 0; }
.yr .y { font-weight: 700; font-variant-numeric: tabular-nums; }
.yr .now { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .btn, .seg a { transition: background .15s; } }
