:root {
  --ink: #0d0820;
  --panel: rgba(18, 11, 38, 0.97);
  --panel-edge: #4b3a7a;
  --text: #f4ecff;
  --muted: #a99cc9;
  --brass: #d4ac62;
  --brass-light: #f0d49a;
  --orange: #ff9b2f;
  --pink: #ff5fa2;
  --cyan: #5ee6ff;
  --exact: #4ade80;
  --close: #fbbf24;
  --far: #f87171;
  --px: 3px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: "VT323", ui-monospace, monospace;
  font-size: 20px;
  -webkit-tap-highlight-color: transparent;
}

#world {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Floating name tags over guessed floors */
#labels { position: fixed; inset: 0; pointer-events: none; }
.tag {
  position: absolute;
  max-width: 200px;
  padding: 1px 5px 0;
  font-size: 18px;
  line-height: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  background: var(--brass-light);
  box-shadow: 0 2px 0 #0006;
}
.tag.exact { background: var(--exact); }
.tag.close { background: var(--close); }
.tag.far { background: #ffb4b4; }
.tag.answer { background: var(--exact); }

/* ---------- Layout ---------- */
.layout {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(10px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.layout > * { pointer-events: auto; }
.layout > .hole { pointer-events: none; }

.hud, .panel {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.panel {
  max-width: 480px;
  align-content: start;
}

/* Pixel-notched frame */
.pix {
  background: var(--panel);
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--panel-edge),
    0 var(--px) 0 0 var(--panel-edge),
    calc(-1 * var(--px)) 0 0 0 var(--panel-edge),
    var(--px) 0 0 0 var(--panel-edge);
}

/* ---------- HUD ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stops {
  list-style: none;
  display: flex;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.stops li {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font: 10px "Press Start 2P", monospace;
  color: var(--muted);
  background: #1a1236;
  box-shadow: 0 -3px 0 #3a2d63, 0 3px 0 #3a2d63, -3px 0 0 #3a2d63, 3px 0 0 #3a2d63;
}
.stops li.current {
  color: var(--ink);
  background: var(--orange);
  box-shadow: 0 -3px 0 #ffd08a, 0 3px 0 #a8641f, -3px 0 0 #ffd08a, 3px 0 0 #a8641f, 0 0 18px rgba(255,155,47,0.6);
}
.stops li.r-exact { color: var(--ink); background: var(--exact); }
.stops li.r-close { color: var(--ink); background: var(--close); }
.stops li.r-far { color: var(--ink); background: var(--far); }
.stops li.r-zero { color: #b3abcf; background: #2a2340; }

.mission {
  margin-top: 14px;
  padding: 8px 12px;
  text-align: center;
  background: var(--panel);
  box-shadow: 0 -3px 0 var(--panel-edge), 0 3px 0 var(--panel-edge), -3px 0 0 var(--panel-edge), 3px 0 0 var(--panel-edge);
}
.category {
  display: block;
  text-wrap: balance;
  font: 11px/1.5 "Press Start 2P", monospace;
  color: var(--text);
}
.goal {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.goal b {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px 0;
  font: 14px "Press Start 2P", monospace;
  color: var(--ink);
  background: var(--orange);
  box-shadow: 0 0 14px rgba(255,155,47,0.6);
  animation: pulse 1.6s steps(2) infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 4px rgba(255,155,47,0.3); } }

/* ---------- Buttons ---------- */
.pix-btn {
  font: 11px "Press Start 2P", monospace;
  color: var(--text);
  background: #2a1f4d;
  border: none;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 -3px 0 #4b3a7a, 0 3px 0 #160f2c, -3px 0 0 #4b3a7a, 3px 0 0 #160f2c;
}
.pix-btn:active { transform: translateY(2px); }
.pix-btn.icon { width: 44px; height: 44px; padding: 0; font-size: 14px; }
.pix-btn.icon.off { opacity: 0.45; }
.pix-btn.primary {
  width: 100%;
  color: var(--ink);
  background: var(--brass);
  box-shadow: 0 -3px 0 var(--brass-light), 0 3px 0 #8a6f3e, -3px 0 0 var(--brass-light), 3px 0 0 #8a6f3e;
}
.pix-btn.ghost { width: 100%; color: var(--muted); background: transparent; }
.pix-btn.big { font-size: 14px; padding: 18px 20px; }
[hidden] { display: none !important; }

/* ---------- Bottom panel ---------- */
.panel { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.panel > *, .hud > * { min-width: 0; }

/* The guess box is the star of the screen */
.search {
  position: relative;
  display: flex;
  align-items: center;
  background: #0b0718;
  box-shadow: 0 -4px 0 var(--brass), 0 4px 0 #8a6f3e, -4px 0 0 var(--brass), 4px 0 0 #8a6f3e, 0 0 26px rgba(212,172,98,0.35);
  animation: beckon 2.4s ease-in-out infinite;
}
.search:focus-within { animation: none; box-shadow: 0 -4px 0 var(--brass-light), 0 4px 0 var(--brass), -4px 0 0 var(--brass-light), 4px 0 0 var(--brass), 0 0 34px rgba(255,155,47,0.55); }
@keyframes beckon { 50% { box-shadow: 0 -4px 0 var(--brass), 0 4px 0 #8a6f3e, -4px 0 0 var(--brass), 4px 0 0 #8a6f3e, 0 0 8px rgba(212,172,98,0.15); } }
.prompt {
  padding-left: 14px;
  font: 14px "Press Start 2P", monospace;
  color: var(--orange);
  animation: blinkOpacity 1s steps(2) infinite;
}
@keyframes blinkOpacity { 50% { opacity: 0.25; } }

.card {
  padding: 12px 14px;
  min-height: 92px;
  background: var(--panel);
  box-shadow: 0 -3px 0 var(--panel-edge), 0 3px 0 var(--panel-edge), -3px 0 0 var(--panel-edge), 3px 0 0 var(--panel-edge);
  animation: cardIn 0.25s steps(4);
}
.card.answer { box-shadow: 0 -3px 0 var(--exact), 0 3px 0 var(--exact), -3px 0 0 var(--exact), 3px 0 0 var(--exact); }
@keyframes cardIn { from { opacity: 0; transform: translateY(6px); } }
.card .kicker {
  font: 9px "Press Start 2P", monospace;
  color: var(--muted);
  letter-spacing: 1px;
}
.card .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}
.card .name { font: 13px/1.4 "Press Start 2P", monospace; color: var(--brass-light); }
.card .floor { font: 12px "Press Start 2P", monospace; color: var(--orange); white-space: nowrap; }
.card .value { color: var(--muted); font-size: 20px; }
.card .fact { margin: 4px 0 0; font-size: 20px; line-height: 1.1; }
.card .heat {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px 1px;
  font: 9px "Press Start 2P", monospace;
  color: var(--ink);
}
.heat.exact { background: var(--exact); }
.heat.close { background: var(--close); }
.heat.far { background: var(--far); }
.card .welcome { font: 12px/1.6 "Press Start 2P", monospace; color: var(--brass-light); margin-top: 6px; }

#input {
  flex: 1;
  min-width: 0;
  padding: 16px 14px 14px 10px;
  font: 30px "VT323", monospace;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
}
#input:disabled { opacity: 0.5; }
#input::placeholder { color: #6e6194; }

.suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 5;
  background: #120b26;
  box-shadow: 0 -3px 0 var(--panel-edge), 0 3px 0 var(--panel-edge), -3px 0 0 var(--panel-edge), 3px 0 0 var(--panel-edge), 0 10px 30px #000a;
}
.suggestions:empty { display: none; }
.suggestions li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 22px;
}
.suggestions li::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  background: #2a1f4d;
  box-shadow: 0 0 0 2px var(--brass-dim, #8a6f3e);
}
.suggestions li.active, .suggestions li:hover { background: #2a1f4d; color: var(--brass-light); }
.suggestions li.active::before, .suggestions li:hover::before { background: var(--orange); box-shadow: 0 0 0 2px var(--brass), 0 0 8px var(--orange); }
.suggestions li.none { color: var(--muted); cursor: default; background: none; }
.suggestions li.none::before { display: none; }

.guess-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 2px 8px;
  background: rgba(13, 8, 32, 0.85);
  font-size: 17px;
  color: var(--muted);
}
#guessesLeft { color: var(--brass); white-space: nowrap; }
#source { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stop-result {
  text-align: center;
  padding: 12px 14px 14px;
  background: var(--panel);
  box-shadow: 0 -3px 0 var(--brass), 0 3px 0 var(--brass), -3px 0 0 var(--brass), 3px 0 0 var(--brass);
  animation: cardIn 0.25s steps(4);
}
.stop-result p { margin: 0 0 12px; font-size: 22px; }
#nextBtn { min-height: 52px; font-size: 13px; }
.stop-result .pts { color: var(--brass-light); font-family: "Press Start 2P", monospace; font-size: 12px; }

/* ---------- Overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  overflow-y: auto;
}
#start { background: linear-gradient(180deg, rgba(13,8,32,0.55), rgba(13,8,32,0.2) 50%, rgba(13,8,32,0.7)); }
.title-wrap { text-align: center; max-width: 420px; }

.neon {
  position: relative;
  margin: 0;
  font: 40px "Press Start 2P", monospace;
  color: #ffe0f0;
  letter-spacing: 2px;
  text-shadow: 0 0 6px var(--pink), 0 0 18px var(--pink), 0 0 36px #ff2f86;
  animation: flicker 5s infinite;
}
@media (max-width: 380px) { .neon { font-size: 30px; } }
@keyframes flicker {
  0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; }
  20%, 63% { opacity: 0.45; text-shadow: none; }
}
.subtitle {
  margin: 14px 0 0;
  font: 12px "Press Start 2P", monospace;
  color: var(--cyan);
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--cyan);
}
.blurb { color: var(--muted); margin: 16px 0 28px; }
.day { margin: 18px 0 0; color: var(--muted); font-size: 18px; }
.streak { margin: 6px 0 0; font: 10px "Press Start 2P", monospace; color: var(--orange); }
.streak:empty { display: none; }

/* CRT scanlines over everything */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

.results { background: rgba(13, 8, 32, 0.72); }
.results-box {
  width: 100%;
  max-width: 420px;
  padding: 20px 18px;
  text-align: center;
  background: var(--panel);
  box-shadow: 0 -3px 0 var(--panel-edge), 0 3px 0 var(--panel-edge), -3px 0 0 var(--panel-edge), 3px 0 0 var(--panel-edge);
}
.results .label { margin: 0; font: 10px "Press Start 2P", monospace; color: var(--muted); }
.score {
  margin: 14px 0 6px;
  font: 40px "Press Start 2P", monospace;
  color: var(--orange);
  text-shadow: 0 0 14px rgba(255,155,47,0.6);
}
.verdict { margin: 0 0 12px; font-size: 24px; color: var(--brass-light); }
.grid {
  display: inline-block;
  text-align: left;
  margin: 0 0 14px;
  padding: 10px 14px;
  font-size: 18px;
  line-height: 1.4;
  background: #0007;
}
.toast { min-height: 20px; margin: 8px 0; color: var(--exact); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.stats div { padding: 8px 2px; background: #0006; }
.stats b { display: block; font: 14px "Press Start 2P", monospace; color: var(--orange); margin-bottom: 4px; }
.stats span { font-size: 16px; color: var(--muted); }
.recap { list-style: none; padding: 0; margin: 0 0 14px; text-align: left; display: grid; gap: 8px; }
.recap li { padding: 8px 10px; background: #0006; font-size: 19px; line-height: 1.1; }
.recap b { color: var(--brass-light); font-weight: 400; }
.recap span { color: var(--muted); }
.recap p { margin: 4px 0 0; font-size: 17px; color: var(--muted); }
.countdown { color: var(--muted); }
#countdown { font: 12px "Press Start 2P", monospace; color: var(--orange); }
.foot { margin: 14px 0 0; font-size: 15px; color: #6e6194; }

/* ---------- Dialogs ---------- */
.dlg {
  max-width: 420px;
  width: calc(100% - 32px);
  border: none;
  padding: 20px;
  color: var(--text);
  background: #150d2c;
  box-shadow: 0 -3px 0 var(--panel-edge), 0 3px 0 var(--panel-edge), -3px 0 0 var(--panel-edge), 3px 0 0 var(--panel-edge);
}
.dlg::backdrop { background: #000b; }
.dlg h2 { font: 14px "Press Start 2P", monospace; color: var(--brass); margin: 0 0 12px; }
.dlg p { line-height: 1.15; margin: 0 0 12px; }
.dlg table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.dlg td { padding: 3px 0; border-bottom: 1px dashed #ffffff22; }
.dlg td:last-child { text-align: right; color: var(--brass); }
.dlg .small { color: var(--muted); font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.title .layout, .title #labels { visibility: hidden; }

/* Big desktop screens: scale the interface up to match the art */
@media (min-width: 1400px) and (min-height: 900px) {
  .layout, .overlay > div, .dlg, .banner { zoom: 1.3; }
}

/* ---------- Lamps for special results ---------- */
.stops li.r-express {
  color: #fff;
  background: #ff3d8f;
  text-shadow: 1px 1px 0 #7a1040;
  box-shadow: 0 -3px 0 #ffb3d4, 0 3px 0 #a0205a, -3px 0 0 #ffb3d4, 3px 0 0 #a0205a, 0 0 16px rgba(255,61,143,0.8);
}

/* ---------- Title menu ---------- */
.menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 22px;
}
.menu .pix-btn { min-height: 44px; padding: 10px 4px; font-size: 10px; }
@media (max-width: 420px) { .menu { grid-template-columns: repeat(2, 1fr); } }
.account { margin-top: 18px; }
.account .pix-btn { font-size: 9px; line-height: 1.6; }
.signed-in { color: var(--muted); font-size: 18px; margin: 0; }
.signed-in a, .links a { color: var(--brass-light); }
.links { margin: 18px 0 0; font-size: 17px; color: var(--muted); }

/* ---------- Big moment banner ---------- */
.banner {
  position: fixed;
  left: 50%;
  top: 30%;
  z-index: 20;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  pointer-events: none;
  text-align: center;
  animation: stamp 0.5s cubic-bezier(.2,1.6,.4,1);
}
.banner strong {
  font: 30px "Press Start 2P", monospace;
  color: #fff;
  white-space: nowrap;
  text-shadow: 3px 3px 0 #1a1022, 0 0 18px var(--exact);
}
.banner span {
  font: 11px "Press Start 2P", monospace;
  color: var(--ink);
  background: var(--exact);
  padding: 6px 10px 4px;
}
.banner.express strong {
  font-size: 40px;
  color: #fff3b0;
  text-shadow: 4px 4px 0 #a8323c, 0 0 24px #f2c84b, 0 0 48px #ff5fa2;
  animation: wobble 0.5s steps(2) infinite;
}
.banner.express span { background: #f2c84b; }
@keyframes stamp { from { transform: translate(-50%, -50%) scale(2.4); opacity: 0; } }
@keyframes wobble { 50% { transform: rotate(-3deg) scale(1.05); } }
@media (max-width: 380px) { .banner.express strong { font-size: 30px; } }

/* ---------- Results extras ---------- */
.share-row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.share-note { min-height: 20px; margin: 8px 0; color: var(--exact); }
.unlock {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  margin: 4px 0 16px;
  padding: 12px;
  background: #2a1f0e;
  box-shadow: 0 -3px 0 #f2c84b, 0 3px 0 #f2c84b, -3px 0 0 #f2c84b, 3px 0 0 #f2c84b, 0 0 24px rgba(242,200,75,0.35);
  animation: cardIn 0.4s steps(4);
}
.unlock canvas { width: 56px; image-rendering: pixelated; }
.unlock b { display: block; font: 10px/1.5 "Press Start 2P", monospace; color: #f2c84b; }
.unlock span { display: block; font-size: 18px; line-height: 1.05; margin: 4px 0 8px; }
.unlock .pix-btn { font-size: 9px; padding: 8px 10px; }

.dist { display: grid; gap: 4px; margin: 0 0 14px; }
.bar-row { display: grid; grid-template-columns: 38px 1fr; gap: 8px; align-items: center; font-size: 16px; color: var(--muted); text-align: right; }
.bar-row i {
  display: block;
  font-style: normal;
  text-align: right;
  padding: 0 6px;
  color: var(--ink);
  background: #4b3a7a;
}
.bar-row.mine i { background: var(--orange); }

.ad-slot { margin: 14px 0 4px; min-height: 0; }
.ad-slot.demo {
  display: grid;
  place-items: center;
  height: 100px;
  font: 10px "Press Start 2P", monospace;
  color: var(--muted);
  border: 2px dashed #4b3a7a;
}
.results .menu { margin-top: 14px; }

/* ---------- Staff room ---------- */
.staff {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 56vh;
  overflow-y: auto;
  padding: 5px;
}
.staff li {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px;
  text-align: center;
  background: #0b0718;
  cursor: pointer;
  box-shadow: 0 -2px 0 #3a2d63, 0 2px 0 #3a2d63, -2px 0 0 #3a2d63, 2px 0 0 #3a2d63;
}
.staff li.locked { cursor: default; opacity: 0.75; }
.staff li.picked { box-shadow: 0 -3px 0 var(--orange), 0 3px 0 var(--orange), -3px 0 0 var(--orange), 3px 0 0 var(--orange); background: #24160a; }
.staff canvas { width: 56px; image-rendering: pixelated; }
.staff b { font: 8px/1.5 "Press Start 2P", monospace; color: var(--brass-light); }
.staff span { font-size: 15px; line-height: 1; color: var(--muted); }

/* ---------- Archive ---------- */
.archive {
  list-style: none;
  padding: 0 4px;
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
  max-height: 56vh;
  overflow-y: auto;
  padding: 5px;
}
.archive .pix-btn { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; font-size: 10px; }
.archive .done { color: var(--orange); }
.archive .empty { color: var(--muted); }

.everyone { margin: -4px 0 12px; font: 9px/1.6 "Press Start 2P", monospace; color: var(--cyan); }

/* ---------- Round 2 polish ---------- */
.pix-btn:focus-visible, .staff li:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}
#input:focus-visible { outline: none; }
.dlg .stats, .dlg .small { text-align: center; }
.results, .staff, .archive { scrollbar-color: #4b3a7a transparent; }
.start-score { margin: 6px 0 0; font-size: 19px; color: var(--brass-light); }
.floors-off { margin: -6px 0 12px; font-size: 20px; color: var(--muted); }
.unlock { display: grid; gap: 10px; grid-template-columns: none; padding: 0; background: none; box-shadow: none; }
.unlock-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 12px;
  background: #2a1f0e;
  box-shadow: 0 -3px 0 #f2c84b, 0 3px 0 #f2c84b, -3px 0 0 #f2c84b, 3px 0 0 #f2c84b, 0 0 24px rgba(242,200,75,0.35);
  animation: cardIn 0.4s steps(4);
}
.unlock-card canvas { width: 56px; image-rendering: pixelated; }
.unlock-card b { display: block; font: 10px/1.5 "Press Start 2P", monospace; color: #f2c84b; }
.unlock-card span { display: block; font-size: 18px; line-height: 1.05; margin: 4px 0 8px; }
.unlock-card .pix-btn { font-size: 9px; padding: 8px 10px; }
.answers { margin: 4px 0 14px; text-align: left; }
.answers summary {
  cursor: pointer;
  list-style: none;
  padding: 12px;
  font: 10px "Press Start 2P", monospace;
  color: var(--brass-light);
  background: #0006;
}
.answers summary::-webkit-details-marker { display: none; }
.answers summary::before { content: "▸ "; }
.answers[open] summary::before { content: "▾ "; }
.answers .recap { margin-top: 8px; }
.countdown { margin: 4px 0 14px; }

/* Phone keyboard open: shrink the layout to the visible area, drop the card */
.kb .layout { bottom: var(--kb, 0px); }
.kb .card { display: none; }
.kb .suggestions { top: auto; bottom: calc(100% + 10px); }
.heat.express { background: #ff3d8f; color: #fff; }

.quip { display: block; margin-top: 6px; font-size: 18px; color: var(--muted); font-style: italic; }
.start-next { margin: 6px 0 0; font-size: 17px; color: var(--muted); }
.start-next:empty { display: none; }
#source { white-space: normal; line-height: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#wipe { position: fixed; inset: 0; z-index: 15; background: #0d0820; pointer-events: none; opacity: 0; transition: opacity 0.22s steps(4); }
#wipe.on { opacity: 1; }

/* ---------- Round 3 ---------- */
.pin {
  position: fixed;
  left: 50%;
  z-index: 6;
  transform: translateX(-50%);
  padding: 6px 10px 4px;
  font: 10px "Press Start 2P", monospace;
  color: var(--ink);
  background: var(--orange);
  box-shadow: 0 0 14px rgba(255,155,47,0.6);
  pointer-events: none;
  animation: blinkOpacity 1.2s steps(2) infinite;
}
.peek { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 3px; text-align: left; }
.peek li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: baseline; padding: 3px 8px; font-size: 18px; background: #0006; }
.peek li b { font: 9px "Press Start 2P", monospace; color: var(--muted); }
.peek li i { font-style: normal; font-size: 16px; color: var(--muted); white-space: nowrap; }
.peek li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek li.answer { background: #14361f; }
.peek li.answer b, .peek li.answer span { color: var(--exact); }
.peek li.guessed span { color: var(--brass-light); }
.versus { margin: -4px 0 12px; font: 10px/1.6 "Press Start 2P", monospace; color: var(--brass-light); }
.rules { margin: 0 0 12px; padding-left: 18px; line-height: 1.1; }
.rules li { margin-bottom: 8px; }
.stops li.r-express {
  color: #f2c84b;
  background: #1d1140;
  text-shadow: none;
  box-shadow: 0 -3px 0 #f2c84b, 0 3px 0 #a8801c, -3px 0 0 #f2c84b, 3px 0 0 #a8801c, 0 0 16px rgba(242,200,75,0.8);
}
.heat.express { background: #1d1140; color: #f2c84b; box-shadow: 0 0 0 2px #f2c84b; }
.peek-wrap { margin: 0 0 12px; text-align: left; }
.peek-wrap summary { cursor: pointer; list-style: none; font: 9px "Press Start 2P", monospace; color: var(--brass-light); padding: 6px 0; }
.peek-wrap summary::-webkit-details-marker { display: none; }
.peek-wrap summary::before { content: "▸ "; }
.peek-wrap[open] summary::before { content: "▾ "; }
.peek-wrap .peek { margin-top: 6px; }

/* ---------- Wide screens: tower on the left, guess panel centered on the right ---------- */
@media (min-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 460px;
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    padding: 18px 48px;
  }
  .hud { grid-column: 1; grid-row: 1; }
  .hole { grid-column: 1; grid-row: 2; }
  .panel { grid-column: 2; grid-row: 1 / span 2; align-self: center; max-width: 460px; }
  .banner, .pin { left: calc((100% - 460px - 96px) / 2 + 48px); }
}

.card .kicker { line-height: 1.7; }
.results-box { background: #120b26; }
.versus-grid { display: block; font-size: 16px; margin: 0 auto 12px; width: fit-content; }
#playToday { margin-bottom: 14px; }
.stops li.r-express { font-size: 14px; }
.climb { font-size: 15px !important; color: var(--brass-light) !important; }
.results .menu { margin: 0 0 14px; }
.results-box { min-width: 0; overflow: hidden; }
.results-box > * { max-width: 100%; }
.results .grid { white-space: pre-wrap; font-size: 15px; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere; }
.versus-grid { font-size: 14px; }
.results-box { position: relative; }
.close-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; font-size: 14px; }

/* Results taller than the screen: start at the top so it all scrolls (centering clipped the top). */
.overlay.results { display: block; }
.overlay.results .results-box { margin: 0 auto; }
@media (max-width: 600px) {
  .overlay.results { padding: 12px 10px 24px; }
  .close-x { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 14px; z-index: 12; box-shadow: 0 -3px 0 #4b3a7a, 0 3px 0 #160f2c, -3px 0 0 #4b3a7a, 3px 0 0 #160f2c, 0 4px 14px #000a; }
}

/* Google sign-in */
.account-note { margin: 0 0 8px; font-size: 18px; color: var(--muted); }
.google-btn { display: flex; justify-content: center; min-height: 44px; color-scheme: light; }
.google-btn[hidden] { display: none; }
.res-account { margin: 0 0 14px; }
