.ring-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: 32px;
  align-items: end;
  padding: 30px 34px;
  border-bottom: 3px solid var(--ink);
}

.game-heading .eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.game-heading h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.2rem, 6.6vw, 4.7rem);
  line-height: 0.95;
}

.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: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

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

.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: 0.65; }

.mode-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: right;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 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(1.05rem, 3vw, 1.55rem); }

.ring-stage {
  display: flex;
  min-height: 750px;
  flex-direction: column;
  align-items: center;
  padding: 28px 28px 34px;
  background:
    linear-gradient(rgba(88, 199, 215, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 199, 215, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 47%, #173b45 0, transparent 57%);
  background-size: 24px 24px, 24px 24px, auto;
}

.stage-copy {
  min-height: 155px;
  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.55rem, 5vw, 2.55rem);
}

.stage-copy > p:not(.stage-kicker) {
  max-width: 650px;
  margin: 10px auto 0;
  color: var(--muted);
  line-height: 1.5;
}

.result-flash {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: center;
  margin-top: 10px;
}

.result-flash[hidden] { display: none; }
.result-flash strong { color: var(--ink); font-size: 1.05rem; }
.result-flash span { color: var(--muted); font-size: 0.76rem; }
.ring-stage[data-result="hit"] .result-flash strong { color: var(--green); }
.ring-stage[data-result="miss"] .result-flash strong { color: var(--red); }

.deadline-wrap {
  width: min(720px, 100%);
  margin-bottom: 18px;
}

.deadline-wrap[hidden] { display: none; }

.deadline-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.deadline-labels strong { color: var(--gold); }

.deadline-track {
  height: 18px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 5px;
  background: #0a2026;
}

.deadline-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--orange));
  transform: scaleX(1);
  transform-origin: left center;
  will-change: transform;
}

.ring-arena {
  position: relative;
  display: grid;
  width: min(340px, 100%);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: #0a2026;
  box-shadow: 8px 8px 0 var(--shadow);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.ring-arena:disabled { cursor: not-allowed; }

.arena-grid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(transparent calc(50% - 1px), rgba(88, 199, 215, 0.18) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(88, 199, 215, 0.18) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-radial-gradient(circle, transparent 0 34px, rgba(88, 199, 215, 0.08) 35px 36px);
}

.target-ring,
.target-center-ring,
.moving-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.target-ring {
  width: var(--target-size, 158px);
  height: var(--target-size, 158px);
  border: var(--target-band, 18px) solid rgba(83, 221, 131, 0.28);
  box-shadow:
    inset 0 0 0 2px rgba(83, 221, 131, 0.52),
    0 0 0 2px rgba(83, 221, 131, 0.52),
    0 0 18px rgba(83, 221, 131, 0.12);
}

.target-center-ring {
  width: var(--target-center-size, 140px);
  height: var(--target-center-size, 140px);
  border: 2px dashed rgba(83, 221, 131, 0.95);
}

.moving-ring {
  width: var(--moving-size, 241px);
  height: var(--moving-size, 241px);
  border: 5px solid var(--gold);
  box-shadow: 0 0 0 2px var(--night), 0 0 16px rgba(247, 201, 72, 0.62);
  will-change: width, height;
}

.ring-stage[data-state="active"] .moving-ring {
  border-color: var(--gold);
}

.ring-stage[data-result="hit"] .moving-ring {
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(83, 221, 131, 0.78);
}

.ring-stage[data-result="miss"] .moving-ring {
  border-color: var(--red);
  box-shadow: 0 0 18px rgba(237, 78, 92, 0.65);
}

.center-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--night);
  transform: translate(-50%, -50%);
}

.arena-action {
  position: absolute;
  bottom: 22px;
  left: 50%;
  z-index: 2;
  padding: 7px 10px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: rgba(7, 26, 31, 0.9);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  transform: translateX(-50%);
  white-space: nowrap;
}

.ring-stage[data-state="active"] .arena-action {
  border-color: var(--gold);
  color: var(--gold);
}

.round-info {
  display: flex;
  width: min(480px, 100%);
  justify-content: space-between;
  margin-top: 20px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #0a2026;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.round-info strong { color: var(--gold); }

.primary-button {
  min-width: min(420px, 100%);
  margin-top: 24px;
  padding: 16px 22px;
  border: 3px solid var(--ink);
  border-radius: 5px;
  background: var(--gold);
  color: var(--night);
  box-shadow: 5px 5px 0 var(--shadow);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.primary-button[hidden] { display: none; }

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

.ring-arena:focus-visible,
.mode-switch button:focus-visible,
.primary-button:focus-visible,
.related-links a:focus-visible,
.faq-list summary:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 4px;
}

.content-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  gap: 54px;
  padding: 82px 12px 56px;
}

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

.content-heading h2,
.info-panel h2,
.faq-section h2,
.related-section h2 { margin: 0; line-height: 1.15; }

.steps-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
}

.steps-list li > span { color: var(--gold); font-weight: 900; }
.steps-list p { margin: 0; color: var(--muted); line-height: 1.55; }

.reading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.info-panel {
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
}

.info-panel p:not(.section-kicker) { color: var(--muted); line-height: 1.65; }

.faq-section,
.related-section { padding: 76px 12px 0; }

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.faq-list details {
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
}

.faq-list summary {
  padding: 18px 20px;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.faq-list details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
  line-height: 1.6;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.related-links a {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.related-links a:hover { border-color: var(--gold); }
.related-links small { color: var(--muted); font-size: 0.76rem; font-weight: 400; }

@media (max-width: 860px) {
  .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) {
  .ring-shell { width: min(100% - 18px, 620px); padding-top: 10px; }
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .topbar-meta { max-width: 100%; flex-wrap: wrap; justify-content: flex-end; }
  .game-card { box-shadow: 6px 6px 0 var(--shadow); }
  .game-heading { gap: 20px; padding: 24px 18px; }
  .game-heading h1 { font-size: clamp(1.85rem, 10vw, 3.45rem); overflow-wrap: anywhere; }
  .mode-panel { align-items: stretch; flex-direction: column; }
  .mode-description { text-align: left; }
  .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); }
  .ring-stage { min-height: 710px; padding: 26px 12px 28px; }
  .stage-copy { min-height: 175px; }
  .ring-arena { width: min(320px, 100%); box-shadow: 5px 5px 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: 390px) {
  .topbar-meta { gap: 6px; font-size: 0.68rem; }
  .topbar-link { font-size: 0.64rem; }
  .mode-switch button { flex: 1 1 0; padding-inline: 8px; }
  .ring-arena { width: min(280px, 100%); }
  .round-info { gap: 10px; padding-inline: 10px; font-size: 0.67rem; }
  .result-flash { align-items: center; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .moving-ring { box-shadow: none; }
}
