.opposite-shell { width: min(1060px, calc(100% - 32px)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.game-card { overflow: hidden; border: 3px solid var(--ink); background: var(--panel); box-shadow: 10px 10px 0 var(--shadow); }
.game-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding: 30px 34px; border-bottom: 3px solid var(--ink); }
.game-heading .eyebrow { margin-bottom: 10px; }
.game-heading h1 { max-width: 820px; font-size: clamp(2.2rem, 6.6vw, 4.8rem); line-height: .94; overflow-wrap: anywhere; }
.lede { max-width: 700px; margin: 18px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.progress-box { min-width: 150px; padding: 16px; border: 2px solid var(--line); background: #171220; text-align: center; }
.progress-box > span, .stat > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .1em; }
.progress-box strong { color: var(--gold); font-size: 1.6rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 3px solid var(--ink); }
.stat { min-width: 0; padding: 18px 12px; border-right: 2px solid var(--line); text-align: center; }
.stat:last-child { border-right: 0; }
.stat strong { color: var(--ink); font-size: clamp(1.02rem, 3vw, 1.6rem); }
.game-stage { min-height: 700px; padding: 34px 34px 32px; background: linear-gradient(rgba(88, 199, 215, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(88, 199, 215, .025) 1px, transparent 1px), radial-gradient(circle at 50% 23%, #302640 0, transparent 51%); background-size: 24px 24px, 24px 24px, auto; }
.prompt-panel { display: flex; min-height: 390px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stage-kicker { margin: 0 0 12px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.arrow-frame { position: relative; display: grid; width: min(460px, 100%); min-height: 176px; place-items: center; margin: 0 0 18px; overflow: hidden; border: 3px solid var(--line); background: #120f1d; box-shadow: 7px 7px 0 var(--shadow); }
.arrow-frame::before, .arrow-frame::after { position: absolute; width: 64px; height: 8px; background: #332a42; content: ""; }
.arrow-frame::before { left: 20px; transform: rotate(45deg); }
.arrow-frame::after { right: 20px; transform: rotate(-45deg); }
.target-arrow { z-index: 1; display: block; color: var(--gold); font-size: clamp(6rem, 22vw, 10rem); font-weight: 900; line-height: .8; text-shadow: 5px 5px 0 var(--shadow); transform: scale(.94); }
.reverse-badge { position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: 6px 8px; border: 2px solid var(--blue); background: #171220; color: var(--blue); font-size: .68rem; font-weight: 900; letter-spacing: .11em; }
.prompt-panel h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2.5rem); letter-spacing: -.04em; }
.prompt-panel > p:not(.stage-kicker, .sr-only) { max-width: 650px; min-height: 48px; margin: 12px 0 10px; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.timing-wrap { width: min(560px, 100%); margin: 2px 0 14px; }
.timing-wrap[hidden] { display: none; }
.timing-labels { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; }
.deadline-track { height: 16px; overflow: hidden; border: 2px solid var(--line); background: #0c0912; }
.deadline-fill { display: block; width: 100%; height: 100%; background: var(--green); transform: scaleX(1); transform-origin: left center; }
.deadline-fill.is-danger { background: var(--red); }
.result-flash { display: flex; min-height: 41px; margin: 0 0 13px; flex-direction: column; align-items: center; justify-content: center; }
.result-flash[hidden] { display: none; }
.result-flash strong { color: var(--green); font-size: 1.6rem; }
.result-flash span { color: var(--muted); font-size: .82rem; }
.direction-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: ". up ." "left down right"; gap: 11px; width: min(720px, 100%); margin: 22px auto 0; }
.direction-up { grid-area: up; }
.direction-left { grid-area: left; }
.direction-right { grid-area: right; }
.direction-down { grid-area: down; }
.direction-button { display: grid; min-width: 0; min-height: 98px; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 4px 12px; align-items: center; padding: 13px 14px; border: 3px solid var(--ink); border-radius: 0; background: #231b30; box-shadow: 5px 5px 0 var(--shadow); color: var(--ink); cursor: pointer; touch-action: manipulation; transition: transform 80ms ease, box-shadow 80ms ease, background 100ms ease; user-select: none; }
.direction-button:disabled { cursor: default; opacity: .46; }
.direction-button:not(:disabled):hover { background: #302540; }
.direction-button:not(:disabled):active, .direction-button.is-pressed { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--shadow); }
.direction-button:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
.direction-mark { grid-row: 1 / 3; color: var(--blue); font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 900; line-height: 1; }
.direction-right .direction-mark, .direction-left .direction-mark { color: var(--orange); }
.direction-button strong { min-width: 0; font-size: clamp(.8rem, 2vw, 1.05rem); letter-spacing: .08em; text-align: left; overflow-wrap: anywhere; }
.key-pair { display: flex; gap: 5px; }
.key-pair kbd { width: 28px; height: 28px; border-color: var(--line); font-size: .75rem; }
.control-note { max-width: 760px; margin: 20px auto 0; color: var(--muted); font-size: .84rem; line-height: 1.5; text-align: center; }
.game-stage[data-state="countdown"] .target-arrow { animation: ready-pulse 650ms steps(2, end) infinite; }
.game-stage[data-state="active"] .arrow-frame { border-color: var(--gold); }
.game-stage[data-state="active"] .target-arrow { animation: arrow-arrive 150ms steps(3, end); }
.game-stage[data-state="active"][data-target="up"] .target-arrow { color: var(--gold); }
.game-stage[data-state="active"][data-target="right"] .target-arrow { color: var(--orange); }
.game-stage[data-state="active"][data-target="down"] .target-arrow { color: var(--blue); }
.game-stage[data-state="active"][data-target="left"] .target-arrow { color: var(--green); }
.game-stage[data-state="active"] .primary-button, .game-stage[data-state="feedback"] .primary-button, .game-stage[data-state="countdown"] .primary-button { visibility: hidden; }
.game-stage[data-state="game-over"] { background-color: #351521; }
.game-stage[data-state="complete"] { background-color: #1d3128; }
.content-section { display: grid; grid-template-columns: .85fr 1.6fr; gap: 64px; padding: 76px 18px 58px; }
.content-section h2, .info-panel h2, .faq-section h2, .related-section h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.05em; }
.steps-list { margin: 0; padding: 0; border-top: 2px solid var(--line); list-style: none; }
.steps-list li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 18px; padding: 20px 0; border-bottom: 2px solid var(--line); }
.steps-list span { color: var(--gold); font-weight: 800; }
.steps-list p, .info-panel p, .faq-list p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.reading-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.info-panel { min-width: 0; padding: 30px; border: 2px solid var(--line); background: var(--panel); }
.info-panel h2 { margin-bottom: 22px; }
.info-panel > p:not(.section-kicker) + p { margin-top: 16px; }
.faq-section, .related-section { padding: 72px 18px 0; }
.faq-list { margin-top: 28px; border-top: 2px solid var(--line); }
.faq-list details { border-bottom: 2px solid var(--line); }
.faq-list summary { padding: 22px 44px 22px 0; color: var(--ink); cursor: pointer; font-size: 1.05rem; font-weight: 800; line-height: 1.4; }
.faq-list details p { max-width: 850px; padding: 0 0 24px; }
.related-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.related-links a { display: flex; min-width: 0; min-height: 118px; flex-direction: column; justify-content: space-between; padding: 18px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 800; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.related-links a:hover, .related-links a:focus-visible { border-color: var(--gold); outline: 0; }
.related-links small { color: var(--muted); font-size: .76rem; font-weight: 400; }
@keyframes ready-pulse { 0%, 49% { opacity: .35; } 50%, 100% { opacity: 1; } }
@keyframes arrow-arrive { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(.94); } }
@media (max-width: 820px) { .game-heading { grid-template-columns: 1fr; } .progress-box { display: flex; align-items: center; justify-content: space-between; } .progress-box > span { margin: 0; } .related-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) {
  .opposite-shell { width: min(100% - 18px, 620px); padding-top: 10px; }
  .game-card { box-shadow: 6px 6px 0 var(--shadow); }
  .game-heading { gap: 20px; padding: 24px 18px; }
  .game-heading h1 { font-size: clamp(1.9rem, 10vw, 3.35rem); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 2px solid var(--line); }
  .game-stage { min-height: 700px; padding: 28px 12px 24px; }
  .prompt-panel { min-height: 390px; }
  .arrow-frame { min-height: 150px; box-shadow: 5px 5px 0 var(--shadow); }
  .target-arrow { font-size: clamp(6rem, 35vw, 8.8rem); }
  .direction-pad { gap: 8px; }
  .direction-button { min-height: 88px; grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 2px; justify-items: center; padding: 8px 5px; box-shadow: 3px 3px 0 var(--shadow); }
  .direction-mark { grid-row: auto; font-size: 2.5rem; }
  .direction-button strong { max-width: 100%; font-size: .7rem; text-align: center; }
  .key-pair { display: none; }
  .content-section, .reading-grid { grid-template-columns: 1fr; }
  .content-section { gap: 30px; padding: 58px 8px 44px; }
  .info-panel { padding: 24px 20px; }
  .faq-section, .related-section { padding: 58px 8px 0; }
  .related-links { grid-template-columns: 1fr; }
  .related-links a { min-height: 92px; }
}
@media (max-width: 350px) { .game-stage { padding-inline: 8px; } .direction-button { min-height: 82px; } .direction-button strong { font-size: .62rem; letter-spacing: .04em; } .reverse-badge { font-size: .58rem; } }
@media (prefers-reduced-motion: reduce) { .target-arrow, .game-stage[data-state="active"] .target-arrow, .game-stage[data-state="countdown"] .target-arrow { animation: none; } .direction-button, .deadline-fill { transition: none !important; } }
