@import url("/fonts.css");
:root {
  color-scheme: dark;
  --bg: #10121f;
  --panel: #191c2e;
  --line: #2b3048;
  --ink: #f5f4ef;
  --muted: #9da4bd;
  --lime: #d8ff62;
  --cyan: #62dfee;
  --purple: #a796ff;
  --pink: #fa84b7;
  --cell: 30px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 88px;
  padding: 0 max(5vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -1px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.brand-mark {
  color: var(--lime);
  font-size: 42px;
  line-height: 1;
  transform: rotate(-90deg);
}
.brand-dot {
  font-size: 10px;
  align-self: flex-start;
  margin-top: 10px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 25px;
}
.tag,
.eyebrow,
.input-label,
.feature-line,
.home-footer,
.leader-footer,
.gesture-hint {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 1.6px;
}
.tag {
  color: var(--muted);
}
.icon-button {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 21px;
}
.icon-button:hover {
  background: var(--line);
}
#home {
  max-width: 1280px;
  margin: auto;
  padding: 64px 5vw 24px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px 70px;
}
.eyebrow {
  color: var(--lime);
  font-size: 10px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  margin-right: 9px;
  box-shadow: 0 0 12px #d8ff6250;
}
h1 {
  font-size: clamp(64px, 7.2vw, 102px);
  line-height: 0.91;
  letter-spacing: -6px;
  font-weight: 950;
  font-style: italic;
  margin: 26px 0;
}
h1 span {
  color: var(--lime);
}
.intro-copy {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
}
.hero-art {
  height: 205px;
  position: relative;
  max-width: var(--board-max, 440px);
  overflow: hidden;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
}
.hero-art canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.art-badge {
  position: absolute;
  right: 0;
  top: 30px;
  transform: rotate(8deg);
  background: var(--pink);
  color: var(--bg);
  padding: 13px 18px;
  box-shadow: 4px 4px 0 #0004;
}
.art-badge span {
  display: block;
  font-family: monospace;
  font-size: 9px;
  letter-spacing: 1px;
}
.art-badge strong {
  font-size: 19px;
}
.feature-line {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 8px;
  margin-top: 15px;
}
.launch-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  align-self: start;
  box-shadow: 0 20px 70px #0002;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.spark {
  font-size: 25px;
  color: var(--purple);
}
.input-label {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
input:not([type="range"]):not([type="checkbox"]),
select {
  display: block;
  width: 100%;
  min-height: 49px;
  background: var(--bg);
  border: 1px solid #404661;
  color: var(--ink);
  border-radius: 8px;
  padding: 13px;
  font-size: 16px;
}
input::placeholder {
  color: #767f9d;
}
.family-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 24px;
  font-size: 10px;
  color: var(--muted);
}
.text-button {
  background: transparent;
  padding: 8px 0;
  color: var(--lime);
  font-size: 11px;
}
.mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.mode {
  padding: 16px;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.mode.selected {
  border-color: var(--lime);
  background: #d8ff6208;
}
.mode > span {
  font-size: 26px;
  color: var(--purple);
}
.mode.selected > span {
  color: var(--lime);
}
.mode strong {
  display: block;
  font-size: 13px;
  margin: 8px 0 6px;
}
.mode small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  display: block;
}
.primary,
.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  border-radius: 8px;
  padding: 13px 18px;
  font-weight: 750;
  font-size: 13px;
}
.primary {
  background: var(--lime);
  color: var(--bg);
}
.primary:hover {
  background: #e7ff9c;
}
.primary:active {
  transform: translateY(1px);
}
.secondary {
  border: 1px solid #454c69;
  background: transparent;
}
.secondary:hover {
  background: #ffffff08;
}
.play-button {
  width: 100%;
  justify-content: space-between;
  font-size: 16px;
  letter-spacing: 0.6px;
}
.play-button span {
  font-size: 25px;
}
.or {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 23px 0;
  color: var(--muted);
  font: 8px monospace;
  letter-spacing: 1.4px;
}
.or:before,
.or:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.duo button {
  font-size: 11px;
  justify-content: space-between;
}
.quiet {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
}
.launch-panel > .quiet {
  text-align: center;
  margin: 17px 0 0;
}
.leaderboard {
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.leader-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.leader-heading .eyebrow {
  color: var(--muted);
  font-size: 8px;
}
h2 {
  font-size: 27px;
  letter-spacing: -1px;
  margin: 9px 0 18px;
}
.leader-heading h2 span {
  color: var(--purple);
  margin-left: 14px;
}
.board-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-top: 6px;
}
.board-tabs button {
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
}
.board-tabs button.selected {
  color: var(--lime);
  border-color: var(--lime);
}
.empty-board {
  padding: 25px 10px;
  text-align: center;
  color: var(--muted);
}
.empty-board > span {
  font-size: 30px;
  color: var(--purple);
  display: block;
}
.empty-board strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin: 8px;
}
.empty-board p {
  font-size: 11px;
}
.leader-row {
  display: grid;
  grid-template-columns: 35px 38px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 5px;
  border-bottom: 1px solid var(--line);
}
.rank {
  color: var(--muted);
  font: 12px monospace;
}
.avatar {
  border-radius: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #a796ff22;
  color: var(--purple);
  font-weight: 800;
}
.leader-name {
  font-size: 13px;
  font-weight: 650;
}
.leader-name small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  margin-top: 4px;
}
.leader-score {
  font: 20px monospace;
  color: var(--lime);
  text-align: right;
}
.leader-score small {
  font: 8px monospace;
  color: var(--muted);
  display: block;
  letter-spacing: 1px;
  margin-top: 3px;
}
.leader-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
  margin-top: 16px;
}
.home-footer {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 8px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.home-footer button {
  font-size: 10px;
}
dialog {
  max-width: var(--board-max, 440px);
  width: calc(100% - 28px);
  border: 1px solid #424964;
  background: var(--panel);
  color: var(--ink);
  border-radius: 18px;
  padding: 32px;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 24px 120px #0009;
}
dialog::backdrop {
  background: #070a14cc;
  backdrop-filter: blur(8px);
}
dialog p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
dialog .primary,
dialog > .secondary {
  width: 100%;
  margin-top: 15px;
}
dialog .close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 26px;
  color: var(--muted);
  background: transparent;
  width: 38px;
  height: 38px;
}
.code {
  font: 24px monospace;
  letter-spacing: 3px;
  color: var(--lime);
  word-break: break-all;
}
#family-share {
  margin-top: 25px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
#family-share button {
  margin: 16px 0;
}
#family-share small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.room-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.room-code-row .code {
  font-size: 21px;
}
.lobby-person {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.lobby-person small {
  color: var(--lime);
}
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.setting input[type="range"] {
  width: 135px;
  accent-color: var(--lime);
}
.setting input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--lime);
}
.setting select {
  width: 165px;
  font-size: 12px;
  min-height: 40px;
}
.help-list {
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.help-list li {
  margin-bottom: 10px;
}
.help-list b {
  color: var(--ink);
}
#toast {
  position: fixed;
  bottom: max(25px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  border-radius: 10px;
  padding: 14px 20px;
  max-width: 90vw;
  width: max-content;
  z-index: 10;
  box-shadow: 0 5px 40px #0006;
}
body.playing .topbar {
  display: none;
}
#arena {
  max-width: 640px;
  margin: auto;
  padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.arena-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 52px;
  flex-shrink: 0;
}
.arena-top .icon-button {
  width: 38px;
  height: 38px;
  font-size: 17px;
}
.game-layout {
  display: flex;
  gap: 14px;
  justify-content: center;
  min-height: 0;
  flex-shrink: 1;
}
.board-wrap {
  position: relative;
  border: 1px solid #474e6c;
  background: #080b15;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 35px #7268ff12;
  line-height: 0;
}
.board-wrap > canvas {
  display: block;
  touch-action: none;
  max-height: calc(
    100dvh - 215px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  height: auto;
  width: auto;
  max-width: calc(100vw - 166px);
  aspect-ratio: 1/2;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.game-side {
  width: 85px;
  flex-shrink: 0;
  padding-top: 6px;
}
.stat {
  margin-bottom: 22px;
}
.stat span,
.hold-card > span,
.next-level {
  font: 9px monospace;
  letter-spacing: 1.5px;
  color: var(--muted);
  display: block;
}
.stat strong {
  font: 24px monospace;
  display: block;
  margin-top: 6px;
}
.stat:first-child strong {
  color: var(--lime);
  font-size: 26px;
}
.hold-card {
  width: 85px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 3px;
}
.hold-card canvas {
  width: 75px;
  height: 56px;
}
.next-side {
  width: 60px;
  flex-shrink: 0;
  padding-top: 6px;
}
.next-side .input-label {
  font-size: 8px;
  white-space: nowrap;
}
.next-side canvas {
  width: 60px;
  height: 154px;
}
.progress-track {
  width: 4px;
  height: 90px;
  background: var(--line);
  margin: 30px auto 12px;
  border-radius: 10px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
#level-progress {
  height: 0;
  background: var(--lime);
  width: 100%;
  transition: height 0.25s;
}
.next-level {
  text-align: center;
  font-size: 8px;
  line-height: 1.5;
}
.touch-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 390px;
  margin-top: 15px;
  flex-shrink: 0;
  touch-action: none;
}
.touch-controls button {
  border-radius: 9px;
  min-height: 46px;
  font-size: 27px;
  background: var(--panel);
  border: 1px solid #414866;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.touch-controls button:active,
.touch-controls button.pressed {
  background: #414866;
}
.touch-controls .soft-drop,
.touch-controls .hard-drop {
  grid-column: span 2;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.touch-controls button span {
  font: 10px monospace;
  letter-spacing: 1px;
}
.touch-controls .hard-drop {
  background: var(--lime);
  color: var(--bg);
  border-color: var(--lime);
}
.gesture-hint {
  font-size: 7px;
  color: var(--muted);
  margin: 12px 0 0;
  text-align: center;
}
.save-status {
  font-size: 10px;
  color: var(--muted);
  height: 14px;
  margin: 5px 0;
  flex-shrink: 0;
}
#board-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #090c18df;
  backdrop-filter: blur(5px);
  padding: 18px;
  text-align: center;
  line-height: 1.3;
}
#board-overlay .eyebrow {
  font-size: 8px;
}
#board-overlay h2 {
  font-size: 32px;
  font-style: italic;
  line-height: 1.05;
  margin: 16px 0;
}
#board-overlay p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
#board-overlay button {
  font-size: 11px;
  width: 100%;
  margin-top: 12px;
}
#clear-label {
  position: absolute;
  top: 40%;
  width: 100%;
  text-align: center;
  pointer-events: none;
  font-weight: 950;
  font-style: italic;
  font-size: 27px;
  color: var(--lime);
  text-shadow: 0 2px 20px #000;
  line-height: 1.2;
}
.clear-flash {
  animation: clear 0.5s ease-out;
}
@keyframes clear {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  25% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}
#opponents {
  display: flex;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  justify-content: center;
  flex-shrink: 0;
}
.opponent {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
  font-size: 10px;
  max-width: 140px;
  overflow: hidden;
}
.opponent strong {
  color: var(--lime);
  float: right;
}
.opponent small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  margin-top: 4px;
}
.multiplayer .board-wrap > canvas {
  max-height: calc(
    100dvh - 270px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
}
.reduced * {
  animation: none !important;
  transition: none !important;
}
@media (min-width: 1000px) {
  #arena {
    max-width: 650px;
  }
  .board-wrap > canvas {
    max-height: calc(100dvh - 225px);
    width: auto;
  }
  .game-layout {
    gap: 24px;
  }
  .game-side {
    width: 105px;
  }
  .next-side {
    width: 70px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 66px;
    padding: 0 22px;
  }
  .brand {
    font-size: 19px;
  }
  .brand-mark {
    font-size: 35px;
  }
  .tag {
    display: none;
  }
  .top-actions {
    gap: 0;
  }
  #home {
    padding: 34px 22px 22px;
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .intro h1 {
    font-size: 72px;
    letter-spacing: -4px;
    margin: 20px 0 18px;
  }
  .intro-copy {
    font-size: 13px;
  }
  .hero-art {
    position: absolute;
    width: 170px;
    height: 125px;
    right: 18px;
    top: 139px;
    opacity: 0.6;
    pointer-events: none;
  }
  .art-badge {
    display: none;
  }
  .intro {
    position: relative;
  }
  .hero-art {
    top: 50px;
    right: -8px;
    width: 145px;
    height: 135px;
    z-index: -1;
  }
  .feature-line {
    margin-top: 20px;
    gap: 15px;
    font-size: 7px;
  }
  .launch-panel {
    padding: 22px;
    border-radius: 14px;
  }
  .panel-heading {
    margin-bottom: 19px;
  }
  .leaderboard {
    padding-top: 25px;
  }
  .leader-footer span:last-child {
    display: none;
  }
  .home-footer > span:last-child {
    display: none;
  }
  h2 {
    font-size: 25px;
  }
  .board-tabs {
    gap: 16px;
  }
  .board-tabs button {
    font-size: 10px;
  }
  .game-layout {
    gap: 8px;
  }
  .game-side {
    width: 62px;
  }
  .next-side {
    width: 40px;
  }
  .next-side canvas {
    width: 40px;
    height: 103px;
  }
  .next-side .input-label {
    font-size: 6px;
  }
  .board-wrap > canvas {
    max-width: calc(100vw - 144px);
  }
  .stat {
    margin-bottom: 16px;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat:first-child strong {
    font-size: 20px;
  }
  .stat span {
    font-size: 8px;
  }
  .hold-card {
    width: 60px;
    padding: 8px 0;
  }
  .hold-card canvas {
    width: 56px;
    height: 42px;
  }
  .hold-card > span {
    font-size: 7px;
  }
  .progress-track {
    height: 70px;
    margin-top: 20px;
  }
  .next-level {
    font-size: 6px;
  }
  .touch-controls {
    max-width: 360px;
  }
  #board-overlay h2 {
    font-size: 26px;
  }
  #board-overlay p {
    font-size: 10px;
  }
}
@media (max-height: 700px) {
  .stat {
    margin-bottom: 10px;
  }
  .stat strong {
    font-size: 18px;
    margin-top: 3px;
  }
  .touch-controls {
    gap: 5px;
    margin-top: 8px;
  }
  .touch-controls button {
    min-height: 41px;
  }
  .arena-top {
    height: 42px;
  }
  .gesture-hint {
    margin-top: 7px;
  }
  .board-wrap > canvas {
    max-height: calc(100dvh - 190px - env(safe-area-inset-bottom));
  }
  .multiplayer .board-wrap > canvas {
    max-height: calc(100dvh - 238px - env(safe-area-inset-bottom));
  }
}
@media (orientation: landscape) and (max-height: 600px) {
  #arena {
    max-width: 850px;
    position: relative;
    padding: 0 170px 0 10px;
  }
  .touch-controls {
    position: absolute;
    right: 12px;
    bottom: 45px;
    width: 145px;
    grid-template-columns: repeat(2, 1fr);
  }
  .touch-controls .soft-drop,
  .touch-controls .hard-drop {
    grid-column: span 2;
  }
  .gesture-hint {
    display: none;
  }
  .board-wrap > canvas {
    max-height: calc(100dvh - 72px);
  }
  .multiplayer .board-wrap > canvas {
    max-height: calc(100dvh - 115px);
  }
  .stat {
    margin-bottom: 8px;
  }
  .save-status {
    position: absolute;
    right: 10px;
    bottom: 12px;
    width: 150px;
    text-align: center;
  }
  .game-layout {
    gap: 15px;
  }
  .arena-top {
    height: 42px;
  }
  .next-side {
    width: 45px;
  }
  .next-side canvas {
    height: 115px;
    width: 45px;
  }
  .hold-card {
    padding: 2px;
  }
  .progress-track {
    height: 35px;
    margin-top: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.adventure-mode {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 35px 1fr;
  align-items: center;
}
.adventure-mode > span {
  grid-row: span 2;
  font-size: 30px;
}
.adventure-mode strong {
  margin: 0 0 5px;
}
.adventure-mode small {
  grid-column: 2;
}
.mode-picker {
  margin-bottom: 16px;
}
#stage-picker {
  margin-bottom: 16px;
}
#stage-select {
  font-size: 13px;
  min-height: 42px;
}
#stage-description {
  margin: 8px 0;
}
#mission-hud {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 470px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 11px;
  flex-shrink: 0;
}
#mission-name {
  color: var(--purple);
  max-width: 55%;
  font-weight: 650;
}
#mission-progress {
  color: var(--lime);
  font-family: monospace;
}
#mission-timer {
  font-family: monospace;
  color: var(--muted);
}
.adventure .board-wrap > canvas {
  max-height: calc(
    100dvh - 257px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
}
.success #board-overlay {
  background: linear-gradient(160deg, #27302cf5, #151727ee);
}
.success #overlay-title {
  color: var(--lime);
}
.success #overlay-kicker {
  font-size: 25px;
  color: var(--pink);
}
.confetti {
  position: absolute;
  width: 6px;
  height: 12px;
  top: -15px;
  animation: confetti-fall 2.2s ease-in forwards;
  pointer-events: none;
  z-index: 2;
}
@keyframes confetti-fall {
  to {
    transform: translateY(650px) rotate(720deg);
    opacity: 0;
  }
}
.board-tabs {
  overflow: auto;
  white-space: nowrap;
}
.board-tabs button {
  flex-shrink: 0;
}
@media (max-height: 700px) {
  .adventure .board-wrap > canvas {
    max-height: calc(100dvh - 230px - env(safe-area-inset-bottom));
  }
}
@media (orientation: landscape) and (max-height: 600px) {
  .adventure .board-wrap > canvas {
    max-height: calc(100dvh - 114px);
  }
}

.brand-mark {
  width: 34px;
  height: 34px;
  transform: none;
  display: block;
}
@media (max-width: 420px) {
  .game-side .stat:first-child strong {
    font-size: clamp(14px, 5vw, 20px);
  }
  .family-summary {
    flex-wrap: wrap;
  }
  .board-tabs {
    gap: 16px;
  }
  .topbar {
    padding-top: env(safe-area-inset-top);
  }
}

@media (min-width: 761px) and (min-height: 700px) {
  #arena {
    max-width: 780px;
  }
  .board-wrap > canvas {
    width: min(450px, calc((100dvh - 270px) / 2));
    height: auto;
  }
}
/* Arcade worlds and GPU surface. Input remains on the original board canvas. */
:root {
  --world-accent: #62dfee;
}
.board-wrap > canvas.gpu-board {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  pointer-events: none;
  z-index: 1;
}
#board-overlay {
  z-index: 3;
}
#clear-label {
  z-index: 2;
  pointer-events: none;
}
.board-wrap {
  border-color: color-mix(in srgb, var(--world-accent) 45%, #34394e);
  box-shadow: 0 0 45px color-mix(in srgb, var(--world-accent) 12%, transparent);
}
#difficulty {
  margin-bottom: 14px;
}
.world-map {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin: 12px 0;
}
.world-map button {
  background: #171b2c;
  border: 1px solid #2c334c;
  border-radius: 10px;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  padding: 9px 3px;
  cursor: pointer;
}
.world-map span {
  display: block;
  font-size: 22px;
  margin-bottom: 5px;
  color: #b9aeff;
}
.world-map button.selected {
  background: #2b2d42;
  border-color: var(--lime);
  color: white;
}
.stage-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin-bottom: 14px;
}
.stage-grid button {
  min-height: 35px;
  border: 1px solid #353c55;
  border-radius: 7px;
  background: #181e30;
  color: #d5dcee;
  font-weight: 700;
  cursor: pointer;
}
.stage-grid button.special {
  color: #fbc972;
  background: #332939;
}
.stage-grid button.selected {
  background: var(--lime);
  color: #17220b;
}
.stage-grid button:disabled {
  opacity: 0.35;
  cursor: default;
}
.daily-card {
  padding: 18px;
  margin-top: 18px;
  border: 1px solid #4d4568;
  border-radius: 14px;
  background: linear-gradient(110deg, #252236, #191d30);
  display: flex;
  align-items: center;
  gap: 16px;
}
.daily-card strong,
.daily-card small {
  display: block;
  margin-top: 8px;
}
.daily-card strong {
  font-size: 20px;
}
.daily-card small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.daily-card .secondary {
  min-width: 104px;
  padding: 12px;
}
.record-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0 16px;
  font-size: 11px;
  color: var(--muted);
}
.record-filters label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.record-filters select {
  width: auto;
  padding: 8px 26px 8px 10px;
  font-size: 11px;
}
#social-panel {
  width: 100%;
  max-width: 580px;
  margin: 0 auto 8px;
  flex-shrink: 0;
}
.match-commentary {
  display: flex;
  gap: 10px;
  align-items: center;
  height: 39px;
  padding: 6px 10px;
  background: #1b2035;
  border: 1px solid #323b58;
  border-radius: 9px;
}
#match-position {
  color: var(--lime);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#match-callout {
  font-size: 11px;
  line-height: 1.35;
  color: #e0e4f5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
#match-callout[data-kind="quad"],
#match-callout[data-kind="close"] {
  color: var(--lime);
}
.reactions {
  display: flex;
  gap: 5px;
  padding-top: 5px;
}
.reactions button {
  flex: 1;
  min-height: 32px;
  padding: 5px 3px;
  border: 1px solid #333b53;
  border-radius: 7px;
  background: #151a2b;
  color: #bec9e5;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  touch-action: manipulation;
}
.reactions button:active {
  background: #334251;
  transform: translateY(1px);
}
#match-history {
  flex: 0 0 30px;
}
#highlights-list {
  max-height: 55vh;
  overflow: auto;
}
#highlights-list p {
  border-bottom: 1px solid #34394e;
  padding-bottom: 12px;
  font-size: 13px;
}
#highlights-list small {
  color: var(--lime);
  font-size: 9px;
  letter-spacing: 1px;
}
#difficulty-help {
  margin-top: 10px;
}
.multiplayer .board-wrap > canvas:not(.gpu-board) {
  max-height: calc(
    100dvh - 345px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
}
@media (min-width: 700px) {
  .reactions button {
    min-height: 38px;
    font-size: 12px;
  }
  .multiplayer .board-wrap > canvas:not(.gpu-board) {
    max-height: calc(
      100dvh - 325px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    );
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  #social-panel {
    position: fixed;
    right: 8px;
    top: 85px;
    width: 145px;
    max-width: 22vw;
  }
  .match-commentary {
    height: auto;
    min-height: 55px;
    flex-direction: column;
    gap: 4px;
  }
  .reactions {
    flex-wrap: wrap;
  }
  .reactions button {
    flex: 1 0 40%;
  }
  .multiplayer .board-wrap > canvas:not(.gpu-board) {
    max-height: calc(100dvh - 60px);
  }
}
/* Simple start flow: the home screen makes only one decision. */
#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 620px;
  margin: 0 auto;
  padding: 18px 22px 24px;
  gap: 0;
}
.topbar {
  height: 64px;
  border-bottom: 0;
  padding: 0 22px;
}
.topbar .brand {
  font-size: 19px;
}
.topbar .brand-mark {
  width: 28px;
  height: 28px;
}
#home .intro {
  text-align: center;
  padding: 12px 0 0;
  width: 100%;
}
#home .intro .eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
}
#home h1 {
  font-size: clamp(56px, 12vw, 82px);
  line-height: 0.94;
  margin: 20px 0 12px;
}
#home .intro-copy {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  color: var(--muted);
}
#home .hero-art {
  height: 104px;
  max-width: 330px;
  margin: 8px auto 0;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: hidden;
}
#home .hero-art canvas {
  width: 260px;
  height: 130px;
  position: static;
  transform: translateY(-8px);
}
.art-badge {
  display: none;
}
#home .launch-panel {
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
  box-shadow: none;
}
.player-greeting {
  display: block;
  margin: 6px auto 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.simple-play {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 82px;
  width: 100%;
  margin: 0 0 12px;
  border-radius: 18px;
  padding: 18px 20px;
  font-size: 20px;
  text-align: left;
}
.simple-play > span:nth-child(2) {
  flex: 1;
}
.simple-play small {
  display: block;
  font-size: 11px;
  margin-top: 6px;
  font-weight: 400;
  opacity: 0.75;
  letter-spacing: 0;
}
.launch-icon {
  font-size: 28px;
}
#home .records-link {
  display: block;
  margin: 22px auto 0;
  font-size: 13px;
}
.home-footer {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
  padding: 0;
  border: 0;
}
.home-footer button {
  font-size: 11px;
}
.pace-buttons {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}
.pace-buttons button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  border: 1px solid #3d465c;
  background: #21283b;
  border-radius: 14px;
  padding: 18px 22px;
}
.pace-buttons strong {
  font-size: 22px;
}
.pace-buttons span {
  font-size: 12px;
  color: var(--muted);
}
.pace-buttons button:active,
.pace-buttons button:focus-visible {
  border-color: var(--lime);
  background: #2b3740;
}
.touch-primer {
  text-align: center;
  line-height: 1.8;
}
#known-players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#known-players button {
  width: auto;
  padding: 10px 16px;
}
.advanced-options {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.advanced-options summary {
  cursor: pointer;
  padding: 8px 0;
  font-weight: 600;
  font-size: 14px;
}
.advanced-options > div {
  padding-top: 14px;
}
.advanced-options .mode-picker {
  grid-template-columns: 1fr;
}
.advanced-options .mode {
  padding: 12px;
}
.advanced-options .mode small {
  font-size: 11px;
}
#records-dialog {
  max-width: 780px;
  width: calc(100vw - 24px);
}
#records-dialog .leaderboard {
  padding: 12px 0;
  border: 0;
  background: none;
}
.leader-heading h2 {
  font-size: 28px;
}
.board-tabs {
  overflow-x: auto;
  flex-wrap: wrap;
}
.leader-footer {
  flex-wrap: wrap;
  gap: 10px;
}
#open-games {
  display: grid;
  gap: 10px;
}
.join-live {
  text-align: left;
}
.join-live small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  margin-top: 7px;
}
.room-code-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.room-code-row .primary {
  width: 100%;
}
#room-start {
  margin-top: 18px;
}
#scan-invite {
  margin: 10px 0;
  text-align: center;
  font-size: 12px;
}
#scan-invite summary {
  cursor: pointer;
  padding: 12px;
}
#invite-qr {
  background: white;
  padding: 4px;
  border-radius: 14px;
  width: 208px;
  max-width: 100%;
  margin: 8px auto;
}
#invite-qr svg {
  display: block;
  width: 100%;
  height: auto;
}
#game-menu-dialog .primary,
#game-menu-dialog .secondary {
  width: 100%;
  margin: 10px 0;
}
#leave-game {
  display: block;
  margin: 18px auto 4px;
  color: var(--muted);
}
/* Playing owns the viewport; gestures never scroll the document. */
html.in-game,
html.in-game body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body.playing {
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
}
body.playing #arena {
  --board-space: 132px;
  position: relative;
  width: 100%;
  max-width: calc(var(--board-max, 440px) + 24px);
  height: 100dvh;
  margin: auto;
  padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
  justify-content: center;
  gap: 8px;
  touch-action: none;
  overscroll-behavior: none;
}
body.playing.adventure #arena {
  --board-space: 174px;
}
body.playing.multiplayer #arena {
  --board-space: 174px;
}
body.playing.extra-controls #arena {
  --board-space: 252px;
}
body.playing.extra-controls.adventure #arena,
body.playing.extra-controls.multiplayer #arena {
  --board-space: 286px;
}
body.playing .arena-top {
  position: static;
  display: grid;
  grid-template-columns: 1fr 64px 64px 44px;
  gap: 8px;
  height: 58px;
  max-width: var(--board-max, 440px);
  margin: 0;
  align-items: center;
}
body.playing #game-mode,
body.playing .game-side,
body.playing .progress-track,
body.playing .next-level,
body.playing #opponents {
  display: none !important;
}
body.playing .arena-top .stat {
  margin: 0;
  padding: 0;
}
.arena-top .stat > span {
  font-size: 9px;
}
.arena-top #score {
  font-size: 24px;
  line-height: 1.2;
}
body.playing .arena-top .next-side {
  position: static;
  width: 64px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
body.playing .next-side .input-label {
  font-size: 8px;
  letter-spacing: 1px;
  margin: 0;
}
body.playing #next {
  width: 64px;
  height: 50px;
  margin: 0;
}
body.playing .hold-card {
  position: static;
  width: 64px;
  height: 52px;
  padding: 4px 0 0;
  margin: 0;
  min-height: 0;
  line-height: 1;
}
.hold-card > span {
  font-size: 8px;
  letter-spacing: 1px;
}
body.playing #held {
  width: 60px;
  height: 39px;
  display: block;
  margin: 0 auto;
}
body.playing .game-layout {
  display: flex;
  position: static;
  gap: 0;
  flex-shrink: 0;
  width: auto;
  margin: 0;
}
body.playing .board-wrap > canvas:not(.gpu-board) {
  width: min(
    calc(100vw - 24px),
    calc(
      (
          100dvh - var(--board-space) - env(safe-area-inset-top) -
            env(safe-area-inset-bottom)
        ) /
        2
    ),
    var(--board-max, 440px)
  ) !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
}
body.playing #mission-hud {
  height: 32px;
  width: 100%;
  max-width: var(--board-max, 440px);
  margin: 0;
  padding: 6px 10px;
  gap: 8px;
  font-size: 10px;
}
.adventure #mission-name {
  font-size: 10px;
}
body.playing #social-panel {
  position: static;
  width: 100%;
  max-width: var(--board-max, 440px);
  margin: 0;
}
.match-commentary {
  height: 32px;
}
.match-commentary #match-callout {
  font-size: 10px;
}
body.playing .reactions {
  display: none;
}
body.playing.round-ended .reactions {
  display: flex;
}
.round-ended.multiplayer #arena {
  --board-space: 212px;
}
body.playing .touch-controls {
  display: none;
  position: static;
  margin: 0;
  width: 100%;
  max-width: var(--board-max, 440px);
}
body.playing.extra-controls .touch-controls {
  display: grid;
}
body.playing .gesture-hint {
  position: static;
  margin: 0;
  font-size: 7px;
  letter-spacing: 0.7px;
  white-space: normal;
  text-align: center;
  height: auto;
  line-height: 1.5;
}
body.playing #save-status {
  display: none;
}
body.playing #board-overlay {
  padding: 14px;
}
#result-home {
  margin-top: 14px;
  font-size: 11px;
}
@media (min-height: 900px) {
  #home {
    padding-top: 40px;
  }
  #home .hero-art {
    height: 148px;
  }
  #home .hero-art canvas {
    width: 340px;
    height: 170px;
  }
  #home h1 {
    font-size: 92px;
  }
  .simple-play {
    min-height: 92px;
  }
}
@media (max-height: 720px) {
  #home h1 {
    font-size: 52px;
    margin: 12px 0 8px;
  }
  #home .hero-art {
    height: 60px;
  }
  #home .hero-art canvas {
    width: 190px;
    height: 95px;
  }
  #home .intro {
    padding: 0;
  }
  .simple-play {
    min-height: 70px;
    padding: 14px 18px;
  }
  #home .records-link {
    margin-top: 14px;
  }
  .home-footer {
    margin-top: 12px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  body.playing #arena {
    max-width: 900px;
    --board-space: 32px !important;
    gap: 0;
  }
  body.playing .arena-top {
    position: absolute;
    left: 16px;
    top: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100px;
    height: auto;
    gap: 16px;
  }
  body.playing #mission-hud,
  body.playing #social-panel {
    position: absolute;
    right: 12px;
    top: 32px;
    max-width: 150px;
    width: 20vw;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  body.playing #social-panel {
    padding: 0;
  }
  .match-commentary {
    min-height: 65px;
    flex-direction: column;
    height: auto;
  }
  body.playing .gesture-hint {
    position: absolute;
    right: 12px;
    bottom: 30px;
    width: 20vw;
    font-size: 8px;
    line-height: 1.8;
  }
  body.playing.extra-controls .touch-controls {
    position: absolute;
    right: 12px;
    bottom: 70px;
    width: 20vw;
    grid-template-columns: repeat(2, 1fr);
  }
  body.playing.extra-controls .touch-controls button {
    height: 35px;
    min-height: 35px;
    font-size: 16px;
    padding: 0;
  }
  body.playing.extra-controls .touch-controls button span {
    font-size: 7px;
  }
  body.playing #board-overlay h2 {
    font-size: 22px;
    margin: 6px 0;
  }
  body.playing #board-overlay p {
    font-size: 10px;
    line-height: 1.3;
  }
  body.playing #board-overlay button {
    padding: 10px;
    font-size: 10px;
  }
}

body.playing .advanced-options {
  display: none;
}
body.playing.round-ended #save-status {
  display: block;
  max-width: var(--board-max, 440px);
  text-align: center;
}

/* McTretris: a small block mark, a big family record. */
.topbar .brand-mark {
  transform: none;
}
#home h1.game-logo {
  margin: 8px 0 10px;
  line-height: 0;
}
.game-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 500px;
  margin: auto;
  filter: drop-shadow(0 7px 24px #62dfee18);
}
.family-record {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 16px;
  margin: 20px 0 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(ellipse at top, #a796ff18, transparent 75%), var(--panel);
}
#home .family-record .eyebrow {
  color: var(--cyan);
  overflow-wrap: anywhere;
}
.record-crown {
  color: var(--lime);
  font-size: 23px;
  position: absolute;
  top: 15px;
  left: 18px;
}
#home-highscore {
  font-size: clamp(32px, 9vw, 44px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -1px;
}
#home-champion {
  font-size: 13px;
  overflow-wrap: anywhere;
}
#home-record-note {
  font-size: 10px;
  color: var(--muted);
}
.battle-settings {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
}
.battle-settings > label:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
#battle-speed-value {
  color: var(--cyan);
}
#battle-speed {
  width: 100%;
  height: 44px;
  accent-color: var(--lime);
  padding: 0;
}
.battle-settings .setting {
  margin: 0;
}
.battle-settings .quiet {
  margin-bottom: 0;
}
.battle-summary {
  color: var(--cyan);
  font-size: 13px;
}
@media (max-height: 720px) {
  #home {
    padding-top: 0;
  }
  #home .family-record {
    margin-top: 12px;
    padding: 12px;
    gap: 4px;
  }
  #home h1.game-logo {
    margin: 0 0 6px;
  }
  .game-logo img {
    max-width: 360px;
  }
  #home-highscore {
    font-size: 32px;
  }
}

/* Readable goals, a steady board, and a little Corbin-sized celebration. */
body.playing.adventure #arena {
  --board-space: 196px;
}
body.playing.extra-controls.adventure #arena {
  --board-space: 318px;
}
body.playing #mission-hud {
  height: 54px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 16px 24px;
  gap: 2px 6px;
  padding: 4px 8px;
}
#mission-name {
  grid-row: 1;
  grid-column: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#mission-timer {
  grid-row: 1;
  grid-column: 2;
}
#mission-progress {
  grid-row: 2;
  grid-column: 1 / -1;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.goal-chip {
  padding: 4px 5px;
  border-radius: 6px;
  background: var(--bg);
  white-space: nowrap;
}
.goal-done {
  color: var(--lime);
}
#quad-celebration {
  line-height: 1.2;
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 20%;
  transform: translateX(-50%);
  width: 92%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 8px;
  text-align: center;
  border: 1px solid var(--lime);
  border-radius: 18px;
  background: #10121fee;
  box-shadow: 0 0 30px #d8ff6230;
  pointer-events: none;
}
#quad-celebration > span {
  font: 9px monospace;
  letter-spacing: 2px;
  color: var(--cyan);
}
#quad-celebration > strong {
  font-size: clamp(23px, 7vw, 38px);
  color: var(--lime);
  letter-spacing: -1px;
}
#quad-celebration > small {
  font-size: 11px;
}
#quad-celebration.quiet-celebration {
  box-shadow: none;
}
.round-ended #quad-celebration {
  top: 5%;
}
#placement-cue {
  line-height: 1.3;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 10px;
  border-radius: 20px;
  background: var(--lime);
  color: var(--bg);
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  white-space: nowrap;
  z-index: 4;
}
.board-wrap.drop-ready {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
#create-room.room-waiting {
  border-color: var(--lime);
}
#create-room.room-waiting small {
  color: var(--lime);
}
#quick-family-name-wrap {
  margin: 14px 0;
}
@media (orientation: landscape) and (max-height: 520px) {
  body.playing #mission-hud {
    height: auto;
    display: flex;
  }
  #mission-progress {
    flex-wrap: wrap;
  }
  #quad-celebration {
    padding: 8px;
    top: 12%;
  }
  #quad-celebration > strong {
    font-size: 22px;
  }
}

@media (min-width: 768px) and (min-height: 700px) {
  body.playing {
    --board-max: 640px;
  }
}
/* A small phone can scroll a long briefing without moving the playing surface. */
body.playing #board-overlay {
  overflow-y: auto;
  justify-content: safe center;
  touch-action: pan-y;
}
#board-overlay > * {
  flex-shrink: 0;
}

.solo-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.solo-modes button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  text-align: left;
}
.solo-modes button.selected {
  border-color: var(--lime);
  background: #d8ff6210;
}
.solo-modes strong {
  font-size: clamp(16px, 5vw, 20px);
}
.solo-modes strong span {
  color: var(--lime);
}
.solo-modes small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
#solo-dialog .pace-buttons {
  margin: 16px 0;
  gap: 8px;
}
#solo-dialog .pace-buttons button {
  min-height: 56px;
  padding: 12px 16px;
}
#solo-mode-copy {
  min-height: 36px;
  line-height: 1.5;
  margin: 12px 0;
}
#og-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--board-max, 440px);
  height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 10px monospace;
}
#og-hud strong {
  color: var(--lime);
}
#og-hud b {
  color: var(--ink);
  margin-left: 5px;
}
body.playing.og #arena {
  --board-space: 174px;
}
body.playing.og.extra-controls #arena {
  --board-space: 286px;
}
@media (max-height: 720px) {
  #solo-dialog {
    padding: 22px;
  }
  #solo-dialog h2 {
    margin: 10px 0 16px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  body.playing #og-hud {
    position: absolute;
    right: 12px;
    top: 32px;
    width: 20vw;
    max-width: 150px;
    height: auto;
    padding: 12px;
    flex-direction: column;
    gap: 14px;
  }
}

#home-record-open {
  width: 100%;
  color: var(--ink);
  cursor: pointer;
}
#home-record-open:hover,
#home-record-open:focus-visible {
  border-color: var(--lime);
}
#home #records-open {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 750;
  background: var(--panel);
}
#og-standings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  width: 100%;
  max-width: var(--board-max, 440px);
  min-height: 24px;
  font-size: 10px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 4px;
  text-align: left;
  cursor: pointer;
}
.og-score {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 4px;
  min-width: 0;
}
.og-score span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.og-score strong {
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
body.playing.multiplayer #arena {
  --board-space: 232px;
}
body.playing.multiplayer.extra-controls #arena {
  --board-space: 342px;
}
body.playing.multiplayer.round-ended:not(.og) #arena {
  --board-space: 276px;
}
.standings-more {
  align-self: center;
  padding: 4px;
  color: var(--lime);
}
#standings-dialog {
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 28px 22px 18px;
  overflow-y: auto;
}
#standings-dialog h2 {
  margin: 12px 0;
  font-size: clamp(22px, 6vw, 30px);
}
#standings-dialog .eyebrow {
  padding-right: 30px;
  overflow-wrap: anywhere;
}
#standings-note,
.dismiss-hint {
  font-size: 12px;
  line-height: 1.5;
}
.standing-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.standing-row.is-you {
  color: var(--lime);
}
.standing-name {
  overflow-wrap: anywhere;
}
.standing-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.standing-row > strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (orientation: landscape) and (max-height: 520px) {
  body.playing #og-standings {
    position: absolute;
    right: 12px;
    top: 145px;
    width: 20vw;
    max-width: 150px;
    grid-template-columns: 1fr;
  }
}
