:root {
  --black: #0a0a0f;
  --white: #f5f5f0;
  --magenta: #ff2bd6;
  --cyan: #2be8ff;
  --mustard: #e8b93c;
  --grey-light: #9a9aa8;
  --grey-dark: #3a3a46;
  --navy: #1a182e;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: #000; color: var(--white); }
body { font-family: 'Press Start 2P', 'Courier New', monospace; font-size: 10px; line-height: 1.7; min-height: 100vh; }
a { color: var(--cyan); }
a:hover { color: var(--white); }
button, input { font-family: inherit; }

.cabinet { max-width: 480px; margin: 0 auto; padding: 12px; min-height: 100vh; }
.screen {
  background: var(--black);
  border: 4px solid var(--grey-dark);
  outline: 2px solid var(--white);
  box-shadow: 0 0 0 4px #000, 0 0 24px rgba(255, 43, 214, 0.25);
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 22px;
  min-height: calc(100vh - 24px);
}
.center-screen { align-items: center; justify-content: center; text-align: center; }

.header { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.presents { font-size: 9px; color: var(--mustard); letter-spacing: 2px; }
.title-main { font-size: clamp(26px, 9vw, 34px); line-height: 1.25; color: var(--magenta); text-shadow: 3px 3px 0 var(--cyan), 6px 6px 0 #000; }
.small-title { font-size: 20px; }
.subtitle { font-size: 9px; color: var(--grey-light); letter-spacing: 1px; line-height: 1.9; }
.label { font-size: 8px; color: var(--grey-light); letter-spacing: 1px; }

.players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.player {
  font-size: 9px; line-height: 1.7; padding: 10px 6px; min-height: 68px; cursor: pointer;
  background: var(--black); color: var(--white); border: 3px solid var(--white);
}
.player[aria-pressed='true'] { background: var(--magenta); border-color: var(--magenta); color: var(--black); }

.board { border-top: 2px solid var(--grey-dark); border-bottom: 2px solid var(--grey-dark); padding: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.board-head { display: flex; justify-content: space-between; padding: 0 6px 6px; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; width: 100%;
  background: transparent; border: 2px solid transparent; color: var(--mustard); padding: 8px 6px; cursor: pointer; text-align: left;
  min-height: 48px;
}
.row:hover { border-color: var(--grey-dark); }
.row[aria-pressed='true'] { border-color: var(--cyan); }
.row .who { font-size: 12px; }
.row .price { font-size: 13px; color: var(--white); text-align: right; white-space: nowrap; }
.row .meta { font-size: 7px; line-height: 2; color: var(--grey-light); grid-column: 1 / -1; letter-spacing: 0.5px; }
.row.none { color: var(--grey-light); }
.row.none .price { color: var(--grey-light); font-size: 9px; }
.down { color: var(--cyan); }
.up { color: var(--magenta); }
.flat { color: var(--grey-light); }

.stats { display: flex; flex-direction: column; gap: 10px; text-align: center; font-size: 9px; line-height: 1.9; }
.stats .hi { color: var(--cyan); }

.chart { border: 2px solid var(--grey-dark); padding: 10px 8px 8px; }
.chart svg { display: block; width: 100%; height: 90px; }
.chart .axis { display: flex; justify-content: space-between; font-size: 7px; color: var(--grey-light); margin-top: 6px; }
.chart .empty { font-size: 8px; color: var(--grey-light); text-align: center; padding: 26px 0; line-height: 2; }

.cta { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.btn {
  display: inline-block; font-size: 11px; letter-spacing: 2px; padding: 14px 18px; min-height: 48px; cursor: pointer;
  background: var(--black); color: var(--white); border: 3px solid var(--white); text-decoration: none;
}
.btn:active, .btn:hover { background: var(--magenta); border-color: var(--magenta); color: var(--black); }
.btn.primary { background: var(--magenta); border-color: var(--magenta); color: var(--black); }
.btn.primary:hover { background: var(--cyan); border-color: var(--cyan); }
.btn[disabled] { opacity: 0.5; cursor: wait; }
.small-link { font-size: 8px; color: var(--grey-light); }
.linkish { background: none; border: 0; padding: 12px 4px; min-height: 44px; font-size: 8px; line-height: 1.8; color: var(--cyan); text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--white); }

.marquee-wrap { margin-top: auto; border-top: 2px solid var(--grey-dark); padding-top: 8px; overflow: hidden; white-space: nowrap; }
.marquee { display: inline-block; font-size: 8px; color: var(--mustard); padding-left: 100%; animation: marquee 22s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee { animation: none; padding-left: 0; white-space: normal; } }
.foot { font-size: 7px; color: var(--grey-light); text-align: center; line-height: 2; }

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.taunt { font-size: 9px; color: var(--white); max-width: 90%; line-height: 1.9; }
.error { color: var(--magenta); font-size: 9px; line-height: 1.8; min-height: 1em; }
.ok { color: var(--cyan); font-size: 9px; line-height: 1.8; }

/* Login */
.login-form { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 300px; }
input[type='password'], input[type='email'], input[type='number'], input[type='text'] {
  width: 100%; min-height: 48px; padding: 10px 12px; font-size: 12px;
  background: var(--navy); color: var(--white); border: 3px solid var(--white); outline: none; border-radius: 0;
}
input:focus { border-color: var(--magenta); }
input::placeholder { color: var(--grey-light); }

/* Subscribe overlay */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); display: flex; justify-content: center; overflow-y: auto; z-index: 10; padding: 12px; }
.overlay[hidden] { display: none; }
.overlay .screen { width: 100%; max-width: 456px; min-height: auto; height: max-content; }
form.sub { display: flex; flex-direction: column; gap: 18px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-size: 8px; color: var(--grey-light); letter-spacing: 1px; margin-bottom: 8px; padding: 0; }
.toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.toggles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.toggle { position: relative; }
.toggle input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 8px 4px;
  border: 3px solid var(--grey-dark); color: var(--grey-light); font-size: 9px; line-height: 1.6;
}
.toggle input:checked + span { border-color: var(--cyan); color: var(--black); background: var(--cyan); }
.toggle input:focus-visible + span { outline: 2px solid var(--magenta); outline-offset: 2px; }
.alert-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: center; font-size: 9px; line-height: 1.7; }
.alert-row input { font-size: 12px; }
.hint { font-size: 7px; color: var(--grey-light); line-height: 1.9; }
.row-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
