.aim-shell {
  width: min(1080px, calc(100% - 32px));
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

.game-heading {
  display: grid;
  grid-template-columns: 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: 790px;
  font-size: clamp(2.7rem, 8vw, 5.7rem);
  line-height: 0.9;
}

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

.timer-box {
  min-width: 166px;
  padding: 16px;
  border: 2px solid var(--line);
  background: #171220;
  text-align: center;
}

.timer-box > span,
.stat > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.timer-box strong {
  color: var(--gold);
  font-size: 1.65rem;
}

.timer-box small {
  margin-left: 5px;
  font-size: 0.78rem;
}

.game-card > .mode-panel {
  margin: 0;
  padding: 20px 24px;
  border-bottom: 3px solid var(--ink);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 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: 720px;
  flex-direction: column;
  align-items: center;
  padding: 28px 26px 30px;
  background:
    linear-gradient(rgba(88, 199, 215, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 199, 215, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, #192d3b 0, transparent 57%);
  background-size: 24px 24px, 24px 24px, auto;
}

.stage-copy {
  min-height: 105px;
  text-align: center;
}

.stage-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.stage-copy h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.stage-copy > p:last-child {
  max-width: 650px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.deadline-track {
  width: min(720px, 96%);
  height: 8px;
  margin: 3px auto 12px;
  overflow: hidden;
  border: 1px solid #355463;
  background: #171220;
}

.deadline-track[hidden] {
  display: block;
  visibility: hidden;
}

.deadline-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(1);
  transform-origin: left center;
  background: var(--blue);
}

.deadline-fill.is-danger {
  background: var(--red);
}

.aim-field {
  position: relative;
  width: min(780px, 96%);
  height: clamp(350px, 48vw, 470px);
  min-height: 350px;
  overflow: hidden;
  border: 3px solid #5a5366;
  background: #100d19;
  box-shadow: inset 0 0 0 5px #191324, 6px 6px 0 var(--shadow);
  cursor: crosshair;
  touch-action: manipulation;
  user-select: none;
}

.field-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(88, 199, 215, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 199, 215, 0.06) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(88, 199, 215, 0.11), transparent 62%);
  background-size: 28px 28px, 28px 28px, auto;
  pointer-events: none;
}

.field-grid::before,
.field-grid::after {
  position: absolute;
  background: rgba(88, 199, 215, 0.12);
  content: "";
}

.field-grid::before {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.field-grid::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.pixel-target {
  --target-size: 88px;
  --target-x: 50%;
  --target-y: 50%;
  position: absolute;
  top: var(--target-y);
  left: var(--target-x);
  z-index: 3;
  width: var(--target-size);
  height: var(--target-size);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: crosshair;
  touch-action: manipulation;
}

.pixel-target[hidden] {
  display: none;
}

.target-ring,
.target-core {
  position: absolute;
  pointer-events: none;
}

.target-ring {
  inset: 0;
  border: max(5px, calc(var(--target-size) * 0.08)) solid var(--red);
  background: var(--ink);
  box-shadow: 5px 5px 0 rgba(9, 7, 15, 0.85);
  clip-path: polygon(0 22%, 22% 22%, 22% 0, 78% 0, 78% 22%, 100% 22%, 100% 78%, 78% 78%, 78% 100%, 22% 100%, 22% 78%, 0 78%);
}

.target-ring::before,
.target-ring::after {
  position: absolute;
  content: "";
}

.target-ring::before {
  inset: 22%;
  border: max(4px, calc(var(--target-size) * 0.06)) solid var(--red);
  background: #231a30;
}

.target-ring::after {
  top: 47%;
  right: 10%;
  left: 10%;
  height: 6%;
  background: var(--gold);
}

.target-core {
  top: 38%;
  left: 38%;
  z-index: 2;
  width: 24%;
  height: 24%;
  background: var(--blue);
  box-shadow: 0 0 0 max(2px, calc(var(--target-size) * 0.03)) #120f1d;
}

.pixel-target:hover .target-core {
  background: var(--green);
}

.pixel-target:active {
  transform: translate(3px, 3px);
}

.pixel-target:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 6px;
}

.field-message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
}

.field-message[hidden] {
  display: none;
}

.field-message strong {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: clamp(1.1rem, 3vw, 1.55rem);
  letter-spacing: 0.08em;
}

.field-message span {
  max-width: 540px;
  font-size: 0.82rem;
}

.feedback {
  display: flex;
  min-height: 46px;
  margin: 12px 0 8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.feedback[hidden] {
  display: flex;
  visibility: hidden;
}

.feedback strong {
  color: var(--green);
  font-size: 1.18rem;
}

.feedback span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.game-stage[data-state="playing"] .primary-button {
  visibility: hidden;
}

.game-stage[data-state="game-over"] {
  background-color: #351521;
}

.game-stage[data-state="complete"] {
  background-color: #2d2515;
}

.control-note {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.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 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: 1fr 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, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.related-links a {
  display: flex;
  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: 820px) {
  .game-heading {
    grid-template-columns: 1fr;
  }

  .timer-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .timer-box > span {
    margin: 0;
  }

  .related-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .aim-shell {
    width: min(100% - 18px, 600px);
    padding-top: calc(10px + env(safe-area-inset-top));
  }

  .game-heading {
    gap: 20px;
    padding: 24px 18px;
  }

  .game-heading h1 {
    font-size: clamp(2.45rem, 13.4vw, 4rem);
  }

  .game-card > .mode-panel {
    padding-inline: 16px;
  }

  .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);
  }

  .game-stage {
    min-height: 650px;
    padding: 24px 8px 24px;
  }

  .stage-copy {
    min-height: 122px;
  }

  .deadline-track,
  .aim-field {
    width: calc(100% - 4px);
  }

  .aim-field {
    height: min(112vw, 430px);
    min-height: 345px;
    border-width: 2px;
    box-shadow: inset 0 0 0 3px #191324, 4px 4px 0 var(--shadow);
  }

  .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: 370px) {
  .aim-field {
    min-height: 330px;
  }

  .field-message {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-target,
  .deadline-fill {
    transition: none !important;
  }
}
