.change-shell { width: min(1060px, calc(100% - 32px)); }
.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.2vw, 4.8rem); line-height: .94; }
.lede { max-width: 690px; margin: 18px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.round-box { min-width: 154px; padding: 16px; border: 2px solid var(--line); background: #171220; text-align: center; }
.round-box > span, .stat > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .1em; }
.round-box strong { color: var(--gold); font-size: 1.6rem; }
.game-card > .mode-panel { margin: 0; padding: 20px 24px; border-bottom: 3px solid var(--ink); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 3px solid var(--ink); }
.stat { min-width: 0; padding: 18px 20px; border-right: 2px solid var(--line); text-align: center; }
.stat:last-child { border-right: 0; }
.stat strong { color: var(--ink); font-size: clamp(1.05rem, 3vw, 1.65rem); }
.game-stage { display: flex; min-height: 760px; flex-direction: column; align-items: center; padding: 32px 28px 30px; background: linear-gradient(rgba(247,201,72,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(247,201,72,.025) 1px,transparent 1px),radial-gradient(circle at 50% 40%,#2a2039 0,transparent 53%); background-size: 24px 24px,24px 24px,auto; }
.stage-copy { min-height: 112px; text-align: center; }
.stage-kicker { margin: 0 0 10px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.stage-copy h2 { margin: 0; font-size: clamp(1.55rem,4vw,2.6rem); line-height: 1.05; letter-spacing: -.04em; }
.stage-copy > p:last-child { max-width: 650px; margin: 12px auto 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.phase-meter { display: grid; width: min(500px, 92vw); grid-template-columns: repeat(3, 1fr); margin: 0 auto 14px; border: 2px solid var(--line); background: #171220; }
.phase-meter span { min-width: 0; padding: 8px 5px; border-right: 2px solid var(--line); color: #746d7d; font-size: clamp(.58rem, 2vw, .72rem); font-weight: 900; letter-spacing: .06em; text-align: center; }
.phase-meter span:last-child { border-right: 0; }
.game-stage[data-state="study"] #phase-study,
.game-stage[data-state="mask"] #phase-mask,
.game-stage[data-state="reveal"] #phase-answer,
.game-stage[data-state="answer"] #phase-answer { background: var(--gold); color: #21190e; }
.deadline-track { flex: none; width: min(500px, 92vw); margin: 0 auto 14px; }
.change-grid { display: grid; width: min(500px, 92vw); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 auto 22px; }
.change-cell { position: relative; display: grid; aspect-ratio: 1; min-width: 0; padding: 0; place-items: center; overflow: hidden; border: 3px solid var(--line); border-radius: 0; background: #211a2e; box-shadow: 5px 5px 0 var(--shadow); color: var(--ink); cursor: default; touch-action: manipulation; transition: transform 80ms ease, box-shadow 80ms ease, border-color 100ms ease, background 100ms ease; user-select: none; }
.game-stage[data-state="answer"] .change-cell { cursor: pointer; }
.game-stage[data-state="answer"] .change-cell:hover { border-color: #71637f; background: #2d243b; }
.change-cell:active, .change-cell.is-pressed { transform: translate(3px,3px); box-shadow: 2px 2px 0 var(--shadow); }
.change-cell:focus-visible { z-index: 3; outline: 4px solid var(--blue); outline-offset: 2px; }
.change-cell:disabled { opacity: 1; }
.cell-key { position: absolute; top: 6px; left: 7px; z-index: 2; display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid #62586d; background: #171220; color: #b9b0c2; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .7rem; font-weight: 900; line-height: 1; }
.cell-symbol { position: relative; display: grid; width: 62%; aspect-ratio: 1; place-items: center; border: 3px solid currentColor; color: #58c7d7; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: clamp(1.55rem, 5vw, 3rem); font-weight: 900; line-height: 1; transition: opacity 80ms linear, transform 120ms ease; }
.cell-symbol::before, .cell-symbol::after { position: absolute; pointer-events: none; content: ""; }
.cell-symbol::before { inset: 5px; opacity: .48; }
.cell-symbol::after { width: 6px; height: 6px; right: 4px; bottom: 4px; background: currentColor; }
.cell-symbol[data-variant="circle-solid"], .cell-symbol[data-variant="circle-ring"] { border-radius: 50%; color: #58c7d7; }
.cell-symbol[data-variant="circle-solid"]::before { border-radius: 50%; background: currentColor; }
.cell-symbol[data-variant="circle-ring"]::before { border: 3px dotted currentColor; border-radius: 50%; }
.cell-symbol[data-variant="triangle-solid"], .cell-symbol[data-variant="triangle-ring"] { color: #f7c948; transform: rotate(0deg); }
.cell-symbol[data-variant="triangle-solid"]::before { background: repeating-linear-gradient(45deg,currentColor 0 3px,transparent 3px 7px); }
.cell-symbol[data-variant="triangle-ring"]::before { border: 3px dashed currentColor; }
.cell-symbol[data-variant="diamond-solid"], .cell-symbol[data-variant="diamond-ring"] { color: #ef7082; transform: rotate(45deg); }
.cell-symbol[data-variant="diamond-solid"] > span, .cell-symbol[data-variant="diamond-ring"] > span { transform: rotate(-45deg); }
.cell-symbol[data-variant="diamond-solid"]::before { background: repeating-linear-gradient(90deg,currentColor 0 3px,transparent 3px 7px); }
.cell-symbol[data-variant="diamond-ring"]::before { border: 3px dotted currentColor; }
.cell-symbol[data-variant="square-solid"], .cell-symbol[data-variant="square-ring"] { color: #9b87f5; }
.cell-symbol[data-variant="square-solid"]::before { background: currentColor; clip-path: polygon(0 0,40% 0,40% 40%,100% 40%,100% 100%,60% 100%,60% 60%,0 60%); }
.cell-symbol[data-variant="square-ring"]::before { background: repeating-linear-gradient(135deg,currentColor 0 2px,transparent 2px 6px); }
.cell-symbol[data-variant="cross-solid"], .cell-symbol[data-variant="cross-ring"] { color: #75dc93; }
.cell-symbol[data-variant="cross-solid"]::before { background: linear-gradient(90deg,transparent 34%,currentColor 34% 66%,transparent 66%),linear-gradient(transparent 34%,currentColor 34% 66%,transparent 66%); }
.cell-symbol[data-variant="cross-ring"]::before { border: 3px dashed currentColor; border-radius: 2px; }
.change-grid.is-masked .cell-symbol { opacity: 0; transform: scale(.72); }
.change-grid.is-masked .change-cell { background: repeating-linear-gradient(135deg,#1a1523 0 8px,#251d31 8px 16px); }
.change-cell.is-correct { border-color: #b4ffd0; background: rgba(117,220,147,.2); }
.change-cell.is-wrong { border-color: #ffadb4; background: rgba(239,112,130,.2); }
.change-cell.is-answer { outline: 4px solid var(--gold); outline-offset: -7px; }
.feedback { display: flex; min-height: 48px; margin: 0 0 14px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.feedback[hidden] { display: none; }
.feedback strong { color: var(--green); font-size: 1.35rem; }
.feedback span { margin-top: 4px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.game-stage[data-state="study"] .primary-button,
.game-stage[data-state="mask"] .primary-button,
.game-stage[data-state="reveal"] .primary-button,
.game-stage[data-state="answer"] .primary-button,
.game-stage[data-state="feedback"] .primary-button { visibility: hidden; }
.game-stage[data-state="study"] .change-grid { animation: study-glow 320ms steps(2,end) infinite; }
.game-stage[data-state="wrong"], .game-stage[data-state="game-over"] { background-color: #351521; }
.game-stage[data-state="complete"] { background-color: #2d2515; }
.control-note { margin: 18px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.7; text-align: center; }
.screen-reader-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.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 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 { 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(5,minmax(0,1fr)); gap: 12px; margin-top: 28px; }
.related-links a { display: flex; min-height: 118px; min-width: 0; 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; }
.related-links a:hover, .related-links a:focus-visible { border-color: var(--gold); outline: 0; }
.related-links small { margin-top: 12px; color: var(--muted); font-size: .76rem; font-weight: 400; }
@keyframes study-glow { 0%,49% { filter: brightness(.96); } 50%,100% { filter: brightness(1.06); } }
@media (max-width:820px) { .game-heading { grid-template-columns: 1fr; } .round-box { display: flex; align-items: center; justify-content: space-between; } .round-box > span { margin: 0; } .related-links { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .change-shell { width: min(100% - 18px,600px); padding-top: 10px; } .game-heading { gap: 20px; padding: 24px 18px; } .game-heading h1 { font-size: clamp(1.95rem,10.7vw,3.5rem); } .game-card > .mode-panel { padding-inline: 16px; } .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: 680px; padding: 28px 10px 24px; } .stage-copy { min-height: 128px; } .change-grid, .phase-meter, .deadline-track { width: min(390px,calc(100vw - 46px)); } .change-grid { gap: 7px; } .change-cell { border-width: 2px; box-shadow: 3px 3px 0 var(--shadow); } .cell-symbol { border-width: 2px; font-size: clamp(1.15rem,8vw,2rem); } .cell-key { top: 4px; left: 4px; width: 20px; height: 20px; font-size: .62rem; } .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) { .change-grid, .phase-meter, .deadline-track { width: calc(100vw - 34px); } .change-grid { gap: 5px; } .cell-symbol { width: 58%; } .cell-key { width: 18px; height: 18px; } }
@media (prefers-reduced-motion:reduce) { .change-cell, .cell-symbol { transition: none !important; } .game-stage[data-state="study"] .change-grid { animation: none; } }
