:root { color-scheme:light; --ink:#1f3b40; --sub:#5a777c; --sea:#2a9d8f; --line:#cfe3e1; }
* { box-sizing:border-box; letter-spacing:0; }
body { --text-scale:1; --control-space:64px; margin:0; color:var(--ink); background:#f5f7f6; font:calc(17px * var(--text-scale))/1.8 "Hiragino Maru Gothic ProN","Hiragino Sans",system-ui,sans-serif; }
body[data-text-size="large"] { --text-scale:1.2; }
body[data-text-size="extra"] { --text-scale:1.4; }
button,a { -webkit-tap-highlight-color:transparent; }
button { font:inherit; cursor:pointer; touch-action:manipulation; }
button:disabled { cursor:default; opacity:.4; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid #2775b6; outline-offset:4px; }
[hidden] { display:none !important; }
main { max-width:1160px; margin:auto; padding:24px; }
.screen { position:relative; width:100%; aspect-ratio:16/9; min-height:480px; background:#121614; overflow:hidden; isolation:isolate; color:#fff; color-scheme:dark; }
/* Short display text breaks between phrases where the browser can do it (Chrome, Edge); elsewhere the usual breaking applies. */
.caption,.interaction h2,.choice span { word-break:auto-phrase; text-wrap:balance; }
.screen:fullscreen,.screen.expanded { width:100%; height:100dvh; min-height:0; max-width:none; aspect-ratio:auto; }
.screen.expanded { position:fixed; inset:0; z-index:100; }
body.player-expanded { overflow:hidden; }
video,.transition-frame { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; }
.transition-frame { z-index:1; opacity:0; pointer-events:none; transition:opacity .24s ease-out; }
.screen.switching .transition-frame { opacity:1; }
.opening { position:absolute; z-index:2; inset:0; padding:24px 24px var(--control-space); display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; background:linear-gradient(transparent,#0008); }
h1 { font-size:calc(36px * var(--text-scale)); line-height:1.4; margin:10px 0 24px; text-shadow:0 2px 8px #000; }
.primary,.secondary { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:48px; border:1px solid transparent; border-radius:5px; padding:10px 22px; font-weight:600; line-height:1.55; }
.primary { color:#fff; background:var(--sea); }
.primary:hover { background:#21675d; }
.secondary { color:#fff; border-color:#ffffff70; background:#ffffff12; }
.secondary:hover { background:#ffffff24; }
button img { display:block; flex:none; filter:invert(1); }
.caption { position:absolute; z-index:2; left:6%; right:6%; bottom:calc(var(--control-space) + 18px); width:fit-content; max-width:88%; margin:0 auto; padding:10px 18px; color:#fff; background:rgba(8,30,40,.78); border-radius:12px; font-size:calc(21px * var(--text-scale)); text-align:center; pointer-events:none; line-height:1.7; box-shadow:0 2px 10px #0005; }
.overlay-shade { position:absolute; z-index:2; inset:0; background:rgba(8,30,40,.5); pointer-events:none; animation:reveal .25s ease both; }
.media-status { position:absolute; z-index:5; inset:0 0 var(--control-space); display:flex; gap:14px; flex-wrap:wrap; align-content:center; justify-content:center; align-items:center; background:#101614c9; color:white; padding:24px; text-align:center; }
.interaction { position:absolute; z-index:3; inset:20px 0 var(--control-space); overflow:auto; overscroll-behavior:contain; padding:20px 30px; display:flex; flex-direction:column; }
.interaction > * { flex-shrink:0; }
.screen[data-stage="question"] .interaction h2 { font-size:calc(30px * var(--text-scale)); text-align:center; line-height:1.5; text-shadow:0 1px 6px #0009; margin:0 auto 6px; max-width:800px; flex:none; }
.screen[data-stage="question"] .kicker { text-align:center; font-size:calc(19px * var(--text-scale)); color:#eafaf7; text-shadow:0 1px 6px #0009; }
.screen[data-stage="question"] .interaction > :first-child { margin-top:auto; }
.screen[data-stage="feedback"] .interaction { inset:auto; left:50%; top:calc((100% - var(--control-space)) / 2); transform:translate(-50%,-50%); width:calc(100% - 48px); max-width:560px; max-height:calc(100% - var(--control-space) - 32px); background:#fffdf8; color:var(--ink); border-radius:16px; padding:22px; box-shadow:0 10px 30px #0006; display:block; }
.screen[data-stage="feedback"] .interaction h2 { color:#e76f51; font-size:calc(23px * var(--text-scale)); line-height:1.5; }
.screen[data-stage="feedback"] .kicker { color:#1f7a70; font-weight:bold; }
.screen[data-stage="feedback"] .record { color:var(--sub); }
.screen[data-stage="feedback"] .secondary { color:var(--ink); border-color:var(--line); background:#fff; }
.interaction h2,.results h2 { font-size:calc(24px * var(--text-scale)); line-height:1.6; margin:0 0 8px; }
.interaction h2:focus,.results h2:focus { outline:none; }
p { margin:8px 0 12px; }
.kicker { font-size:calc(13px * var(--text-scale)); color:#d1dbd7; margin:0 0 6px; }
.choices { display:flex; flex-direction:column; flex:none; gap:12px; width:100%; max-width:640px; margin:14px auto auto; }
.choice { display:flex; align-items:center; gap:14px; width:100%; min-height:78px; padding:16px 18px; text-align:left; background:rgba(255,255,255,.97); border:3px solid transparent; border-radius:16px; color:var(--ink); font-size:calc(23px * var(--text-scale)); font-weight:bold; line-height:1.4; box-shadow:0 3px 12px #0004; transition:background .15s,border-color .15s; }
.choice:hover { background:#fff; border-color:var(--sea); }
.choice b { display:flex; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px; border-radius:50%; color:#fff; background:var(--sea); font-size:20px; font-weight:bold; }
.choice span { min-width:0; overflow-wrap:anywhere; text-wrap:pretty; }
.screen h1,.screen h2,.screen h3,.screen p,.screen legend,.screen button,.screen a { overflow-wrap:anywhere; line-break:strict; }
.primary,.secondary { max-width:100%; white-space:normal; }
.screen[data-stage="question"] .interaction h2 { text-wrap:balance; }
.screen button:focus-visible { outline-color:#a9e5ce; }
.actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:18px; }
.assessment { display:flex; gap:16px; align-items:flex-start; }
.assessment p { min-width:0; margin:4px 0; }
.mark { display:flex; align-items:center; justify-content:center; width:52px; height:52px; border-radius:50%; border:3px solid currentColor; font-size:28px; line-height:1.3; color:var(--sea); background:#fff; flex:0 0 52px; font-weight:900; }
.mark.caution { color:#c48e00; }
.mark.other { color:var(--sub); border-style:dashed; }
.compare { margin-top:14px; font-size:calc(15px * var(--text-scale)); }
.compare summary { color:var(--sub); padding:6px 0; font-size:calc(14px * var(--text-scale)); text-wrap:pretty; }
.compare-list { display:flex; flex-direction:column; gap:8px; margin-top:6px; }
.compare-list button { width:100%; justify-content:flex-start; text-align:left; min-height:44px; padding:8px 14px; font-weight:500; }
.results { position:absolute; z-index:3; inset:0 0 var(--control-space); overflow:auto; overscroll-behavior:contain; padding:16px 24px; background:#101614f0; }
.results > p { margin:6px 0 8px; }
.results .lead { font-size:calc(20px * var(--text-scale)); font-weight:600; }
.results .actions { margin-top:12px; }
.result-rows { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 32px; }
.result-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid #ffffff2e; }
.result-row p { margin:0; }
.fraction { font-size:calc(23px * var(--text-scale)); white-space:nowrap; }
.fraction strong { font-size:calc(32px * var(--text-scale)); }
.fraction small { font-size:calc(14px * var(--text-scale)); }
.fraction-mark { font-size:calc(20px * var(--text-scale)); }
.result-bar { grid-column:1/-1; height:8px; background:#ffffff2b; overflow:hidden; }
.result-bar span { display:block; height:100%; background:#84c7a8; width:0; }
.check-form fieldset { margin:18px 0; padding:12px; border:1px solid #ffffff70; min-width:0; }
.check-form legend { padding:0 6px; font-weight:600; }
.check-form label { display:flex; align-items:center; gap:10px; min-height:44px; cursor:pointer; }
.check-form input { width:20px; height:20px; margin:0; flex:none; accent-color:var(--sea); }
.post-check { margin-top:24px; border-top:1px solid #ffffff70; padding-top:12px; }
.check-comparison { padding:8px 0; border-bottom:1px solid #ffffff2e; }
.check-comparison span { display:inline-block; max-width:100%; }
.jump { margin:4px 0 10px; min-height:44px; padding:8px 18px; }
.review-choices { display:grid; gap:12px; margin:18px 0; }
.review-choices button { justify-content:flex-start; text-align:left; }
.survey-link { display:inline-block; color:#b8e8dd; padding:12px 0; }
.record { color:#c3cec8; font-size:calc(14px * var(--text-scale)); }
.player-controls { position:absolute; z-index:6; bottom:8px; left:12px; right:12px; height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:15px; line-height:1.4; }
.control-row { display:flex; align-items:center; gap:4px; flex:none; margin-left:auto; }
.text-size { display:flex; align-items:center; gap:8px; flex:none; padding:0 8px; height:44px; background:#081e28cc; border-radius:4px; }
.size-options { display:flex; height:36px; border:1px solid #ffffff70; border-radius:4px; overflow:hidden; }
.size-options button { width:48px; min-height:34px; padding:0; border:0; color:#fff; background:transparent; }
.size-options button + button { border-left:1px solid #ffffff70; }
.size-options button[aria-pressed="true"] { background:#fff; color:var(--ink); font-weight:700; }
.size-options button:focus-visible { outline-offset:-3px; }
.icon-button { flex:none; width:44px; height:44px; border:0; border-radius:4px; background:#081e2866; color:white; display:inline-flex; justify-content:center; align-items:center; }
.icon-button:not(:disabled):hover { background:#ffffff24; }
.icon-button[aria-pressed="true"] { background:#ffffff20; }
.resume { position:absolute; z-index:4; width:64px; height:64px; top:calc(50% - 65px); left:calc(50% - 32px); background:#101412cc; border-radius:50%; }
.text-button { color:var(--sea); background:none; border:0; border-bottom:1px solid currentColor; padding:3px 0; }
.footnotes { color:var(--sub); font-size:13px; padding:20px 0 0; }
.footnotes a { color:#346f89; }
.footnotes li { margin-bottom:5px; overflow-wrap:anywhere; }
summary { cursor:pointer; color:var(--ink); }
footer { max-width:1160px; padding:0 24px 30px; margin:auto; color:var(--sub); font-size:12px; }
.reveal { animation:reveal .24s ease-out both; }
@keyframes reveal { from {opacity:0} to {opacity:1} }
@media(max-width:650px) {
  body {--control-space:112px; font-size:calc(16px * var(--text-scale));}
  main {padding:16px 12px;}
  .screen {aspect-ratio:3/4; min-height:560px;}
  video,.transition-frame {object-position:center 20%;}
  h1 {font-size:calc(27px * var(--text-scale)); margin:8px 0 20px;}
  .opening {padding:18px 18px var(--control-space);}
  .caption {font-size:calc(16px * var(--text-scale)); left:4%; right:4%; padding:6px 10px;}
  .interaction {padding:14px 16px;}
  .interaction h2,.results h2 {font-size:calc(20px * var(--text-scale));}
  .screen[data-stage="question"] .interaction h2 {font-size:calc(23px * var(--text-scale));}
  .screen[data-stage="question"] .kicker {font-size:calc(15px * var(--text-scale));}
  .screen[data-stage="feedback"] .interaction {width:calc(100% - 28px); padding:16px;}
  .screen[data-stage="feedback"] .interaction h2 {font-size:calc(20px * var(--text-scale));}
  .choices {gap:12px;}
  .choice {min-height:72px; padding:12px 14px; font-size:calc(18px * var(--text-scale)); gap:12px;}
  .choice b {width:34px; height:34px; flex-basis:34px; font-size:18px;}
  .media-status {font-size:calc(14px * var(--text-scale)); padding:16px;}
  .player-controls {left:8px; right:8px; height:96px; flex-direction:column; align-items:stretch; gap:8px;}
  .text-size {align-self:flex-start;}
  .results {padding:16px;}
  .result-rows {grid-template-columns:1fr;}
  .fraction {font-size:calc(20px * var(--text-scale));}
  .fraction strong {font-size:calc(28px * var(--text-scale));}
  .actions {gap:10px;}
  .actions button {width:100%;}
}
@media(max-height:500px) and (orientation:landscape) {
  .screen:fullscreen .interaction,.screen.expanded .interaction {padding:12px 22px;}
  .screen:fullscreen[data-stage="question"] .interaction h2,.screen.expanded[data-stage="question"] .interaction h2 {font-size:calc(22px * var(--text-scale));}
  .screen:fullscreen[data-stage="question"] .kicker,.screen.expanded[data-stage="question"] .kicker {font-size:calc(14px * var(--text-scale));}
  .screen:fullscreen .choices,.screen.expanded .choices {gap:8px; margin-top:8px;}
  .screen:fullscreen .choice,.screen.expanded .choice {min-height:56px; padding:7px 14px; font-size:calc(18px * var(--text-scale));}
  .screen:fullscreen .choice b,.screen.expanded .choice b {width:34px; height:34px; flex-basis:34px;}
  .screen:fullscreen .actions,.screen.expanded .actions {margin-top:12px;}
  .screen:fullscreen .actions button,.screen.expanded .actions button {width:auto;}
}
@media(max-width:400px) {
  .screen[data-stage="question"] .interaction {padding-left:12px; padding-right:12px;}
  .choice {padding:12px 8px; gap:8px;}
  .choice b {width:28px; height:28px; flex-basis:28px; font-size:17px;}
  .assessment {display:flow-root;}
  .assessment .mark {float:left; margin:4px 12px 4px 0; width:44px; height:44px; font-size:25px;}
}
@media(prefers-reduced-motion:reduce) {.reveal {animation:none;} .transition-frame,.choice {transition:none;}}
