:root {
  --blue-950: #031b43;
  --blue-900: #05275c;
  --blue-800: #06458e;
  --blue-700: #086fd0;
  --blue-600: #168ee8;
  --blue-400: #63c7ff;
  --blue-200: #bcecff;
  --cream: #fff8e8;
  --yellow: #ffd96a;
  --yellow-strong: #ffbf3f;
  --coral: #ff8f78;
  --mint: #66e0bd;
  --text: #f8fcff;
  --muted: #b8d8f2;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --page-x: clamp(10px, 2.6vw, 28px);
  --page-y: clamp(8px, 1.8vh, 20px);
  color-scheme: dark;
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--blue-950);
}

body {
  min-width: 280px;
  padding:
    calc(var(--page-y) + var(--safe-top))
    calc(var(--page-x) + var(--safe-right))
    calc(var(--page-y) + var(--safe-bottom))
    calc(var(--page-x) + var(--safe-left));
  color: var(--text);
  background:
    radial-gradient(circle at 8% 14%, rgba(99, 199, 255, 0.3), transparent 25%),
    radial-gradient(circle at 91% 84%, rgba(255, 217, 106, 0.17), transparent 22%),
    linear-gradient(145deg, #0875d8 0%, #0751aa 42%, #03265f 100%);
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  opacity: 0.34;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 217, 106, 0.42) 0 1px, transparent 1.6px);
  background-position: 0 0, 23px 27px;
  background-size: 54px 54px, 71px 71px;
  mask-image: linear-gradient(to bottom, black, rgba(0, 0, 0, 0.4) 70%, transparent);
}

body::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(0deg, rgba(1, 16, 49, 0.3), transparent 35%);
}

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

button {
  font: inherit;
}

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

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

.menu-shell {
  width: min(100%, 1280px);
  height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - (2 * var(--page-y)));
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(7px, 1.5vh, 15px);
}

.topbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: clamp(2px, 1vw, 8px);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(9px, 2vw, 15px);
}

.brand-pair {
  width: 44px;
  height: 42px;
  flex: 0 0 44px;
  position: relative;
}

.brand-card {
  position: absolute;
  width: 29px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 9px;
  color: var(--blue-900);
  background: var(--yellow);
  box-shadow: 0 7px 15px rgba(1, 22, 59, 0.28);
  font-size: 13px;
  font-weight: 1000;
}

.brand-card-one {
  left: 1px;
  top: 4px;
  transform: rotate(-11deg);
}

.brand-card-two {
  right: 1px;
  top: 1px;
  color: white;
  background: var(--coral);
  transform: rotate(9deg);
}

h1 {
  margin: 0;
  color: white;
  font-size: clamp(28px, 7.5vw, 48px);
  font-weight: 1000;
  line-height: 0.92;
  letter-spacing: -0.065em;
  text-shadow: 0 4px 0 rgba(2, 31, 80, 0.2), 0 9px 24px rgba(2, 30, 76, 0.28);
}

h1 span {
  display: inline-block;
  margin-inline: 0.02em;
  color: var(--yellow);
  transform: rotate(-3deg) translateY(-0.02em);
  text-shadow: 0 3px 0 rgba(134, 83, 0, 0.22);
}

.ready-badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #e8f7ff;
  background: rgba(3, 35, 84, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.ready-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(102, 224, 189, 0.9);
}

.hero {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(8px, 1.5vh, 15px);
}

.board-scene {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.board-scene::before {
  content: "";
  position: absolute;
  width: min(82%, 610px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 220, 255, 0.32), transparent 67%);
  filter: blur(12px);
  z-index: -2;
}

.bubble {
  position: absolute;
  z-index: -1;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(111, 205, 255, 0.11);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.12);
}

.bubble-one {
  width: 42px;
  height: 42px;
  top: 7%;
  left: 5%;
}

.bubble-two {
  width: 24px;
  height: 24px;
  right: 5%;
  top: 16%;
}

.bubble-three {
  width: 58px;
  height: 58px;
  right: 2%;
  bottom: 7%;
}

.demo-board {
  width: min(100%, 470px);
  max-height: 100%;
  aspect-ratio: 1.34;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 2vw, 13px);
  padding: clamp(12px, 3vw, 20px);
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.44);
  border-radius: clamp(24px, 6vw, 38px);
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.17), transparent 33%),
    linear-gradient(145deg, rgba(30, 151, 232, 0.84), rgba(4, 66, 150, 0.93));
  box-shadow:
    0 20px 0 rgba(2, 30, 78, 0.18),
    0 30px 55px rgba(1, 22, 61, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.14);
  transform: rotate(-0.8deg);
}

.demo-board::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: calc(clamp(24px, 6vw, 38px) - 7px);
  pointer-events: none;
}

.demo-card {
  min-width: 0;
  min-height: 0;
  position: relative;
  perspective: 900px;
}

.demo-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 480ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.demo-card.is-matched .demo-card-inner {
  transform: rotateY(180deg);
}

.demo-card:nth-child(2) .demo-card-inner,
.demo-card:nth-child(5) .demo-card-inner {
  animation: peek-pair 7s ease-in-out infinite;
}

.demo-card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: clamp(10px, 2.4vw, 18px);
  backface-visibility: hidden;
  box-shadow:
    0 9px 0 rgba(2, 29, 74, 0.2),
    0 13px 22px rgba(1, 23, 61, 0.24),
    inset 0 2px 0 rgba(255, 255, 255, 0.18);
}

.demo-card-back {
  color: rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.18) 0 2px, transparent 2.6px),
    linear-gradient(145deg, #ff9a78, #f46c69);
  background-size: 13px 13px, auto;
}

.demo-card:nth-child(3n + 2) .demo-card-back {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0 2px, transparent 2.6px),
    linear-gradient(145deg, #72d2ff, #198fe4);
  background-size: 13px 13px, auto;
}

.demo-card:nth-child(3n) .demo-card-back {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.22) 0 2px, transparent 2.6px),
    linear-gradient(145deg, #ffd96a, #ffb842);
  background-size: 13px 13px, auto;
}

.demo-card-back span {
  width: 42%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 32%;
  color: white;
  background: rgba(3, 43, 101, 0.4);
  box-shadow: 0 5px 12px rgba(1, 24, 63, 0.18);
  font-size: clamp(10px, 2.7vw, 22px);
  font-weight: 1000;
}

.demo-card-front {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 30%, rgba(99, 199, 255, 0.2), transparent 48%),
    linear-gradient(145deg, #0a5bb6, #04285f);
}

.demo-card-front img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  filter: drop-shadow(0 7px 8px rgba(0, 16, 53, 0.34));
}

.demo-card.is-matched .demo-card-face {
  border-color: var(--yellow);
  box-shadow:
    0 9px 0 rgba(2, 29, 74, 0.18),
    0 0 0 4px rgba(255, 217, 106, 0.15),
    0 0 28px rgba(255, 217, 106, 0.48),
    inset 0 2px 0 rgba(255, 255, 255, 0.18);
}

.tilt-left {
  transform: rotate(-2.1deg);
}

.tilt-right {
  transform: rotate(1.8deg);
}

.tilt-left-soft {
  transform: rotate(-0.8deg);
}

.tilt-right-soft {
  transform: rotate(0.7deg);
}

.tablet-card {
  display: none;
}

.match-pop {
  position: absolute;
  left: 50%;
  top: 49%;
  z-index: 4;
  display: flex;
  gap: 3px;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.match-pop span {
  color: var(--yellow);
  font-size: clamp(13px, 3vw, 25px);
  text-shadow: 0 3px 8px rgba(1, 25, 66, 0.35);
  animation: star-pop 2.4s ease-in-out infinite;
}

.match-pop span:nth-child(2) {
  animation-delay: -0.22s;
  transform: translateY(-10px);
}

.match-pop span:nth-child(3) {
  animation-delay: -0.44s;
}

.control-panel {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: clamp(8px, 1.4vh, 13px);
  padding: clamp(11px, 3vw, 22px);
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: clamp(22px, 5vw, 34px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 28%),
    rgba(3, 38, 91, 0.72);
  box-shadow:
    0 16px 0 rgba(2, 27, 70, 0.15),
    0 24px 44px rgba(1, 19, 55, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(125%);
}

.panel-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-heading h2,
.dialog-heading h2 {
  margin: 0;
  color: white;
  font-size: clamp(19px, 5vw, 30px);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -0.045em;
}

#selection-summary {
  min-width: 0;
  overflow: hidden;
  color: var(--blue-200);
  font-size: clamp(10px, 2.6vw, 13px);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-block {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-block legend {
  margin-bottom: 6px;
  padding: 0 2px;
  color: white;
  font-size: clamp(11px, 2.7vw, 15px);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1.6vw, 10px);
}

.choice-card {
  min-width: 0;
  min-height: 52px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 5px 4px;
  border: 2px solid rgba(255, 255, 255, 0.23);
  border-radius: clamp(14px, 3vw, 20px);
  color: white;
  background: rgba(17, 105, 185, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.choice-card:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(30, 132, 214, 0.68);
}

.choice-card:active {
  transform: scale(0.97);
}

.choice-card[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, 0.74);
  color: var(--blue-950);
  background: linear-gradient(160deg, #fff4a2, var(--yellow));
  box-shadow:
    0 5px 0 rgba(129, 79, 0, 0.18),
    0 8px 18px rgba(255, 188, 44, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.choice-number {
  display: block;
  font-size: clamp(17px, 4.6vw, 27px);
  font-weight: 1000;
  line-height: 0.95;
}

.choice-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(9px, 2.3vw, 12px);
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-stack {
  min-width: 0;
}

.start-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: clamp(16px, 3.5vw, 22px);
  color: var(--blue-950);
  background: linear-gradient(160deg, #fff4a2, var(--yellow-strong));
  box-shadow:
    0 7px 0 #b47416,
    0 13px 24px rgba(0, 21, 58, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: clamp(18px, 4.8vw, 26px);
  font-weight: 1000;
  letter-spacing: -0.025em;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.start-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 8px 0 #b47416,
    0 15px 27px rgba(0, 21, 58, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.start-button:active {
  transform: translateY(5px);
  box-shadow:
    0 2px 0 #b47416,
    0 7px 13px rgba(0, 21, 58, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.start-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.menu-meta {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 5px;
  color: rgba(232, 247, 255, 0.72);
  font-size: 9px;
  font-weight: 700;
}

.asset-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-actions button {
  min-height: 24px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: inherit;
  font-weight: inherit;
}

.menu-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 18px;
  border: 0;
  color: var(--text);
  background: rgba(1, 17, 48, 0.7);
  backdrop-filter: blur(12px);
}

.menu-dialog::backdrop {
  background: rgba(1, 17, 48, 0.72);
  backdrop-filter: blur(10px);
}

.menu-dialog[open] {
  display: grid;
  place-items: center;
}

.dialog-card {
  width: min(100%, 520px);
  max-height: min(82vh, 660px);
  overflow: auto;
  padding: clamp(20px, 5vw, 30px);
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 28px;
  background: linear-gradient(160deg, #0b61b8, #06275d);
  box-shadow: 0 28px 70px rgba(0, 12, 39, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.12);
}

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

.dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: white;
  background: rgba(2, 33, 80, 0.52);
  cursor: pointer;
  font-size: 26px;
}

.dialog-copy {
  margin-top: 20px;
  color: var(--blue-200);
  line-height: 1.55;
}

.dialog-copy a {
  color: var(--yellow);
}

.debug-dialog .dialog-card {
  width: min(100%, 760px);
}

#debug-output {
  min-height: 230px;
  max-height: 48vh;
  margin: 18px 0 0;
  overflow: auto;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: #d9f3ff;
  background: rgba(1, 19, 47, 0.72);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.dialog-actions button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  color: white;
  background: rgba(18, 112, 197, 0.65);
  cursor: pointer;
  font-weight: 800;
}

.dialog-status {
  display: block;
  min-height: 18px;
  margin-top: 8px;
  color: var(--blue-200);
  font-size: 12px;
  text-align: right;
}

@keyframes peek-pair {
  0%, 18%, 48%, 100% { transform: rotateY(0deg); }
  25%, 41% { transform: rotateY(180deg); }
}

@keyframes star-pop {
  0%, 55%, 100% { opacity: 0.35; transform: translateY(4px) scale(0.72) rotate(-9deg); }
  68% { opacity: 1; transform: translateY(-4px) scale(1.08) rotate(7deg); }
  82% { opacity: 0.75; transform: translateY(0) scale(0.9) rotate(-2deg); }
}

@media (min-width: 600px) and (orientation: portrait) {
  :root {
    --page-x: clamp(18px, 4vw, 32px);
    --page-y: clamp(14px, 2vh, 24px);
  }

  .topbar {
    min-height: 58px;
  }

  .brand-pair {
    width: 55px;
    height: 52px;
    flex-basis: 55px;
  }

  .brand-card {
    width: 36px;
    height: 45px;
    border-radius: 11px;
    font-size: 15px;
  }

  h1 {
    font-size: clamp(42px, 7.4vw, 58px);
  }

  .hero {
    gap: clamp(14px, 2vh, 22px);
  }

  .tablet-card {
    display: block;
  }

  .demo-board {
    width: min(92%, 680px, calc(100dvh - 405px));
    aspect-ratio: 1;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 2vw, 15px);
    padding: clamp(16px, 3vw, 24px);
  }

  .control-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    padding: clamp(18px, 3vw, 25px);
  }

  .panel-heading,
  .action-stack {
    grid-column: 1 / -1;
  }

  .choice-card {
    min-height: 72px;
  }

  .start-button {
    min-height: 62px;
  }
}

@media (min-width: 720px) and (orientation: landscape) {
  :root {
    --page-x: clamp(16px, 2.4vw, 32px);
    --page-y: clamp(12px, 2vh, 22px);
  }

  .menu-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .topbar {
    min-height: 54px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(18px, 3vw, 40px);
  }

  .board-scene {
    min-height: 0;
  }

  .tablet-card {
    display: block;
  }

  .demo-board {
    width: min(100%, calc(100dvh - 142px), 680px);
    aspect-ratio: 1;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: clamp(9px, 1.5vw, 15px);
    padding: clamp(16px, 2vw, 24px);
  }

  .control-panel {
    align-self: center;
    max-height: 100%;
    place-content: center stretch;
    gap: clamp(13px, 2vh, 20px);
    padding: clamp(18px, 2.3vw, 30px);
  }

  .choice-card {
    min-height: clamp(66px, 9vh, 88px);
  }

  .start-button {
    min-height: clamp(58px, 8vh, 72px);
  }
}

@media (min-width: 1100px) and (orientation: landscape) {
  .hero {
    grid-template-columns: minmax(0, 1.72fr) minmax(340px, 0.78fr);
  }

  .control-panel {
    max-width: 410px;
    justify-self: end;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  :root {
    --page-x: 10px;
    --page-y: 6px;
  }

  .menu-shell {
    grid-template-rows: 38px minmax(0, 1fr);
    gap: 6px;
  }

  .topbar {
    min-height: 38px;
  }

  .brand-pair {
    width: 36px;
    height: 34px;
    flex-basis: 36px;
  }

  .brand-card {
    width: 23px;
    height: 29px;
    border-width: 1px;
    border-radius: 7px;
    font-size: 10px;
  }

  h1 {
    font-size: clamp(25px, 5.2vw, 34px);
  }

  .ready-badge {
    min-height: 30px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 12px;
  }

  .tablet-card {
    display: none;
  }

  .demo-board {
    width: min(100%, 470px);
    aspect-ratio: 1.52;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 11px;
    border-radius: 24px;
  }

  .control-panel {
    align-self: stretch;
    place-content: center stretch;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 20px;
  }

  .panel-heading h2 {
    font-size: 18px;
  }

  #selection-summary {
    font-size: 9px;
  }

  .choice-block legend {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .choice-grid {
    gap: 6px;
  }

  .choice-card {
    min-height: 44px;
    border-radius: 12px;
  }

  .choice-number {
    font-size: 17px;
  }

  .choice-label {
    font-size: 8px;
  }

  .start-button {
    min-height: 45px;
    border-radius: 14px;
    box-shadow: 0 4px 0 #b47416, 0 8px 14px rgba(0, 21, 58, 0.24);
    font-size: 18px;
  }

  .menu-meta {
    display: none;
  }
}

@media (max-width: 370px), (max-height: 690px) and (orientation: portrait) {
  .ready-badge span:last-child {
    display: none;
  }

  .ready-badge {
    min-width: 34px;
    justify-content: center;
    padding: 0;
  }

  .control-panel {
    gap: 7px;
    padding: 10px;
  }

  .panel-heading h2 {
    font-size: 18px;
  }

  .choice-block legend {
    margin-bottom: 4px;
  }

  .choice-card {
    min-height: 48px;
  }

  .start-button {
    min-height: 50px;
  }

  .menu-meta {
    font-size: 8px;
  }
}

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