.catch-shell { width: min(1080px, 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: 780px; font-size: clamp(2.4rem, 7vw, 5rem); line-height: 0.94; }

.lede {
  max-width: 710px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.progress-box {
  min-width: 154px;
  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: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.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 { overflow-wrap: anywhere; font-size: clamp(1rem, 3vw, 1.65rem); }

.game-stage {
  min-height: 780px;
  padding: 30px;
  background: radial-gradient(circle at 50% 42%, #29203a 0, transparent 62%);
}

.stage-copy { min-height: 112px; text-align: center; }
.stage-kicker { margin: 0 0 9px; color: var(--gold); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; }
.stage-copy h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2.5rem); letter-spacing: -0.04em; }
.stage-copy > p:last-child { max-width: 680px; margin: 9px auto 12px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

.deadline-wrap { width: min(760px, 100%); margin: 0 auto 12px; }
.deadline-labels { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; }
.deadline-track { height: 12px; overflow: hidden; border: 2px solid var(--line); background: #171220; }
.deadline-fill { display: block; width: 100%; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left center; }
.deadline-track.is-active .deadline-fill { background: var(--gold); }
.deadline-track.is-danger .deadline-fill { background: var(--red); }

.catch-field {
  position: relative;
  width: min(760px, 100%);
  height: 350px;
  margin: 0 auto;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: #171220;
  box-shadow: 7px 7px 0 var(--shadow);
  user-select: none;
}

.field-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, transparent 33.1%, rgba(88, 199, 215, 0.3) 33.1%, rgba(88, 199, 215, 0.3) 33.6%, transparent 33.6%, transparent 66.4%, rgba(88, 199, 215, 0.3) 66.4%, rgba(88, 199, 215, 0.3) 66.9%, transparent 66.9%),
    linear-gradient(rgba(88, 199, 215, 0.06) 1px, transparent 1px);
  background-size: 100% 100%, 100% 28px;
  pointer-events: none;
}

.lane-numbers { position: absolute; inset: 10px 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); color: rgba(244, 240, 232, 0.44); font-size: 0.76rem; font-weight: 800; text-align: center; }

.falling-pixel {
  position: absolute;
  z-index: 3;
  top: 34px;
  left: calc(16.6667% - 18px);
  width: 36px;
  height: 36px;
  transition-property: top;
  transition-duration: var(--drop-duration, 2200ms);
  transition-timing-function: linear;
}

.falling-pixel[data-lane="2"] { left: calc(50% - 18px); }
.falling-pixel[data-lane="3"] { left: calc(83.3333% - 18px); }
.falling-pixel.is-falling { top: calc(100% - 82px); }
.falling-pixel.is-caught { top: calc(100% - 82px); }
.falling-pixel.is-missed { top: calc(100% - 35px); }
.falling-pixel span { display: block; width: 28px; height: 28px; margin: 2px; border: 4px solid var(--ink); background: var(--gold); box-shadow: 5px 5px 0 var(--shadow); }
.falling-pixel.is-caught span { background: var(--green); }
.falling-pixel.is-missed span { background: var(--red); transform: rotate(45deg); }

.basket {
  position: absolute;
  z-index: 2;
  bottom: 19px;
  left: calc(16.6667% - 42px);
  width: 84px;
  height: 48px;
  transition: left 100ms steps(2, end);
}

.basket[data-lane="2"] { left: calc(50% - 42px); }
.basket[data-lane="3"] { left: calc(83.3333% - 42px); }
.basket::before { position: absolute; inset: 0 6px auto; height: 12px; border: 4px solid var(--ink); background: var(--blue); content: ""; }
.basket span { position: absolute; inset: 12px 14px 0; border: 4px solid var(--ink); border-top: 0; background: repeating-linear-gradient(90deg, var(--blue) 0 8px, #2f8fa1 8px 14px); box-shadow: 5px 5px 0 var(--shadow); }
.basket.is-correct::before,
.basket.is-correct span { background: var(--green); }
.basket.is-wrong::before,
.basket.is-wrong span { background: var(--red); }

.field-message { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; color: var(--muted); font-size: clamp(0.85rem, 3vw, 1.2rem); font-weight: 800; letter-spacing: 0.08em; text-align: center; pointer-events: none; }
.field-message[hidden] { display: none; }

.lane-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(760px, 100%); margin: 18px auto 0; }
.lane-buttons button,
.step-buttons button { min-width: 0; border: 2px solid var(--line); border-radius: 0; background: #171220; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.lane-buttons button { display: flex; min-height: 56px; align-items: center; justify-content: center; gap: 10px; padding: 9px 8px; }
.lane-buttons button.is-current { border-color: var(--blue); background: #213843; }
.lane-buttons button:hover:not(:disabled),
.lane-buttons button:focus-visible,
.step-buttons button:hover:not(:disabled),
.step-buttons button:focus-visible { border-color: var(--gold); outline: 0; }
.lane-buttons button:disabled,
.step-buttons button:disabled { cursor: default; opacity: 0.48; }
kbd { min-width: 25px; padding: 3px 5px; border: 1px solid var(--muted); background: var(--panel); color: var(--gold); font: inherit; font-size: 0.75rem; }

.step-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(520px, 100%); margin: 10px auto 0; }
.step-buttons button { display: flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 8px; font-size: 0.8rem; }

.feedback { display: flex; min-height: 42px; margin: 14px 0 8px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.feedback[hidden] { visibility: hidden; display: flex; }
.feedback strong { color: var(--green); font-size: 1.1rem; }
.feedback span { color: var(--muted); font-size: 0.78rem; }
.primary-button { display: block; margin: 0 auto; }
.control-note { margin: 14px auto 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; text-align: center; }

.game-stage[data-state="countdown"] .primary-button,
.game-stage[data-state="active"] .primary-button,
.game-stage[data-state="feedback"] .primary-button { visibility: hidden; }
.game-stage[data-state="complete"] { background-color: #2d2515; }
.game-stage[data-state="game-over"] { background-color: #351521; }
.game-stage[data-state="cancelled"] { background-color: #241a31; }

.content-section { display: grid; grid-template-columns: 0.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: -0.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; }
.related-links a:hover,
.related-links a:focus-visible { border-color: var(--gold); outline: 0; }
.related-links small { color: var(--muted); font-size: 0.76rem; font-weight: 400; }

@media (max-width: 900px) {
  .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) {
  .catch-shell { width: min(100% - 18px, 620px); padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .game-card { box-shadow: 6px 6px 0 var(--shadow); }
  .game-heading { gap: 20px; padding: 24px 18px; }
  .game-heading h1 { font-size: clamp(2.05rem, 11.5vw, 3.8rem); overflow-wrap: anywhere; }
  .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: 750px; padding: 24px 10px; }
  .stage-copy { min-height: 132px; }
  .catch-field { height: 330px; box-shadow: 4px 4px 0 var(--shadow); }
  .lane-buttons button { min-height: 62px; flex-direction: column; gap: 4px; font-size: 0.74rem; }
  .step-buttons button { font-size: 0.7rem; }
  .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: 360px) {
  .game-stage { padding-inline: 7px; }
  .basket { width: 68px; left: calc(16.6667% - 34px); }
  .basket[data-lane="2"] { left: calc(50% - 34px); }
  .basket[data-lane="3"] { left: calc(83.3333% - 34px); }
  .lane-buttons { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .basket { transition: none; }
  .falling-pixel { transition-timing-function: steps(5, end); }
}
