:root {
  --ink: #17333a;
  --panel: #fff4d8;
  --panel-edge: #593717;
  --teal: #0f5963;
  --teal-dark: #092f37;
  --gold: #f2bd54;
  --green: #5d9f63;
  --sky: #9bd7df;
  --white: #ffffff;
  --shadow: 0 18px 48px rgba(11, 38, 43, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #0f2e34;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% 46%, rgba(232, 247, 214, 0.16) 0 18%, transparent 42%),
    linear-gradient(90deg, rgba(4, 32, 38, 0.92) 0%, rgba(5, 37, 44, 0.82) 42%, rgba(9, 35, 40, 0.58) 100%),
    linear-gradient(rgba(9, 35, 40, 0.40), rgba(9, 35, 40, 0.62)),
    url("../assets/hero-key-art.jpg") center / cover fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
select {
  font: inherit;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  z-index: 20;
  border-radius: 6px;
  background: var(--white);
  color: var(--teal-dark);
  padding: 10px 14px;
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  clip-path: none;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 3vw, 38px);
  color: var(--white);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  color: inherit;
  font-weight: 900;
  text-decoration: none;
}

.brand-link img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.game-page {
  width: min(100% - 40px, 1320px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 54px 0 18px;
  display: grid;
  place-items: center;
}

.game-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(360px, 560px);
  justify-content: center;
  gap: clamp(34px, 6vw, 92px);
  align-items: center;
}

.game-copy {
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.36);
}

.eyebrow {
  margin: 0 0 10px;
  color: #ffd876;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.5rem, 6vw, 5.35rem);
  line-height: 0.94;
}

.game-copy__lead {
  max-width: 500px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.56;
}

.mobile-copy,
.mobile-minimondo-note {
  display: none;
}

.game-copy__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.hero-button,
.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 7px;
  font-weight: 900;
  text-decoration: none;
}

.hero-button {
  border: 2px solid transparent;
  padding: 11px 18px;
  font-size: 0.94rem;
}

.hero-button--primary {
  background: var(--gold);
  color: #251b0a;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.48);
}

.hero-button--primary:hover,
.hero-button--primary:focus-visible {
  background: #ffd06d;
}

.hero-button--secondary {
  border-color: rgba(255, 255, 255, 0.70);
  background: rgba(6, 38, 45, 0.36);
  color: var(--white);
}

.hero-button--secondary:hover,
.hero-button--secondary:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.hero-link {
  min-height: 40px;
  color: #ffe5a2;
  padding: 6px 2px;
}

.hero-link::after {
  margin-left: 6px;
  content: "->";
}

.hero-button:focus-visible,
.hero-link:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.arcade {
  width: min(100%, 480px, calc((100vh - 96px) * 0.635));
  justify-self: start;
  border: 5px solid #172d30;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #dceabe 0%, #c5de9d 100%);
  box-shadow: var(--shadow);
  padding: 10px;
}

@media (min-width: 821px) and (max-height: 860px) {
  .game-shell {
    align-items: start;
  }

  .game-copy {
    padding-top: clamp(64px, 13vh, 116px);
  }
}

.arcade__controls {
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  border: 2px solid #d9a545;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #fffdf3 0%, #fff8e8 62%, #f3dfb4 100%);
  padding: 18px 12px 12px;
  box-shadow:
    0 3px 0 #a27427,
    0 9px 18px rgba(48, 61, 29, 0.16),
    inset 0 2px rgba(255, 255, 255, 0.82);
}

.arcade__controls::before {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  top: 0;
  height: 10px;
  border-radius: 12px 12px 0 0;
  background:
    linear-gradient(
      180deg,
      #b8dc8b 0 6px,
      #e0aa38 6px 8px,
      #a77525 8px 10px
    );
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.48);
}

.arcade__toolbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  align-items: end;
  gap: 9px;
  margin-bottom: 10px;
}

.select-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.select-field__label {
  display: block;
  color: #6f522a;
  padding-inline: 8px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.select-field__control {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 42px;
  border: 2px solid #dfb977;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 232, 0.98)),
    #fffaf0;
  box-shadow:
    0 2px 0 #c7954d,
    inset 0 1px rgba(255, 255, 255, 0.78),
    inset 0 -2px rgba(184, 129, 48, 0.08);
}

.select-field__control::after {
  position: absolute;
  right: 11px;
  top: calc(50% - 6px);
  width: 10px;
  height: 10px;
  border-right: 3px solid #745225;
  border-bottom: 3px solid #745225;
  transform: rotate(45deg);
  content: "";
  pointer-events: none;
}

select,
button {
  min-height: 38px;
  border: 3px solid #0d252b;
  border-radius: 4px;
  background: var(--panel);
  color: #211407;
  font-weight: 900;
}

select {
  width: 100%;
  padding: 0 8px;
}

button {
  cursor: pointer;
  padding: 0 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.arcade__toolbar select,
.arcade__toolbar button {
  min-height: 42px;
  border: 0;
  color: #2b1809;
  font-size: 0.88rem;
  line-height: 1;
}

.arcade__toolbar select {
  appearance: none;
  width: 100%;
  min-width: 0;
  background: transparent;
  padding: 0 32px 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
}

.mute-button {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 54px;
  border: 2px solid #dfb977;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 226, 0.98)),
    #fffaf0;
  color: #5d4322;
  padding: 0;
  font-size: 0.68rem;
  box-shadow:
    0 2px 0 #c7954d,
    inset 0 1px rgba(255, 255, 255, 0.78);
}

.mute-button[aria-pressed="true"] {
  border-color: #dba36e;
  background:
    linear-gradient(180deg, #fff8ed 0%, #ffe8d5 100%),
    #fff1e4;
  color: #6b3d2a;
}

.mute-button__icon {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-switch {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 10px;
  overflow: hidden;
  border: 2px solid #e0aa38;
  border-radius: 10px;
  background: #fff7e6;
  box-shadow:
    0 3px 0 #a77525,
    inset 0 1px rgba(255, 255, 255, 0.68);
}

.mode-description {
  position: relative;
  z-index: 1;
  margin: -2px 2px 10px;
  color: #5d4322;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.mode-switch__button {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: #fff7e6;
  color: #5c4322;
  font-size: 0.92rem;
}

.mode-switch__button + .mode-switch__button {
  border-left: 2px solid #e0aa38;
}

.mode-switch__button[aria-pressed="true"] {
  background:
    linear-gradient(180deg, #ffe99b 0%, #ffc94f 100%),
    #ffc94f;
  color: #2b1809;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.66),
    inset 0 -3px rgba(178, 116, 22, 0.20);
}

.pack-field {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

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

.pack-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.pack-field__presets {
  display: flex;
  gap: 5px;
}

.pack-field__presets button {
  min-height: 28px;
  border: 2px solid #dfb977;
  background: #fffaf0;
  color: #5d4322;
  padding: 0 8px;
  font-size: 0.64rem;
  box-shadow: 0 1px 0 #c7954d;
}

.pack-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pack-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 2px solid #dfb977;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 232, 0.98)),
    #fffaf0;
  color: #2b1809;
  padding: 7px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow:
    0 2px 0 #c7954d,
    inset 0 1px rgba(255, 255, 255, 0.78);
}

.pack-check input {
  width: 16px;
  height: 16px;
  accent-color: #ffc94f;
  flex: 0 0 auto;
}

.pack-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 10px;
}

.setup-actions button {
  min-height: 50px;
}

.setup-actions__play {
  background:
    linear-gradient(180deg, #fff0a8 0%, #ffd45f 54%, #ffc13e 100%),
    #ffc94f;
  border-width: 4px;
  font-size: 1.08rem;
  box-shadow:
    0 5px 0 #9d6a1f,
    0 0 0 4px rgba(255, 234, 139, 0.38),
    inset 0 2px rgba(255, 255, 255, 0.62);
}

.setup-actions__icon {
  display: grid;
  place-items: center;
  border-color: #dfb977;
  background: #fffaf0;
  color: #5d4322;
  padding: 0;
}

.setup-actions__icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button:hover,
button:focus-visible,
select:focus-visible {
  outline: 3px solid #ffd876;
  outline-offset: 2px;
}

.arcade__screen {
  position: relative;
  overflow: hidden;
  border: 4px solid #091519;
  border-radius: 4px;
  background: var(--sky);
  aspect-ratio: 2 / 3;
}

.arcade__screen[hidden] {
  display: none;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.celebration-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hud {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  color: #2b1809;
  font-size: 0.72rem;
  font-weight: 900;
  pointer-events: none;
  z-index: 4;
}

.hud span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  border: 2px solid rgba(14, 36, 40, 0.72);
  border-radius: 999px;
  background: rgba(255, 248, 215, 0.92);
  padding: 2px 8px;
  box-shadow:
    0 2px 0 rgba(14, 36, 40, 0.32),
    inset 0 1px rgba(255, 255, 255, 0.7);
}

.arcade__screen.is-campaign-run .hud {
  display: none;
}

.run-badge {
  position: absolute;
  top: 8px;
  left: 149px;
  z-index: 4;
  max-width: calc(100% - 157px);
  overflow: hidden;
  border: 2px solid rgba(14, 36, 40, 0.72);
  border-radius: 999px;
  background: rgba(255, 248, 215, 0.88);
  color: #2d401f;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow:
    0 2px 0 rgba(14, 36, 40, 0.32),
    inset 0 1px rgba(255, 255, 255, 0.7);
}

.arcade__screen.is-campaign-run .run-badge {
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
}

.run-badge[hidden] {
  display: none;
}

@media (max-width: 380px) {
  .run-badge {
    top: 43px;
    left: 8px;
    max-width: calc(100% - 16px);
  }

  .arcade__screen.is-campaign-run .run-badge {
    top: 8px;
  }
}

.pause-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  min-width: 58px;
  min-height: 44px;
  border: 2px solid rgba(14, 36, 40, 0.72);
  border-radius: 8px;
  background: rgba(255, 248, 215, 0.90);
  color: #2b1809;
  padding: 0 9px;
  font-size: 0.72rem;
  box-shadow:
    0 2px 0 rgba(14, 36, 40, 0.32),
    inset 0 1px rgba(255, 255, 255, 0.7);
}

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

.word-readout {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 77%;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #fff8d7;
  text-align: center;
  text-shadow:
    2px 0 #19333a,
    -2px 0 #19333a,
    0 2px #19333a,
    0 -2px #19333a;
  pointer-events: none;
  transform: translateY(-50%);
  z-index: 4;
}

.phrase-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  max-width: 100%;
  min-height: 1.15em;
  gap: 2px 6px;
  line-height: 1.08;
}

.phrase-progress--target {
  min-height: 2rem;
}

.phrase-token {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: rgba(255, 248, 215, 0.92);
  font-size: 0.84rem;
  font-weight: 900;
}

.phrase-token.is-current {
  color: #fffaf0;
  font-size: 1.42rem;
}

.phrase-progress--support .phrase-token {
  color: rgba(255, 248, 215, 0.86);
  font-size: 0.74rem;
  font-weight: 900;
}

.phrase-progress--support .phrase-token.is-current {
  color: #fffaf0;
  text-decoration: underline;
  text-decoration-color: #ffd86b;
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

.phrase-token--checkpoint.is-current {
  color: #d9ff9d;
  font-size: 2rem;
  line-height: 0.95;
}

.phrase-progress--support .phrase-token--checkpoint-support {
  color: #f4ffdd;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.overlay {
  position: absolute;
  inset: auto 8% 17% 8%;
  z-index: 5;
  display: grid;
  gap: 10px;
  justify-items: stretch;
  border: 4px solid #4f3217;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff7df 0%, #f4e4bd 100%),
    var(--panel);
  padding: 18px 16px;
  text-align: center;
  color: #183239;
  box-shadow:
    0 14px 28px rgba(22, 30, 24, 0.26),
    inset 0 2px rgba(255, 255, 255, 0.68);
}

.overlay--celebrate {
  inset: 7% 7% auto 7%;
  max-height: 86%;
  overflow: auto;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 216, 118, 0.58) 0 20px, transparent 22px),
    radial-gradient(circle at 84% 10%, rgba(123, 214, 111, 0.42) 0 18px, transparent 20px),
    linear-gradient(180deg, #fff9dc 0%, #f4e4bd 100%),
    var(--panel);
}

.overlay--review {
  inset: 2.5% 6% 2.5% 6%;
  max-height: none;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
  padding: 14px 12px 12px;
}

.overlay--celebrate h2::before,
.overlay--celebrate h2::after {
  color: #d49b25;
  content: "★";
  font-size: 0.8em;
  margin-inline: 6px;
}

.overlay[hidden] {
  display: none;
}

.overlay h2 {
  margin: 0;
  font-size: 1.35rem;
}

.overlay--review h2 {
  padding-inline: 34px;
  line-height: 1.15;
}

.overlay--review p {
  font-size: 0.82rem;
  line-height: 1.25;
}

.overlay p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.overlay-progress {
  display: grid;
  grid-template-columns: 1fr 50px;
  align-items: center;
  gap: 10px;
  border: 2px solid #dca339;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff4c5 0%, #f8e8b3 100%),
    #fff4c5;
  padding: 9px;
  text-align: left;
  box-shadow:
    0 2px 0 #9b6a25,
    inset 0 1px rgba(255, 255, 255, 0.74);
}

.overlay--celebrate .overlay-progress {
  background:
    linear-gradient(180deg, #fff0a8 0%, #ffd76a 100%),
    #ffd76a;
}

.overlay--review .overlay-progress {
  position: absolute;
  top: 10px;
  right: 10px;
  grid-template-columns: 44px;
  gap: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.overlay--review .overlay-progress__copy {
  display: none;
}

.overlay--review .overlay-progress__button {
  min-width: 44px;
  min-height: 42px;
  border: 2px solid #0d252b;
  background:
    linear-gradient(180deg, #fffaf0 0%, #f8e7c7 100%),
    #fffaf0;
  box-shadow: 0 2px 0 #8a5c24;
}

.overlay-progress[hidden] {
  display: none;
}

.overlay-progress__copy {
  display: grid;
  gap: 2px;
}

.overlay-progress__copy span {
  color: #2f643c;
  font-size: 0.66rem;
  font-weight: 900;
}

.overlay-progress__copy strong {
  color: #2b1809;
  font-size: 0.88rem;
  line-height: 1.15;
}

.level-review {
  min-height: 0;
  max-height: min(250px, 39vh);
  overflow: auto;
  border: 2px solid #dca339;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.96) 0%, rgba(248, 232, 188, 0.96) 100%),
    #fff4d7;
  padding: 8px;
  text-align: left;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.72),
    inset 0 -2px rgba(138, 92, 36, 0.08);
}

.overlay--review .level-review {
  max-height: none;
  padding: 7px 8px;
}

.level-review[hidden] {
  display: none;
}

.level-review__summary {
  display: grid;
  gap: 2px;
  margin: 0 0 6px;
  border-bottom: 2px solid rgba(220, 163, 57, 0.45);
  padding: 0 0 6px;
  text-align: center;
}

.level-review__summary span {
  color: #2f643c;
  font-size: 0.68rem;
  font-weight: 900;
}

.level-review__summary strong {
  color: #2b1809;
  font-size: 0.84rem;
  line-height: 1.2;
}

.level-review__list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 22px;
}

.level-review__item {
  color: #4b3115;
  font-size: 0.72rem;
  line-height: 1.25;
}

.level-review__item strong,
.level-review__item span {
  display: block;
}

.level-review__item strong {
  color: #2b1809;
  font-size: 0.78rem;
}

.level-review__item span {
  margin-top: 1px;
  color: #6e4f25;
}

.overlay button {
  min-height: 42px;
  border-color: #0d252b;
  background:
    linear-gradient(180deg, #fffaf0 0%, #f8e7c7 100%),
    #fffaf0;
  color: #2b1809;
  box-shadow: 0 2px 0 #8a5c24;
}

.overlay-progress__button {
  display: grid;
  place-items: center;
  min-width: 48px;
  padding: 0;
}

.overlay-progress__button svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#resume-button,
#continue-level-button,
#restart-button {
  background:
    linear-gradient(180deg, #ffe99b 0%, #ffc94f 100%),
    var(--gold);
}

#reset-campaign-button {
  border-color: #8f6329;
  background:
    linear-gradient(180deg, #fff6df 0%, #ead2a8 100%),
    #ead2a8;
  color: #5a3213;
  font-size: 0.82rem;
}

.overlay button[hidden] {
  display: none;
}

.status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 820px) {
  body {
    overflow-x: hidden;
    background-attachment: scroll;
  }

  .topbar {
    padding: 10px 14px;
  }

  .game-page {
    width: 100%;
    max-width: 430px;
    padding: 58px 0 24px;
  }

  .game-shell {
    grid-template-columns: 1fr;
    gap: 12px;
    min-width: 0;
  }

  .game-copy {
    min-width: 0;
    padding-inline: 14px;
    text-align: center;
  }

  .eyebrow,
  .desktop-copy {
    display: none;
  }

  .mobile-copy {
    display: inline;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3rem);
    line-height: 0.96;
    white-space: nowrap;
  }

  h1 span {
    display: inline;
  }

  .game-copy__lead {
    max-width: 310px;
    margin: 10px auto 0;
    font-size: 0.96rem;
    line-height: 1.35;
  }

  .game-copy__actions {
    justify-content: center;
    gap: 9px;
    margin-top: 14px;
    padding-inline: 14px;
  }

  .hero-button {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 0.84rem;
  }

  .hero-button--desktop-primary {
    display: none;
  }

  .hero-link {
    flex-basis: 100%;
    min-height: 36px;
    font-size: 0.84rem;
  }

  .arcade {
    width: min(360px, calc(100vw - 18px));
    max-width: none;
    min-width: 0;
    justify-self: center;
    padding: 8px;
  }

  .game-copy {
    padding-top: 0;
  }

  .mobile-minimondo-note {
    display: grid;
    gap: 12px;
    justify-items: center;
    margin: 4px auto 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    width: 100%;
    padding: 18px 24px 0;
    color: var(--white);
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.36);
  }

  .mobile-minimondo-note p {
    max-width: 300px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.45;
    overflow-wrap: break-word;
  }

  .arcade__toolbar {
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 6px;
  }
}

.journey-strip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin: 0 0 8px;
  border: 2px solid #e0aa38;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(244, 250, 220, 0.96) 0%, rgba(255, 243, 187, 0.98) 100%),
    #fff2b8;
  color: #4a3311;
  padding: 8px 11px;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow:
    0 2px 0 #b67f23,
    inset 0 1px rgba(255, 255, 255, 0.68);
}

.journey-strip strong,
.journey-strip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-strip span {
  color: #2f643c;
}

.journey-strip strong {
  color: #5a3e0e;
}

.arcade__tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 2px solid #e0aa38;
  border-radius: 10px;
  background: #fff7e6;
  padding: 0;
  box-shadow:
    0 3px 0 #a77525,
    inset 0 1px rgba(255, 255, 255, 0.68);
}

.arcade__tab {
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: #fff7e6;
  color: #5c4322;
  padding-inline: 10px;
  font-size: 0.98rem;
  transition:
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.arcade__tab + .arcade__tab {
  border-left: 2px solid #e0aa38;
}

.arcade__tab[aria-selected="true"] {
  background:
    linear-gradient(180deg, #ffe99b 0%, #ffc94f 100%),
    #ffc94f;
  color: #2b1809;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.66),
    inset 0 -3px rgba(178, 116, 22, 0.20);
}

.arcade__tab:active {
  transform: translateY(1px);
}

.arcade__view[hidden] {
  display: none;
}

.unlock-toast {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 48px;
  z-index: 6;
  display: grid;
  gap: 2px;
  border: 2px solid #d79d35;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffe08a, #fff8df),
    #f8df8a;
  color: #2b1809;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: left;
  box-shadow:
    0 4px 0 #a77525,
    0 12px 20px rgba(66, 54, 26, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.66);
  pointer-events: none;
  animation: toast-in 180ms ease-out;
}

.unlock-toast[hidden] {
  display: none;
}

.unlock-toast strong,
.unlock-toast span,
.unlock-toast small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unlock-toast span {
  color: #3b2609;
}

.unlock-toast small {
  color: #5f4210;
}

.notebook-panel {
  position: relative;
  border: 4px solid #172d30;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 18%),
    repeating-linear-gradient(
      0deg,
      rgba(164, 124, 56, 0.055) 0 2px,
      transparent 2px 23px
    ),
    #fff4d8;
  aspect-ratio: 2 / 3;
  overflow-y: auto;
  padding: 10px;
  color: #2b1809;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.42),
    inset 0 -12px rgba(114, 173, 72, 0.16);
  scrollbar-color: #d79d35 #f5dfae;
  scrollbar-width: thin;
}

.notebook-topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-start;
  margin: 0 0 8px;
}

.notebook-back {
  min-height: 34px;
  border: 2px solid #dcb36e;
  background: #fff9ea;
  color: #6f5125;
  padding-inline: 10px;
  font-size: 0.74rem;
  box-shadow: 0 2px 0 #c8944d;
}

.notebook-summary {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  border: 2px solid #e0aa38;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #f1f8cf 0%, #fff2b8 100%),
    #fff2b8;
  padding: 11px;
  box-shadow:
    0 3px 0 #b67f23,
    0 8px 14px rgba(101, 85, 35, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.70);
}

.notebook-summary__copy {
  display: grid;
  gap: 2px;
}

.notebook-summary__copy span {
  color: #2f643c;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0;
}

.notebook-summary__copy strong {
  color: #2b1809;
  font-size: 1.34rem;
  line-height: 1;
}

.notebook-summary__copy small {
  color: #5a3e0e;
  font-size: 0.74rem;
  font-weight: 800;
}

.notebook-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.notebook-progress__track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(106, 135, 72, 0.24);
  background: rgba(255, 250, 240, 0.70);
  box-shadow: inset 0 1px 2px rgba(92, 67, 34, 0.18);
}

.notebook-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6fac48, #ffd86b);
  box-shadow: 0 0 8px rgba(255, 216, 107, 0.34);
  transition: width 220ms ease;
}

.notebook-progress b {
  color: #5f4210;
  font-size: 0.78rem;
  font-weight: 900;
}

.notebook-list {
  display: grid;
  gap: 12px;
}

.notebook-level {
  border: 2px solid #dcb36e;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #fff9ea, #f7e4ba),
    #fff4d8;
  overflow: hidden;
  box-shadow:
    0 3px 0 #b67f23,
    0 8px 14px rgba(89, 55, 23, 0.14),
    inset 0 1px rgba(255, 255, 255, 0.72);
}

.notebook-level.has-unlocks {
  border-color: #8fbf5e;
}

.notebook-level.is-complete {
  border-color: #d79d35;
}

.notebook-level__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(49, 96, 35, 0.12) 0 2px,
      transparent 2px 16px
    ),
    linear-gradient(180deg, #8fc65b 0%, #6fac48 100%);
  color: #fffaf0;
  padding: 10px;
  text-shadow: 0 1px rgba(44, 82, 31, 0.48);
}

.notebook-level__header span:first-child {
  display: block;
  color: #fff6bf;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0;
}

.notebook-level__header h3 {
  margin: 2px 0 0;
  font-size: 0.96rem;
  line-height: 1.25;
}

.notebook-level__count {
  flex: 0 0 auto;
  border: 2px solid #d79d35;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff6bf, #ffd86b);
  color: #4a3311;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 900;
  text-shadow: none;
  box-shadow:
    0 2px 0 #a77525,
    inset 0 1px rgba(255, 255, 255, 0.66);
}

.notebook-checkpoint {
  display: grid;
  gap: 7px;
  margin: 8px;
  min-height: 94px;
  border: 2px solid #dcb36e;
  border-radius: 8px;
  padding: 10px;
}

.notebook-checkpoint.is-unlocked {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 239, 202, 0.98)),
    #fffaf0;
  color: #2b1809;
  box-shadow:
    0 3px 0 #c8944d,
    0 7px 12px rgba(89, 55, 23, 0.12),
    inset 0 1px rgba(255, 255, 255, 0.72);
}

.notebook-checkpoint.is-locked {
  border-color: #c6d39b;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(106, 135, 72, 0.10) 0 6px,
      rgba(255, 255, 255, 0.12) 6px 12px
    ),
    #eef0cf;
  color: #6e704f;
}

.notebook-checkpoint__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #6f5125;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
}

.notebook-checkpoint.is-locked .notebook-checkpoint__meta {
  color: #7f815d;
}

.notebook-checkpoint__phrase {
  display: block;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.notebook-checkpoint__support {
  margin: 0;
  color: #5b4423;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.notebook-checkpoint.is-locked .notebook-checkpoint__support {
  color: #747654;
}

.notebook-footer {
  margin-top: 12px;
  padding-bottom: 2px;
  text-align: right;
}

.notebook-reset {
  min-height: 32px;
  border: 2px solid #dcb36e;
  background: #fff9ea;
  color: #6f5125;
  padding-inline: 10px;
  font-size: 0.74rem;
  box-shadow: 0 2px 0 #c8944d;
}

.notebook-reset:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

@keyframes toast-in {
  from {
    transform: translateY(-8px);
  }

  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .arcade__tab,
  .notebook-progress__fill,
  .unlock-toast {
    animation: none;
    transition: none;
  }
}

@media (max-width: 380px) {
  .game-page {
    width: 100%;
    padding-left: 6px;
    padding-right: 6px;
  }

  .arcade {
    border-width: 4px;
  }

  .overlay {
    left: 8%;
    right: 8%;
    padding: 14px;
  }
}

@media (max-width: 420px) {
  .arcade__toolbar {
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 5px;
  }

  .select-field__label {
    padding-inline: 5px;
    font-size: 0.62rem;
  }

  .select-field__control {
    min-height: 39px;
  }

  .arcade__toolbar select {
    padding-inline: 8px 26px;
    font-size: 0.75rem;
  }

  .mute-button {
    min-height: 58px;
    padding-inline: 3px;
  }

  .journey-strip {
    min-height: 39px;
    padding-inline: 9px;
    font-size: 0.68rem;
  }

  .arcade__tab {
    min-height: 42px;
    font-size: 0.92rem;
  }
}
