/* 雑学タイムアタック — クイズ番組のスタジオ。赤×黄×黒、電球と照明 */
:root {
  --red: #e3262e;
  --red-btn: #c4161f;
  --red-deep: #7c0a10;
  --yellow: #ffd23f;
  --yellow-deep: #b88a00;
  --black: #0a0a0c;
  --black-2: #16121a;
  --panel: #1e1922;
  --line: #3a3140;
  --white: #fff8e8;
  --mute: #cfc5b4;
  --good: #ffd23f;

  --f-show: 'RocknRoll One', 'M PLUS 1p', sans-serif;
  --f-body: 'M PLUS 1p', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --f-sign: 'Bungee', 'M PLUS 1p', sans-serif;

  --r-s: 6px;
  --r-m: 12px;
  --t-fast: 80ms;
  --ease: cubic-bezier(.2, .9, .2, 1);
  --spring: cubic-bezier(.34, 1.7, .5, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --q-size: 21px;
}
:root[data-size="l"] { --q-size: 25px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #050506; }
body {
  font-family: var(--f-body); color: var(--white); font-size: 15px; line-height: 1.6; font-weight: 500;
  line-break: strict; overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased;
}
@media (min-width: 600px) {
  body { background: radial-gradient(50% 60% at 50% 0%, rgba(227, 38, 46, .25), transparent 70%), radial-gradient(40% 50% at 50% 100%, rgba(255, 210, 63, .12), transparent 70%), #050506; }
}
button, a { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { text-decoration: none; }
svg { width: 1em; height: 1em; flex: none; }
img { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-feature-settings: "palt"; word-break: keep-all; }
.num { font-family: var(--f-sign); font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: .02em; }

.app { position: fixed; inset: 0; margin: 0 auto; max-width: 430px; background: var(--black); overflow: hidden; overflow: clip; }
@media (min-width: 600px) { .app { box-shadow: 0 0 0 1px #221c26, 0 30px 90px rgba(0, 0, 0, .7); } }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; background: var(--black); }
.screen.is-on { display: flex; }
.screen.is-in { animation: scr-in .26s var(--ease); }
@keyframes scr-in { from { opacity: 0; transform: scale(1.03); } }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* ---------- ボタン ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 18px; border-radius: var(--r-s); font-weight: 800; font-size: 16px; letter-spacing: .04em;
  word-break: keep-all; user-select: none; -webkit-user-select: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
}
.btn svg { font-size: 22px; }
.btn:active { transform: translateY(3px); }
.btn--xl { width: 100%; min-height: 66px; font-family: var(--f-show); font-weight: 400; font-size: 24px; }
.btn--l { width: 100%; min-height: 56px; }
.btn--red { background: var(--red-btn); color: #fff; box-shadow: 0 5px 0 var(--red-deep), 0 0 0 2px #ff6a6f inset; }
.btn--red:active { box-shadow: 0 2px 0 var(--red-deep), 0 0 0 2px #ff6a6f inset; }
.btn--yellow { background: var(--yellow); color: var(--black); box-shadow: 0 5px 0 var(--yellow-deep); }
.btn--yellow:active { box-shadow: 0 2px 0 var(--yellow-deep); }
.btn--dark { background: var(--panel); color: var(--white); box-shadow: 0 4px 0 #050506, inset 0 0 0 2px var(--line); }
.btn--sq { width: 50px; padding: 0; flex: none; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--black-2); color: var(--white); font-size: 22px; box-shadow: inset 0 0 0 2px var(--line);
  transition: transform var(--t-fast);
}
.icon-btn:active { transform: scale(.9); }
.badge { position: absolute; top: -8px; right: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--yellow); color: var(--black); font-size: 13px; line-height: 24px; text-align: center; box-shadow: 0 0 0 3px var(--black); }

/* ---------- スタジオ照明 ---------- */
.beams { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.beams i {
  position: absolute; top: -10%; width: 46%; height: 120%; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(255, 220, 120, .34), rgba(255, 220, 120, 0) 75%);
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); filter: blur(6px); mix-blend-mode: screen;
  animation: sweep 7s ease-in-out infinite alternate;
}
.beams i:nth-child(1) { left: -6%; --a: -22deg; --b: 8deg; }
.beams i:nth-child(2) { right: -6%; --a: 20deg; --b: -10deg; animation-delay: -3s; background: linear-gradient(180deg, rgba(255, 70, 80, .3), rgba(255, 70, 80, 0) 75%); }
.beams i:nth-child(3) { left: 27%; --a: -8deg; --b: 12deg; animation-duration: 9s; }
@keyframes sweep { from { transform: rotate(var(--a)); } to { transform: rotate(var(--b)); } }
.beams--play i { opacity: .55; }

/* ---------- タイトル ---------- */
.screen--title { background: var(--black) url(/app-development/apps/a019/img/title.webp) center bottom / cover no-repeat; padding: calc(var(--safe-t) + 10px) 18px calc(var(--safe-b) + 20px); }
.screen--title::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5, 5, 6, .55), transparent 30%, transparent 50%, rgba(5, 5, 6, .9) 85%); }
.title__top, .title__logo, .title__bottom { position: relative; z-index: 2; }
.title__top { display: flex; align-items: center; justify-content: space-between; }
.onair { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 4px; background: var(--red-btn); color: #fff; font-family: var(--f-sign); font-size: 14px; letter-spacing: .08em; }
.onair i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.title__logo { margin-top: 5vh; text-align: center; }
.kicker-pill { display: inline-block; padding: 4px 14px; border-radius: 99px; background: var(--yellow); color: var(--black); font-weight: 800; font-size: 15px; letter-spacing: .06em; }
.logo { display: flex; flex-direction: column; align-items: center; margin-top: 12px; font-family: var(--f-show); font-weight: 400; line-height: 1.02; }
.logo__a { font-size: clamp(56px, 18vw, 76px); color: var(--white); text-shadow: 0 4px 0 var(--red-deep), 0 0 24px rgba(0, 0, 0, .8); letter-spacing: .08em; }
.logo__b { font-size: clamp(40px, 12.4vw, 54px); color: var(--yellow); text-shadow: 0 4px 0 #6b4c00, 0 0 22px rgba(0, 0, 0, .9); letter-spacing: .02em; word-break: keep-all; }
.logo__en { margin-top: 10px; font-family: var(--f-sign); font-size: 14px; letter-spacing: .18em; color: var(--white); text-shadow: 0 2px 6px #000; }
.title__bottom { margin-top: auto; display: grid; gap: 12px; }
.best { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-s); background: var(--black-2); box-shadow: inset 0 0 0 2px var(--line); }
.best__k { font-size: 13px; font-weight: 800; color: var(--mute); }
.best__v { font-size: 28px; color: var(--yellow); flex: 1; }
.best__rank { min-width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--red-btn); color: #fff; font-family: var(--f-sign); font-size: 20px; }
.title__sub { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }

/* ---------- 共通バー ---------- */
.bar { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 8px) 12px 10px; background: var(--black); border-bottom: 2px solid var(--red-btn); }
.bar--clear { background: transparent; border-bottom: 0; position: absolute; left: 0; right: 0; top: 0; }
.bar__title { flex: 1; text-align: center; font-family: var(--f-show); font-weight: 400; font-size: 20px; letter-spacing: .06em; }
.bar--clear .bar__title { visibility: hidden; }
.bar__sp { width: 44px; }

/* ---------- ジャンル ---------- */
.genre__scroll { padding: 14px 14px calc(var(--safe-b) + 24px); }
.rules { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 8px 12px; border-radius: 99px; background: var(--black-2); font-weight: 800; font-size: 14px; white-space: nowrap; }
.rules__i { font-size: 20px; color: var(--yellow); }
.rules__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin: 0 8px; align-self: center; }
.mix {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; padding: 16px; border-radius: var(--r-m);
  background: var(--red-btn); color: #fff; text-align: left; box-shadow: 0 5px 0 var(--red-deep);
  transition: transform var(--t-fast);
}
.mix:active { transform: translateY(3px); }
.mix__ico { font-size: 40px; padding: 8px; width: 56px; height: 56px; border-radius: 50%; background: var(--black); color: var(--yellow); }
.mix__body { flex: 1; display: grid; }
.mix__en { font-family: var(--f-sign); font-size: 12px; letter-spacing: .12em; }
.mix__name { font-family: var(--f-show); font-size: 24px; line-height: 1.2; }
.mix__desc { font-size: 13px; font-weight: 700; }
.mix__best { display: grid; justify-items: end; font-size: 12px; font-weight: 800; }
.mix__best .num { font-size: 22px; color: #fff; }
.tiles { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; display: block; width: 100%; border-radius: var(--r-m); overflow: hidden; text-align: left;
  background: var(--panel); box-shadow: 0 4px 0 #050506, inset 0 0 0 2px var(--line); transition: transform var(--t-fast);
}
.tile:active { transform: translateY(3px) scale(.98); }
.tile img { width: 100%; height: auto; aspect-ratio: 1 / .78; object-fit: cover; }
.tile__body { display: grid; gap: 2px; padding: 8px 12px 12px; background: var(--panel); }
.tile__en { font-family: var(--f-sign); font-size: 11px; letter-spacing: .1em; color: var(--yellow); }
.tile__name { font-family: var(--f-show); font-size: 19px; line-height: 1.25; }
.tile__stat { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 800; color: var(--mute); white-space: nowrap; }
.tile__stat .num { font-size: 16px; color: var(--white); }
.tile__bar { height: 5px; border-radius: 9px; background: var(--black); overflow: hidden; margin-top: 4px; }
.tile__bar i { display: block; height: 100%; background: var(--yellow); }

/* ---------- 出題 ---------- */
.screen--play { background: radial-gradient(120% 60% at 50% 0%, #2a0c12 0%, var(--black) 60%); background-color: var(--black); padding-bottom: calc(var(--safe-b) + 12px); }
.flash { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; }
.flash.is-good { animation: flash-good .45s ease-out; }
.flash.is-bad { animation: flash-bad .45s ease-out; }
@keyframes flash-good { 0% { opacity: .55; background: radial-gradient(circle at 50% 55%, rgba(255, 210, 63, .9), rgba(255, 210, 63, 0) 70%); } 100% { opacity: 0; } }
@keyframes flash-bad { 0% { opacity: .5; background: rgba(227, 38, 46, .6); } 100% { opacity: 0; } }
.screen--play.is-shake { animation: shake .26s linear; }
@keyframes shake { 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.hud { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 8px) 12px 6px; }
.hud__q { display: flex; align-items: baseline; gap: 2px; padding: 4px 10px; border-radius: 6px; background: var(--black-2); white-space: nowrap; }
.hud__k { font-family: var(--f-sign); font-size: 13px; color: var(--mute); letter-spacing: .08em; }
.hud__q .num { font-size: 22px; color: var(--yellow); }
.hud__of { font-family: var(--f-sign); font-size: 14px; color: var(--mute); }
.lives { display: flex; gap: 3px; font-size: 21px; color: var(--red); margin-right: auto; }
.lives svg.is-lost { color: #4a3d4f; animation: lost .5s var(--ease); }
@keyframes lost { 0% { transform: scale(1.6); color: var(--red); } }
.hud__score { display: grid; justify-items: end; line-height: 1.05; padding: 4px 10px; border-radius: 6px; background: var(--black-2); }
.hud__score .num { font-size: 22px; color: var(--white); }
.hud__score.is-bump .num { animation: bump .3s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18); color: var(--yellow); } }

.clock { position: relative; z-index: 3; display: flex; align-items: center; gap: 12px; margin: 6px 14px 0; padding: 8px 12px; border-radius: 99px; background: var(--black-2); box-shadow: inset 0 0 0 2px var(--line); }
.bulbs { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.bulbs i { aspect-ratio: 1; border-radius: 50%; background: #3a2f22; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .4); transition: background .15s, box-shadow .15s; }
.bulbs i.is-on { background: radial-gradient(circle at 40% 35%, #fff6c8, var(--yellow) 55%, #c79400); box-shadow: 0 0 10px rgba(255, 210, 63, .8); }
.bulbs.is-hurry i.is-on { background: radial-gradient(circle at 40% 35%, #ffd0d0, var(--red) 55%, #8a0d14); box-shadow: 0 0 12px rgba(227, 38, 46, .9); animation: blink .5s steps(2, start) infinite; }
.clock__sec { width: 64px; text-align: right; font-size: 26px; color: var(--yellow); }
.clock.is-hurry .clock__sec { color: #ff6a6f; }
.clock.is-frozen .clock__sec { color: var(--mute); }

.meta { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 14px 0; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 99px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.chip--genre { background: var(--white); color: var(--black); }
.chip--lv { background: var(--black-2); color: var(--mute); box-shadow: inset 0 0 0 1.5px var(--line); }
.chip--streak { background: var(--yellow); color: var(--black); animation: pop-in .35s var(--spring); }
@keyframes pop-in { from { transform: scale(.4); } }

.panel { position: relative; z-index: 3; margin: 10px 12px 0; padding: 20px 18px; min-height: 124px; display: grid; place-items: center; border-radius: 14px; background: var(--panel); }
.panel__lights {
  position: absolute; inset: 0; border-radius: inherit; padding: 6px; pointer-events: none;
  background: radial-gradient(circle, #ffe680 0 2.6px, transparent 3.2px) 0 0 / 14px 14px, radial-gradient(circle, #8a6a1a 0 2.6px, transparent 3.2px) 7px 7px / 14px 14px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: chase .6s steps(2) infinite;
}
@keyframes chase { to { background-position: 7px 7px, 14px 14px; } }
.panel__q { position: relative; font-family: var(--f-show); font-weight: 400; font-size: var(--q-size); line-height: 1.5; text-align: center; color: var(--white); word-break: keep-all; font-feature-settings: "palt"; }
.panel.is-in .panel__q { animation: q-in .35s var(--ease); }
@keyframes q-in { from { opacity: 0; transform: translateY(8px); } }

.answers { position: relative; z-index: 3; list-style: none; margin: 12px 12px 0; padding: 0; display: grid; gap: 9px; }
.ans {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 14px 8px 8px;
  border-radius: var(--r-s); background: var(--black-2); color: var(--white); text-align: left;
  box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 #050506; font-weight: 800; font-size: 17px; line-height: 1.35;
  transition: transform var(--t-fast), background .12s, box-shadow .12s, opacity .2s;
}
.ans.is-show { animation: ans-in .28s var(--ease) both; }
@keyframes ans-in { from { opacity: 0; transform: translateX(-16px); } }
.ans:active:not([disabled]) { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--yellow), 0 1px 0 #050506; }
.ans__k { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--red-btn); color: #fff; font-family: var(--f-sign); font-size: 18px; }
.ans__t { flex: 1; word-break: keep-all; }
.ans__mark { flex: none; font-size: 26px; display: none; }
.ans.is-right { background: var(--yellow); color: var(--black); box-shadow: 0 0 0 3px #fff3b0, 0 0 26px rgba(255, 210, 63, .7); }
.ans.is-right .ans__k { background: var(--black); color: var(--yellow); }
.ans.is-right .ans__mark { display: block; color: var(--black); }
.ans.is-wrong { background: #6d0d13; color: #fff; box-shadow: inset 0 0 0 2px #ff6a6f; }
.ans.is-wrong .ans__mark { display: block; color: #fff; }
.ans.is-reveal { box-shadow: inset 0 0 0 3px var(--yellow); }
.ans.is-reveal .ans__mark { display: block; color: var(--yellow); }
.ans.is-out { opacity: .25; }
.ans[disabled] { cursor: default; }

.lifelines { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: auto 12px 0; padding-top: 12px; }
.life { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 99px; background: var(--black-2); color: var(--yellow); font-weight: 800; font-size: 15px; box-shadow: inset 0 0 0 2px var(--yellow-deep); transition: transform var(--t-fast); }
.life .num { font-size: 16px; }
.life svg { font-size: 20px; }
.life:active:not([disabled]) { transform: scale(.96); }
.life[disabled] { color: #8d8377; box-shadow: inset 0 0 0 2px var(--line); text-decoration: line-through; cursor: default; }

.pops { position: absolute; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.pop { position: absolute; left: 0; top: 0; padding: 4px 12px; border-radius: 6px; background: var(--yellow); color: var(--black); font-family: var(--f-sign); font-size: 24px; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.pop small { font-family: var(--f-body); font-weight: 800; font-size: 13px; margin-left: 4px; }

.stinger { position: absolute; inset: 0; z-index: 10; display: none; flex-direction: column; align-items: center; justify-content: center; background: rgba(10, 10, 12, .96); pointer-events: none; }
.stinger.is-on { display: flex; }
.stinger__k { font-family: var(--f-sign); font-size: 22px; letter-spacing: .3em; color: var(--yellow); animation: st-k .7s var(--ease) both; }
.stinger__n { font-size: 110px; line-height: 1; color: var(--white); animation: st-n .7s var(--spring) both; text-shadow: 0 6px 0 var(--red-deep); }
@keyframes st-k { from { letter-spacing: 1em; opacity: 0; } }
@keyframes st-n { from { transform: scale(2.4); opacity: 0; } }

.banner { position: absolute; left: 0; right: 0; top: 42%; z-index: 9; display: none; justify-content: center; pointer-events: none; }
.banner.is-on { display: flex; animation: banner .9s var(--ease) both; }
.banner span { padding: 8px 24px; background: var(--yellow); color: var(--black); font-family: var(--f-show); font-size: 30px; transform: rotate(-4deg); box-shadow: 0 8px 0 var(--yellow-deep), 0 0 40px rgba(255, 210, 63, .6); white-space: nowrap; }
@keyframes banner { 0% { transform: scale(2); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }

.demo { position: absolute; z-index: 11; left: 0; right: 0; bottom: 0; display: none; flex-direction: column; align-items: center; gap: 10px; padding: 18px 16px calc(var(--safe-b) + 16px); background: var(--black); box-shadow: 0 -20px 30px rgba(10, 10, 12, .9); }
.demo.is-on { display: flex; }
.demo__tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 99px; background: var(--red-btn); color: #fff; font-weight: 800; font-size: 14px; }
.demo__tag i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1s steps(2, start) infinite; }

.pause { position: absolute; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 5, 6, .9); }
.pause.is-on { display: flex; }
.pause__card { width: 100%; display: grid; gap: 12px; padding: 22px 18px; border-radius: 16px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); text-align: center; }
.pause__en { font-family: var(--f-sign); font-size: 14px; letter-spacing: .3em; color: var(--yellow); }
.pause__title { font-family: var(--f-show); font-weight: 400; font-size: 30px; }
.pause__text { font-size: 15px; color: var(--mute); word-break: normal; text-align: left; }

/* ---------- 結果 ---------- */
.screen--result { background: var(--black) url(/app-development/apps/a019/img/result.webp) center top / 100% auto no-repeat; }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.result__scroll { position: relative; z-index: 1; padding: calc(var(--safe-t) + 60px) 14px 16px; }
.result__hero { display: grid; justify-items: center; gap: 6px; text-align: center; padding-bottom: 18px; }
.result__label { padding: 3px 12px; border-radius: 99px; background: var(--black); font-weight: 800; font-size: 13px; color: var(--yellow); }
.rank { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; background: var(--red-btn); color: #fff; font-family: var(--f-sign); font-size: 64px; line-height: 1; box-shadow: 0 0 0 6px var(--yellow), 0 0 0 10px var(--black), 0 0 60px rgba(255, 210, 63, .6); }
.rank.is-in { animation: rank-in .7s var(--spring) both; }
@keyframes rank-in { from { transform: scale(3) rotate(-30deg); opacity: 0; } }
.result__title span { display: inline-block; padding: 4px 16px; border-radius: 6px; background: var(--black); font-family: var(--f-show); font-weight: 400; font-size: 26px; }
.result__score { display: flex; align-items: baseline; gap: 6px; padding: 2px 16px 6px; border-radius: 10px; background: var(--black); white-space: nowrap; }
.result__score .num { font-size: 52px; color: var(--yellow); line-height: 1.1; }
.result__score span { font-weight: 800; }
.result__new { padding: 3px 14px; border-radius: 99px; background: var(--yellow); color: var(--black); font-weight: 800; font-size: 14px; animation: pop-in .4s .6s var(--spring) both; }
.result__card { display: grid; gap: 14px; padding: 16px 14px; border-radius: 16px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); }
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.strip li { display: grid; justify-items: center; gap: 2px; }
.strip b { font-family: var(--f-sign); font-weight: 400; font-size: 11px; color: var(--mute); }
.strip span { width: 100%; aspect-ratio: 1; max-width: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; }
.strip .ok span { background: var(--yellow); color: var(--black); }
.strip .ng span { background: #6d0d13; color: #fff; }
.strip .na span { background: var(--black); box-shadow: inset 0 0 0 1.5px var(--line); }
.rstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.rstats div { padding: 8px 10px; border-radius: 10px; background: var(--black); }
.rstats dt { font-size: 12px; font-weight: 800; color: var(--mute); }
.rstats dd { margin: 0; font-weight: 800; white-space: nowrap; font-size: 13px; }
.rstats .num { font-size: 22px; color: var(--white); margin-right: 2px; }
.breakdown { font-size: 14px; color: var(--mute); word-break: normal; }
.breakdown b { color: var(--white); font-weight: 800; white-space: nowrap; }
.sub-h { font-family: var(--f-show); font-weight: 400; font-size: 18px; margin-top: 4px; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.history li { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--black); }
.history__rank { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--red-btn); color: #fff; font-family: var(--f-sign); font-size: 17px; }
.history__rank.is-over { background: #3c3340; }
.history__g { font-weight: 800; font-size: 15px; }
.history__d { font-size: 13px; color: var(--mute); }
.history__s { font-size: 20px; color: var(--yellow); }
.result__actions { position: relative; z-index: 3; display: grid; gap: 10px; padding: 12px 14px calc(var(--safe-b) + 14px); background: var(--black); box-shadow: 0 -12px 24px rgba(10, 10, 12, .9); }
.result__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- 復習 ---------- */
.review__scroll { padding: 14px 14px calc(var(--safe-b) + 24px); }
.drill { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; padding: 16px; border-radius: 16px; background: var(--red-btn); box-shadow: 0 5px 0 var(--red-deep); }
.drill__n { grid-row: span 2; display: flex; align-items: baseline; gap: 2px; padding: 6px 12px; border-radius: 12px; background: var(--black); white-space: nowrap; }
.drill__n .num { font-size: 40px; color: var(--yellow); line-height: 1; }
.drill__n span { font-weight: 800; }
.drill__text { font-size: 14px; font-weight: 700; color: #fff; word-break: normal; }
.drill .btn { grid-column: 1 / -1; margin-top: 6px; }
.vfilter { display: flex; gap: 6px; overflow-x: auto; margin: 14px -14px 0; padding: 2px 14px 4px; scrollbar-width: none; }
.vfilter::-webkit-scrollbar { display: none; }
.vfilter button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 99px; background: var(--black-2); color: var(--mute); font-weight: 800; font-size: 14px; box-shadow: inset 0 0 0 2px var(--line); white-space: nowrap; }
.vfilter button[aria-pressed="true"] { background: var(--white); color: var(--black); box-shadow: none; }
.sample-note { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: var(--black-2); color: var(--mute); font-size: 13px; word-break: normal; }
.notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.note { padding: 14px; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line); }
.note__top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note__g { padding: 2px 10px; border-radius: 99px; background: var(--white); color: var(--black); font-weight: 800; font-size: 12px; }
.note__miss { font-size: 12px; font-weight: 800; color: #ff9da1; white-space: nowrap; }
.note__q { font-family: var(--f-show); font-weight: 400; font-size: 17px; line-height: 1.5; word-break: keep-all; }
.note__a { display: grid; gap: 4px; margin-top: 10px; }
.note__row { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.note__row svg { font-size: 18px; }
.note__row.is-ok { color: var(--yellow); }
.note__row.is-ng { color: #ff9da1; }
.note__e { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--mute); word-break: normal; }
.note.is-gone { animation: gone .4s var(--ease) forwards; }
@keyframes gone { to { opacity: 0; transform: translateX(40px); } }
.empty { display: grid; justify-items: center; gap: 8px; margin-top: 30px; text-align: center; }
.empty > svg { width: 72px; height: 72px; padding: 16px; border-radius: 50%; background: var(--yellow); color: var(--black); }
.empty__title { font-family: var(--f-show); font-size: 20px; }
.empty__text { color: var(--mute); font-size: 14px; margin-bottom: 8px; }

/* ---------- 設定 ---------- */
.set__scroll { padding: 6px 14px calc(var(--safe-b) + 24px); }
.sec-h { margin: 22px 2px 10px; font-family: var(--f-show); font-weight: 400; font-size: 18px; color: var(--yellow); }
.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.howto li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px; border-radius: 14px; background: var(--panel); }
.howto__n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); color: var(--black); font-size: 22px; }
.howto h3 { font-size: 16px; font-weight: 800; line-height: 1.4; }
.howto p { margin-top: 4px; font-size: 14px; color: var(--mute); word-break: normal; }
.group { border-radius: 14px; background: var(--panel); overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row--stack { flex-direction: column; align-items: stretch; }
.row__label { font-weight: 800; }
.row__label small { display: block; font-size: 12px; color: var(--mute); font-weight: 500; }
.row--btn { width: 100%; justify-content: flex-start; color: #ff9da1; font-weight: 800; }
.row--btn svg { font-size: 22px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--black); }
.seg button { min-height: 42px; border-radius: 8px; font-weight: 800; color: var(--mute); }
.seg button[aria-pressed="true"] { background: var(--yellow); color: var(--black); }
.switch { position: relative; flex: none; width: 56px; height: 34px; border-radius: 99px; background: var(--line); transition: background .2s; }
.switch i { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); }
.switch[aria-checked="true"] { background: var(--red-btn); }
.switch[aria-checked="true"] i { transform: translateX(22px); }
.about { padding: 16px; display: grid; gap: 12px; }
.about__head { display: flex; align-items: center; gap: 14px; }
.about__head img { width: 64px; height: 64px; border-radius: 15px; }
.about__name { font-family: var(--f-show); font-size: 18px; }
.about__ver { font-size: 13px; color: var(--mute); }
.about__note { font-size: 14px; word-break: normal; }
.about__k { font-size: 13px; font-weight: 800; color: var(--yellow); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 4px 10px; border-radius: 99px; background: var(--black); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* ---------- シート等 ---------- */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(0, 0, 0, .7); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.is-on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; z-index: 41; left: 0; right: 0; bottom: 0; display: grid; gap: 10px; padding: 10px 18px calc(var(--safe-b) + 20px); border-radius: 20px 20px 0 0; background: var(--panel); box-shadow: inset 0 2px 0 var(--line); transform: translateY(110%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; }
.sheet.is-on { transform: none; visibility: visible; transition: transform .3s var(--ease); }
.sheet__grab { justify-self: center; width: 40px; height: 5px; border-radius: 9px; background: var(--line); }
.sheet h2 { font-family: var(--f-show); font-weight: 400; font-size: 22px; line-height: 1.35; }
.sheet p { font-size: 15px; color: var(--mute); word-break: normal; }
.toast { position: absolute; z-index: 60; left: 50%; top: calc(var(--safe-t) + 12px); width: max-content; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 8px; background: var(--yellow); color: var(--black); font-weight: 800; transform: translate(-50%, calc(-100% - 40px)); visibility: hidden; transition: transform .3s var(--spring), visibility 0s .3s; pointer-events: none; word-break: keep-all; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .3s var(--spring); }
.splash { position: absolute; inset: 0; z-index: 90; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--black); }
.splash.is-on { display: flex; }
.splash.is-out { opacity: 0; transition: opacity .3s; }
.splash img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 0 50px rgba(227, 38, 46, .6); }
.splash p { font-family: var(--f-show); font-size: 20px; }
.loadfail { position: absolute; inset: 0; z-index: 95; display: grid; place-content: center; gap: 12px; padding: 24px; background: var(--black); text-align: center; }
.loadfail[hidden] { display: none; }
.loadfail__t { font-family: var(--f-show); font-size: 22px; }
.noscript { position: absolute; inset: auto 16px 40% 16px; padding: 16px; border-radius: 10px; background: var(--yellow); color: var(--black); font-weight: 800; text-align: center; }

@media (max-height: 700px) {
  .panel { min-height: 96px; padding: 14px; }
  .ans { min-height: 50px; font-size: 16px; }
  .ans__k { width: 34px; height: 34px; }
  .answers { gap: 7px; }
  :root { --q-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .beams { display: none; }
}
.ans.is-pick { background: #2c2433; box-shadow: inset 0 0 0 3px var(--white); }
.nowrap { white-space: nowrap; }
.hud__k--jp { font-family: var(--f-body); font-weight: 800; font-size: 12px; margin-right: 4px; }
