:root {
  --ink: #1f1f24;
  --paper: #fffde8;
  --panel: #fffef8;
  --accent: #2f74c7;
  --accent-2: #e8bb58;
  --muted: #615f67;
  --line: #d9deea;
  --success: #2c8e4f;
  --danger: #c13d2c;
  --tie: #9e7a1e;
  --shadow: 0 10px 30px rgba(25, 31, 44, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, #fff5bf 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, #dcecff 0%, transparent 35%),
    linear-gradient(160deg, var(--paper), #eef5ff);
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.3;
  z-index: -1;
}

.bg-orb-a {
  width: 260px;
  height: 260px;
  background: #f7ca66;
  top: -80px;
  right: 5vw;
}

.bg-orb-b {
  width: 280px;
  height: 280px;
  background: #5ea5f0;
  bottom: -120px;
  left: 4vw;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.88rem clamp(0.85rem, 3vw, 2.1rem);
}

.brand {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  gap: 0.8rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.25rem 0.52rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.site-nav a:hover {
  background: rgba(47, 116, 199, 0.12);
}

.site-nav .nav-return {
  color: #fff;
  background: linear-gradient(135deg, #1197d8, #8459ff);
  box-shadow: 0 8px 16px rgba(79, 73, 202, 0.14);
}

.site-nav .nav-return:hover {
  background: linear-gradient(135deg, #0f8dcc, #7650ee);
}

.page {
  width: min(960px, 92vw);
  margin: 0 auto 1.9rem;
  flex: 1 0 auto;
}

.hero {
  background: linear-gradient(135deg, #fffef6, #f3f8ff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: clamp(0.95rem, 2.3vw, 1.75rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  margin: 0;
  color: var(--accent);
}

h1,
h2 {
  margin: 0.2rem 0 0.8rem;
  font-family: "Baskervville", Georgia, serif;
  font-weight: 400;
}

h1 {
  font-size: clamp(1.2rem, 3vw, 1.95rem);
}

h2 {
  font-size: clamp(0.98rem, 2vw, 1.2rem);
}

.lede {
  max-width: 64ch;
  color: var(--muted);
}

.hero-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.7rem;
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.8rem;
}

.stack {
  display: grid;
  gap: 0.7rem;
}

.play-stack {
  gap: 0.8rem;
}

.play-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.hero-status {
  display: grid;
  gap: 0.6rem;
  min-width: min(250px, 100%);
}

.status-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 245, 255, 0.92));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
}

.status-kicker {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(205px, 240px) minmax(0, 1.2fr) minmax(220px, 250px);
  gap: 0.8rem;
  align-items: start;
}

.play-main-column,
.play-sidebar,
.play-setup-panel,
.play-arena-panel {
  display: grid;
  gap: 0.7rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.panel-head.compact {
  margin-bottom: 0.2rem;
}

.panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.score-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.62rem 0.68rem;
  border: 1px solid rgba(217, 222, 234, 0.95);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.94));
}

.score-card strong {
  font-size: 1.08rem;
}

.score-card-wide {
  grid-column: 1 / -1;
}

.score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 0.42rem 0.72rem;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5a9ae2);
}

.btn-secondary {
  color: var(--ink);
  background: #eef3ff;
}

.btn-action {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), #f0cd73);
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

select,
input {
  font: inherit;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  width: 100%;
  min-height: 38px;
  line-height: 1.2;
  appearance: auto;
}

input[type="number"] {
  text-align: left;
}

.status {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
}

.play-arena {
  overflow: hidden;
}

.fighter {
  text-align: center;
  min-width: 0;
}

.fighter-lane {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 132px;
  min-width: 0;
  overflow: hidden;
}

.fighter-lane-player {
  justify-content: flex-end;
}

.fighter-lane-ai {
  justify-content: flex-start;
}

.history-strip {
  display: flex;
  align-items: flex-end;
  min-height: 76px;
  max-width: 230px;
  overflow: hidden;
  padding-inline: 2px;
}

.history-strip.player {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.history-strip.ai {
  justify-content: flex-start;
}

.history-icon {
  position: relative;
  width: 52px;
  height: 62px;
  border-radius: 12px;
  border: 2px solid rgba(223, 216, 206, 0.92);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 4px 12px rgba(22, 18, 12, 0.08);
  transition: transform 220ms ease, opacity 220ms ease, border-color 180ms ease, box-shadow 180ms ease;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.history-icon.latest {
  box-shadow: 0 6px 18px rgba(47, 116, 199, 0.22);
}

.action-chip {
  margin: 0 auto;
  width: min(144px, 100%);
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  background: #fff;
  transform: translateY(0) scale(1);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.action-chip.reveal {
  background: #eef5ff;
  transform: translateY(-3px) scale(1.02);
}

.icon-chip {
  width: 108px;
  max-width: 108px;
  height: 122px;
  padding: 0.22rem;
}

.gesture-wrap {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  padding: 2px 2px 4px;
}

.token-badge {
  width: min(88px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border: 3px solid rgba(58, 64, 92, 0.85);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 4px 10px rgba(22, 18, 12, 0.12);
}

.history-icon .token-badge {
  width: 38px;
  border-width: 2px;
}

.token-rock {
  background: radial-gradient(circle at 34% 26%, #ffef9e, #ffd24f 62%, #d69c14);
}

.token-paper {
  background: radial-gradient(circle at 34% 26%, #fff8ca, #f6d48f 62%, #d89a50);
}

.token-scissors {
  background: radial-gradient(circle at 34% 26%, #dce6ff, #7da1ff 62%, #3f5ed5);
}

.token-glyph {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: #283155;
}

.history-icon .token-glyph {
  font-size: 0.95rem;
}

.gesture-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 2px rgba(16, 22, 38, 0.24));
}

.gesture-label {
  margin-top: -2px;
  line-height: 1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #2e2b33;
}

.history-icon .gesture-label {
  font-size: 0.58rem;
}

.idle-mark {
  font-size: 1.8rem;
  line-height: 1;
}

.action-chip.idle {
  color: var(--muted);
}

.action-chip.pending {
  color: var(--muted);
  background: #f2ece3;
}

.action-chip.result-win,
.history-icon.result-win {
  border-color: var(--success);
  box-shadow: 0 6px 18px rgba(44, 142, 79, 0.28);
}

.action-chip.result-loss,
.history-icon.result-loss {
  border-color: var(--danger);
  box-shadow: 0 6px 18px rgba(193, 61, 44, 0.24);
}

.action-chip.result-tie,
.history-icon.result-tie {
  border-color: var(--tie);
  box-shadow: 0 6px 16px rgba(138, 106, 26, 0.22);
}

.versus {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
}

.versus-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 60px;
}

.clash-fx {
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 3px solid rgba(232, 187, 88, 0.85);
  box-shadow: 0 0 0 0 rgba(232, 187, 88, 0.5);
  opacity: 0;
  pointer-events: none;
}

.clash-fx.active {
  animation: clashRing 420ms ease-out 1;
}

.action-chip.winner-flash {
  animation: winnerFlash 250ms cubic-bezier(0.22, 0.61, 0.36, 1) 2;
}

@keyframes clashRing {
  0% {
    opacity: 0;
    transform: scale(0.4);
    box-shadow: 0 0 0 0 rgba(232, 187, 88, 0.5);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
    box-shadow: 0 0 0 20px rgba(232, 187, 88, 0);
  }
}

@keyframes winnerFlash {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translateY(-6px) scale(1.1);
    filter: brightness(1.2);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

.choice-played {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  justify-self: center;
  max-width: min(100%, 22rem);
  font-size: 0.94rem;
  font-weight: 700;
  color: #2d2a31;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(97, 95, 103, 0.42);
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
}

.outcome {
  margin-top: 0.8rem;
  font-weight: 600;
}

.outcome.pending {
  color: var(--accent);
}

.outcome.win {
  color: var(--success);
}

.outcome.loss {
  color: var(--danger);
}

.outcome.tie {
  color: var(--tie);
}

.score-row {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.play-action-panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 0;
}

.play-actions-row {
  margin-top: auto;
  width: 100%;
}

.play-actions-row .btn-action {
  flex: 1 1 0;
}

.log-list {
  margin: 0;
  padding-left: 1rem;
  max-height: 240px;
  overflow: auto;
}

.log-list li {
  margin-bottom: 0.35rem;
}

.train-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  align-items: end;
}

.train-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.86rem;
}

.train-form label.is-hidden {
  display: none;
}

.label-line {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.help-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f4f8ff;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
  cursor: help;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.inline-details {
  margin-top: 0.6rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.5rem 0.7rem;
}

.inline-details summary {
  cursor: pointer;
  font-weight: 600;
}

.latency-panel {
  margin-top: 0.7rem;
}

.latency-panel .status {
  margin: 0.5rem 0 0.2rem;
}

.compact-controls {
  gap: 0.4rem;
}

.toggle-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.compact-toggle {
  font-size: 0.82rem;
  padding: 0.12rem 0.2rem;
}

.compact-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
}

.meter {
  margin-top: 0.6rem;
  height: 10px;
  border-radius: 999px;
  background: #e5edf9;
  overflow: hidden;
}

.meter-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7cb2ec);
  transition: width 220ms ease;
}

.metrics {
  margin-top: 0.8rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f7fbff;
  padding: 0.7rem;
  min-height: 90px;
  overflow: auto;
}

.job-chart {
  margin-top: 0.7rem;
  width: 100%;
  max-width: 500px;
  height: 90px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.2rem;
  color: var(--accent);
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.7rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.55rem 0.35rem;
  font-size: 0.84rem;
}

.site-footer {
  padding: 0 0 1.15rem;
}

.footer-inner {
  width: min(960px, 92vw);
  margin: 0 auto;
  padding: 0.8rem 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 248, 0.94);
  box-shadow: var(--shadow);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.copyleft-mark {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex: 0 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.24rem 0.54rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.88rem;
}

.footer-links a:hover {
  background: rgba(47, 116, 199, 0.12);
}

@media (max-width: 700px) {
  .page {
    width: min(1000px, 96vw);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .site-nav a {
    background: rgba(47, 116, 199, 0.08);
  }

  .play-hero {
    flex-direction: column;
  }

  .hero-status {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .play-layout {
    grid-template-columns: 1fr;
  }

  .arena {
    grid-template-columns: 1fr;
  }

  .versus {
    text-align: center;
  }

  .fighter-lane {
    justify-content: center;
  }

  .fighter-lane-player,
  .fighter-lane-ai {
    justify-content: center;
  }

  .play-arena {
    overflow-x: hidden;
    padding-inline: 0.55rem;
  }

  .history-strip {
    max-width: min(44vw, 150px);
  }

  .history-icon {
    width: 44px;
    height: 54px;
  }

  .icon-chip {
    width: 96px;
    height: 112px;
    max-width: 96px;
  }

  .choice-played {
    font-size: 0.86rem;
  }

  .train-form {
    grid-template-columns: 1fr;
  }

  .controls-row {
    align-items: stretch;
  }

  .controls-row > * {
    width: 100%;
  }

  .btn {
    min-height: 46px;
  }

  .btn-action {
    flex: 1 1 calc(33.333% - 0.6rem);
  }

  .data-table {
    min-width: 600px;
  }

  .panel {
    overflow-x: auto;
  }

  .footer-inner {
    width: min(96vw, 960px);
    align-items: flex-start;
  }
}

/* Compact lab UI pass. */
:root {
  --shadow: 0 7px 18px rgba(25, 31, 44, 0.08);
}

body {
  font-size: 0.86rem;
}

.bg-orb {
  filter: blur(42px);
  opacity: 0.2;
}

.bg-orb-a {
  width: 195px;
  height: 195px;
  top: -70px;
}

.bg-orb-b {
  width: 210px;
  height: 210px;
  bottom: -95px;
}

.site-header {
  padding: 0.62rem clamp(0.65rem, 2vw, 1.35rem);
  gap: 0.55rem;
}

.brand {
  font-size: 0.82rem;
}

.site-nav {
  gap: 0.42rem;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 0.18rem 0.4rem;
  font-size: 0.8rem;
}

.page {
  width: min(880px, 94vw);
  margin: 0 auto 1.25rem;
}

.hero {
  border-radius: 12px;
  padding: clamp(0.7rem, 1.6vw, 1.1rem);
}

.eyebrow,
.status-kicker,
.score-label {
  letter-spacing: 0.08em;
  font-size: 0.62rem;
}

h1 {
  font-size: clamp(1.05rem, 2.2vw, 1.52rem);
}

h2 {
  font-size: clamp(0.88rem, 1.5vw, 1.04rem);
}

.lede,
p,
li,
.status,
.panel-note {
  font-size: 0.82rem;
  line-height: 1.36;
}

.grid {
  margin-top: 0.62rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.52rem;
}

.stack,
.play-stack,
.play-main-column,
.play-sidebar,
.play-setup-panel,
.play-arena-panel,
.hero-status,
.score-card {
  gap: 0.52rem;
}

.card,
.panel {
  border-radius: 10px;
  padding: 0.62rem;
}

.panel-head {
  gap: 0.55rem;
}

.score-grid {
  gap: 0.42rem;
}

.score-card,
.status-card,
.inline-details,
.metrics {
  border-radius: 9px;
  padding: 0.48rem 0.55rem;
}

.score-card strong {
  font-size: 0.95rem;
}

.btn {
  min-height: 2.05rem;
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-size: 0.82rem;
}

.train-form > .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

select,
input {
  min-height: 2.05rem;
  border-radius: 7px;
  padding: 0.28rem 0.42rem;
  font-size: 0.82rem;
}

.controls-row {
  gap: 0.34rem;
}

.play-layout {
  grid-template-columns: minmax(168px, 195px) minmax(0, 1.15fr) minmax(180px, 205px);
  gap: 0.58rem;
}

.play-hero {
  gap: 0.55rem;
}

.arena {
  gap: 0.55rem;
}

.fighter-lane {
  min-height: 96px;
}

.history-strip {
  min-height: 56px;
  max-width: 170px;
}

.history-icon {
  width: 40px;
  height: 48px;
  border-radius: 9px;
}

.action-chip {
  width: min(112px, 100%);
  border-radius: 9px;
  padding: 0.16rem;
  letter-spacing: 0.06em;
}

.icon-chip {
  width: 82px;
  max-width: 82px;
  height: 94px;
}

.token-badge {
  width: min(66px, 100%);
  border-width: 2px;
}

.history-icon .token-badge {
  width: 30px;
}

.token-glyph {
  font-size: 1.12rem;
}

.history-icon .token-glyph {
  font-size: 0.76rem;
}

.gesture-label {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}

.history-icon .gesture-label {
  font-size: 0.5rem;
}

.idle-mark {
  font-size: 1.35rem;
}

.versus {
  font-size: 0.95rem;
}

.versus-wrap {
  min-width: 44px;
}

.clash-fx {
  width: 54px;
  height: 54px;
}

.choice-played {
  max-width: min(100%, 17rem);
  font-size: 0.78rem;
  padding: 0.16rem 0.62rem;
}

.train-form {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.42rem;
  align-items: start;
}

.train-form label {
  gap: 0.24rem;
  min-width: 0;
  font-size: 0.78rem;
}

.label-line {
  gap: 0.22rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.help-dot {
  width: 0.82rem;
  height: 0.82rem;
  font-size: 0.58rem;
}

.form-note {
  font-size: 0.74rem;
  line-height: 1.28;
}

.meter {
  margin-top: 0.38rem;
  height: 0.52rem;
}

.metrics {
  margin-top: 0.45rem;
  min-height: 68px;
  font-size: 0.72rem;
  line-height: 1.32;
}

.job-chart {
  margin-top: 0.45rem;
  max-width: 380px;
  height: 68px;
}

.data-table {
  margin-top: 0.45rem;
  font-size: 0.78rem;
}

.data-table th,
.data-table td {
  padding: 0.34rem 0.28rem;
}

.footer-inner {
  width: min(880px, 94vw);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  gap: 0.48rem;
}

.footer-copy,
.footer-links a {
  font-size: 0.76rem;
}

@media (max-width: 700px) {
  .play-layout,
  .arena,
  .train-form {
    grid-template-columns: 1fr;
  }

  body {
    overflow-x: hidden;
  }

  .page {
    width: calc(100vw - 0.8rem);
    overflow-x: hidden;
  }

  .hero,
  .panel,
  .card {
    max-width: 100%;
  }

  .hero-status {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .history-strip {
    max-width: min(44vw, 125px);
  }

  .history-icon {
    width: 36px;
    height: 43px;
  }

  .icon-chip {
    width: 72px;
    height: 84px;
    max-width: 72px;
  }

  .score-grid {
    grid-template-columns: 1fr;
  }

  .controls-row > *,
  .play-actions-row .btn,
  .train-form > .btn {
    width: 100%;
  }

  .panel {
    overflow-x: auto;
  }

  .lede,
  p,
  .status,
  .panel-note {
    overflow-wrap: anywhere;
  }
}
