@font-face { font-family: "PlexJP"; src: url("../assets/fonts/plex-jp-regular.woff2?v=20261201g") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PlexJP"; src: url("../assets/fonts/plex-jp-medium.woff2?v=20261201g") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PlexJP"; src: url("../assets/fonts/plex-jp-semibold.woff2?v=20261201g") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "PlexMono"; src: url("../assets/fonts/plex-mono-regular.woff2?v=20261201g") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PlexMono"; src: url("../assets/fonts/plex-mono-medium.woff2?v=20261201g") format("woff2"); font-weight: 500 700; font-display: swap; }

/* ---- テーマ（data-theme） ---- */
:root, [data-theme="blueprint"] {
  /* 黒・白・オレンジ。オレンジの上の文字は黒（6.0:1）、白地の小さなオレンジ文字は濃いめ（--accent-text 5.2:1） */
  --bg: #ffffff; --surface: #ffffff; --ink: #111111; --ink2: #3d3d3d; --muted: #6b6b6b; --faint: #a3a3a3;
  --line: rgba(17,17,17,.1); --line2: rgba(17,17,17,.26);
  --grid: rgba(17,17,17,.045); --grid2: rgba(17,17,17,.09);
  --accent: #ff5a00; --accent-ink: #111111; --accent-text: #c2410c; --accent-soft: rgba(255,90,0,.1);
  --ref: rgba(17,17,17,.16); --ref-d: rgba(255,255,255,.75); --tgt: #ff5a00; --tgt-d: rgba(255,255,255,.5);
  --dim: #111111; --shadow: 0 1px 2px rgba(17,17,17,.04), 0 8px 24px rgba(17,17,17,.05);
}
[data-theme="night"] {
  --bg: #0b1120; --surface: #0f172a; --ink: #e9edf5; --ink2: #c3cad8; --muted: #8590a6; --faint: #566079;
  --line: rgba(233,237,245,.1); --line2: rgba(233,237,245,.24);
  --grid: rgba(125,170,255,.06); --grid2: rgba(125,170,255,.12);
  --accent: #f6c344; --accent-ink: #0b1120; --accent-text: #f6c344; --accent-soft: rgba(246,195,68,.12);
  --ref: rgba(233,237,245,.24); --ref-d: rgba(15,23,42,.6); --tgt: #f6c344; --tgt-d: rgba(15,23,42,.45);
  --dim: #8fb4ff; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.25);
}
[data-theme="mono"] {
  --bg: #ffffff; --surface: #ffffff; --ink: #0d0d0d; --ink2: #333; --muted: #777; --faint: #b0b0b0;
  --line: rgba(0,0,0,.09); --line2: rgba(0,0,0,.3);
  --grid: rgba(0,0,0,0); --grid2: rgba(0,0,0,.08);
  --accent: #2b4dff; --accent-ink: #fff; --accent-text: #2b4dff; --accent-soft: rgba(43,77,255,.08);
  --ref: #d9d9d9; --ref-d: rgba(255,255,255,.7); --tgt: #2b4dff; --tgt-d: rgba(255,255,255,.5);
  --dim: #0d0d0d; --shadow: none;
}
:root { --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); --r: 14px; --ad-h: 50px; --ad-gap: 24px; --ad-bg: rgba(17,17,17,.035); }
@media (min-height: 780px) { :root { --ad-h: 100px; } }
html.noads { --ad-h: 0px; --ad-gap: 0px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); height: 100%; }
body {
  font-family: "PlexJP", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif; font-weight: 400; letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior: none; touch-action: manipulation; opacity: 0; transition: opacity .3s;
}
body.ready { opacity: 1; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-user-select: none; user-select: none; }
a { color: inherit; }
.mono, .num { font-family: "PlexMono", ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hidden { display: none !important; }
#app { max-width: 480px; margin: 0 auto; }
.screen { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 6px) 20px calc(var(--safe-b) + 12px + var(--ad-h) + var(--ad-gap)); animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border-radius: 12px; padding: 13px 18px; font-size: 15px; font-weight: 600; letter-spacing: .04em;
  transition: transform .12s ease, opacity .12s, background .2s; }
.btn:active { transform: scale(.985); opacity: .9; }
.btn.big { width: 100%; height: 52px; font-size: 15.5px; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary::after { content: "→"; font-family: "PlexMono", monospace; font-weight: 400; opacity: .7; }
.btn.outline { border: 1px solid var(--line2); color: var(--ink); background: transparent; }
#btn-lock.primary { background: var(--accent); color: var(--accent-ink); }
[data-theme="blueprint"] #btn-lock.primary { background: var(--ink); color: var(--bg); }  /* オレンジはお題と点数だけに絞る */
#btn-lock.primary::after { content: none; }
.link { color: var(--muted); text-decoration: none; font-size: 12px; padding: 6px 2px; }
.link:hover { color: var(--ink); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--ink2); transition: background .15s; }
.icon-btn:hover, .icon-btn:active { background: var(--line); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ヘッダー */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 52px; flex: none; }
.top-right { display: flex; gap: 2px; margin-right: -8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.mark { width: 22px; height: 22px; position: relative; flex: none; }
.mark::before, .mark::after { content: ""; position: absolute; border-radius: 3px; }
.mark::before { left: 0; bottom: 0; width: 10px; height: 10px; background: var(--ink); }
.mark::after { right: 0; bottom: 0; width: 16px; height: 22px; border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 4px; }
.logo { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .08em; line-height: 1; }

/* ホーム */
.home-main { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 10px 0 4px; min-height: 0; }
.eyebrow { font-size: 11.5px; color: var(--muted); letter-spacing: .08em; display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.eyebrow .sep { width: 18px; height: 1px; background: var(--line2); }
.headline { margin: 0; font-size: 30px; line-height: 1.28; font-weight: 600; letter-spacing: .02em; }
.lead { margin: -4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.hero-stage { flex: 1 1 auto; min-height: 120px; max-height: 300px; border: 1px solid var(--line); border-radius: 16px; background-color: var(--surface); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero-stage .stage-svg { position: absolute; inset: 0; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.slots li { border-top: 1.5px solid var(--line2); padding-top: 7px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.slots li small { font-size: 10px; color: var(--faint); }
.slots li span { font-size: 11.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slots li.done { border-top-color: var(--ink); }
.slots li.done span { font-size: 15px; color: var(--ink); font-weight: 500; }
.slots li.t-perfect { border-top-color: var(--accent); }
.slots li.t-perfect span { color: var(--accent-text); }
.today-sub { margin: -6px 0 0; text-align: center; font-size: 11.5px; color: var(--muted); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.st { display: flex; flex-direction: column; align-items: flex-start; padding: 10px 0 10px 12px; border-left: 1px solid var(--line); }
.st:first-child { border-left: 0; padding-left: 0; }
.st b { font-size: 20px; font-weight: 500; line-height: 1.1; }
.st small { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.foot { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding-top: 8px; flex: none; }
.foot a { text-decoration: none; }
.dotsep { color: var(--faint); }

/* プレイ */
.play-top { display: flex; align-items: center; gap: 12px; height: 52px; flex: none; }
#btn-back { margin-left: -8px; }
.dots { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.dot { height: 3px; border-radius: 2px; background: var(--line); position: relative; transition: background .3s; }
.dot.cur { background: var(--ink); }
.dot.done { background: var(--ink2); opacity: .55; }
.dot.d-perfect { background: var(--accent); opacity: 1; }
.pill { font-size: 13px; color: var(--muted); display: flex; align-items: baseline; gap: 3px; min-width: 52px; justify-content: flex-end; }
.pill b { color: var(--ink); font-size: 16px; font-weight: 500; }
.qbox { flex: none; padding: 6px 0 12px; }
.qcat { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.qtext { margin: 5px 0 0; font-size: 21px; line-height: 1.35; font-weight: 600; letter-spacing: .02em; }
.qtext small { font-size: .68em; font-weight: 500; color: var(--ink2); }
.qsub { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.qsub b { color: var(--ink2); font-weight: 500; }
.stage { flex: 1 1 auto; min-height: 200px; position: relative; border: 1px solid var(--line); border-radius: 16px; background-color: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.stage-svg { display: block; position: absolute; inset: 0; }
.stage-svg .grid-minor { stroke: var(--grid); stroke-width: 1; }
.stage-svg .grid-major { stroke: var(--grid2); stroke-width: 1; }
.stage-svg .ground-line { stroke: var(--ink); stroke-width: 1.25; }
.stage-svg .hatch path { stroke: var(--line2); stroke-width: .8; }
.stage-svg .hatch-bg { fill: var(--surface); }
.stage-svg .slab-line { stroke: var(--line2); stroke-width: 1; }
.obj.ref svg { fill: var(--ref); }
.obj.ref .d { fill: var(--ref-d); }
.obj.tgt svg { fill: var(--tgt); }
.obj.tgt .d { fill: var(--tgt-d); }
.obj.ghost svg { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: .55; }
.obj.ghost svg * { vector-effect: non-scaling-stroke; }
.obj.ghost .d { display: none; }
.dimg path { stroke: var(--dim); stroke-width: 1; fill: none; }
.dimg.tgt path { stroke: var(--accent); }
.dimg .ext { stroke-dasharray: 2 2; opacity: .6; }
.lbl { font-family: "PlexMono", monospace; font-size: 11px; fill: var(--dim); font-weight: 500; }
.lbl.tgt { fill: var(--accent-text); }
.lbl-bg { fill: var(--surface); }
.lbl-name { font-family: "PlexJP", sans-serif; font-size: 10.5px; fill: var(--muted); }
.scale text { font-family: "PlexMono", monospace; font-size: 9.5px; fill: var(--muted); letter-spacing: .04em; }
.scale path { stroke: var(--muted); stroke-width: 1; fill: none; }
.pin path { fill: var(--muted); }
.pin.pin-tgt path { fill: var(--accent); }
.burst path { stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; fill: none; }
.controls, .reveal { flex: none; padding-top: 14px; }
.readout { display: flex; align-items: baseline; justify-content: space-between; }
.readout span { font-size: 12px; color: var(--muted); }
.readout b { font-size: 34px; font-weight: 500; line-height: 1.1; letter-spacing: -.02em; }
.slider-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.sq-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line2); font-family: "PlexMono", monospace; font-size: 18px; color: var(--ink2); flex: none; transition: background .15s; }
.sq-btn:active { background: var(--line); }
.slider-wrap { flex: 1; position: relative; height: 40px; display: flex; align-items: center;
  background-image: repeating-linear-gradient(90deg, var(--line2) 0 1px, transparent 1px 10%); background-size: 100% 7px; background-repeat: no-repeat; background-position: 0 30px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; background: transparent; margin: 0; --p: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--ink) var(--p), var(--line2) var(--p)); }
input[type=range]::-moz-range-track { height: 2px; background: var(--line2); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -11px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--ink); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft); }

/* 答え合わせ */
.reveal { animation: rise .4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rv-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.rv-score { display: flex; align-items: baseline; gap: 4px; }
.rv-score b { font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -.03em; }
.rv-score span { font-size: 15px; color: var(--muted); }
.reveal[data-tier="perfect"] .rv-score b, .reveal[data-tier="great"] .rv-score b { color: var(--accent); }
.rv-right { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }
.rv-diff { font-size: 12.5px; color: var(--ink2); border: 1px solid var(--line2); border-radius: 999px; padding: 4px 10px; font-weight: 500; }
.rv-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.reveal[data-tier="perfect"] .rv-mark { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.reveal[data-tier="great"] .rv-mark { background: var(--accent); }
.reveal[data-tier="good"] .rv-mark { background: var(--ink2); }
.rv-nums { display: grid; grid-template-columns: 1fr 1fr; margin: 12px 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rv-nums div { display: flex; flex-direction: column; padding: 8px 0; }
.rv-nums div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.rv-nums span { font-size: 11px; color: var(--muted); }
.rv-nums b { font-size: 19px; font-weight: 500; }
.rv-nums div:first-child b { color: var(--accent-text); }
.rv-fact { margin: 6px 0 2px; font-size: 13px; line-height: 1.65; color: var(--ink2); }
.rv-src { margin: 0 0 12px; font-size: 11px; color: var(--muted); }
.rv-src a { text-underline-offset: 2px; text-decoration-color: var(--line2); }

/* 紙吹雪（控えめ） */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i { position: absolute; top: -12px; width: 2px; height: 10px; border-radius: 1px; animation: fall 1.6s cubic-bezier(.25,.6,.35,1) forwards; opacity: .9; }
@keyframes fall { to { transform: translate3d(var(--dx, 0), 62vh, 0) rotate(var(--rot, 180deg)); opacity: 0; } }

/* 結果 */
.res-title { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: .06em; }
#btn-home2, #btn-home3 { margin-left: -8px; }
#btn-zukan2 { margin-right: -8px; }
.res-main { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.res-hero { padding: 6px 0 2px; }
.res-total { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.res-total b { font-size: 64px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.res-total span { font-size: 18px; color: var(--muted); }
.res-rank { font-size: 17px; font-weight: 600; margin-top: 8px; letter-spacing: .04em; }
.res-emoji { display: none; }
.res-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rl { display: grid; grid-template-columns: 22px 30px 1fr 44px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rl-i { font-size: 11px; color: var(--faint); }
.rl-pic { display: grid; place-items: center; }
.rl-pic svg { fill: var(--ink2); }
.rl-pic .d { fill: var(--surface); opacity: .6; }
.rl-name { font-size: 13px; font-weight: 500; min-width: 0; }
.rl-name em { font-style: normal; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-bar { display: block; height: 2px; background: var(--line); border-radius: 2px; margin: 5px 0 3px; overflow: hidden; }
.rl-bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; animation: grow .8s cubic-bezier(.2,.7,.2,1) both; }
.rl.t-perfect .rl-bar i, .rl.t-great .rl-bar i { background: var(--accent); }
@keyframes grow { from { transform: scaleX(0); } }
.rl-name small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; font-family: "PlexMono", monospace; }
.rl-sc { text-align: right; font-size: 17px; font-weight: 500; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-link { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; text-align: left; }
.row-link span { flex: 1; }
.row-link b { font-weight: 400; color: var(--muted); font-size: 13px; }
.row-link i { font-style: normal; color: var(--muted); font-family: "PlexMono", monospace; }
.next-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.next-row b { font-size: 17px; color: var(--ink); font-weight: 500; }
/* 広告枠（中身なしの置き場所。js/ads.js で一括管理） */
.ad { position: relative; display: flex; flex-direction: column; align-items: center; }
.ad-label { align-self: center; font-size: 9.5px; color: var(--faint); letter-spacing: .12em; line-height: 1; margin-bottom: 4px; }
.ad-box { max-width: 100%; background: var(--ad-bg); border: 1px solid var(--line); border-radius: 4px; display: grid; place-items: center; }
.ad-box span { font-size: 10px; color: var(--faint); letter-spacing: .06em; }
.ad-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--bg); border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + var(--safe-b)); display: flex; justify-content: center; }
.ad-dock .ad-label { position: absolute; left: max(10px, calc(50% - 154px)); top: 11px; margin: 0; z-index: 1; }
.ad-dock .ad-box { border-radius: 2px; }
html.noads .ad-dock, html.noads .ad-gone { display: none !important; }
.ad-result, .ad-zukan { margin: 6px 0; }
.ad-zukan { grid-column: 1 / -1; padding: 14px 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ad-interstitial { position: fixed; inset: 0; z-index: 45; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; animation: fade .2s both; }
.ad-interstitial.guard .ad-close { opacity: .35; }  /* 出た直後は押しても閉じない（下の画面にも届かない） */
.ad-close { position: absolute; top: calc(var(--safe-t) + 14px); right: 16px; height: 36px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 999px; font-size: 13px; color: var(--ink2); background: var(--bg); }
.pro-link { align-self: center; }

/* 図鑑 */
.zk-count { font-size: 13px; color: var(--muted); min-width: 38px; text-align: right; }
.zk-lead { margin: 4px 0 14px; color: var(--muted); font-size: 12.5px; }
.zk-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.zk { aspect-ratio: 1 / 1.18; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; min-width: 0; }
.zk svg { fill: var(--ink2); }
.zk .d { fill: var(--bg); opacity: .6; }
.zk b { font-size: 10.5px; font-weight: 500; line-height: 1.25; text-align: center; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.zk small { font-size: 10px; color: var(--muted); }
.zk:not(.ok) { color: var(--faint); }
.zk-q { width: 26px; height: 26px; border: 1px dashed var(--line2); border-radius: 6px; }

/* モーダル・トースト */
.modal { position: fixed; inset: 0; background: rgba(8,12,22,.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; z-index: 40; animation: fade .2s both; }
.modal-card { position: relative; width: 100%; max-width: 400px; max-height: 86dvh; overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-card h3 { margin: 0 0 12px; font-size: 18px; font-weight: 600; letter-spacing: .04em; }
.modal-card p { font-size: 13.5px; line-height: 1.7; color: var(--ink2); }
.modal-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 8px; font-size: 20px; color: var(--muted); }
.help { margin: 0; padding: 0; list-style: none; counter-reset: h; }
.help li { counter-increment: h; display: grid; grid-template-columns: 28px 1fr; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.6; }
.help li::before { content: "0" counter(h); font-family: "PlexMono", monospace; font-size: 12px; color: var(--accent-text); padding-top: 2px; }
.help-s { font-size: 12px !important; color: var(--muted) !important; }
.help-fig { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; height: 120px; position: relative; overflow: hidden; }
.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 10px 0; font-size: 10.5px; color: var(--muted); text-align: center; }
.tiers b { display: block; font-family: "PlexMono", monospace; font-size: 13px; color: var(--ink); font-weight: 500; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 12px; }
.stat-grid div { padding: 12px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.stat-grid b { font-size: 22px; font-weight: 500; }
.stat-grid small { font-size: 11px; color: var(--muted); }
.zd { text-align: left; }
.zd-pic { display: grid; place-items: center; height: 150px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; background: var(--bg); }
.zd-pic svg { fill: var(--accent); }
.zd-pic .d { fill: var(--bg); opacity: .55; }
.zd h3 { margin-bottom: 4px; }
.zd-size { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.zd-size span { font-size: 12px; color: var(--muted); }
.zd-size b { font-size: 22px; font-weight: 500; }
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + var(--ad-h) + 34px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 50; animation: rise .25s both; max-width: 90vw; }

/* 小さい画面（SE など） */
@media (max-height: 700px) {
  .screen { padding-left: 16px; padding-right: 16px; }
  .top, .play-top { height: 46px; }
  .home-main { gap: 10px; padding-top: 4px; }
  .headline { font-size: 25px; }
  .lead { font-size: 12.5px; line-height: 1.6; }
  .hero-stage { min-height: 90px; }
  .stats-row .st { padding-top: 7px; padding-bottom: 7px; }
  .st b { font-size: 17px; }
  .qbox { padding: 2px 0 8px; }
  .qtext { font-size: 18px; }
  .qsub { margin-top: 3px; font-size: 12px; }
  .controls, .reveal { padding-top: 8px; }
  .readout b { font-size: 28px; }
  .slider-row { margin: 4px 0 8px; }
  .btn.big { height: 46px; }
  .rv-score b { font-size: 38px; }
  .rv-nums { margin: 8px 0 4px; }
  .rv-nums b { font-size: 16px; }
  .rv-fact { font-size: 12px; line-height: 1.55; margin: 4px 0 2px; }
  .rv-src { margin-bottom: 8px; }
  .res-main { gap: 10px; }
  .res-total b { font-size: 52px; }
  .rl { padding: 5px 0; }
}
