.flash-shell { width: min(1080px, calc(100% - 32px)); }
.game-card { overflow: hidden; border: 3px solid var(--ink); border-radius: 5px; background: var(--panel); box-shadow: 10px 10px 0 var(--shadow); }
.game-heading { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; padding: 30px 34px; border-bottom: 3px solid var(--ink); }
.eyebrow, .section-kicker { margin: 0; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .13em; }
.game-heading h1 { max-width: 820px; margin: 10px 0 0; font-size: clamp(2.2rem, 7vw, 4.8rem); line-height: .94; }
.lede { max-width: 720px; margin: 18px 0 0; color: var(--muted); line-height: 1.6; }
.progress-box { min-width: 150px; padding: 16px; border: 2px solid var(--line); border-radius: 5px; background: #0a2026; text-align: center; }
.progress-box > span, .stat > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .1em; }
.progress-box strong { color: var(--gold); font-size: 1.6rem; }
.mode-panel { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 2px solid var(--line); background: #0a2026; }
.mode-switch { display: flex; flex: 0 0 auto; gap: 6px; }
.mode-switch button { padding: 10px 14px; border: 2px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.mode-switch button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold); color: var(--night); }
.mode-switch button:disabled { cursor: not-allowed; opacity: .65; }
.mode-description { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; text-align: right; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 3px solid var(--ink); }
.stat { min-width: 0; padding: 18px 10px; border-right: 2px solid var(--line); text-align: center; }
.stat:last-child { border-right: 0; }
.stat strong { font-size: clamp(1rem, 3vw, 1.5rem); }
.flash-stage { display: flex; min-height: 610px; flex-direction: column; align-items: center; padding: 26px 28px 34px; background: linear-gradient(rgba(88,199,215,.04) 1px,transparent 1px), linear-gradient(90deg,rgba(88,199,215,.04) 1px,transparent 1px), radial-gradient(circle at 50% 40%,#173b45 0,transparent 62%); background-size: 24px 24px,24px 24px,auto; }
.stage-copy { min-height: 137px; text-align: center; }
.stage-kicker { margin: 0 0 9px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.stage-copy h2 { margin: 0; font-size: clamp(1.55rem,5vw,2.6rem); }
.stage-copy > p:not(.stage-kicker) { max-width: 680px; margin: 10px auto 0; color: var(--muted); line-height: 1.5; }
.phase-timer { width: min(820px,100%); margin-bottom: 18px; }
.timer-labels { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .1em; }
.timer-labels strong { color: var(--ink); font-size: 1rem; }
.countdown-bar { position: relative; height: 24px; overflow: hidden; border: 3px solid var(--ink); border-radius: 5px; background: #071a1f; box-shadow: 4px 4px 0 var(--shadow); }
.countdown-bar > span { position: absolute; inset: 0; background: var(--blue); transform: scaleX(0); transform-origin: left; will-change: transform; }
.countdown-bar[data-urgent="true"] > span { background: var(--red); }
.countdown-bar i { position: absolute; z-index: 1; top: 0; bottom: 0; width: 2px; background: rgba(7,26,31,.4); }
.countdown-bar i:nth-of-type(1) { left: 25%; } .countdown-bar i:nth-of-type(2) { left: 50%; } .countdown-bar i:nth-of-type(3) { left: 75%; }
.flash-screen { position: relative; display: flex; width: min(820px,100%); min-height: 265px; overflow: hidden; flex-direction: column; gap: 10px; align-items: center; justify-content: center; border: 4px solid var(--ink); border-bottom-width: 10px; border-radius: 5px; background: #0a2026; box-shadow: 7px 7px 0 var(--shadow); color: var(--ink); cursor: pointer; touch-action: manipulation; }
.flash-screen:not(:disabled):active { border-bottom-width: 4px; transform: translateY(6px); }
.flash-screen:disabled { cursor: not-allowed; opacity: .75; }
.flash-screen:focus-visible, .mode-switch button:focus-visible, .primary-button:focus-visible { outline: 4px solid var(--blue); outline-offset: 4px; }
.screen-grid { position: absolute; inset: 0; background: repeating-linear-gradient(0deg,transparent 0 23px,rgba(88,199,215,.06) 23px 24px), repeating-linear-gradient(90deg,transparent 0 23px,rgba(88,199,215,.06) 23px 24px); }
.flash-screen strong, .flash-screen small, .flash-count { position: relative; z-index: 2; }
.flash-screen strong { font-size: clamp(1.65rem,6vw,3.15rem); letter-spacing: .05em; }
.flash-screen small { color: var(--muted); font-weight: 800; letter-spacing: .12em; }
.flash-count { display: grid; width: 72px; height: 72px; place-items: center; border: 3px solid var(--line); border-radius: 5px; color: var(--gold); font-size: 2.7rem; font-weight: 900; }
.flash-burst { position: absolute; z-index: 1; color: transparent; font-size: 9rem; line-height: 1; }
.flash-screen[data-flash] { border-color: var(--gold); background: #f7c948; box-shadow: 0 0 34px rgba(247,201,72,.75),7px 7px 0 var(--shadow); color: var(--night); }
.flash-screen[data-flash] .screen-grid { opacity: .2; }
.flash-screen[data-flash] .flash-burst { color: #fff6c9; transform: scale(1.35); }
.flash-screen[data-flash] .flash-count { border-color: var(--night); color: var(--night); }
.flash-screen[data-flash] small { color: #153f51; }
.result-line { min-height: 1.4em; margin: 16px 0 8px; color: var(--muted); font-size: .82rem; font-weight: 900; letter-spacing: .06em; text-align: center; }
.result-line[data-kind="correct"] { color: var(--green); } .result-line[data-kind="wrong"] { color: var(--red); }
.primary-button { min-width: min(390px,100%); }
.control-note { margin: 14px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.5; text-align: center; }
.content-section, .faq-section, .related-section { margin-top: 48px; }
.content-section h2, .faq-section h2, .related-section h2, .info-panel h2 { margin: 8px 0 0; }
.steps-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding: 0; list-style: none; }
.steps-list li, .info-panel, .faq-list details, .related-links a { border: 2px solid var(--line); border-radius: 5px; background: var(--panel); }
.steps-list li { display: flex; gap: 14px; padding: 20px; }
.steps-list li > span { color: var(--gold); font-size: 1.25rem; font-weight: 900; }
.steps-list p, .info-panel p, .faq-list p { margin: 0; color: var(--muted); line-height: 1.65; }
.reading-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-top: 32px; }
.info-panel { padding: 26px; } .info-panel h2 { margin-bottom: 16px; } .info-panel p + p { margin-top: 12px; }
.faq-list { display: grid; gap: 10px; margin-top: 18px; } .faq-list details { padding: 18px 20px; } .faq-list summary { font-weight: 800; cursor: pointer; } .faq-list p { margin-top: 12px; }
.related-links { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-top: 18px; }
.related-links a { display: flex; gap: 5px; flex-direction: column; padding: 18px; color: var(--ink); text-decoration: none; }
.related-links a:hover { border-color: var(--gold); } .related-links small { color: var(--muted); }
@media (max-width:720px) {
  .flash-shell { width: min(100% - 20px,1080px); } .topbar { align-items: flex-start; } .topbar-meta { flex-wrap: wrap; justify-content: flex-end; }
  .game-heading { grid-template-columns: 1fr; gap: 18px; padding: 24px 20px; } .progress-box { min-width: 0; }
  .mode-panel { align-items: stretch; flex-direction: column; } .mode-switch button { flex: 1; } .mode-description { text-align: left; }
  .stats-grid { grid-template-columns: repeat(2,1fr); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 2px solid var(--line); }
  .flash-stage { min-height: 575px; padding: 24px 14px 30px; } .flash-screen { min-height: 235px; }
  .steps-list, .reading-grid, .related-links { grid-template-columns: 1fr; }
}
@media (max-width:430px) { .topbar-meta { max-width: 210px; } .topbar-link { font-size: .63rem; } .game-heading h1 { font-size: clamp(2rem,12vw,3rem); } .flash-screen { min-height: 220px; } .stage-copy { min-height: 150px; } }
@media (prefers-reduced-motion:reduce) { .countdown-bar > span { will-change: auto; } .flash-burst { display: none; } }
