:root {
  --sky: #8fd0ee;
  --sky-strong: #a9dcf4;
  --ink: #eef5f8;
  --ink-dim: rgba(226, 236, 241, 0.72);
  --ink-faint: rgba(226, 236, 241, 0.5);
  --panel: rgba(16, 23, 29, 0.8);
  --line: rgba(255, 255, 255, 0.14);
  --card-line: #6c7176;
  --head-top: #3e4043;
  --head-bottom: #121314;
  --accent: #19c2b4;
  --danger: #ff8a6b;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* the hidden attribute must win over any display set below (.field, .note, ...) */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #1b2228;
  color: var(--ink);
  font-family: var(--font);
}

#app canvas {
  display: block;
  touch-action: none; /* swipes are the game's, not the page's */
  -webkit-user-select: none;
  user-select: none;
}

/* ================================================================ touch controls */
#touch-ui {
  /* button sizes follow the screen's shorter side */
  --t-small: clamp(34px, 10vmin, 52px);
  --t-mid: clamp(46px, 14vmin, 66px);
  --t-big: clamp(54px, 18vmin, 86px);
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.t-btn {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(10, 20, 28, 0.38);
  color: #fff;
  font: 600 14px var(--font);
  letter-spacing: 0.04em;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.t-btn.on {
  background: rgba(143, 208, 238, 0.75);
  border-color: var(--sky);
  color: #072230;
}

.t-pause {
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  width: var(--t-small);
  height: var(--t-small);
  border-radius: 50%;
  gap: 5px;
}

.t-pause span {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: #fff;
}

.t-level {
  top: max(10px, env(safe-area-inset-top));
  left: calc(max(10px, env(safe-area-inset-left)) + 2 * var(--t-small) + 20px);
  width: var(--t-small);
  height: var(--t-small);
  border-radius: 50%;
  font-size: calc(var(--t-small) * 0.5);
}

#touch-ui[data-mode='drone'] .t-level {
  display: none;
}

.t-lineup {
  top: max(10px, env(safe-area-inset-top));
  left: calc(max(10px, env(safe-area-inset-left)) + var(--t-small) + 10px);
  width: var(--t-small);
  height: var(--t-small);
  border-radius: 50%;
  font-size: calc(var(--t-small) * 0.45);
}

/* standing: crouch (toggle) and snap (hold) on the left */
.t-crouch,
.t-charge {
  left: max(14px, env(safe-area-inset-left));
  width: var(--t-big);
  height: var(--t-big);
  border-radius: 50%;
  font-size: calc(var(--t-big) * 0.2);
  display: none;
}

.t-crouch {
  top: calc(50% - var(--t-big) - 6px);
}

.t-charge {
  top: calc(50% + 6px);
}

#touch-ui[data-mode='standing'] .t-crouch,
#touch-ui[data-mode='standing'] .t-charge {
  display: flex;
}

/* drone: climb and descend, on the right */
.t-up,
.t-down {
  right: max(14px, env(safe-area-inset-right));
  width: var(--t-mid);
  height: var(--t-mid);
  border-radius: 50%;
  font-size: calc(var(--t-mid) * 0.3);
  display: none;
}

.t-up {
  top: calc(40% - var(--t-mid) - 6px);
}

.t-down {
  top: calc(40% + 6px);
}

#touch-ui[data-mode='drone'] .t-up,
#touch-ui[data-mode='drone'] .t-down {
  display: flex;
}

#touch-ui[data-mode='drone'] .t-lineup {
  display: none;
}

/* a guide to the touch zones, shown for the first few seconds */
.t-guide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s;
  color: rgba(255, 255, 255, 0.9);
  font: 600 clamp(10px, 3.2vmin, 14px) / 1.4 var(--font);
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

#touch-ui.guide .t-guide {
  opacity: 1;
}

.t-guide span {
  position: absolute;
  padding: 8px 10px;
  border: 1.5px dashed rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  background: rgba(10, 20, 28, 0.25);
}

.g-left {
  left: 8%;
  top: 40%;
}

.g-board {
  left: 50%;
  top: 40%;
  transform: translateX(-50%);
}

.g-right {
  right: 8%;
  top: 18%;
}

.g-look {
  right: 8%;
  bottom: 14%;
}

#touch-ui:not([data-mode='prone']) .g-left,
#touch-ui:not([data-mode='prone']) .g-right,
#touch-ui[data-mode='drone'] .t-guide {
  display: none;
}

/* (portrait is playable: the start message suggests turning the phone) */
#rotate-hint {
  display: none;
}

button {
  font: inherit;
  color: inherit;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 6px;
  margin: 0 1px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  font: 600 12px/1.4 var(--font);
  text-align: center;
  color: var(--ink);
}

/* ================================================================ menu */
.menu {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.menu.hidden {
  opacity: 0;
  pointer-events: none;
}

.menu-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(ellipse 90% 70% at 50% 38%, #1c252c 0%, #12181c 58%, #0a0d10 100%);
}

/* a faint sea chart (depth contours, drawn by menu.js) rising from the bottom */
.menu-bg .chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.75) 35%, rgba(0, 0, 0, 0.12) 75%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.75) 35%, rgba(0, 0, 0, 0.12) 75%, transparent 100%);
  animation: chart-in 1.2s ease both;
}

@keyframes chart-in {
  from {
    opacity: 0;
  }
}

/* over the live game (pause) the world shows through */
.menu.ingame .menu-bg {
  background: rgba(8, 16, 22, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.menu.ingame .menu-bg .chart {
  display: none;
}

.menu-inner {
  position: relative;
  min-height: 100%;
  padding: clamp(16px, 4.5vh, 52px) clamp(16px, 6.6vw, 104px) clamp(14px, 3vh, 30px);
  display: flex;
  flex-direction: column;
}

/* LINEUP | SINGLEPLAYER, over a ruled line */
.brand {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 20px);
  min-height: clamp(36px, 6vh, 56px);
}

.logo {
  margin: 0;
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--sky);
  text-shadow: 0 0 18px rgba(143, 208, 238, 0.3);
  user-select: none;
}

.crumb {
  margin: 0;
  padding-left: clamp(12px, 1.6vw, 20px);
  border-left: 1px solid rgba(226, 236, 241, 0.45);
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.6;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.crumb:empty {
  display: none;
}

.rule {
  height: 4px;
  margin: clamp(10px, 2vh, 18px) 0 clamp(18px, 4.5vh, 46px);
  background: linear-gradient(180deg, rgba(222, 234, 240, 0.85) 0 1px, rgba(150, 168, 178, 0.75) 1px 3px, rgba(0, 0, 0, 0.45) 3px 4px);
}

.screen {
  display: none;
  flex: 1;
}

.screen.on {
  display: flex;
  flex-direction: column;
  animation: rise 0.28s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- mode cards (main screen): a row of tall cards, one always selected ---------- */
.screen[data-screen='main'].on {
  justify-content: center;
}

.mode-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 1.3vw, 18px);
}

.mode-card {
  position: relative;
  height: min(58vh, 560px);
  aspect-ratio: 0.55;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: #1e2124;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s;
}

.mode-shot {
  position: absolute;
  inset: 0;
  background: #2d3033;
}

.mode-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) brightness(0.68);
  transform: scale(1.001);
  transition: filter 0.3s, transform 0.6s ease;
}

.mode-head {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(36px, 6.2vh, 50px);
  padding: 0 8px;
  background: rgba(14, 16, 18, 0.84);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: #9da4a9;
  font-size: clamp(13px, 1.25vw, 17px);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s, background 0.2s;
}

/* the selected card: full colour, outlined in blue (the mouse or the arrow keys pick it) */
.mode-card.sel {
  border-color: var(--sky);
  box-shadow: 0 0 0 1px var(--sky), 0 0 26px rgba(143, 208, 238, 0.28), 0 24px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(-4px);
}

.mode-card.sel .mode-shot img {
  filter: none;
  transform: scale(1.03);
}

.mode-card.sel .mode-head {
  color: #fff;
  background: linear-gradient(180deg, rgba(14, 16, 18, 0.9), rgba(14, 22, 28, 0.94));
  box-shadow: inset 0 -3px 0 var(--sky);
}

@media (max-width: 640px) {
  .mode-card {
    height: auto;
    width: min(100%, 420px);
    aspect-ratio: 16 / 9;
  }
}

/* ---------- prompts along the bottom ---------- */
.menu-foot {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(16px, 3vh, 30px);
  padding-top: 10px;
  border-top: 1px solid rgba(226, 236, 241, 0.38);
  min-height: 44px;
}

.menu-foot::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  width: 64px;
  height: 3px;
  background: var(--sky);
}

.prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding-right: 14px;
  border-right: 1px solid rgba(226, 236, 241, 0.38);
}

.prompt {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 2px 0;
  border: none;
  background: none;
  color: var(--ink-dim);
  font: 600 13px var(--font);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.prompt:disabled {
  cursor: default;
}

.prompt:hover:not(:disabled),
.prompt:focus-visible {
  color: var(--ink);
  outline: none;
}

.prompt kbd {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: #4f5a61;
  color: #fff;
  font: 700 11px var(--font);
  letter-spacing: 0.02em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}

.prompt.p-go kbd {
  background: #4caf50;
}

.prompt.p-back kbd {
  background: #d9534a;
}

/* ---------- panels (sub screens): centred under the header, like the cards ---------- */
.screen.on > .panel {
  margin: 0 auto;
}

.panel {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.panel.wide {
  width: min(1080px, 100%);
}

.panel.narrow {
  width: min(400px, 100%);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 16px;
  background: linear-gradient(180deg, var(--head-top), var(--head-bottom));
  border-bottom: 1px solid rgba(143, 208, 238, 0.35);
}

.panel-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sky-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.back {
  flex: none;
  padding: 6px 12px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-dim);
  font-size: 13px;
  cursor: pointer;
}

.back::before {
  content: '‹ ';
}

.back:hover,
.back:focus-visible {
  color: var(--ink);
  border-color: var(--sky);
  outline: none;
}

.panel-body {
  padding: 20px 22px 22px;
}

.panel-body h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.panel-body.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-dim);
}

.note:empty {
  display: none;
}

.note.error {
  color: var(--danger);
}

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, filter 0.2s;
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--sky);
  background: rgba(143, 208, 238, 0.12);
  outline: none;
}

.btn.primary {
  border: none;
  background: var(--sky);
  color: #072230;
  box-shadow: 0 6px 22px rgba(143, 208, 238, 0.28);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  filter: brightness(1.08);
  background: var(--sky);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
  box-shadow: none;
}

.btn.vr-off {
  border-style: dashed;
}

.link {
  padding: 0;
  border: none;
  background: none;
  color: var(--sky);
  text-decoration: underline;
  cursor: pointer;
}

.play-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink-dim);
}

.field span {
  display: flex;
  justify-content: space-between;
}

.field input[type='text'],
.field input[type='password'],
.field select,
.search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: 500 15px var(--font);
  outline: none;
}

.field input:focus,
.field select:focus,
.search:focus {
  border-color: var(--sky);
}

.field select option {
  background: #1b252c;
}

.field input[type='range'] {
  accent-color: var(--sky);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.4;
}

.check input {
  margin-top: 3px;
  accent-color: var(--sky);
}

/* ---------- board picker ---------- */
.board-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.board-opt {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  cursor: pointer;
}

.board-opt svg {
  grid-row: span 2;
  width: 44px;
  height: 92px;
}

.board-opt b {
  font-weight: 600;
  font-size: 15px;
  align-self: end;
}

.board-opt small {
  font-size: 12px;
  color: var(--ink-dim);
  align-self: start;
  line-height: 1.35;
}

.board-pick.compact .board-opt {
  grid-template-columns: 22px 1fr;
  padding: 8px 10px;
}

.board-pick.compact .board-opt svg {
  width: 22px;
  height: 46px;
}

.board-pick.compact small {
  display: none;
}

.board-opt[aria-checked='true'] {
  border-color: var(--sky);
  background: rgba(143, 208, 238, 0.14);
  box-shadow: inset 0 0 0 1px var(--sky);
}

.board-opt:focus-visible,
.opt:focus-visible,
.tab:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

/* ---------- multiplayer ---------- */
.mp-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 26px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 9px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.tab.on {
  color: var(--sky-strong);
  border-bottom-color: var(--sky);
}

.room-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: min(46vh, 420px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.room-list:empty {
  display: none;
}

.room-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.room-list li:last-child {
  border-bottom: none;
}

.room-list li:hover {
  background: rgba(143, 208, 238, 0.07);
}

.room-name {
  min-width: 0;
}

.room-name b {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-name small {
  display: block;
  font-size: 12px;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-count {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink-dim);
}

.room-list .btn {
  padding: 7px 16px;
  font-size: 13px;
}

.lock {
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
  color: var(--sky);
}

.privacy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  cursor: pointer;
}

.opt small {
  font-size: 12px;
  color: var(--ink-dim);
}

.opt.on {
  border-color: var(--sky);
  background: rgba(143, 208, 238, 0.14);
}

.room-meta {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-dim);
}

.room-meta:empty {
  display: none;
}

.player-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.player-list li i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.player-list li.playing i {
  background: #5fe0a2;
}

.player-list li.me {
  outline: 1px solid rgba(143, 208, 238, 0.5);
}

/* ---------- settings ---------- */
#quality-note {
  margin: -6px 0 16px;
}

#lobby-status {
  margin: 0 0 16px;
}

/* your look: turntable preview + colour swatches */
.look-pick {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.look-preview {
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 38%, rgba(143, 208, 238, 0.2), rgba(0, 0, 0, 0.22) 70%);
  border: 1px solid var(--line);
}

.look-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.swatch-row > span {
  flex: none;
  width: 42px;
  font-size: 12px;
  color: var(--ink-dim);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: var(--c);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
}

.swatch:hover {
  transform: scale(1.12);
}

.swatch.on {
  border-color: var(--sky);
  box-shadow: 0 0 0 2px rgba(143, 208, 238, 0.35);
}

.swatch:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

.look-random {
  font-size: 13px;
}

@media (max-width: 520px) {
  .look-pick {
    grid-template-columns: 1fr;
  }
}

/* VR leaning sensitivity */
.lean-set {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 12px 0 4px;
}

.lean-axis {
  padding: 12px 14px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.lean-axis b {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.lean-axis b small {
  font-weight: 400;
  color: var(--ink-dim);
}

.lean-axis .field {
  margin-bottom: 8px;
}

.lean-axis canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.lean-note b {
  color: var(--ink);
  font-weight: 600;
}

/* surf spot */
.spot-pick {
  margin: 0 0 14px;
}

.spot-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.spot-opt {
  display: grid;
  gap: 2px;
  padding: 0 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  cursor: pointer;
}

.spot-opt img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  margin-bottom: 6px;
  background: #123;
}

.spot-opt b,
.spot-opt small {
  padding: 0 11px;
}

.spot-opt b {
  font-weight: 600;
  font-size: 15px;
}

.spot-opt small {
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.35;
}

.spot-opt[aria-checked='true'] {
  border-color: var(--sky);
  background: rgba(143, 208, 238, 0.14);
  box-shadow: inset 0 0 0 1px var(--sky);
}

.spot-opt:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

/* the room's spot and time of day, in the lobby */
.room-where {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.room-where[hidden] {
  display: none;
}

.room-where img {
  width: 96px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

.room-where b {
  display: block;
  font-weight: 600;
}

.room-where small {
  font-size: 12px;
  color: var(--ink-dim);
}

@media (max-width: 520px) {
  .spot-opts {
    grid-template-columns: 1fr;
  }
}

/* wave size */
.wave-pick {
  margin: 2px 0 14px;
}

.tod-pick {
  margin: 0 0 14px;
}

.wave-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.wave-label {
  font-size: 13px;
  color: var(--ink-dim);
}

.seg {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.seg button {
  padding: 6px 13px;
  border: none;
  background: none;
  color: var(--ink-dim);
  font: 600 13px var(--font);
  cursor: pointer;
}

.seg button.on {
  background: rgba(143, 208, 238, 0.2);
  color: var(--sky-strong);
}

.seg button:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: -2px;
}

.wave-pick input[type='range'] {
  width: 100%;
  accent-color: var(--sky);
}

.wave-pick input[type='range']:disabled {
  opacity: 0.3;
}

.wave-desc {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-dim);
}

/* surfer or drone */
.player-list li small {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sky);
}

.drone-help {
  margin: 0 0 14px;
  line-height: 1.9;
}

.drone-help kbd {
  font-size: 11px;
}

.stab-body.settings {
  max-width: 520px;
}

/* key / button bindings */
.binds {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.35;
}

.binds th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 8px 8px 0;
}

.binds td {
  padding: 5px 10px 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  vertical-align: middle;
  color: var(--ink);
}

.binds td:first-child {
  width: 52%;
}

.binds tr.fixed td:first-child,
.binds.gestures td:last-child {
  color: var(--ink-dim);
}

.binds.gestures td:first-child {
  width: 34%;
  font-weight: 600;
}

.keycap {
  min-width: 120px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom-width: 3px;
  background: rgba(255, 255, 255, 0.07);
  font: 600 14px var(--font);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

button.keycap:hover,
button.keycap:focus-visible {
  border-color: var(--sky);
  background: rgba(143, 208, 238, 0.12);
  outline: none;
}

.keycap.empty {
  color: var(--ink-faint);
  font-weight: 500;
}

.keycap.listening {
  border-color: var(--sky);
  background: rgba(143, 208, 238, 0.22);
  color: var(--sky-strong);
  animation: listen 1.1s ease-in-out infinite;
}

@keyframes listen {
  50% {
    background: rgba(143, 208, 238, 0.06);
  }
}

.keycap.fixed {
  display: inline-block;
  cursor: default;
  color: var(--ink-dim);
  border-style: dashed;
  border-bottom-width: 1px;
  background: none;
}

.binds select {
  width: min(240px, 100%);
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: 600 14px var(--font);
}

.binds select:focus {
  border-color: var(--sky);
  outline: none;
}

.binds select option {
  background: #1b252c;
}

.binds-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 18px;
}

.binds-foot .note {
  margin: 4px 0 0;
}

.btn.small {
  flex: none;
  padding: 7px 14px;
  font-size: 13px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tab-body[hidden] {
  display: none;
}

/* ---------- dialog ---------- */
.dialog {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 10, 14, 0.55);
  z-index: 20;
}

.dialog[hidden] {
  display: none;
}

@media (max-width: 860px) {
  .mp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .binds td:first-child {
    width: auto;
  }
  .keycap {
    min-width: 0;
  }
  .binds-foot {
    flex-direction: column;
  }
  .board-pick {
    grid-template-columns: 1fr;
  }
}

/* loading state until the game has initialised */
body:not(.ready) .mode-card,
body:not(.ready) [data-play] {
  pointer-events: none;
}

body:not(.ready) .crumb::after {
  content: 'Generating the ocean…';
}

/* ================================================================ HUD */
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: opacity 0.3s;
}

#hud.hidden {
  opacity: 0;
}

.hud-tl {
  position: absolute;
  top: 18px;
  left: 20px;
}

#hud-state {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-dim);
}

#hud-speed {
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hud-tr {
  position: absolute;
  top: 20px;
  right: 22px;
  text-align: right;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

#hud-wave {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dim);
}

#hud-players {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-dim);
}

.hud-bl {
  position: absolute;
  left: 20px;
  bottom: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

#hud-feed {
  position: absolute;
  left: 20px;
  bottom: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(460px, 70vw);
}

#hud-feed li {
  padding: 5px 12px;
  border-radius: 10px;
  background: rgba(4, 28, 36, 0.42);
  font-size: 14px;
  animation: feed 5.5s ease forwards;
}

@keyframes feed {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }
  6%,
  80% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
  }
}

#toast {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translate(-50%, -8px);
  width: max-content; /* (else left: 50% caps it at half the screen) */
  max-width: min(720px, 92vw);
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(4, 28, 36, 0.45);
  backdrop-filter: blur(6px);
  font-size: 16px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#hud-tube {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%) rotate(-6deg) scale(0.6);
  opacity: 0;
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
  pointer-events: none;
}

#hud-tube span {
  font-size: clamp(28px, 6vmin, 54px);
}

#hud-tube span::after {
  background: linear-gradient(180deg, #e9ffff 0%, #5ff2ff 45%, #12a8e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

#hud-tube.show {
  opacity: 1;
  transform: translateX(-50%) rotate(-6deg) scale(1);
  animation: tube-wobble 0.9s ease-in-out infinite alternate;
}

@keyframes tube-wobble {
  to {
    transform: translateX(-50%) rotate(-3deg) scale(1.05);
  }
}

#hud-paddle,
#hud-foot {
  display: none;
  margin-top: 6px;
}

#hud-paddle.show,
#hud-foot.show {
  display: flex;
}

#hud-paddle {
  width: 120px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

#hud-paddle i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--sky);
  transition: width 0.12s linear;
}

#hud-foot {
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-dim);
}

#hud-foot b {
  position: relative;
  width: 110px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
}

#hud-foot i {
  position: absolute;
  top: -3px;
  width: 4px;
  height: 12px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
}

/* ---------- tricks and scores: early-2000s surf-mag stickers ---------- */
:root {
  --chunky: 'Titan One', 'Arial Black', system-ui, sans-serif;
  --marker: 'Permanent Marker', 'Comic Sans MS', system-ui, sans-serif;
  --sticker-ink: #082a4a;
}

/* big gradient letters, a thick navy outline and a hard offset shadow: the word itself is
   the outline, and a copy of it on top carries the gradient */
#hud-callout b,
#hud-ride b,
#hud-tube span {
  position: relative;
  display: inline-block;
  font: 400 clamp(40px, 10vmin, 96px) / 1 var(--chunky);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--sticker-ink);
  -webkit-text-stroke: 0.17em var(--sticker-ink);
  filter: drop-shadow(0.07em 0.09em 0 var(--sticker-ink)) drop-shadow(0 0.18em 0.35em rgba(0, 20, 40, 0.35));
}

#hud-callout b::after,
#hud-ride b::after,
#hud-tube span::after {
  content: attr(data-t);
  position: absolute;
  left: 0;
  top: 0;
  -webkit-text-stroke: 0;
  background: linear-gradient(180deg, #fff36b 0%, #ffd23a 40%, #ff8a1e 72%, #ff4f2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#hud-ride b small {
  -webkit-text-stroke: 0.1em var(--sticker-ink);
  paint-order: stroke fill;
  -webkit-text-fill-color: #ffd23a;
}

#hud-callout {
  position: absolute;
  top: 40%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transform: translate(-50%, 0) rotate(var(--tilt, -5deg));
  opacity: 0;
  pointer-events: none;
}

/* a burst behind the word, like a sticker on a board */
#hud-callout::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 46%;
  width: 150%;
  aspect-ratio: 2.4;
  translate: -50% -50%;
  background: radial-gradient(circle at 50% 50%, rgba(95, 242, 255, 0.95) 0 30%, rgba(30, 170, 230, 0.9) 31% 52%, transparent 53%);
  clip-path: polygon(50% 0%, 57% 30%, 76% 6%, 70% 36%, 98% 22%, 79% 48%, 100% 64%, 72% 64%, 80% 96%, 58% 72%, 50% 100%, 42% 72%, 20% 96%, 28% 64%, 0% 64%, 21% 48%, 2% 22%, 30% 36%, 24% 6%, 43% 30%);
  opacity: 0.85;
  z-index: -1;
}

#hud-callout i,
#hud-ride i,
#hud-ride em {
  font: 400 clamp(15px, 3.2vmin, 26px) / 1.15 var(--marker);
  font-style: normal;
  color: #5ff2ff;
  text-shadow: 0.06em 0.06em 0 var(--sticker-ink), -0.03em 0.03em 0 var(--sticker-ink), 0.03em -0.03em 0 var(--sticker-ink), -0.03em -0.03em 0 var(--sticker-ink), 0 0.2em 0.4em rgba(0, 20, 40, 0.5);
  white-space: nowrap;
}

#hud-callout.show {
  animation: slap 1.6s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes slap {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px) rotate(calc(var(--tilt) - 14deg)) scale(2.1);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(calc(var(--tilt) + 3deg)) scale(0.92);
  }
  18% {
    transform: translate(-50%, 0) rotate(var(--tilt)) scale(1.06);
  }
  26%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(var(--tilt)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -26px) rotate(calc(var(--tilt) + 4deg)) scale(0.9);
  }
}

/* the ride's score */
#hud-ride {
  position: absolute;
  top: 9%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 92vw;
  padding: 14px 30px 16px;
  transform: translate(-50%, 0) rotate(-3deg);
  border: 4px solid var(--sticker-ink);
  border-radius: 18px 26px 16px 30px;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.09) 0 10px, transparent 10px 22px),
    linear-gradient(160deg, #1e8fd6 0%, #0b5aa8 60%, #0a3f7a 100%);
  box-shadow: 7px 9px 0 var(--sticker-ink), 0 18px 40px rgba(0, 20, 40, 0.35);
  opacity: 0;
  pointer-events: none;
}

#hud-ride em {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#hud-ride b {
  font-size: clamp(44px, 10vmin, 92px);
}

#hud-ride b small {
  margin-left: 0.15em;
  font-size: 0.42em;
}

#hud-ride strong {
  position: absolute;
  top: -14px;
  right: -22px;
  padding: 5px 12px;
  transform: rotate(12deg);
  border: 3px solid var(--sticker-ink);
  border-radius: 8px;
  background: #ff3d8b;
  color: #fff;
  font: 400 clamp(13px, 2.6vmin, 20px) / 1 var(--chunky);
  text-transform: uppercase;
  box-shadow: 3px 4px 0 var(--sticker-ink);
}

#hud-ride i {
  max-width: 80vw;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #dff9ff;
}

#hud-ride.show {
  animation: ride-card 5.5s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes ride-card {
  0% {
    opacity: 0;
    transform: translate(-50%, -40px) rotate(-12deg) scale(1.4);
  }
  7% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(-1deg) scale(0.96);
  }
  12%,
  88% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(-3deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -16px) rotate(-3deg) scale(0.95);
  }
}

#hud-warn {
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(214, 92, 44, 0.85);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.12s;
}

#hud-warn.show {
  opacity: 1;
}

#debug {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font: 12px/1.3 ui-monospace, Consolas, monospace;
  color: #e8fffd;
}

/* ================================================================ phones and short screens */
/* the HUD keeps clear of notches and rounded corners, and scales with the screen */
.hud-tl {
  top: max(18px, env(safe-area-inset-top));
  left: max(20px, env(safe-area-inset-left));
}

.hud-tr {
  top: max(20px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
  max-width: 45vw;
}

#hud-speed {
  font-size: clamp(20px, 5.4vmin, 30px);
}

#hud-state {
  font-size: clamp(10px, 2.6vmin, 13px);
}

#hud-wave {
  font-size: clamp(11px, 2.8vmin, 14px);
}

#toast {
  font-size: clamp(12px, 3.4vmin, 16px);
  max-width: min(720px, 86vw);
}

#hud-feed {
  left: max(20px, env(safe-area-inset-left));
}

#hud-feed li {
  font-size: clamp(11px, 3vmin, 14px);
}

/* playing by touch: the HUD's top left moves over for the pause and lineup buttons */
body[data-device='touch'] .hud-tl {
  top: max(10px, env(safe-area-inset-top));
  left: calc(max(10px, env(safe-area-inset-left)) + 3 * clamp(34px, 10vmin, 52px) + 34px);
}

/* only on touch screens */
body:not([data-device='touch']) .touch-only {
  display: none !important;
}

/* the settings' bubble level for the phone's tilt */
.tilt-check {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  margin: 10px 0 14px;
}

.tilt-side {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.tilt-side .note {
  margin: 0;
}

.tilt-side .wave-row {
  flex-wrap: wrap;
  margin: 0;
}

.tilt-level {
  position: relative;
  flex: none;
  width: 150px;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat,
    radial-gradient(circle, transparent 0 34%, rgba(255, 255, 255, 0.12) 35% 36%, transparent 37%),
    rgba(255, 255, 255, 0.03);
}

.tilt-level i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #ffc94a;
  box-shadow: 0 0 10px rgba(255, 201, 74, 0.6);
  transition: transform 0.06s linear;
}

.tilt-level.off i {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.tilt-level span {
  position: absolute;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.l-l {
  left: 6px;
  top: 50%;
  transform: translateY(-120%);
}

.l-r {
  right: 6px;
  top: 50%;
  transform: translateY(-120%);
}

.l-f {
  top: 4px;
  left: 50%;
  transform: translateX(6px);
}

.l-b {
  bottom: 4px;
  left: 50%;
  transform: translateX(6px);
}

body[data-device='touch'] .hud-bl {
  display: none;
}

body[data-device='touch'] #toast {
  top: 18%;
  max-width: min(640px, calc(84vw - 216px)); /* (clear of the zone labels at the sides) */
}

/* phones upright: the wave readout goes under the buttons, and the right zone's label below the messages */
@media (orientation: portrait) and (max-width: 600px) {
  body[data-device='touch'] .hud-tr {
    top: calc(max(10px, env(safe-area-inset-top)) + clamp(34px, 10vmin, 52px) + 26px);
  }

  body[data-device='touch'] #toast {
    max-width: 88vw;
  }

  .g-right {
    top: 34%;
  }
}

@media (max-height: 520px) {
  .menu-inner {
    padding: 10px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  }

  .brand {
    min-height: 30px;
  }

  .logo {
    font-size: 24px;
  }

  .crumb {
    font-size: 12px;
  }

  .rule {
    margin: 6px 0 10px;
  }

  /* the cards: a row of short landscape tiles, each image filling its card */
  .mode-cards {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .mode-card {
    height: calc(100vh - 150px);
    max-height: 230px;
    aspect-ratio: auto;
    flex: 1 1 0;
    max-width: 260px;
  }

  .mode-head {
    height: 34px;
    font-size: 12px;
  }

  .menu-foot {
    margin-top: 8px;
    padding-top: 6px;
    min-height: 34px;
  }

  .panel-head {
    min-height: 40px;
  }

  .panel-body {
    padding: 12px 14px 14px;
  }

}

/* very short screens (small phones sideways) */
@media (max-height: 380px) {
  .logo {
    font-size: 20px;
  }

  .rule {
    margin: 4px 0 6px;
  }

  .mode-card {
    height: calc(100vh - 118px);
  }

  .menu-foot {
    min-height: 28px;
    margin-top: 4px;
  }

  .prompt kbd {
    min-width: 22px;
    height: 22px;
  }

  .panel-body h3 {
    margin-bottom: 6px;
  }

  /* the pause screen: buttons in two columns so they all fit */
  [data-screen='pause'] .panel.narrow {
    width: min(620px, 100%);
  }

  [data-screen='pause'] .panel-body.stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  [data-screen='pause'] .panel-body.stack > :not(.btn) {
    grid-column: 1 / -1;
  }

  [data-screen='pause'] .btn {
    padding: 9px 16px;
  }
}

/* phones upright: menus in one column, cards stacked */
@media (max-width: 560px) and (orientation: portrait) {
  .mode-cards {
    flex-direction: column;
    align-items: stretch;
  }

  .mode-card {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 7;
  }

  .spot-opts,
  .lean-set {
    grid-template-columns: 1fr;
  }
}
