:root {
  --bg: #05080f;
  --neon: #2fb8ff;
  --neon-glow: rgba(47, 184, 255, 0.55);
  --yellow: #ffd84a;
  --orange: #ffb547;
  --gold: #ffc857;
  --cyan: #63d6ff;
  --text: #f3f6fb;
  --muted: #8a97b2;
  --outline: #3d2200;
  --font-pixel: 'Press Start 2P', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 18px 10px 40px;
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, #16233f 0%, transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 4px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-pixel);
}

button {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------------ console shell */

.console {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 24px 16px;
  border: 2px solid #2a3855;
  border-radius: 26px 26px 40px 40px;
  background: linear-gradient(180deg, #141f34 0%, #0c1321 28%, #0a101c 100%);
  box-shadow:
    inset 0 0 0 3px #080c15,
    inset 0 0 0 5px #1a253c,
    0 30px 80px rgba(0, 0, 0, 0.7);
}

.marquee {
  text-align: center;
}

.title {
  margin: 4px 0 12px;
  font-family: var(--font-pixel);
  font-size: clamp(15px, 4.5vw, 26px);
  font-weight: normal;
  line-height: 1.25;
  color: var(--yellow);
  text-shadow:
    2px 0 var(--outline), -2px 0 var(--outline), 0 2px var(--outline), 0 -2px var(--outline),
    2px 2px var(--outline), -2px 2px var(--outline), 2px -2px var(--outline), -2px -2px var(--outline),
    0 5px #1e1000, 2px 5px #1e1000, -2px 5px #1e1000,
    0 0 22px rgba(255, 200, 60, 0.35);
}

.welcome {
  margin: 12px 0 0;
  font-size: clamp(9px, 2.7vw, 14px);
  line-height: 1.5;
  color: var(--cyan);
  text-shadow: 2px 2px 0 #000, 0 0 10px rgba(99, 214, 255, 0.5);
}

/* Tapping the countdown jumps to the party info, like "skip the game". */
.countdown {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 10px;
  margin: 14px 0 0;
  padding: 8px 12px;
  border: 2px solid #2a3855;
  border-radius: 8px;
  background: #03060c;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
  font-family: var(--font-pixel);
  cursor: pointer;
}

.countdown:hover,
.countdown:focus-visible {
  border-color: #ff9f3d;
}

.cd-label {
  font-size: clamp(7px, 2vw, 9px);
  color: var(--muted);
}

.cd-digits {
  font-size: clamp(10px, 3vw, 14px);
  color: #ff9f3d;
  text-shadow: 0 0 8px rgba(255, 140, 40, 0.75);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ player card */

.player-card {
  display: grid;
  grid-template-columns: minmax(104px, 40%) 1fr;
  gap: 14px;
  align-items: center;
  margin: 20px 0 22px;
}

.portrait {
  --c: #eaf2ff;
  padding: 9px;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 22px 4px,
    linear-gradient(var(--c), var(--c)) 0 0 / 4px 22px,
    linear-gradient(var(--c), var(--c)) 100% 0 / 22px 4px,
    linear-gradient(var(--c), var(--c)) 100% 0 / 4px 22px,
    linear-gradient(var(--c), var(--c)) 0 100% / 22px 4px,
    linear-gradient(var(--c), var(--c)) 0 100% / 4px 22px,
    linear-gradient(var(--c), var(--c)) 100% 100% / 22px 4px,
    linear-gradient(var(--c), var(--c)) 100% 100% / 4px 22px;
  background-repeat: no-repeat;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
  box-shadow: 0 0 0 2px #0a1830, 0 0 16px rgba(47, 184, 255, 0.45);
}

.name {
  margin: 0 0 8px;
  font-family: var(--font-pixel);
  font-size: clamp(19px, 6.2vw, 34px);
  font-weight: normal;
  color: #fff;
  text-shadow: 3px 3px 0 #0a0f1a;
}

.age {
  margin: 0 0 10px;
  font-family: var(--font-pixel);
  font-size: clamp(8px, 2.5vw, 12px);
  line-height: 1.5;
}

.age em {
  font-style: normal;
  color: var(--yellow);
}

.statbox {
  margin: 0;
  padding: 8px 10px;
  border: 3px solid var(--neon);
  border-radius: 6px;
  background: #03060c;
  box-shadow: 0 0 10px var(--neon-glow), inset 0 0 8px rgba(47, 184, 255, 0.22);
  font-size: clamp(7px, 2.1vw, 10px);
  line-height: 1.6;
}

.statbox dt {
  color: var(--orange);
}

.statbox dd {
  margin: 0 0 6px;
  color: #fff;
}

.statbox dd:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ game screen */

.play-zone {
  position: relative;
}

.leds {
  position: absolute;
  top: 6%;
  height: 230px;
  max-height: 60%;
  width: 6px;
  border-radius: 2px;
  background:
    linear-gradient(#ff4b4b, #ff4b4b) 0 0 / 100% 6px no-repeat,
    repeating-linear-gradient(to bottom, #ffb627 0 6px, transparent 6px 13px) 0 13px / 100% calc(100% - 13px) no-repeat;
  filter: drop-shadow(0 0 3px rgba(255, 170, 40, 0.8));
}

.leds-left {
  left: -17px;
}

.leds-right {
  right: -17px;
}

.screen {
  position: relative;
  padding: 9px;
  border-radius: 16px;
  background: linear-gradient(180deg, #3a4767, #283350);
  box-shadow:
    0 0 0 2px #5c6d92,
    0 0 0 4px #0a0f1a,
    0 0 20px 3px rgba(47, 184, 255, 0.35);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.screen.playing {
  touch-action: none;
  cursor: pointer;
}

.screen canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  background: #000;
  image-rendering: pixelated;
}

.overlay {
  position: absolute;
  inset: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  background: rgba(6, 10, 20, 0.5);
}

.overlay.hidden {
  display: none;
}

.logo {
  margin: 0;
  font-family: var(--font-pixel);
  line-height: 1.2;
  text-shadow:
    2px 0 #0b111d, -2px 0 #0b111d, 0 2px #0b111d, 0 -2px #0b111d,
    2px 2px #0b111d, -2px 2px #0b111d, 2px -2px #0b111d, -2px -2px #0b111d,
    0 4px #000;
}

.logo span {
  display: block;
}

.logo span:first-child {
  font-size: clamp(13px, 4.2vw, 22px);
  color: #9cf3e9;
}

.logo span:last-child {
  font-size: clamp(18px, 6vw, 32px);
  color: var(--yellow);
}

.big {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(16px, 5vw, 26px);
  color: #fff;
  text-shadow: 3px 3px 0 #000;
}

.big.red {
  color: #ff5a6a;
}

.hint {
  margin: 0;
  font-size: clamp(7px, 2.2vw, 10px);
  line-height: 1.8;
  color: #e6eef9;
  text-shadow: 1px 1px 0 #000, 0 0 6px #000;
}

.btn {
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  background: #e3342f;
  box-shadow: 0 4px 0 #7a1010, 0 0 0 2px #0a0f1a;
  font-family: var(--font-pixel);
  font-size: clamp(9px, 2.8vw, 13px);
  color: #fff;
  text-shadow: 1px 1px 0 #5a0808;
  cursor: pointer;
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #7a1010, 0 0 0 2px #0a0f1a;
}

/* The player picker on the title screen, a smaller twin of the one under the game. */
.title-player {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px;
  border: 2px solid #46506c;
  border-radius: 8px;
  background: rgba(6, 10, 20, 0.8);
}

/* With the picker, the title screen tightens up to fit on small phones. */
#ov-title:has(.title-player:not([hidden])) {
  gap: 7px;
  padding: 6px;
}

#ov-title:has(.title-player:not([hidden])) .logo span:first-child {
  font-size: clamp(11px, 3.6vw, 22px);
}

#ov-title:has(.title-player:not([hidden])) .logo span:last-child {
  font-size: clamp(15px, 5vw, 32px);
}

#ov-title:has(.title-player:not([hidden])) .btn-start {
  padding: 9px 16px;
}

.title-player .player-step {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.title-player-name {
  min-width: 9ch;
  margin: 0;
  font-size: clamp(8px, 2.6vw, 12px);
  line-height: 1.5;
  color: var(--yellow);
  text-shadow: 1px 1px 0 #3d2200;
}

.title-player-label {
  display: block;
  font-size: 0.7em;
  color: var(--muted);
  text-shadow: none;
}

.btn-start {
  font-size: clamp(11px, 3.4vw, 16px);
  padding: 12px 18px;
  animation: nudge 0.9s steps(1) infinite;
}

.btn-alt {
  background: #2b3550;
  box-shadow: 0 4px 0 #111827, 0 0 0 2px #0a0f1a;
  text-shadow: 1px 1px 0 #000;
}

.btn-go {
  background: #22b14c;
  box-shadow: 0 4px 0 #0b4a1e, 0 0 0 2px #0a0f1a;
  text-shadow: 1px 1px 0 #0b4a1e;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.overlay-clear {
  justify-content: flex-end;
  padding: 0 6px 5%;
  background: none;
}

.btn-row-tight {
  flex-wrap: nowrap;
  gap: 8px;
}

.btn-row-tight .btn {
  padding: 9px 10px;
  font-size: clamp(8px, 2.5vw, 12px);
}

.mini-icon canvas {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 8px;
  vertical-align: -2px;
  image-rendering: pixelated;
}

.mini-icon[data-icon='star'] canvas {
  width: 15px;
  height: 15px;
}

/* ------------------------------------------------------------------ controller */

.controller {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 22px 2px 24px;
}

.dpad {
  position: relative;
  width: 82px;
  height: 82px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter:
    drop-shadow(2px 0 0 #3a4560) drop-shadow(-2px 0 0 #3a4560)
    drop-shadow(0 2px 0 #3a4560) drop-shadow(0 -2px 0 #3a4560)
    drop-shadow(0 4px 0 #03050a);
  touch-action: none;
}

.dpad span {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, #121827 0 8px, transparent 9px),
    linear-gradient(#2a3247, #1c2334);
  clip-path: polygon(33% 0, 67% 0, 67% 33%, 100% 33%, 100% 67%, 67% 67%, 67% 100%, 33% 100%, 33% 67%, 0 67%, 0 33%, 33% 33%);
}

.dpad.pressed span {
  transform: translateY(2px);
}

.pills {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pill {
  min-width: 96px;
  padding: 8px 10px;
  border: 2px solid #46506c;
  border-radius: 999px;
  background: #262d42;
  box-shadow: 0 3px 0 #03050a;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #b9c4dc;
  cursor: pointer;
}

.pill-start {
  border-color: #6e5fb0;
  background: #4a3f86;
  color: #fff;
}

.pill:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #03050a;
}

.ab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 18px;
}

.round {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
  cursor: pointer;
  touch-action: none;
}

.round-a {
  background: radial-gradient(circle at 35% 30%, #8dffa8, #23b34d 55%, #147a33);
  box-shadow: 0 5px 0 #0b4a1e, 0 0 0 3px #0a0f1a, 0 0 16px rgba(60, 220, 110, 0.4);
}

.round-b {
  margin-top: 16px;
  background: radial-gradient(circle at 35% 30%, #ffa3ae, #e3263f 55%, #9a1426);
  box-shadow: 0 5px 0 #5a0a16, 0 0 0 3px #0a0f1a, 0 0 16px rgba(255, 70, 90, 0.4);
}

.round.pressed {
  transform: translateY(4px);
}

.round-a.pressed {
  box-shadow: 0 1px 0 #0b4a1e, 0 0 0 3px #0a0f1a, 0 0 22px rgba(60, 220, 110, 0.7);
}

.round-b.pressed {
  box-shadow: 0 1px 0 #5a0a16, 0 0 0 3px #0a0f1a, 0 0 22px rgba(255, 70, 90, 0.7);
}

.ab-label {
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ party info */

.panel {
  scroll-margin-top: 14px;
  padding: 18px 16px;
  border: 3px solid var(--neon);
  border-radius: 14px;
  background: #02050b;
  box-shadow: 0 0 14px var(--neon-glow), inset 0 0 12px rgba(47, 184, 255, 0.2);
}

.lockbox {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.lockbox canvas {
  display: block;
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  animation: wiggle 2.4s steps(1) infinite;
}

.panel + .panel {
  margin-top: 20px;
}

.lockbox h3,
.info-title,
.panel-title {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(10px, 3.1vw, 14px);
  font-weight: normal;
  line-height: 1.4;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #3d2200;
}

.lockbox p {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(8px, 2.4vw, 11px);
  line-height: 1.8;
  color: #c9d4e8;
}

.skip {
  margin-top: 4px;
  padding: 9px 12px;
  border: 2px dashed #46506c;
  border-radius: 6px;
  background: none;
  font-family: var(--font-pixel);
  font-size: clamp(8px, 2.3vw, 10px);
  line-height: 1.4;
  color: #9fb0cf;
  cursor: pointer;
}

.skip:hover {
  border-color: var(--neon);
  color: #fff;
}

.info-title {
  margin-bottom: 16px;
  text-align: center;
}

.info ul {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}

.icon canvas {
  display: block;
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
}

.row p,
.waiver span {
  margin: 0;
  font-size: clamp(9px, 2.7vw, 13px);
  font-weight: normal;
  line-height: 1.7;
  text-transform: uppercase;
}

.row p b {
  font-weight: normal;
}

.row-date p {
  color: var(--orange);
}

.row-time p {
  color: #fff;
}

.row-loc p {
  color: var(--gold);
}

.row-rsvp p {
  color: var(--cyan);
}

.nowrap {
  white-space: nowrap;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 5px;
  background: var(--yellow);
  box-shadow: 0 3px 0 #8a6a00;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: #0b111d;
  text-decoration: none;
}

.chip:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #8a6a00;
}

.chip-alt {
  background: var(--neon);
  box-shadow: 0 3px 0 #145a8a;
}

.chip-alt:active {
  box-shadow: 0 1px 0 #145a8a;
}

.waiver {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 0;
  text-align: center;
}

.waiver span {
  color: #ffe14d;
  font-size: clamp(8px, 2.4vw, 11px);
}

.party.reveal .info-title,
.party.reveal .row,
.party.reveal .link-note,
.party.reveal .waiver {
  animation: wipe-in 0.45s steps(6) both;
  animation-delay: calc(var(--i, 0) * 220ms + 150ms);
}

.party.reveal {
  animation: flash 0.6s steps(3) 1;
}

/* ------------------------------------------------------------------ guest panels */

.panel-title {
  margin-bottom: 14px;
  text-align: center;
}

.panel-note {
  margin: 12px 0 0;
  font-size: clamp(8px, 2.3vw, 10px);
  line-height: 1.8;
  text-align: center;
  color: #c9d4e8;
}

.panel-intro {
  margin: -4px 0 14px;
  color: var(--muted);
}

.panel-note:empty {
  display: none;
}

.rsvp-question {
  margin: 0 0 16px;
  font-size: clamp(9px, 2.7vw, 13px);
  line-height: 1.7;
  text-align: center;
  color: var(--cyan);
}

.rsvp .btn {
  font-size: clamp(8px, 2.5vw, 11px);
}

.rsvp .btn[aria-pressed='true'] {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.rsvp .btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.rsvp.answered .btn[aria-pressed='false'],
.rsvp-kid.answered .btn[aria-pressed='false'] {
  opacity: 0.55;
}

.rsvp-kids {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rsvp-kid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
}

.rsvp-kid-name {
  font-size: clamp(9px, 2.7vw, 13px);
  color: #fff;
  overflow-wrap: anywhere;
}

.rsvp-kid .btn {
  padding: 8px 12px;
}

.link-note {
  padding: 12px;
  border: 2px dashed #46506c;
  border-radius: 8px;
  font-size: clamp(8px, 2.4vw, 11px);
  line-height: 1.8;
  text-align: center;
  color: var(--cyan);
}

.player-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 18px;
}

/* The label sits on its own line so long names like "ELI & MALIKI'S MOM" have room. */
.player-label {
  flex-basis: 100%;
  font-size: 10px;
  text-align: center;
  color: var(--muted);
}

.player-name {
  min-width: 9ch;
  max-width: calc(100% - 120px);
  font-size: clamp(12px, 3.6vw, 16px);
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #3d2200;
}

.player-step {
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid #46506c;
  border-radius: 6px;
  background: #262d42;
  box-shadow: 0 3px 0 #03050a;
  font-family: var(--font-pixel);
  font-size: 16px;
  color: #fff;
  cursor: pointer;
}

.player-step:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #03050a;
}

.message-from {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.message-from label {
  font-size: 9px;
  color: var(--muted);
}

.message-from select {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: 2px solid #46506c;
  border-radius: 6px;
  background: #0b111d;
  color: #fff;
  font: 16px system-ui, -apple-system, 'Segoe UI', sans-serif; /* 16px+ stops iPhones zooming in */
}

.rsvp-waiver {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 12px;
  border: 2px dashed var(--yellow);
  border-radius: 8px;
  background: #1a1404;
  text-align: center;
}

.rsvp-waiver[hidden] {
  display: none;
}

.rsvp-waiver > p:first-child {
  margin: 0;
  font-size: clamp(8px, 2.4vw, 11px);
  line-height: 1.8;
  color: #ffe14d;
}

.rsvp-waiver .panel-note {
  margin: 0;
  color: #7dff8a;
}

.btn-waiver {
  display: inline-block;
  background: var(--yellow);
  box-shadow: 0 4px 0 #8a6a00, 0 0 0 2px #0a0f1a;
  color: #0b111d;
  text-decoration: none;
  text-shadow: none;
  animation: nudge 0.9s steps(1) infinite;
}

.btn-waiver:active {
  box-shadow: 0 1px 0 #8a6a00, 0 0 0 2px #0a0f1a;
}

.score-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
}

.score-list li {
  display: grid;
  grid-template-columns: 2.4em 1fr auto auto;
  gap: 10px;
  align-items: baseline;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: clamp(8px, 2.5vw, 11px);
  counter-increment: rank;
}

.score-list li::before {
  content: counter(rank) '.';
  color: var(--muted);
}

.score-list li:nth-child(1)::before {
  color: var(--yellow);
}

.score-list li.you {
  background: #10233a;
  box-shadow: inset 0 0 0 2px var(--neon);
}

.score-list .who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-list .stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--yellow);
}

.score-list .stars canvas {
  width: 14px;
  height: 14px;
  image-rendering: pixelated;
}

.score-list .who,
.message-list .from {
  text-transform: uppercase;
}

.score-list .pts {
  min-width: 5ch;
  text-align: right;
  color: #fff;
}

.message-form textarea {
  display: block;
  width: 100%;
  padding: 10px;
  border: 2px solid #46506c;
  border-radius: 6px;
  background: #0b111d;
  color: #fff;
  font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif; /* 16px+ stops iPhones zooming in */
  resize: vertical;
}

.message-form textarea::placeholder {
  color: #56627e;
  font-family: var(--font-pixel);
  font-size: 10px;
}

.message-form textarea:focus {
  outline: none;
  border-color: var(--neon);
}

.message-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.message-count {
  font-size: 8px;
  color: var(--muted);
}

.message-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

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

.message-list li {
  padding: 10px 12px;
  border-left: 4px solid var(--neon);
  border-radius: 4px;
  background: #0b111d;
}

.message-list p {
  margin: 0;
  font-size: clamp(8px, 2.4vw, 11px);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.message-list .from {
  margin-top: 6px;
  color: var(--orange);
}

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

/* ------------------------------------------------------------------ footer */

.console-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.grille {
  width: 64px;
  height: 22px;
  background: repeating-linear-gradient(0deg, #1c2538 0 3px, transparent 3px 6px);
  border-radius: 3px;
}

.brand {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: #3a4560;
}

/* ------------------------------------------------------------------ animation */

@keyframes nudge {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes wiggle {
  0%, 88% { transform: rotate(0); }
  90% { transform: rotate(-8deg); }
  94% { transform: rotate(8deg); }
  98% { transform: rotate(0); }
}

@keyframes wipe-in {
  from { clip-path: inset(0 100% 0 0); opacity: 0.4; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes flash {
  0% { box-shadow: 0 0 40px #fff, inset 0 0 30px rgba(255, 255, 255, 0.6); }
  100% { box-shadow: 0 0 14px var(--neon-glow), inset 0 0 12px rgba(47, 184, 255, 0.2); }
}

@media (max-width: 400px) {
  body {
    padding: 10px 6px 30px;
  }

  .console {
    padding: 18px 15px 14px;
    border-radius: 20px 20px 30px 30px;
  }

  .leds {
    width: 4px;
  }

  .leds-left {
    left: -11px;
  }

  .leds-right {
    right: -11px;
  }

  .player-card {
    gap: 11px;
  }

  .dpad {
    width: 72px;
    height: 72px;
  }

  .round {
    width: 50px;
    height: 50px;
  }

  .pill {
    min-width: 84px;
    padding: 7px 6px;
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-start,
  .btn-waiver,
  .lockbox canvas {
    animation: none;
  }

  .party.reveal,
  .party.reveal .info-title,
  .party.reveal .row,
  .party.reveal .link-note,
  .party.reveal .waiver {
    animation-duration: 0.01ms;
    animation-delay: 0ms;
  }
}
