@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --bg: #0d0221;
  --panel: #1a1038;
  --fg: #f4f4ff;
  --dim: #8a82b5;
  --accent: #ffec27;
  --pink: #ff004d;
  --green: #00e436;
  --blue: #29adff;
  --font: 'Press Start 2P', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.6;
  image-rendering: pixelated;
  -webkit-tap-highlight-color: transparent;
}

/* CRT scanlines + vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.45) 100%);
  z-index: 100;
}

#app { min-height: 100vh; padding: 16px; display: flex; flex-direction: column; align-items: center; }
.center { justify-content: center; text-align: center; }
.stack { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 520px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

h1, h2, h3 { margin: 0; font-weight: normal; text-transform: uppercase; }
h1 { font-size: clamp(20px, 5vw, 44px); color: var(--accent); text-shadow: 4px 4px 0 var(--pink); line-height: 1.3; }
h2 { font-size: clamp(14px, 3vw, 24px); color: var(--blue); }
.dim { color: var(--dim); }
.error { color: var(--pink); min-height: 1.6em; }
.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* chunky pixel panel / buttons */
.panel {
  background: var(--panel);
  border: 4px solid var(--fg);
  box-shadow: 6px 6px 0 #000;
  padding: 16px;
}

button, .btn {
  font-family: var(--font);
  font-size: 14px;
  text-transform: uppercase;
  color: #000;
  background: var(--accent);
  border: 4px solid #000;
  box-shadow: 4px 4px 0 var(--pink);
  padding: 14px 20px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
button:active, .btn:active { transform: translate(4px, 4px); box-shadow: none; }
button:disabled { background: #555; color: #999; box-shadow: none; cursor: not-allowed; }
button.secondary { background: var(--blue); }
button.danger { background: var(--pink); color: #fff; }

input {
  font-family: var(--font);
  font-size: 18px;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
  padding: 14px;
  color: var(--accent);
  background: #000;
  border: 4px solid var(--fg);
  outline: none;
}
input:focus { border-color: var(--accent); }

/* host lobby */
.room-code {
  font-size: clamp(40px, 12vw, 120px);
  color: var(--green);
  letter-spacing: 0.2em;
  text-shadow: 0 0 12px var(--green);
  margin: 8px 0;
}

.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; width: 100%; max-width: 960px; }
.player-chip { border: 4px solid var(--c, #fff); padding: 12px; background: #000; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.player-chip.offline { opacity: 0.4; }
.player-chip .x { background: none; color: var(--dim); border: none; box-shadow: none; padding: 0 4px; font-size: 12px; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 380px));
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 960px;
}
.game-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  text-align: left;
  font-size: 16px;
  line-height: 1.5;
  background: var(--panel);
  color: var(--fg);
  border: 4px solid var(--dim);
  box-shadow: 6px 6px 0 #000;
}
.game-card:hover { border-color: var(--blue); }
.game-card.selected { border-color: var(--accent); color: var(--accent); }
.game-card .desc { font-size: 10px; line-height: 2; color: var(--dim); text-transform: uppercase; }
.game-card .meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 2px dashed var(--dim);
  font-size: 10px;
  color: var(--blue);
}
.game-card.selected .meta { color: var(--accent); border-top-color: var(--accent); }

/* generic big text for in-game screens */
.huge { font-size: clamp(32px, 14vw, 140px); line-height: 1.1; }
.big { font-size: clamp(18px, 5vw, 40px); }

/* score bars */
.bars { width: 100%; max-width: 960px; display: flex; flex-direction: column; gap: 10px; }
.bar { display: flex; align-items: center; gap: 12px; }
.bar .name { width: 11ch; text-align: left; overflow: hidden; white-space: nowrap; }
.bar .track { flex: 1; height: 28px; background: #000; border: 3px solid var(--fg); }
.bar .fill { height: 100%; background: var(--c); width: 0; transition: width 0.1s linear; }
.bar .val { width: 6ch; text-align: right; }

/* phone controller */
.pad {
  width: 100%;
  flex: 1;
  min-height: 55vh;
  font-size: 28px;
  border-radius: 0;
  background: var(--c, var(--accent));
}
.me-tag { border: 4px solid var(--c); padding: 8px 12px; background: #000; }

.results li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 2px dashed var(--dim); }
.results { list-style: none; padding: 0; margin: 0; width: 100%; }
.results li:first-child { color: var(--accent); }

/* sound toggle */
.sfx-toggle {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 200;
  font-size: 9px;
  padding: 8px 10px;
  background: var(--panel);
  color: var(--fg);
  border: 3px solid var(--dim);
  box-shadow: 3px 3px 0 #000;
}

/* high scores */
.results-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: 100%; align-items: start; }
.results-cols .panel h2 { margin-bottom: 12px; }
@media (max-width: 800px) { .results-cols { grid-template-columns: 1fr; } }

.results.hs li { display: grid; grid-template-columns: 3.5ch 1fr auto auto 4.5ch; gap: 14px; text-align: left; align-items: center; }
.results.hs .score { text-align: right; color: var(--green); }
.results.hs .date { color: var(--dim); font-size: 10px; }
.results.hs .tag { color: var(--pink); font-size: 10px; }
.results.hs li.new { color: var(--accent); background: rgba(255, 236, 39, 0.12); }
.results.hs li.new .score { color: var(--accent); }

/* host EXIT button, opposite the sound toggle */
.exit-btn { right: auto; left: 8px; border-color: var(--pink); color: var(--pink); }

/* credits line (music attribution) */
.credits { position: fixed; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 8px; line-height: 1.8; color: var(--dim); padding: 0 16px; }
.credits a { color: var(--blue); }


/* generation range slider (game select screen) */
.gs { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 22px; text-align: center; }
.gs-label { color: var(--accent); font-size: clamp(11px, 1.6vw, 16px); min-height: 1.6em; margin-bottom: 14px; }
.gs-track { position: relative; height: 14px; margin: 18px 0 8px; background: #000; border: 3px solid #fff; touch-action: none; cursor: pointer; }
.gs-fill { position: absolute; top: 0; bottom: 0; background: var(--accent); }
.gs-dot { position: absolute; top: 50%; width: 6px; height: 6px; background: var(--dim); transform: translate(-50%, -50%); }
.gs-handle { position: absolute; top: 50%; width: 34px; height: 34px; padding: 0; transform: translate(-50%, -50%); display: grid; place-items: center; font-size: 12px; background: var(--blue); color: #000; border: 3px solid #fff; box-shadow: 3px 3px 0 #000; cursor: grab; touch-action: none; }
.gs-handle:active { transform: translate(-50%, -50%); box-shadow: 3px 3px 0 #000; cursor: grabbing; }
.gs-handle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.gs-ticks { position: relative; height: 3.2em; margin-top: 18px; }
.gs-ticks span { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--dim); }
.gs-ticks span small { display: block; margin-top: 4px; font-size: 7px; letter-spacing: 0; }
.gs-ticks span.on { color: var(--fg); }
.gs.compact .gs-ticks span small { display: none; }
.gs.compact .gs-ticks { height: 1.6em; }

/* topic picker and the topic's options (game select screen) */
.topic-picker { width: 100%; }
.topic-row { flex-wrap: wrap; justify-content: center; }
.settings { display: flex; flex-direction: column; gap: 14px; width: 100%; align-items: center; }
.setting { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* re-rendering the lobby must not make the browser shift the scroll position to keep an "anchor" element in place */
body, #app { overflow-anchor: none; }

/* game cards: tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 8px; line-height: 1; padding: 5px 7px; border: 2px solid var(--dim); color: var(--fg); text-transform: uppercase; }
.tag.time { border-color: var(--blue); color: var(--blue); }
.tag.mode { border-color: var(--pink); color: var(--pink); }
.tag.help { border-color: var(--green); color: var(--green); }
.tag.style { color: var(--dim); }

/* a topic whose pictures are not cut-outs (card art) blurs them instead of blacking them out */
body[data-hide="blur"] .tq-image img.hidden, body[data-hide="blur"] .pb-qimg img.hidden { filter: blur(16px) saturate(0.4) brightness(0.8); }
body[data-hide="blur"] .tq-image { overflow: hidden; }
.gs-ticks span.bare::before { content: ''; display: block; width: 1px; height: 4px; margin: 0 auto; background: var(--dim); }
.gs-handle.long { width: auto; min-width: 34px; padding: 0 4px; font-size: 9px; }

/* the picture clears up over the question's clock, then the reveal removes .hidden and shows it sharp */
@keyframes unblur { from { filter: blur(22px) saturate(0.4) brightness(0.8); } to { filter: blur(3px) saturate(0.8) brightness(0.95); } }
body[data-hide="blur"] .tq-image img.hidden.unblur { animation: unblur var(--ms, 15s) linear forwards; }

/* ── game select screen: topic tiles, settings bar, game cards and the pinned start bar ── */
h2.step { font-size: 11px; color: var(--dim); letter-spacing: 0.14em; margin-top: 8px; }

.topic-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; width: 100%; max-width: 960px; }
.topic-tile { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 14px 16px; background: var(--panel); color: var(--fg); border: 3px solid #2e2557; box-shadow: none; font-size: 12px; line-height: 1.4; }
.topic-tile .nm { color: var(--fg); }
.topic-tile .blurb { font-size: 8px; line-height: 1.9; color: var(--dim); }
.topic-tile:hover { border-color: var(--blue); }
.topic-tile:active { transform: none; }
.topic-tile.selected { border-color: var(--accent); box-shadow: 4px 4px 0 var(--pink); }
.topic-tile.selected .nm { color: var(--accent); }

.settings { max-width: 960px; padding: 6px 18px 2px; background: var(--panel); border: 3px solid #2e2557; gap: 0; }
.settings:empty { display: none; }
.setting h2 { font-size: 10px; color: var(--dim); letter-spacing: 0.14em; margin-top: 8px; }
.setting .gs { max-width: 640px; margin: 0 auto; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; width: 100%; max-width: 960px; }
.pick-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 14px 16px; background: var(--panel); color: var(--fg); border: 3px solid #2e2557; box-shadow: none; font-size: 12px; line-height: 1.4; }
.pick-card .tags { margin-top: 0; }
.pick-card:hover { border-color: var(--blue); }
.pick-card:active { transform: none; }
.pick-card.selected { border-color: var(--accent); color: var(--accent); box-shadow: 4px 4px 0 var(--pink); }
.picker { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }

.pick-detail { width: 100%; max-width: 960px; text-align: left; padding: 16px 20px; background: rgba(255, 255, 255, 0.04); border-left: 4px solid var(--accent); }
.pick-detail h3 { margin: 0 0 8px; font-size: 14px; color: var(--accent); }
.pick-detail .desc { margin: 0; font-size: 10px; line-height: 2; color: var(--dim); text-transform: uppercase; }
.pick-detail .meta { margin: 10px 0 0; font-size: 9px; color: var(--blue); }

.start-bar { position: sticky; bottom: 0; z-index: 5; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-top: 8px; padding: 12px 16px; background: rgba(13, 2, 33, 0.96); border-top: 4px solid var(--accent); }
.start-bar .picked { font-size: 11px; color: var(--accent); text-align: left; line-height: 1.6; }
.start-bar .go { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.start-bar input { width: 190px; font-size: 14px; padding: 10px; }
.start-bar .error { margin: 0; min-height: 0; font-size: 10px; }
@media (max-width: 640px) {
  .start-bar { justify-content: center; }
  .start-bar .picked, .start-bar .go { justify-content: center; text-align: center; width: 100%; }
}
@media (max-width: 640px) {
  .topic-tiles { grid-template-columns: 1fr 1fr; }
  .topic-tile { padding: 12px; }
  .topic-tile .blurb { display: none; }
  .pick-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .start-bar { gap: 8px; padding: 10px 12px; }
  .start-bar .picked { font-size: 9px; }
  .start-bar .go { flex-wrap: nowrap; }
  .start-bar input { flex: 1 1 0; min-width: 0; width: auto; }
  .start-bar button { padding: 12px 14px; font-size: 12px; white-space: nowrap; }
}

.gs-ticks .tv { font-weight: normal; }
.gs-ticks span.bare .tv { display: none; }

/* host lobby: how the evening works */
.how { width: 100%; max-width: 960px; margin: 4px 0 8px; background: var(--panel); border: 3px solid #2e2557; text-align: left; }
.how summary { cursor: pointer; padding: 12px 16px; font-size: 11px; letter-spacing: 0.14em; color: var(--dim); list-style: none; }
.how summary::-webkit-details-marker { display: none; }
.how summary::before { content: '+ '; color: var(--accent); }
.how[open] summary::before { content: '- '; }
.how ol { list-style: none; margin: 0; padding: 4px 16px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how li { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: rgba(255, 255, 255, 0.04); border-left: 4px solid var(--accent); }
.how .n { font-size: 10px; color: var(--pink); }
.how b { font-size: 12px; font-weight: normal; color: var(--accent); letter-spacing: 0.08em; }
.how .t { font-size: 9px; line-height: 2; color: var(--fg); text-transform: none; }
@media (max-width: 760px) { .how ol { grid-template-columns: 1fr; } }
.gs-handle.long { white-space: nowrap; }

/* ── cosmetics: names, frames, effects, phone themes and the locker (all just for show) ── */
.flair { display: inline-block; text-align: center; line-height: 1.5; }
.fl-badge { font-style: normal; margin-right: 0.35em; }
.fl-title { display: block; margin-top: 2px; font-size: 7px; letter-spacing: 0.1em; color: var(--dim); text-shadow: none; -webkit-text-fill-color: var(--dim); }
.results .fl-title { display: inline; margin-left: 8px; }

.nm-gold { color: #ffd700; text-shadow: 0 0 6px rgba(255, 215, 0, 0.55); }
.nm-pink { color: #ff5fb0; }
.nm-cyan { color: #5ff2ff; }
.nm-rainbow, .nm-flame { color: transparent; -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-clip: text; background-size: 200% 100%; animation: flair-slide 3s linear infinite; }
.nm-rainbow { background-image: linear-gradient(90deg, #ff004d, #ffec27, #00e436, #29adff, #b07cff, #ff004d); }
.nm-flame { background-image: linear-gradient(90deg, #ff004d, #ff8a1f, #ffec27, #ff8a1f, #ff004d); animation-duration: 1.6s; }
.nm-glitch { color: #fff; animation: flair-glitch 1.2s steps(2, jump-none) infinite; }
@keyframes flair-slide { to { background-position: 200% 0; } }
@keyframes flair-glitch { 0% { text-shadow: 2px 0 #ff004d, -2px 0 #29adff; } 50% { text-shadow: -2px 1px #ff004d, 2px -1px #29adff; } 100% { text-shadow: 2px 0 #ff004d, -2px 0 #29adff; } }

.fr-pixel { outline: 3px solid #fff; outline-offset: 2px; }
.fr-gold { outline: 3px solid #ffd700; outline-offset: 2px; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.fr-glow { box-shadow: 0 0 14px 2px var(--p, var(--c, #fff)); }
.fr-double { outline: 6px double #fff; outline-offset: 2px; }
.fr-dash { outline: 3px dashed #fff; outline-offset: 2px; }
.fr-rainbow { outline: 3px solid #ff004d; outline-offset: 2px; animation: flair-outline 2.4s linear infinite; }
@keyframes flair-outline { 0% { outline-color: #ff004d; } 20% { outline-color: #ffec27; } 40% { outline-color: #00e436; } 60% { outline-color: #29adff; } 80% { outline-color: #b07cff; } 100% { outline-color: #ff004d; } }

/* a right answer's flourish: the player's box pulses and their effect bursts above it */
.tq-roster .p[class*='fx-'] { animation: flair-pulse 0.7s ease-out; z-index: 5; }
.tq-roster .p.p[class*='fx-']::after { position: absolute; left: 50%; right: auto; top: auto; bottom: 100%; transform: translateX(-50%); pointer-events: none; z-index: 6; animation: flair-rise 2.2s ease-out forwards; white-space: nowrap; line-height: 1; }
.tq-roster .p.p.fx-sparkle::after { content: '✦ ✧ ✦ ✧ ✦'; color: #ffec27; letter-spacing: 12px; font-size: 30px; text-shadow: 0 0 10px #ffec27; }
.tq-roster .p.p.fx-confetti::after { content: '▪ ▪ ▪ ▪'; color: #ff004d; font-size: 30px; letter-spacing: 10px; text-shadow: 30px -26px #ffec27, -34px -34px #29adff, 58px -8px #00e436, -62px -12px #b07cff, 12px -52px #ff8a1f; }
.tq-roster .p.p.fx-lightning::after { content: '⚡'; font-size: 64px; text-shadow: 0 0 18px #ffec27; animation-name: flair-zap; }
.tq-roster .p.p.fx-lightning { box-shadow: 0 0 22px 4px #ffec27; }
.tq-roster .p.p.fx-coins::after { content: '🪙 🪙 🪙 🪙'; font-size: 30px; letter-spacing: 8px; }
@keyframes flair-pulse { 0% { transform: scale(1); } 25% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes flair-rise { 0% { opacity: 0; transform: translate(-50%, 16px); } 12% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70px); } }
@keyframes flair-zap { 0% { opacity: 0; transform: translate(-50%, 0) scale(0.3); } 12% { opacity: 1; transform: translate(-50%, -10px) scale(1.6); } 24% { opacity: 0.1; } 36% { opacity: 1; } 48% { opacity: 0.2; } 60% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50px) scale(1); } }

/* phone themes */
:root[data-theme='gameboy'] { --bg: #0f1f0f; --panel: #1c3a1c; --fg: #e0f8cf; --dim: #86c06c; --accent: #c4f06b; --pink: #ff6b6b; --green: #7ae582; --blue: #86c06c; }
:root[data-theme='ice'] { --bg: #04121f; --panel: #0b2a40; --fg: #e8f7ff; --dim: #7fb2d1; --accent: #9be7ff; --pink: #ff7aa8; --green: #5ff2c0; --blue: #5aa9ff; }
:root[data-theme='sunset'] { --bg: #1f0a1f; --panel: #3a1431; --fg: #fff1e6; --dim: #c98ba5; --accent: #ffb347; --pink: #ff5e78; --green: #7be0a0; --blue: #7aa2ff; }
:root[data-theme='neon'] { --bg: #05010f; --panel: #120a2e; --fg: #ffffff; --dim: #9a8cff; --accent: #39ff14; --pink: #ff2bd6; --green: #00ffd0; --blue: #00b7ff; }

/* the locker */
body.locker-open { overflow: hidden; }
.locker { position: fixed; inset: 0; z-index: 300; overflow-y: auto; background: var(--bg); padding: 16px; }
.lk-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: center; padding-bottom: 40px; }
.lk-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lk-head h1 { font-size: clamp(18px, 5vw, 30px); }
.lk-me { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 16px; padding: 14px; background: var(--panel); border: 3px solid #2e2557; }
.lk-xp { display: flex; flex-direction: column; gap: 8px; font-size: 9px; }
.lk-xp .bar { height: 14px; background: #000; border: 3px solid #fff; }
.lk-xp .fill { height: 100%; background: var(--accent); }
.lk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lk-stats div { display: flex; flex-direction: column; gap: 4px; padding: 10px 4px; background: var(--panel); border: 3px solid #2e2557; }
.lk-stats b { font-size: 16px; font-weight: normal; color: var(--accent); }
.lk-stats small { font-size: 7px; color: var(--dim); }
.lk-note { font-size: 8px; line-height: 1.9; margin: 0; }
.lk-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lk-tabs button { font-size: 9px; padding: 9px 10px; box-shadow: 3px 3px 0 var(--pink); position: relative; }
.lk-tabs button.has-new::after { content: ''; position: absolute; top: -6px; right: -6px; width: 12px; height: 12px; background: var(--pink); border: 2px solid #000; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lk-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; text-align: center; text-transform: uppercase; background: var(--panel); color: var(--fg); border: 3px solid #2e2557; box-shadow: none; font-size: 9px; min-height: 130px; }
.lk-item:hover:not(:disabled) { border-color: var(--blue); }
.lk-item.equipped { border-color: var(--accent); box-shadow: 3px 3px 0 var(--pink); }
.lk-item.locked { opacity: 0.55; cursor: not-allowed; background: #000; }
.lk-item.isnew { border-color: var(--pink); }
.lk-prev { display: flex; align-items: center; justify-content: center; min-height: 40px; font-size: 13px; }
.lk-label { color: var(--fg); line-height: 1.5; }
.lk-state { margin-top: auto; font-size: 7px; line-height: 1.8; color: var(--dim); }
.lk-item.equipped .lk-state { color: var(--accent); }
.lk-item.isnew .lk-state { color: var(--pink); }
.lk-frame { display: inline-block; padding: 8px 14px; background: #000; font-size: 11px; }
.lk-big { font-size: 26px; }
.lk-text { font-size: 9px; line-height: 1.6; color: var(--accent); }
.lk-swatch { display: flex; }
.lk-swatch i { width: 22px; height: 28px; display: block; border: 2px solid #000; }

.unlock-banner { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; background: rgba(255, 236, 39, 0.1); border: 3px solid var(--accent); }
.ub-level { color: var(--accent); font-size: 13px; }
.ub-item { color: var(--green); font-size: 10px; line-height: 1.8; }

/* high scores: two drop-downs instead of a wall of buttons */
.hs-picks { display: flex; flex-wrap: wrap; gap: 14px; width: 100%; justify-content: center; }
.hs-pick { display: flex; flex-direction: column; gap: 8px; flex: 1 1 260px; max-width: 340px; text-align: left; font-size: 9px; letter-spacing: 0.14em; color: var(--dim); }
.hs-pick select {
  appearance: none; -webkit-appearance: none; width: 100%; padding: 14px 40px 14px 14px; font-family: var(--font); font-size: 12px; text-transform: uppercase; color: var(--accent);
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M0 0h16L8 10z' fill='%2329adff'/%3E%3C/svg%3E") no-repeat right 14px center; border: 4px solid var(--fg); border-radius: 0; cursor: pointer;
}
.hs-pick select:focus { border-color: var(--accent); outline: none; }
.hs-pick option { background: #000; color: var(--fg); }
.results.hs li:nth-child(1) .rank { color: #ffd700; }
.results.hs li:nth-child(2) .rank { color: #d0d8e8; }
.results.hs li:nth-child(3) .rank { color: #e29a5b; }
.results.hs .fl-title { display: block; margin: 2px 0 0; }
.results.hs .name { min-width: 0; text-align: left; }
@media (max-width: 520px) {
  .results.hs li { grid-template-columns: 3ch minmax(0, 1fr) auto auto; gap: 8px; }
  .results.hs li > span:last-child:empty { display: none; }
  .results.hs .date { font-size: 8px; }
}

/* challenge a friend */
.share-box { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; background: rgba(255, 255, 255, 0.04); border: 3px dashed var(--accent); }
.share-box .link { width: 100%; font-size: 10px; line-height: 1.8; color: var(--accent); word-break: break-all; text-transform: none; }
.share-box p { margin: 0; font-size: 8px; line-height: 1.9; }
.challenge-board li .rank { min-width: 3.5ch; }
.challenge-board li.you { outline: 3px solid var(--green); outline-offset: -3px; }
.my-challenge { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 14px; text-align: left; background: var(--panel); color: var(--fg); border: 3px solid #2e2557; box-shadow: none; position: relative; }
.my-challenge:hover { border-color: var(--blue); }
.my-challenge.isnew { border-color: var(--pink); }
.my-challenge .mc-title { font-size: 12px; color: var(--accent); }
.my-challenge .mc-line { font-size: 9px; line-height: 1.8; }
.my-challenge .mc-new { position: absolute; top: 10px; right: 10px; font-size: 9px; color: #000; background: var(--pink); padding: 4px 6px; }
.results.hs.challenge-board li { grid-template-columns: 6ch minmax(0, 1fr) auto; }
.challenge-board li > span:only-child { grid-column: 1 / -1; }
.share-box .link { font-family: 'Courier New', monospace; font-size: 12px; font-weight: bold; }

/* the sender's ghost in a challenge: a second player who is not really there */
.tq-roster .p.ghost { border-style: dashed; opacity: 0.88; }
.tq-roster .p.ghost .fl-name::before { content: '👻 '; }
.results li.ghost-row .name::before { content: '👻 '; }

.tag.challenge { border-color: var(--accent); color: var(--accent); }
.results li.ghost-row .flair::before { content: '👻 '; }

/* the one back button, top-left on every screen but the main one; the screen keeps clear of it */
.nav-back[hidden] { display: none; }
body.has-nav #app { padding-top: 60px; }
.lk-head { justify-content: flex-start; gap: 16px; }
.lk-head h1 { margin: 0; }

/* the account line in My Stuff */
.lk-account { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 12px; font-size: 9px; line-height: 1.8; background: rgba(255, 255, 255, 0.04); border: 2px dashed #2e2557; }
.lk-account.form { gap: 10px; }
.lk-account input { max-width: 320px; font-size: 14px; padding: 10px; text-transform: none; }
.lk-account .row { gap: 8px; }
button.small { font-size: 9px; padding: 8px 10px; box-shadow: 3px 3px 0 var(--pink); }
