:root {
  color-scheme: dark;
  --navy: #102447;
  --night: #08162f;
  --panel: #122b51;
  --cream: #fff9df;
  --yellow: #ffd84a;
  --orange: #ff8b3d;
  --coral: #ff5e6f;
  --mint: #5fe0b7;
  --sky: #6cd7ff;
  --violet: #a984ff;
  --ink: #16243e;
  font-family: "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--night);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 12% 18%, #ffffff22 0 2px, transparent 3px) 0 0 / 71px 71px,
    radial-gradient(circle at 84% 72%, #8e7bff24 0 2px, transparent 3px) 0 0 / 93px 93px,
    linear-gradient(145deg, #0a1a37 0%, #183568 46%, #10234b 72%, #0a1730 100%);
  overscroll-behavior: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 32vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .2;
}

body::before { top: 8%; left: -10%; background: #43e7c2; }
body::after { right: -12%; bottom: -8%; background: #c268ff; }

button,
a { -webkit-tap-highlight-color: transparent; }

button {
  border: 0;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid var(--sky);
  outline-offset: 3px;
}

button:disabled { cursor: default; }

.topbar {
  min-height: 60px;
  padding: max(10px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #ffffff1a;
  background: #07162fc7;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
  text-decoration: none;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  border: 2px solid #fff7b0;
  border-radius: 9px 12px 10px 14px;
  color: var(--navy);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--orange);
  font-size: 21px;
  line-height: 1;
}

.brand-small { display: none; }

.sound-button {
  min-height: 38px;
  padding: 0 14px;
  flex: 0 0 auto;
  border: 1px solid #ffffff30;
  border-radius: 999px;
  color: var(--cream);
  background: #ffffff10;
  font-size: 12px;
  font-weight: 900;
}

.page-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 54px) clamp(14px, 3.2vw, 42px) 34px;
  display: grid;
  grid-template-columns: minmax(300px, .74fr) minmax(520px, 680px);
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 72px);
}

.story { max-width: 470px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2em;
}

h1 {
  margin: 0;
  color: var(--yellow);
  font-size: clamp(48px, 5.2vw, 76px);
  line-height: .94;
  letter-spacing: -.07em;
  text-shadow: 0 7px 0 #d65352, 0 15px 34px #02081799;
}

h1 span {
  color: var(--cream);
  font-size: .57em;
  letter-spacing: -.03em;
  text-shadow: none;
}

.lead {
  margin: 28px 0 21px;
  color: #e7efff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.85;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.feature-row div {
  min-height: 77px;
  padding: 11px 7px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid #ffffff21;
  border-radius: 18px;
  background: #ffffff0a;
}

.feature-row b {
  color: var(--yellow);
  font-size: 30px;
  line-height: 1;
}

.feature-row span {
  margin-top: 5px;
  color: #c7d6ef;
  font-size: 10px;
  font-weight: 900;
}

.steps {
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  list-style: none;
}

.steps li {
  padding: 12px 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid #ffffff22;
  color: #b9c8e0;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.5;
}

.steps b {
  color: #6684ae;
  font-size: 23px;
  font-style: italic;
}

.steps em { color: var(--cream); font-size: 10px; font-style: normal; }

.save-copy {
  margin: 18px 0 0;
  color: #7f99bd;
  font-size: 10px;
  line-height: 1.7;
}

.game-panel {
  width: 100%;
  max-width: 680px;
  padding: 12px;
  border: 1px solid #ffffff2b;
  border-radius: 28px;
  background: #07162fdb;
  box-shadow: 0 28px 76px #020713a8, inset 0 1px #ffffff1b;
}

.player-bar {
  min-height: 54px;
  padding: 2px 8px 10px;
  display: grid;
  grid-template-columns: 50px 1fr 66px;
  align-items: center;
  gap: 10px;
}

.rank-badge,
.combo-badge { display: grid; text-align: center; }
.player-bar small { color: #7891b3; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.rank-badge strong { color: var(--yellow); font-size: 25px; line-height: 1; }
.combo-badge strong { color: var(--mint); font-size: 23px; line-height: 1; }

.xp-area > div:first-child {
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #dbe7fa;
  font-size: 10px;
  font-weight: 900;
}

.xp-area b { color: #829abb; font-size: 9px; }

.xp-track {
  height: 9px;
  overflow: hidden;
  border: 2px solid #1b3b65;
  border-radius: 99px;
  background: #040c1d;
}

.xp-track span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sky), var(--mint));
  transition: width .35s ease;
}

.arena {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 2px solid #ffffff1a;
  border-radius: 20px;
  background: #224b7a;
  isolation: isolate;
  user-select: none;
  touch-action: manipulation;
}

#game-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.overlay {
  position: absolute;
  z-index: 5;
  inset: 0;
  padding: 15px;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: #07172ecf;
  backdrop-filter: blur(7px);
}

.overlay.empty { display: none; }

.card {
  width: min(560px, 100%);
  margin: auto;
  padding: 22px;
  border: 1px solid #ffffff27;
  border-radius: 24px;
  color: var(--ink);
  background: #fffaf0;
  box-shadow: 0 18px 44px #02081775;
  text-align: center;
}

.card .kicker {
  margin: 0 0 6px;
  color: #5c78a0;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
}

.card h2 {
  margin: 0;
  color: #17345b;
  font-size: clamp(24px, 5vw, 34px);
  letter-spacing: -.05em;
}

.card > p:not(.kicker):not(.tiny-note) {
  margin: 8px 0 16px;
  color: #637089;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.mascot-row {
  height: 56px;
  margin: 1px auto 4px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 8px;
}

.mini-monster {
  position: relative;
  width: 46px;
  height: 42px;
  display: grid;
  place-items: center;
  transform: rotate(var(--tilt, 0deg));
  border: 3px solid #18365e;
  border-radius: 45% 55% 43% 47%;
  color: #17345b;
  background: var(--monster, var(--mint));
  box-shadow: inset 0 -7px #00000016, 0 5px 0 #dbe2e8;
  font-size: 14px;
  font-weight: 900;
}

.mini-monster::before,
.mini-monster::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 12px;
  height: 16px;
  border: 3px solid #18365e;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: inherit;
}

.mini-monster::before { left: 3px; transform: rotate(-20deg); }
.mini-monster::after { right: 3px; transform: rotate(20deg); }

.mode-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.mode-button {
  min-height: 74px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 8px;
  border: 2px solid #d8e1ed;
  border-radius: 17px;
  color: #1b3d68;
  background: #f3f7fb;
  text-align: left;
  transition: transform .13s ease, border-color .13s ease, box-shadow .13s ease;
}

.mode-button:hover { transform: translateY(-2px); border-color: #76b9ff; box-shadow: 0 6px 16px #17365c16; }
.mode-button.primary-mode { color: #fff; border-color: #257bd2; background: linear-gradient(135deg, #1686dc, #395bd2); }
.mode-button.daily { border-color: #ffd16b; background: #fff8dd; }
.mode-button.endless { border-color: #c4b2ee; background: #f6f0ff; }
.mode-icon { font-size: 27px; text-align: center; }
.mode-button span:not(.mode-icon) { display: grid; }
.mode-button strong { font-size: 14px; }
.mode-button small { margin-top: 2px; color: inherit; font-size: 8px; font-weight: 700; opacity: .72; line-height: 1.35; }

.home-subrow {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.soft-button,
.primary,
.secondary {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.soft-button { color: #31547e; background: #e7edf5; }
.primary { color: white; background: linear-gradient(135deg, #ff745b, #ee4c72); box-shadow: 0 5px 0 #b63055; }
.secondary { color: #31547e; border: 2px solid #cad7e5; background: white; }
.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #b63055; }

.progress-summary {
  margin: 13px 0 0;
  padding-top: 10px;
  display: flex;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid #dce4ed;
  color: #667995;
  font-size: 9px;
  font-weight: 900;
}

.progress-summary b { color: #173d6c; font-size: 14px; }

.map-card { width: min(590px, 100%); padding: 17px; }

.map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.map-heading button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #31547e;
  background: #e9eff6;
  font-size: 18px;
  font-weight: 900;
}

.island-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.island-button {
  min-height: 88px;
  padding: 7px 4px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border: 2px solid #d8e2ed;
  border-radius: 17px;
  color: #254a75;
  background: #f3f7fa;
}

.island-button:hover:not(:disabled) { transform: translateY(-2px); border-color: #64b5f4; }
.island-button .island-icon { font-size: 24px; line-height: 1; }
.island-button strong { font-size: 17px; }
.island-button small { color: #6f8197; font-size: 8px; font-weight: 800; }
.island-button .crowns { min-height: 13px; color: #f2ac17; font-size: 10px; letter-spacing: 1px; }
.island-button.locked { filter: grayscale(.8); opacity: .46; }
.island-button.boss-ready { border-color: #ff9b66; background: #fff3e9; }
.island-button.complete { border-color: #60d5ae; background: #edfff8; }

.map-note {
  margin: 10px 0 0 !important;
  font-size: 9px !important;
}

.how-grid {
  margin: 14px 0 18px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.how-item {
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  color: #52647b;
  background: #f0f4f7;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.how-item b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #357fd1;
  font-size: 15px;
}

.book-card { width: min(590px, 100%); padding: 16px; }

.book-grid {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 5px;
}

.book-monster {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid #dce4ec;
  border-radius: 12px;
  color: #b5c0cc;
  background: #edf1f5;
  font-size: 15px;
  font-weight: 900;
}

.book-monster.got {
  color: #18385f;
  border-color: color-mix(in srgb, var(--monster) 65%, #7d91aa);
  background: color-mix(in srgb, var(--monster) 45%, white);
  box-shadow: inset 0 -5px #0000000e;
}

.book-detail {
  min-height: 42px;
  margin: 10px 0;
  padding: 7px 10px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #52657c;
  background: #f0f4f7;
  font-size: 9px;
  font-weight: 800;
}

.result-stars {
  margin: 9px 0 2px;
  color: #ffbd26;
  font-size: 35px;
  letter-spacing: 5px;
  text-shadow: 0 3px #e39321;
}

.result-score {
  margin: 10px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.result-score div {
  padding: 8px 4px;
  border-radius: 12px;
  color: #65778e;
  background: #eff3f7;
  font-size: 8px;
  font-weight: 900;
}

.result-score b { display: block; color: #183b67; font-size: 18px; }

.result-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.new-friend {
  margin: 8px auto 12px;
  padding: 8px 12px;
  width: max-content;
  max-width: 100%;
  border: 2px solid #ffc751;
  border-radius: 14px;
  color: #8d5712;
  background: #fff3c3;
  font-size: 10px;
  font-weight: 900;
}

.tiny-note { margin: 8px 0 0; color: #7b899b; font-size: 8px; font-weight: 700; }

.countdown {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: none;
  place-items: center;
  color: #fff;
  background: #07162e80;
  font-size: 96px;
  font-weight: 900;
  text-shadow: 0 7px 0 #284d81, 0 10px 30px #000;
}

.countdown.show { display: grid; }

.toast {
  position: absolute;
  z-index: 8;
  top: 16px;
  left: 50%;
  min-width: 130px;
  padding: 8px 14px;
  transform: translate(-50%, -20px) scale(.9);
  border-radius: 999px;
  color: #17345b;
  background: var(--cream);
  box-shadow: 0 5px 18px #06132655;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  transition: opacity .16s ease, transform .16s ease;
}

.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.toast.good { color: #075f4d; background: #bdfbe4; }
.toast.bad { color: #8f2841; background: #ffd2d8; }
.toast.power { color: #744111; background: #fff0a3; }

.quiz-panel {
  padding: 10px 3px 2px;
}

.question-line {
  min-height: 48px;
  display: grid;
  grid-template-columns: 88px 1fr 72px;
  align-items: center;
  gap: 6px;
}

.question-line > span {
  padding: 6px 4px;
  border-radius: 999px;
  color: var(--mint);
  background: #5fe0b714;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}

.question-line strong {
  color: var(--cream);
  font-size: clamp(18px, 3vw, 25px);
  text-align: center;
  line-height: 1.1;
}

.question-line small {
  color: #7d96b8;
  font-size: 8px;
  font-weight: 900;
  text-align: right;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.answer-grid button {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid #2b4c76;
  border-radius: 16px;
  color: #f8fbff;
  background: linear-gradient(180deg, #234c79, #17375f);
  box-shadow: 0 5px 0 #081b36;
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  transition: transform .1s ease, filter .1s ease;
}

.answer-grid button:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.15); }
.answer-grid button:not(:disabled):active { transform: translateY(3px); box-shadow: 0 2px 0 #081b36; }
.answer-grid button:disabled { opacity: .42; }
.answer-grid button.correct { color: #073c31; border-color: #7eebc8; background: #64e0ba; box-shadow: 0 5px 0 #1b9272; opacity: 1; }
.answer-grid button.wrong { color: #6c1831; border-color: #ff8ca0; background: #ff7188; box-shadow: 0 5px 0 #ad304e; opacity: 1; }
.answer-grid button.reveal { color: #073c31; border-color: #7eebc8; background: #64e0ba; opacity: 1; }

.power-track {
  position: relative;
  height: 17px;
  margin: 10px 4px 4px;
  overflow: hidden;
  border: 2px solid #27476e;
  border-radius: 99px;
  background: #030c1d;
}

.power-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6bd8ff, #63e5ba 50%, #ffe052);
  transition: width .25s ease;
}

.power-track b {
  position: relative;
  z-index: 1;
  display: block;
  color: white;
  font-size: 8px;
  line-height: 13px;
  letter-spacing: .11em;
  text-align: center;
  text-shadow: 0 1px 2px #000;
}

.power-track.active { border-color: var(--yellow); box-shadow: 0 0 18px #ffd84a66; }
.power-track.active span { width: 100% !important; animation: power-shine .6s linear infinite; }

.menu-controls {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.menu-controls button {
  min-height: 40px;
  border: 1px solid #ffffff1b;
  border-radius: 12px;
  color: #9ab0ce;
  background: #ffffff08;
  font-size: 10px;
  font-weight: 900;
}

.menu-controls button:hover { color: var(--cream); background: #ffffff12; }

footer {
  padding: 10px 20px max(18px, env(safe-area-inset-bottom));
  color: #547099;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .22em;
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes power-shine {
  0% { filter: hue-rotate(0deg) brightness(1); }
  50% { filter: hue-rotate(25deg) brightness(1.35); }
  100% { filter: hue-rotate(0deg) brightness(1); }
}

@media (max-width: 940px) {
  .page-shell {
    width: min(720px, 100%);
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 24px;
  }

  .story { max-width: none; text-align: center; }
  .story h1 { font-size: clamp(50px, 11vw, 78px); }
  .lead { margin: 22px 0 16px; }
  .feature-row { width: min(480px, 100%); margin: auto; }
  .steps { width: min(520px, 100%); margin: 18px auto 0; }
  .save-copy { margin-bottom: 0; }
  .game-panel { margin: auto; }
}

@media (max-width: 600px) {
  .topbar { min-height: 54px; padding-left: 12px; padding-right: 12px; }
  .brand-wide { display: none; }
  .brand-small { display: inline; letter-spacing: .06em; }
  .sound-button { min-height: 35px; padding: 0 11px; }
  .page-shell { padding: 16px 8px 20px; gap: 18px; }
  .story { padding: 0 8px; }
  .eyebrow { margin-bottom: 9px; font-size: 9px; }
  .story h1 { font-size: clamp(42px, 14.5vw, 62px); text-shadow: 0 5px 0 #d65352; }
  .lead { margin: 17px 0 13px; font-size: 12px; line-height: 1.65; }
  .feature-row div { min-height: 62px; border-radius: 14px; }
  .feature-row b { font-size: 24px; }
  .steps, .save-copy { display: none; }
  .game-panel { padding: 7px; border-radius: 21px; }
  .player-bar { min-height: 47px; padding: 1px 4px 7px; grid-template-columns: 43px 1fr 56px; gap: 6px; }
  .rank-badge strong, .combo-badge strong { font-size: 20px; }
  .xp-area > div:first-child { font-size: 8px; }
  .xp-area b { font-size: 7px; }
  .arena { border-radius: 16px; }
  .overlay { padding: 8px; }
  .card { padding: 14px 11px; border-radius: 18px; }
  .card h2 { font-size: 24px; }
  .card > p:not(.kicker):not(.tiny-note) { margin: 5px 0 10px; font-size: 9px; }
  .mascot-row { height: 42px; }
  .mini-monster { width: 37px; height: 34px; font-size: 11px; border-width: 2px; }
  .mini-monster::before, .mini-monster::after { top: -8px; width: 9px; height: 12px; border-width: 2px; border-bottom: 0; }
  .mode-list { gap: 6px; }
  .mode-button { min-height: 59px; padding: 7px; grid-template-columns: 29px 1fr; border-radius: 13px; }
  .mode-icon { font-size: 21px; }
  .mode-button strong { font-size: 11px; }
  .mode-button small { font-size: 7px; }
  .progress-summary { margin-top: 8px; padding-top: 7px; gap: 11px; }
  .progress-summary b { font-size: 12px; }
  .island-grid { margin-top: 7px; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .island-button { min-height: 68px; border-radius: 12px; border-width: 1px; }
  .island-button .island-icon { font-size: 18px; }
  .island-button strong { font-size: 13px; }
  .island-button small { font-size: 6px; }
  .island-button .crowns { font-size: 7px; }
  .map-note { margin-top: 5px !important; }
  .book-grid { gap: 3px; }
  .book-monster { border-radius: 8px; font-size: 11px; border-width: 1px; }
  .book-detail { min-height: 32px; margin: 6px 0; font-size: 7px; }
  .how-grid { margin: 8px 0 10px; gap: 5px; }
  .how-item { padding: 6px 8px; font-size: 8px; }
  .question-line { min-height: 42px; grid-template-columns: 67px 1fr 54px; }
  .question-line > span { font-size: 6px; }
  .question-line strong { font-size: 17px; }
  .question-line small { font-size: 6px; }
  .answer-grid { gap: 5px; }
  .answer-grid button { min-height: 50px; border-radius: 13px; font-size: 22px; box-shadow: 0 4px 0 #081b36; }
  .power-track { margin-top: 8px; }
  .menu-controls { margin-top: 7px; gap: 5px; }
  .menu-controls button { min-height: 36px; font-size: 8px; }
  footer { padding-top: 4px; }
}

@media (max-width: 360px) {
  .story h1 { font-size: 40px; }
  .feature-row { gap: 5px; }
  .feature-row div { min-height: 56px; }
  .feature-row span { font-size: 8px; }
  .mode-button { min-height: 54px; }
  .mode-button small { display: none; }
  .result-stars { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Used only to capture the required release thumbnail from a real battle state. */
body.thumbnail-mode {
  width: 1200px;
  height: 675px;
  overflow: hidden;
}

.thumbnail-mode .topbar,
.thumbnail-mode footer { display: none; }

.thumbnail-mode .page-shell {
  width: 1200px;
  height: 675px;
  padding: 24px 30px;
  grid-template-columns: 410px 690px;
  gap: 36px;
}

.thumbnail-mode .story h1 { font-size: 66px; }
.thumbnail-mode .story .lead { margin: 23px 0 16px; }
.thumbnail-mode .story .steps,
.thumbnail-mode .story .save-copy { display: none; }
.thumbnail-mode .game-panel {
  width: 680px;
  transform: scale(.79);
  transform-origin: center;
}
