/* Brain Rocket — a 1600×900 game scaled to fit any window. The layout stretches to fill the tab
   (no black bars) and the world picture behind it keeps its shape, covering the whole stage. */
:root {
  --ink: #f4f7ff;
  --muted: #b9c3e6;
  --panel: rgba(14, 20, 48, 0.78);
  --panel-edge: rgba(255, 255, 255, 0.14);
  --accent: #ffd23f;
  --hot: #ff5d73;
  --cool: #4fd1ff;
  --good: #7ddc6f;
  --t1: #c9d1e3;
  --t2: #6fe08a;
  --t3: #4fb3ff;
  --t4: #c77dff;
  --t5: #ffc531;
  --font: 'Fredoka', 'Nunito', 'Trebuchet MS', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; }
body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; }

/* the padding keeps the game clear of phone notches and rounded corners */
#viewport {
  position: fixed; inset: 0; background: #000;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
#stage {
  position: absolute; left: 0; top: 0;
  overflow: hidden; overflow: clip;   /* clip: nothing (a focused button, the oversized world) can scroll the game sideways */
  width: 1600px; height: 900px;   /* fit() stretches one of these to fill the tab */
  transform-origin: 0 0;
  overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
#stage input { user-select: text; -webkit-user-select: text; }
#world { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; overflow: hidden; }
#scene, #sceneOld { position: absolute; inset: 0; width: 1600px; height: 900px; display: block; }
#sceneOld.hidden { display: none; }
/* tab switch: the old world slides out as the new one slides in, timed with the tab highlight */
:root { --slide: 0.55s cubic-bezier(.65,0,.35,1); }
#scene.sliding, #sceneOld.sliding { transition: transform var(--slide); }

.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud {
  position: absolute; left: 120px; right: 24px; top: 20px;
  display: flex; gap: 14px; align-items: stretch;
  animation: drop-in 0.5s cubic-bezier(.2,1.4,.4,1);
}
.hud-spacer { flex: 1; }
.hud-pill {
  background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 22px;
  padding: 8px 20px 10px; display: flex; flex-direction: column; justify-content: center;
  backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  min-width: 150px;
}
.pill-label { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.pill-value { font-size: 34px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pill-sub { font-size: 15px; color: var(--muted); }
.score-pill .pill-value { color: var(--accent); }
.score-pill.bump .pill-value { animation: bump 0.4s ease; }
.alt-pill { min-width: 330px; }
.streak-pill { min-width: 140px; }
.streak-pill .flame { display: inline-block; filter: grayscale(1) opacity(0.5); transition: filter 0.3s; }
.streak-pill.hot .flame { filter: none; animation: flicker 0.5s infinite alternate; }
.streak-pill.blazing { border-color: #ff9a3c; box-shadow: 0 0 24px rgba(255,140,40,0.6); }
.streak-pill.cosmic { border-color: #c77dff; box-shadow: 0 0 30px rgba(199,125,255,0.8); }
.fuel { display: flex; gap: 6px; margin-top: 6px; }
.cell {
  width: 22px; height: 34px; border-radius: 6px; border: 2px solid rgba(255,255,255,0.5);
  background: linear-gradient(#7dff9c, #1fbf55); box-shadow: 0 0 10px rgba(125,255,156,0.5);
  transition: all 0.3s;
}
.cell.empty { background: rgba(255,255,255,0.08); box-shadow: none; border-color: rgba(255,255,255,0.2); }
.cell.lost { animation: cell-lost 0.8s ease; }

.icon-btn {
  width: 64px; border-radius: 20px; border: 2px solid var(--panel-edge); background: var(--panel);
  color: var(--ink); font-size: 26px; display: grid; place-items: center;
  transition: transform 0.15s, background 0.2s;
}
.icon-btn:hover { transform: scale(1.06); background: rgba(40,52,110,0.9); }

/* ---------- Track ---------- */
#track { position: absolute; left: 22px; top: 22px; bottom: 22px; width: 80px; }
.track-line { position: absolute; left: 38px; top: 24px; bottom: 24px; width: 6px; border-radius: 3px; background: rgba(255,255,255,0.15); overflow: hidden; }
.track-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(to top, #4fd1ff, #c77dff, #ffd23f); border-radius: 3px; }
#trackStops { position: absolute; inset: 0; }
.stop {
  position: absolute; left: 22px; width: 38px; height: 38px; margin-top: -19px;
  display: grid; place-items: center; font-size: 20px; border-radius: 50%;
  background: rgba(10,14,36,0.85); border: 2px solid rgba(255,255,255,0.2);
  filter: grayscale(0.8) brightness(0.8); transition: all 0.4s;
}
.stop.reached { filter: none; border-color: var(--accent); box-shadow: 0 0 12px rgba(255,210,63,0.6); }
.stop .stop-name {
  position: absolute; left: 82px; white-space: nowrap; font-size: 14px; font-weight: 600;
  background: rgba(10,14,36,0.85); padding: 2px 8px; border-radius: 8px; opacity: 0; transition: opacity 0.2s;
}
.stop.next .stop-name, .stop:hover .stop-name { opacity: 1; }
.stop.next { border-color: var(--cool); filter: none; animation: pulse 1.6s infinite; }
.track-rocket { position: absolute; left: 70px; font-size: 26px; margin-top: -16px; transform: rotate(-45deg); transition: top 0.2s linear; filter: drop-shadow(0 0 6px rgba(255,200,80,0.8)); }

/* ---------- Question card ---------- */
#card {
  position: absolute; right: 30px; top: 150px; width: 600px;
  background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 30px;
  padding: 26px 30px 22px; backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  animation: card-in 0.5s cubic-bezier(.2,1.3,.4,1);
}
#card.swap { animation: card-swap 0.45s cubic-bezier(.2,1.3,.4,1); }
#card.shake { animation: shake 0.4s; }
#card.blur .q-text { filter: blur(10px); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chip { background: rgba(255,255,255,0.12); padding: 6px 16px; border-radius: 999px; font-size: 20px; font-weight: 600; }
.q-num { color: var(--muted); font-size: 18px; }
.q-text { font-size: 36px; line-height: 1.3; font-weight: 500; min-height: 140px; transition: filter 0.2s; }
.q-text b { color: var(--accent); font-weight: 700; }
.ltr {
  display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px;
  margin: 0 2px; border-radius: 12px; font-weight: 700; font-size: 32px; vertical-align: middle;
  background: linear-gradient(#ffe27a, #ffb52e); color: #3b2300; box-shadow: 0 4px 0 #c47a00;
  transform: translateY(-3px);
}

.timer { margin: 18px 0 16px; }
.timer-track { position: relative; height: 22px; background: rgba(255,255,255,0.1); border-radius: 999px; overflow: hidden; }
.zone { position: absolute; top: 0; bottom: 0; }
.zone-x2 { left: 75%; right: 0; background: rgba(255,210,63,0.18); }
.zone-x15 { left: 50%; right: 25%; background: rgba(79,209,255,0.12); }
.timer-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff5d73, #ffd23f 40%, #7ddc6f); }
.timer.low .timer-fill { animation: low-pulse 0.5s infinite alternate; }
.timer-info { display: flex; justify-content: space-between; margin-top: 8px; font-size: 18px; }
.speed-badge { font-weight: 700; color: var(--accent); transition: color 0.2s; }
.speed-badge.x15 { color: var(--cool); }
.speed-badge.x1 { color: var(--muted); }
.timer-secs { font-variant-numeric: tabular-nums; font-weight: 600; }
.timer.low .timer-secs { color: var(--hot); }

#answerForm { display: flex; gap: 12px; }
#answer {
  flex: 1; font: inherit; font-size: 30px; padding: 14px 20px; border-radius: 18px;
  border: 3px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.95); color: #141a3a; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#answer:focus { border-color: var(--cool); box-shadow: 0 0 0 5px rgba(79,209,255,0.3); }
#answer:disabled { opacity: 0.6; }
.go-btn {
  font-size: 24px; font-weight: 700; padding: 0 24px; border: 0; border-radius: 18px; color: #fff;
  background: linear-gradient(#ff7a8c, #e8364f); box-shadow: 0 6px 0 #a3182d; transition: transform 0.1s, box-shadow 0.1s;
}
.go-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #a3182d; }
.go-btn:disabled { filter: grayscale(0.6); }

.feedback { min-height: 34px; margin-top: 12px; font-size: 21px; color: #ffb3bf; }
.feedback.ok { color: var(--good); }
.feedback.bad { color: #ff5d73; font-weight: 700; }
.hint-cost { margin-left: 8px; font-size: 16px; color: #ffb3bf; letter-spacing: 0; }
.stat s.lost { font-size: 20px; color: #ff8a9b; opacity: 0.8; margin-left: 6px; }
.reveal { margin-top: 4px; font-size: 19px; color: var(--muted); line-height: 1.6; animation: fade-up 0.35s ease; }
.reveal .ans { display: inline-block; padding: 2px 12px; border-radius: 999px; margin: 3px 4px 0 0; font-weight: 600; background: rgba(255,255,255,0.08); }
.tier-1 { color: var(--t1); } .tier-2 { color: var(--t2); } .tier-3 { color: var(--t3); }
.tier-4 { color: var(--t4); } .tier-5 { color: var(--t5); }

.card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 12px; }
.skip-btn { background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.18); color: var(--ink); border-radius: 14px; padding: 8px 16px; font-size: 17px; font-weight: 600; }
.skip-btn:hover:not(:disabled) { background: rgba(255,255,255,0.18); }
.skip-btn:disabled { opacity: 0.4; cursor: default; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: flex-end; font-size: 13px; font-weight: 600; }
.legend span::before { content: '●'; margin-right: 3px; }
.legend .t1 { color: var(--t1); } .legend .t2 { color: var(--t2); } .legend .t3 { color: var(--t3); }
.legend .t4 { color: var(--t4); } .legend .t5 { color: var(--t5); }

/* ---------- Popups near the rocket ---------- */
#popups { position: absolute; inset: 0; pointer-events: none; }
.popup {
  position: absolute; transform: translate(-50%, 0); text-align: center; 
  animation: pop-rise 2.2s cubic-bezier(.2,.9,.3,1) forwards;
  text-shadow: 0 3px 0 rgba(0,0,0,0.35), 0 0 18px rgba(0,0,0,0.4);
}
.popup .pts { font-size: 72px; font-weight: 700; line-height: 1; }
.popup .rarity { font-size: 28px; font-weight: 700; letter-spacing: 0.08em; }
.popup .tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px auto 0; width: 380px; }
.popup .tag { font-size: 20px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,0.45); text-shadow: none; }
.popup.legendary .pts { animation: rainbow 0.8s linear infinite; }
.popup.miss { animation-duration: 1.6s; }
.popup.miss .pts { font-size: 48px; color: var(--hot); }

/* ---------- Milestone banner ---------- */
#banner {
  position: absolute; left: 120px; right: 680px; top: 150px; text-align: center; pointer-events: none;
  animation: banner 3.2s cubic-bezier(.2,1.2,.4,1) forwards;
}
#banner .b-icon { font-size: 96px; display: block; animation: spin-in 0.8s cubic-bezier(.2,1.4,.4,1); }
#banner .b-small { font-size: 26px; letter-spacing: 0.2em; color: var(--accent); font-weight: 700; }
#banner .b-name { font-size: 64px; font-weight: 700; line-height: 1.05; text-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 30px rgba(120,180,255,0.6); }
#banner .b-dist { font-size: 22px; color: var(--muted); margin-top: 6px; }

/* ---------- Countdown ---------- */
#countdown {
  position: absolute; left: 0; right: 640px; top: 230px; text-align: center; pointer-events: none;
  font-size: 220px; font-weight: 700; color: #fff; text-shadow: 0 8px 0 rgba(0,0,0,0.3), 0 0 50px rgba(255,210,63,0.8);
}
#countdown.tick { animation: count 0.9s ease forwards; }

/* ---------- Screens ---------- */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 60px; }
#pause, #over { justify-content: center; padding: 0; background: rgba(4,6,20,0.55); backdrop-filter: blur(3px); animation: fade 0.3s; }
.title-panel { width: 820px; text-align: center; animation: card-in 0.7s cubic-bezier(.2,1.3,.4,1); }
.logo { margin: 0; font-size: 120px; line-height: 0.9; font-weight: 700; letter-spacing: 0.02em; }
.logo span { display: block; }
.logo .logo-brain { display: inline-block; position: relative; }
.logo .logo-by {
  position: absolute; left: -30px; top: 16px; z-index: 2;
  font-size: 30px; font-style: normal; line-height: 1; font-weight: 700; letter-spacing: 0.04em; color: #ffd23f;
  text-shadow: 0 3px 0 #8a2b1a, 0 0 14px rgba(255,210,63,0.55);
  transform: rotate(-30deg); transform-origin: left bottom; white-space: nowrap;
  animation: by-pulse 1.6s ease-in-out infinite;
}
/* "SirSC's" sits just over the corner of the B and gently pulses bigger and smaller */
@keyframes by-pulse {
  0%, 100% { transform: rotate(-30deg) scale(1); }
  50% { transform: rotate(-30deg) scale(1.16); }
}
@media (prefers-reduced-motion: reduce) { .logo .logo-by { animation: none; } }
.logo span:first-child { color: #fff; text-shadow: 0 8px 0 #2b3a8a, 0 0 40px rgba(79,209,255,0.6); }
.logo span:last-of-type { background: linear-gradient(#ffe27a, #ff7a3c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 0 #8a2b1a); animation: float 3s ease-in-out infinite; }
.tagline { font-size: 24px; margin: 18px auto 26px; max-width: 680px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,40,0.7); }
.modes { display: flex; gap: 18px; justify-content: center; }
.mode-card {
  width: 250px; padding: 20px 16px 18px; border-radius: 28px; border: 3px solid rgba(255,255,255,0.35);
  color: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 8px 0 rgba(0,0,0,0.3), 0 16px 30px rgba(0,0,0,0.3);
  transition: transform 0.18s cubic-bezier(.2,1.6,.4,1), box-shadow 0.18s;
}
.mode-card:hover, .mode-card:focus-visible { transform: translateY(-8px) scale(1.04); box-shadow: 0 14px 0 rgba(0,0,0,0.3), 0 24px 40px rgba(0,0,0,0.35); outline: none; }
.mode-card:active { transform: translateY(2px); }
.mode-easy { background: linear-gradient(160deg, #5fe08a, #1f9e5a); }
.mode-medium { background: linear-gradient(160deg, #5fb4ff, #2f5fd8); }
.mode-hard { background: linear-gradient(160deg, #ff7a8c, #b5203e); }
.mode-icon { font-size: 56px; animation: float 2.4s ease-in-out infinite; }
.mode-medium .mode-icon { animation-delay: -0.8s; }
.mode-hard .mode-icon { animation-delay: -1.6s; }
.mode-name { font-size: 38px; font-weight: 700; letter-spacing: 0.04em; line-height: 1; }
.mode-tag { font-size: 16px; font-weight: 700; background: rgba(0,0,0,0.22); border-radius: 999px; padding: 2px 12px; }
.mode-info { font-size: 16px; opacity: 0.95; margin-top: 6px; line-height: 1.35; }
.mode-best { font-size: 15px; font-weight: 600; margin-top: 6px; min-height: 20px; color: #fff6c8; }
.how {
  margin: 24px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; text-align: left;
  background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 22px; padding: 16px 22px; font-size: 17px; color: var(--muted);
}
.how b { color: var(--ink); }
.corner-btns { position: absolute; left: 24px; top: 24px; display: flex; gap: 10px; }
.corner-btns .icon-btn { height: 60px; }
#btnPause { height: auto; }

.dialog {
  background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 32px; padding: 34px 44px;
  text-align: center; min-width: 520px; box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  animation: card-in 0.5s cubic-bezier(.2,1.3,.4,1);
}
.dialog h2 { font-size: 64px; margin: 0; line-height: 1.05; }
.dialog p { font-size: 22px; color: var(--muted); }
.dialog-btns { display: flex; gap: 14px; justify-content: center; margin-top: 22px; }
.big-btn {
  font-size: 26px; font-weight: 700; padding: 14px 30px; border-radius: 20px; border: 0; color: #fff;
  background: linear-gradient(#ff7a8c, #e8364f); box-shadow: 0 6px 0 #a3182d; transition: transform 0.12s;
}
.big-btn:hover { transform: translateY(-2px); }
.big-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a3182d; }
.big-btn.ghost { background: rgba(255,255,255,0.12); box-shadow: 0 6px 0 rgba(0,0,0,0.3); }
.over-dialog { width: 720px; }
.over-reached { font-size: 26px !important; color: #fff !important; }
.over-reached b { color: var(--accent); }
/* small stats share each row evenly (3 or 4 of them); wide ones take a whole row */
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.stat { flex: 1 1 0; min-width: 0; background: rgba(255,255,255,0.07); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.stat .s-label { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat .s-value { font-size: 30px; font-weight: 700; }
.stat.wide { flex-basis: 100%; }
.stat.wide .s-value { font-size: 24px; }
.new-best { display: inline-block; font-size: 26px; font-weight: 700; color: #3b2300; background: linear-gradient(#ffe27a, #ffb52e); padding: 6px 20px; border-radius: 999px; margin-bottom: 10px; animation: bump 0.6s ease 3; }

/* ---------- Animations ---------- */
@keyframes drop-in { from { transform: translateY(-120%); } to { transform: none; } }
@keyframes card-in { from { transform: translateX(60px) scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes card-swap { 0% { transform: scale(0.94) rotate(-1deg); opacity: 0.4; } 100% { transform: none; opacity: 1; } }
@keyframes shake { 0%,100% { transform: none; } 20% { transform: translateX(-14px) rotate(-1deg); } 40% { transform: translateX(12px) rotate(1deg); } 60% { transform: translateX(-8px); } 80% { transform: translateX(6px); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes flicker { from { transform: scale(1) rotate(-6deg); } to { transform: scale(1.18) rotate(6deg); } }
@keyframes cell-lost { 0% { transform: scale(1); background: #ff5d73; } 50% { transform: scale(1.4) rotate(12deg); } 100% { transform: scale(1); } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(79,209,255,0.6); } 50% { box-shadow: 0 0 0 8px rgba(79,209,255,0); } }
@keyframes low-pulse { from { filter: brightness(1); } to { filter: brightness(1.6); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop-rise {
  0% { opacity: 0; transform: translate(-50%, 30px) scale(0.4); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1.15); }
  22% { transform: translate(-50%, -10px) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -150px) scale(0.95); }
}
@keyframes rainbow { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@keyframes banner {
  0% { opacity: 0; transform: scale(0.5); }
  12% { opacity: 1; transform: scale(1.08); }
  20% { transform: scale(1); }
  82% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(0.96); }
}
@keyframes spin-in { from { transform: rotate(-200deg) scale(0); } to { transform: none; } }
@keyframes count { 0% { opacity: 0; transform: scale(2.2); } 25% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(0.7); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Rocket / Submarine switch ---------- */
.title-panel .logo { font-size: 104px; }
.tagline { margin: 12px auto 16px; }
.type-toggle { display: inline-flex; gap: 8px; padding: 6px; margin-bottom: 18px; border-radius: 24px; background: var(--panel); border: 2px solid var(--panel-edge); }
.type-btn {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  padding: 8px 20px; border-radius: 18px; border: 0; background: transparent; color: var(--muted); transition: background 0.2s, color 0.2s, transform 0.15s;
}
.type-btn:hover { color: var(--ink); }
.type-btn:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; }
.type-btn.active { background: linear-gradient(#ffe27a, #ffb52e); color: #3b2300; transform: scale(1.03); }
.type-icon { grid-row: span 2; font-size: 34px; }
.type-name { font-size: 24px; font-weight: 700; line-height: 1; }
.type-sub { font-size: 14px; font-weight: 600; opacity: 0.85; }
#title[data-type="sub"] .logo span:first-child { text-shadow: 0 8px 0 #0b3a6b, 0 0 40px rgba(79,209,255,0.8); }

/* ---------- Submarine HUD ---------- */
.time-pill { min-width: 150px; }
.time-pill .pill-value { color: var(--cool); }
.time-pill.low { border-color: var(--hot); box-shadow: 0 0 24px rgba(255,93,115,0.6); }
.time-pill.low .pill-value { color: var(--hot); animation: bump 1s ease infinite; }
#track.down .track-fill { top: 0; bottom: auto; background: linear-gradient(to bottom, #4fd1ff, #1a4f9e, #ff8a3c, #ffd23f); }
#track.down .track-rocket { transform: none; }
#card.dive .zone { display: none; }
#card.dive .timer-fill { background: linear-gradient(90deg, #ff5d73, #4fd1ff 40%, #7de8ff); }
#banner.dive { top: 600px; padding: 10px 18px; border-radius: 24px; background: rgba(6,12,30,0.55); backdrop-filter: blur(4px); }
#banner.dive .b-icon { font-size: 56px; display: inline-block; vertical-align: middle; }
#banner.dive .b-name { font-size: 52px; }

/* ---------- Dive length picker ---------- */
.type-toggle { align-items: center; }
.dive-len { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 8px 0 14px; border-left: 2px solid var(--panel-edge); }
.dive-len-label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.dive-len-btns { display: flex; gap: 4px; }
.dive-len-btns button { font-size: 17px; font-weight: 700; padding: 5px 12px; border-radius: 12px; border: 2px solid var(--panel-edge); background: transparent; color: var(--ink); }
.dive-len-btns button:hover { background: rgba(255,255,255,0.1); }
.dive-len-btns button:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; }
.dive-len-btns button.active { background: var(--cool); border-color: var(--cool); color: #052033; }

/* ---------- Ultra Hard ---------- */
.title-panel { width: 920px; }
.modes { gap: 14px; }
.mode-card { width: 216px; padding: 18px 12px 16px; }
.mode-name { font-size: 34px; }
.mode-info { font-size: 15px; }
.mode-ultra { background: linear-gradient(160deg, #7a3cff, #2a0f5c); border-color: rgba(255,120,200,0.6); }
.mode-ultra .mode-icon { animation-delay: -1.2s; }
.mode-ultra .mode-tag { background: rgba(255,80,160,0.45); }
.alt-pill.drifting { border-color: var(--hot); box-shadow: 0 0 22px rgba(255,93,115,0.55); }
.alt-pill.drifting .pill-sub { color: #ffb3bf; font-weight: 600; }
#title { padding-right: 36px; }

/* ---------- Ultra question difficulty ---------- */
.mode-ultra { cursor: pointer; }
.mode-ultra:focus-visible { outline: 3px solid #ff9ad5; outline-offset: 3px; }
.ultra-hint { font-size: 13px; font-weight: 600; margin-top: 6px; color: #ffd6f0; }
.ultra-picks { display: none; flex-direction: column; gap: 6px; width: 100%; margin-top: 6px; }
.mode-ultra.open { transform: translateY(-8px) scale(1.04); }
.mode-ultra.open .mode-info, .mode-ultra.open .ultra-hint { display: none; }
.mode-ultra.open .ultra-picks { display: flex; animation: fade-up 0.25s ease; }
.ultra-pick {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left;
  padding: 6px 10px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.35); background: rgba(0,0,0,0.25); color: #fff;
  transition: background 0.15s, transform 0.15s;
}
.ultra-pick:hover, .ultra-pick:focus-visible { background: rgba(255,120,200,0.45); transform: scale(1.03); outline: none; }
.ultra-pick .up-name { grid-row: span 2; font-size: 20px; font-weight: 700; min-width: 66px; }
.ultra-pick .up-sub { font-size: 12px; opacity: 0.9; }
.ultra-pick .mode-best { margin: 0; min-height: 0; font-size: 12px; }

.mode-ultra.open .mode-icon { font-size: 40px; }
.mode-ultra.open .mode-name { font-size: 28px; }
.ultra-picks { gap: 5px; }
.ultra-pick { padding: 4px 9px; grid-template-columns: auto 1fr; }
.ultra-pick .up-name { font-size: 17px; min-width: 60px; }
.ultra-pick .up-sub { font-size: 11px; }
.ultra-pick .mode-best:empty { display: none; }

/* ---------- Hints (Owen / Easy) ---------- */
.card-btns { display: flex; gap: 8px; }
.hint-btn { color: #ffe27a; border-color: rgba(255,226,122,0.45); }
.hint-btn:hover:not(:disabled) { background: rgba(255,226,122,0.15); }
.hint { margin-top: 12px; font-size: 20px; color: #ffe27a; font-weight: 600; animation: fade-up 0.3s ease; }
.hint-word { font-size: 26px; letter-spacing: 0.06em; color: #fff; white-space: pre-wrap; }
.skip-btn { white-space: nowrap; }

/* ---- Play With Friends ------------------------------------------------------- */
.ch-panel { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; text-align: left; margin-bottom: 16px; animation: card-in 0.5s cubic-bezier(.2,1.3,.4,1); }
.ch-panel.hidden { display: none; }
.ch-box { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 16px 18px; border-radius: 24px; background: var(--panel); border: 2px solid var(--panel-edge); }
.ch-box h3 { margin: 0; font-size: 24px; }
#chInput { font: inherit; font-size: 38px; font-weight: 700; letter-spacing: 0.16em; text-align: center; text-transform: uppercase; padding: 10px; border-radius: 18px; border: 3px solid var(--panel-edge); background: rgba(0,0,0,0.35); color: #fff; width: 100%; }
#chInput:focus { outline: none; border-color: var(--accent); }
#chInput::placeholder { font-size: 22px; letter-spacing: 0.04em; color: rgba(185,195,230,0.6); }
.ch-preview { min-height: 50px; font-size: 18px; color: var(--muted); line-height: 1.3; }
.ch-preview.ok { color: var(--good); font-weight: 600; }
.ch-preview.bad { color: #ffb3bf; }
.ch-box .big-btn { font-size: 22px; padding: 11px 18px; }
.ch-box .big-btn:disabled { opacity: 0.45; cursor: default; transform: none; }
#chJoin { margin-top: auto; }
.ch-row { display: flex; gap: 6px; }
.ch-row button { flex: 1; font-size: 17px; font-weight: 700; padding: 7px 8px; border-radius: 14px; border: 2px solid var(--panel-edge); background: transparent; color: var(--ink); white-space: nowrap; }
.ch-row button:hover { background: rgba(255,255,255,0.1); }
.ch-row button:focus-visible, .ch-copy:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; }
.ch-row button.active { background: var(--accent); border-color: var(--accent); color: #2a1d00; }
.ch-made { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border-radius: 18px; background: rgba(0,0,0,0.35); border: 2px dashed var(--panel-edge); }
.ch-code { flex: 1; font-size: 34px; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); user-select: all; }
.ch-code.empty { color: rgba(185,195,230,0.45); letter-spacing: 0.1em; user-select: none; }
.ch-copy { font-size: 17px; font-weight: 700; padding: 9px 12px; border-radius: 14px; border: 0; background: var(--cool); color: #052033; }
.ch-copy:disabled { opacity: 0.4; cursor: default; }
.ch-host-btns { display: flex; gap: 8px; }
.ch-host-btns .big-btn { flex: 1; }
.q-num .ch-tag, .ch-tag { color: var(--accent); font-weight: 700; letter-spacing: 0.06em; }
#title[data-type="drill"] .modes { display: none; }
#title[data-type="drill"] .logo span:first-child { text-shadow: 0 8px 0 #4e2f19, 0 0 40px rgba(255,190,90,0.7); }
.type-toggle .type-btn { min-width: 0; padding: 8px 14px; column-gap: 8px; }
.type-toggle .type-icon { font-size: 30px; }
.type-toggle .type-name { font-size: 22px; white-space: nowrap; }
.type-toggle .type-sub { font-size: 13px; white-space: nowrap; }
.type-toggle .dive-len { padding: 0 4px 0 10px; }

/* ---- Warden Chat promo (home screen, bottom left) ---------------------------- */
.promo-btn {
  position: absolute; left: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 2px solid var(--panel-edge); box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: transform 0.15s, border-color 0.15s;
}
.promo-btn:hover { transform: translateY(-2px); border-color: var(--cool); }
.promo-btn:focus-visible { outline: 3px solid var(--cool); outline-offset: 3px; }
.promo-icon { font-size: 26px; }
.promo-text { display: flex; flex-direction: column; line-height: 1.1; }
.promo-text b { font-size: 18px; }
.promo-text small { font-size: 12px; color: var(--muted); font-weight: 600; }
.promo-arrow { font-size: 16px; color: var(--cool); font-weight: 700; }

/* ---- Title layout: the logo, tagline and tab bar sit in the same place in every mode ---- */
#title { align-items: flex-start; padding-top: 48px; }
#title .tagline { min-height: 62px; display: flex; align-items: center; justify-content: center; margin: 10px auto 12px; }
.type-toggle { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-bottom: 0; isolation: isolate; }
.type-toggle .type-btn { position: relative; z-index: 1; padding: 8px 10px; column-gap: 7px; background: transparent !important; transform: none !important; transition: color 0.3s; }
.type-toggle .type-btn[hidden] { display: none; }
.type-toggle .type-btn.active { color: #3b2300; }
.type-glider {
  position: absolute; left: 0; top: 6px; bottom: 6px; z-index: 0; border-radius: 18px;
  background: linear-gradient(#ffe27a, #ffb52e); box-shadow: 0 4px 14px rgba(255,180,40,0.45);
  transition: transform var(--slide), width var(--slide);
}
.type-glider.instant { transition: none; }
.type-extra { position: relative; height: 60px; }
.type-extra .dive-len {
  position: absolute; top: 6px; transform: translate(-50%, -14px); opacity: 0; pointer-events: none;
  flex-direction: column; padding: 6px 12px 8px; border: 2px solid var(--panel-edge); border-radius: 18px; background: var(--panel);
  transition: transform 0.35s cubic-bezier(.2,1.3,.4,1), opacity 0.25s;
}
.type-extra .dive-len::before { content: ''; position: absolute; left: 50%; top: -9px; margin-left: -8px; border: 8px solid transparent; border-top: 0; border-bottom-color: var(--panel-edge); }
.type-extra .dive-len.open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; transition-delay: 0.25s; }
.type-toggle .type-name { font-size: 20px; }
.type-toggle .type-icon { font-size: 27px; }

/* The mode cards and the Play With Friends panel share one fixed-height slot, so the rules box
   underneath sits in the same place in every mode. It blurs while the scene slides across. */
.title-panel .modes, .title-panel .ch-panel { height: 284px; margin-bottom: 0; box-sizing: border-box; }
.title-panel .modes { align-items: flex-start; }
.title-panel .ch-preview { min-height: 44px; }
.title-panel .how { margin-top: 18px; height: 128px; box-sizing: border-box; align-content: center; transition: filter 0.25s, opacity 0.25s; }
.title-panel .how.switching { filter: blur(5px); opacity: 0.55; }

/* ---- Submarine: pick a dive length after picking a difficulty ---------------- */
.modes { position: relative; }
.time-pick {
  position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  padding: 16px 14px; border-radius: 26px; box-sizing: border-box;
  background: linear-gradient(160deg, #1d7fc4, #0b3a6b); border: 3px solid rgba(160,230,255,0.7);
  box-shadow: 0 14px 0 rgba(0,0,0,0.3), 0 24px 40px rgba(0,0,0,0.35);
  transform: translateY(-8px) scale(1.04); opacity: 0; transition: opacity 0.2s;
}
.time-pick.open { opacity: 1; animation: fade-up 0.25s ease; }
.tp-title { font-size: 24px; font-weight: 700; text-align: center; }
.tp-mode { font-size: 13px; font-weight: 600; color: #bfe9ff; text-align: center; margin-top: -6px; }
.tp-len { display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: 16px; border: 2px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); color: #fff; }
.tp-len b { font-size: 26px; line-height: 1; }
.tp-len small { font-size: 12px; color: #bfe9ff; font-weight: 600; margin-top: 2px; }
.tp-len:hover, .tp-len:focus-visible { background: #4fd1ff; color: #052033; outline: none; }
.tp-len:hover small, .tp-len:focus-visible small { color: #052033; }
.tp-len.last { border-color: #ffd23f; }
.tp-close { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border-radius: 10px; border: 0; background: rgba(255,255,255,0.15); color: #fff; font-size: 14px; }
.tp-close:hover { background: rgba(255,255,255,0.3); }

/* compact enough to fit inside any card, with the ✕ clear of the title */
.time-pick { padding: 12px 10px 10px; gap: 6px; overflow: hidden; }
.tp-title { font-size: 20px; padding: 0 28px; line-height: 1.1; }
.tp-mode { font-size: 12px; margin-top: -4px; }
.tp-len { flex: 1; min-height: 0; justify-content: center; padding: 4px 6px; }
.tp-len b { font-size: 22px; }
.tp-len small { font-size: 11px; }
.tp-close { right: 8px; top: 8px; width: 26px; height: 26px; font-size: 12px; }
#title[data-type="elev"] .logo span:first-child { text-shadow: 0 8px 0 #4a3a6a, 0 0 40px rgba(255,210,120,0.6); }
.time-pill.bump { animation: bump 0.4s ease; }
/* breathing room between the tab bar and the cards, so a lifted card never overlaps the bar */
.title-panel .modes, .title-panel .ch-panel { margin-top: 30px; }

/* ---- Haunted Flight (limited time) ---------------------------------------------------------- */
.type-toggle { overflow: visible; }
.type-toggle .type-haunt { position: relative; }
.ltd-badge {
  position: absolute; top: -14px; right: 6px; z-index: 2; padding: 3px 10px; border-radius: 999px; overflow: hidden; isolation: isolate;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.55); box-shadow: 0 2px 12px rgba(255,140,40,0.55);
  /* a rainbow that keeps sliding along, under an orange layer that fades away and back */
  background: linear-gradient(90deg, #ff3b3b, #ff9a1a, #ffe14a, #4cd964, #3fa9ff, #8a5cff, #ff4fd8, #ff3b3b);
  background-size: 300% 100%;
  animation: ltd-rainbow 3s linear infinite;
}
.ltd-badge::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #ff7a1a, #ff9a3c);
  animation: ltd-orange 6s ease-in-out infinite;
}
@keyframes ltd-rainbow { to { background-position: 300% 0; } }
@keyframes ltd-orange { 0%, 15% { opacity: 1; } 40%, 75% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ltd-badge, .ltd-badge::before { animation: none; } }
#title[data-type="haunt"] .logo span:first-child { text-shadow: 0 8px 0 #3a1460, 0 0 40px rgba(255,140,40,0.75); }
#title[data-type="haunt"] .tagline { color: #ffd9b0; }

/* the HUD has no journey track on the left, and the ghost pill shows how safe you are */
#hud.haunt { left: 24px; }
#hud.haunt .alt-pill { min-width: 300px; transition: border-color 0.3s, box-shadow 0.3s; }
#hud.haunt .alt-pill[data-chase="safe"] .pill-value { color: #7ddc6f; }
#hud.haunt .alt-pill[data-chase="near"] { border-color: #ffb02e; }
#hud.haunt .alt-pill[data-chase="near"] .pill-value { color: #ffb02e; }
#hud.haunt .alt-pill[data-chase="danger"] { border-color: var(--hot); box-shadow: 0 0 26px rgba(255,93,115,0.7); }
#hud.haunt .alt-pill[data-chase="danger"] .pill-value { color: var(--hot); animation: bump 0.5s ease infinite; }
.icon-btn:disabled { opacity: 0.35; cursor: default; transform: none; }

/* the question card runs along the bottom, so the chase has the whole width above it */
#card.haunt {
  left: 24px; right: 24px; top: auto; bottom: 18px; width: auto; padding: 16px 26px 14px;
  display: grid; grid-template-columns: minmax(0, 1fr) 560px; column-gap: 30px; align-items: start;
}
#card.haunt .card-top { grid-column: 1; grid-row: 1; margin-bottom: 8px; }
#card.haunt .q-text { grid-column: 1; grid-row: 2 / span 3; font-size: 30px; min-height: 80px; }
#card.haunt .timer { grid-column: 1; grid-row: 5; margin: 10px 0 0; }
#card.haunt #answerForm { grid-column: 2; grid-row: 1 / span 2; }
#card.haunt .hint { grid-column: 2; grid-row: 3; margin-top: 8px; }
#card.haunt .feedback { grid-column: 2; grid-row: 4; min-height: 28px; margin-top: 6px; font-size: 18px; }
#card.haunt .reveal { grid-column: 2; grid-row: 4; }
#card.haunt .card-bottom { grid-column: 2; grid-row: 5; margin-top: 8px; }
#card.haunt .zone { display: none; }
#card.haunt .timer-track { height: 18px; }
#card.haunt .timer-fill { transition: background 0.3s; }
#card.haunt .timer-info { font-size: 17px; margin-top: 6px; }
#card.haunt .legend { font-size: 13px; }
.speed-badge.chase-safe { color: #7ddc6f; }
.speed-badge.chase-near { color: #ffb02e; }
.speed-badge.chase-danger { color: var(--hot); }
.skip-btn.risky { border-color: var(--hot); color: var(--hot); box-shadow: 0 0 14px rgba(255,93,115,0.5); }
#countdown.haunt { right: 0; top: 150px; }
#banner.haunt { left: 0; right: 0; top: 120px; }
#banner.haunt .b-icon { font-size: 64px; }
#banner.haunt .b-name { font-size: 52px; }
.speed-badge.chase-warn { color: #fff6c8; animation: low-pulse 0.25s infinite alternate; }

/* ---- Halloween event: a witch hat on the logo while Haunted Flight is running ---- */
/* it sits on top of the T in ROCKET, tipped 35° to the right, and floats with the word */
.logo .logo-rocket { position: relative; }
.logo-hat { display: none; position: absolute; left: 570px; top: -76px; width: 132px; height: 110px; transform: rotate(35deg); transform-origin: 50% 86%; filter: drop-shadow(0 6px 0 rgba(26,8,44,0.85)); pointer-events: none; }
.halloween .logo-hat { display: block; animation: hat-sway 3.2s ease-in-out infinite; }
@keyframes hat-sway { 50% { transform: rotate(30deg); } }
@media (prefers-reduced-motion: reduce) { .halloween .logo-hat { animation: none; } }

/* the pause menu's music switch */
.music-toggle {
  display: block; margin: 18px auto 0; padding: 8px 18px; border-radius: 999px; font: 600 18px var(--font);
  color: var(--ink); background: rgba(255,255,255,0.1); border: 2px solid var(--panel-edge); cursor: pointer;
}
.music-toggle:hover { background: rgba(255,255,255,0.18); }
.music-toggle:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; }
.music-toggle.off { color: var(--muted); }

/* ---- Phones held upright: ask to turn sideways ---- */
#rotate { display: none; }
@media (orientation: portrait) and (pointer: coarse) {
  #rotate {
    position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    padding: 24px; text-align: center; color: var(--ink); font-size: 20px; line-height: 1.4;
    background: radial-gradient(circle at 50% 40%, #1d2a6b, #070a1c 75%);
  }
  #rotate b { font-size: 26px; }
  .rotate-phone { font-size: 84px; animation: rotate-hint 2.4s ease-in-out infinite; }
}
@keyframes rotate-hint { 0%, 30% { transform: rotate(0deg); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { .rotate-phone { animation: none; } }

/* ---- Bullseye, the daily mode ------------------------------------------------------------------
   Its card sits under the rules on tall screens (.below) and down the left side otherwise (.side).
   Parchment and wood, like the archery range it opens. */
.daily-card {
  position: absolute; z-index: 3; box-sizing: border-box; color: #3b2611; text-align: center;
  background: linear-gradient(170deg, #fbefcf, #f0d9a2); border: 4px solid #7a4a24; border-radius: 24px;
  box-shadow: 0 10px 0 rgba(60,30,10,0.35), 0 20px 40px rgba(0,0,0,0.3), inset 0 0 0 3px rgba(255,255,255,0.35);
  padding: 30px 16px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: card-in 0.6s cubic-bezier(.2,1.3,.4,1);
}
.dc-ribbon {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%); padding: 4px 18px; border-radius: 8px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.2em; color: #fff; background: #c0392b; box-shadow: 0 3px 0 #7a1f16;
}
.dc-target {
  width: 132px; height: 132px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle, #ffd23f 0 19%, #e8364f 19% 38%, #2f8fe8 38% 57%, #2b2b38 57% 76%, #f6f2e6 76% 95%, #d7a84a 95%);
  box-shadow: 0 4px 0 rgba(60,30,10,0.3);
}
/* an arrow in the gold */
.dc-target i { position: absolute; left: 54%; top: 46%; width: 54px; height: 5px; background: #7a4a24; border-radius: 3px; transform: rotate(-35deg); transform-origin: 0 50%; }
.dc-target i::after { content: ''; position: absolute; right: -6px; top: -7px; border-left: 14px solid #e8364f; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.dc-text { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.dc-title { font-size: 34px; font-weight: 700; letter-spacing: 0.06em; line-height: 1; color: #7a1f16; text-shadow: 0 2px 0 rgba(255,255,255,0.6); }
.dc-num { font-size: 15px; font-weight: 600; color: #7a4a24; }
.dc-how { margin: 2px 0 0; font-size: 15px; line-height: 1.35; color: #4a3218; }
.dc-how b { color: #7a1f16; }
.dc-streak { font-size: 15px; font-weight: 700; color: #c0392b; min-height: 0; }
.dc-streak:empty { display: none; }
.dc-state { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.dc-btn {
  width: 100%; padding: 12px 10px; border-radius: 16px; border: 0; font: 700 19px var(--font); color: #fff; cursor: pointer;
  background: linear-gradient(#e8513f, #c0392b); box-shadow: 0 5px 0 #7a1f16; transition: transform 0.12s;
}
.dc-btn:hover { transform: translateY(-2px); }
.dc-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #7a1f16; }
.dc-btn:focus-visible { outline: 3px solid #2f8fe8; outline-offset: 3px; }
.dc-play { animation: dc-glow 2.4s ease-in-out infinite; }
@keyframes dc-glow { 50% { box-shadow: 0 5px 0 #7a1f16, 0 0 22px rgba(255,180,60,0.85); } }
@media (prefers-reduced-motion: reduce) { .dc-play { animation: none; } }
.dc-score { font-size: 16px; color: #7a4a24; }
.dc-score b { font-size: 34px; color: #7a1f16; }
.dc-grid { font-size: 21px; line-height: 1.15; letter-spacing: 2px; }
.dc-next { font-size: 13px; font-weight: 600; color: #7a4a24; }
.daily-card.side { justify-content: space-evenly; }
/* under the rules: one wide row (target · words · button) */
.daily-card.below { flex-direction: row; padding: 22px 26px 34px; gap: 24px; text-align: left; align-items: center; }
.daily-card.below .dc-target { width: 116px; height: 116px; }
.daily-card.below .dc-text { align-items: flex-start; flex: 1; min-width: 0; }
.daily-card.below .dc-state { width: 230px; flex: none; }
.daily-card.below .dc-next { position: absolute; right: 26px; bottom: 6px; }
.daily-card.below .dc-ribbon { left: 70px; }

/* in the game: a parchment question card and a big "aim for" badge */
#card.daily { background: linear-gradient(170deg, rgba(251,239,207,0.97), rgba(240,217,162,0.97)); border: 4px solid #7a4a24; color: #3b2611; }
#card.daily .q-text b { color: #7a1f16; }
#card.daily .chip { background: rgba(122,74,36,0.15); color: #3b2611; }
#card.daily .q-num { color: #7a4a24; font-weight: 600; }
#card.daily .zone { display: none; }
#card.daily .timer-track { background: rgba(122,74,36,0.2); }
#card.daily .timer-fill { background: linear-gradient(90deg, #c0392b, #e8a33c 40%, #7ab648); }
#card.daily .timer-secs { color: #3b2611; }
#card.daily .feedback { color: #a02818; }
#card.daily .feedback.ok { color: #2f7a1f; }
#card.daily .reveal { color: #4a3218; }
#card.daily .skip-btn { color: #4a3218; border-color: rgba(122,74,36,0.4); background: rgba(255,255,255,0.4); }
#card.daily .legend span { text-shadow: 0 1px 0 rgba(0,0,0,0.35); }
#card.daily .legend .t1, #card.daily .tier-1 { color: #6b7385; text-shadow: none; }
#card.daily .reveal .tier-1 { color: #6b7385; }
.aim-badge { padding: 6px 16px; border-radius: 999px; font-size: 20px; font-weight: 700; color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,0.25); animation: bump 0.5s ease; }
.tier-bg-1 { background: #7c8597; } .tier-bg-2 { background: #2f9a4a; } .tier-bg-3 { background: #2a7fd6; }
.tier-bg-4 { background: #8e44d6; } .tier-bg-5 { background: linear-gradient(90deg, #e09a00, #ffbf1f); color: #3b2300; }
#hud.daily .alt-pill { min-width: 240px; }
.speed-badge.tier-1 { color: #5a6275; } .speed-badge.tier-2 { color: #2f7a3a; } .speed-badge.tier-3 { color: #1f6cbc; }
.speed-badge.tier-4 { color: #7a2fc2; } .speed-badge.tier-5 { color: #b47a00; }
.daily-grid { font-size: 30px; line-height: 1.2; letter-spacing: 4px; }
.daily-grid-stat { align-items: center; }

/* ---- Accounts: the button on the home screen, the account dialog, notices and the results line ---- */
.acct-chip {
  position: absolute; right: 24px; top: 24px; height: 60px; display: flex; align-items: center; gap: 10px;
  padding: 0 18px 0 12px; border-radius: 18px; color: var(--ink); font-size: 22px; font-weight: 600;
  background: var(--panel); border: 2px solid var(--panel-edge); box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: transform 0.15s, border-color 0.15s; max-width: 300px;
}
.acct-chip:hover { transform: translateY(-2px); border-color: var(--cool); }
.acct-chip:focus-visible { outline: 3px solid var(--cool); outline-offset: 3px; }
.acct-chip.hidden { display: none; }
.acct-chip-icon { font-size: 26px; }
.acct-chip-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.acct-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; font-weight: 700; color: #1b1240; background: linear-gradient(135deg, #ffd23f, #ff8a5c);
}
.acct-avatar.big { width: 76px; height: 76px; font-size: 42px; }
.acct-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.synced .acct-dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
.syncing .acct-dot { background: var(--cool); animation: acct-pulse 0.9s ease-in-out infinite; }
.offline .acct-dot, .error .acct-dot { background: #ffb347; }
@keyframes acct-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .syncing .acct-dot { animation: none; } }

#acct { justify-content: center; padding: 0; background: rgba(4,6,20,0.62); backdrop-filter: blur(3px); animation: fade 0.25s; z-index: 30; }
.acct-dialog { position: relative; width: 600px; min-width: 0; padding: 30px 44px 26px; text-align: left; }
.acct-dialog h2 { font-size: 46px; text-align: center; }
.acct-dialog.busy { cursor: progress; }
.acct-sub, .acct-msg { font-size: 20px !important; text-align: center; margin: 8px 0 18px; line-height: 1.35; }
.acct-msg b { color: var(--ink); }
.acct-x {
  position: absolute; right: 16px; top: 16px; width: 48px; height: 48px; border-radius: 14px; border: 0;
  font-size: 22px; color: var(--muted); background: rgba(255,255,255,0.08);
}
.acct-x:hover { color: var(--ink); background: rgba(255,255,255,0.16); }
.acct-form { display: flex; flex-direction: column; gap: 14px; }
.af { display: flex; flex-direction: column; gap: 6px; }
.af-label { font-size: 18px; font-weight: 600; color: var(--muted); }
.af-wrap { position: relative; display: flex; }
.af-input {
  flex: 1; min-width: 0; font: inherit; font-size: 24px; color: var(--ink); padding: 12px 16px; border-radius: 16px;
  background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.18); outline: none;
}
.af-input[type="password"], .af-wrap .af-input { padding-right: 86px; }
.af-wrap .af-input:not([type="password"]):not([name="password"]):not([name="current"]) { padding-right: 16px; }
.af-input:focus { border-color: var(--cool); box-shadow: 0 0 0 3px rgba(79,209,255,0.25); }
.af-input[aria-invalid="true"] { border-color: var(--hot); box-shadow: 0 0 0 3px rgba(255,93,115,0.22); }
.af-input:disabled { opacity: 0.6; }
.af-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 10px;
  padding: 6px 10px; font-size: 16px; font-weight: 600; color: var(--muted); background: rgba(255,255,255,0.1);
}
.af-eye:hover { color: var(--ink); }
.af-hint { font-size: 16px; color: var(--muted); opacity: 0.85; }
.af-error { font-size: 19px; color: #ff9aa9; min-height: 0; line-height: 1.35; }
.af-error:empty { display: none; }
.af-error.info { color: var(--good); }
.acct-main { width: 100%; margin-top: 4px; }
.big-btn.danger { background: linear-gradient(#ff5d5d, #c4202f); box-shadow: 0 6px 0 #7d1019; }
.acct-link {
  border: 0; padding: 0; background: none; font: inherit; color: var(--cool); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}
.acct-link:hover { color: #9be6ff; }
.acct-link:disabled { opacity: 0.5; cursor: default; }
.acct-link.danger { color: #ff9aa9; font-size: 17px; }
.acct-forgot { align-self: flex-end; font-size: 17px; margin-top: -6px; }
.acct-foot { text-align: center; font-size: 19px !important; margin: 18px 0 0; }
.acct-big-icon { font-size: 64px; text-align: center; margin-top: 6px; }
.acct-who { display: flex; align-items: center; gap: 18px; margin: 18px 0 14px; }
.acct-who-text { display: flex; flex-direction: column; min-width: 0; }
.acct-who-text b { font-size: 32px; overflow: hidden; text-overflow: ellipsis; }
.acct-who-text small { font-size: 18px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.acct-sync { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--muted); padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,0.06); }
.acct-sync-text { flex: 1; line-height: 1.3; }
.acct-sync.offline, .acct-sync.error { color: #ffd59a; }
.acct-stats .stat .s-value { font-size: 26px; }
.acct-stats .stat .s-label { font-size: 13px; }
.acct-check { display: flex; gap: 12px; align-items: flex-start; font-size: 20px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.06); cursor: pointer; }
.acct-check input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--cool); }
.acct-check small { display: block; font-size: 16px; color: var(--muted); margin-top: 2px; }

.acct-toast {
  position: absolute; left: 50%; bottom: 34px; transform: translate(-50%, 30px); z-index: 35; max-width: 760px;
  padding: 14px 24px; border-radius: 18px; font-size: 21px; line-height: 1.35; text-align: center; color: var(--ink);
  background: rgba(14,20,48,0.95); border: 2px solid var(--panel-edge); box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.acct-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.acct-toast.good { border-color: rgba(125,220,111,0.6); }
.acct-toast.warn { border-color: rgba(255,179,71,0.7); }

.acct-note { margin-top: 14px; font-size: 19px; color: var(--muted); }
.acct-note b { color: var(--ink); }
.acct-note.synced { color: #a8eaa0; }
.acct-note.offline, .acct-note.error { color: #ffd59a; }
.dialog-btns .acct-main { width: auto; flex: 1; margin-top: 0; }
.wc-badge { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 15px; font-weight: 700; color: #bfe9ff; background: rgba(79,209,255,0.14); border: 1px solid rgba(79,209,255,0.35); padding: 2px 10px; border-radius: 999px; white-space: nowrap; vertical-align: 2px; }
.acct-sub .wc-badge { font-size: 17px; }
.wc-callout { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 16px; padding: 14px 16px; border-radius: 16px; font-size: 18px; line-height: 1.4; color: var(--ink); background: rgba(79,209,255,0.12); border: 2px solid rgba(79,209,255,0.35); }
.wc-callout-icon { font-size: 28px; line-height: 1; }
.acct-warn { margin: 0; font-size: 16px !important; color: #ffd59a !important; line-height: 1.35; }
.acct-foot.small { font-size: 16px !important; color: var(--muted); }
.acct-signup .af { gap: 4px; }
.acct-signup .acct-form { gap: 10px; }
.acct-signup .af-input { padding: 9px 16px; }
.acct-badge { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; margin-left: 8px; border-radius: 999px; font-size: 16px; font-weight: 700; color: #fff; background: var(--hot); vertical-align: 2px; }
.acct-chip .acct-badge { margin-left: 0; }
.acct-friends-btn { position: relative; }

.acct-friends { width: 640px; }
.fr-add { flex-direction: row; gap: 10px; }
.fr-add .af-wrap { flex: 1; }
.fr-add .af-input { padding-right: 16px; }
.dialog-btns .fr-send, .fr-add .fr-send { width: auto; flex: none; margin-top: 0; padding: 10px 26px; }
.acct-friends .af-error { margin-top: 10px; }
.fr-lists { max-height: 400px; overflow-y: auto; margin-top: 8px; padding-right: 6px; overscroll-behavior: contain; }
.fr-h { font-size: 17px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 16px 0 8px; font-weight: 600; }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.06); margin-bottom: 8px; }
.fr-row.req { background: rgba(255,93,115,0.1); border: 1px solid rgba(255,93,115,0.3); }
.fr-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fr-name b { font-size: 21px; overflow: hidden; text-overflow: ellipsis; }
.fr-name small { font-size: 16px; color: var(--muted); }
.fr-name small b { font-size: inherit; color: var(--accent); }
.fr-none { opacity: 0.75; }
.fr-btn { font: inherit; font-size: 16px; font-weight: 600; padding: 7px 14px; border-radius: 12px; border: 0; color: var(--ink); background: rgba(255,255,255,0.12); }
.fr-btn:hover { background: rgba(255,255,255,0.2); }
.fr-btn.yes { background: linear-gradient(#8ee07f, #4fb840); color: #0f2a0b; }
.fr-btn.subtle { background: none; color: var(--muted); }
.fr-btn.subtle:hover { color: var(--ink); background: rgba(255,255,255,0.1); }
.fr-btn.confirm { color: #fff; background: #c4202f; }
.fr-empty { font-size: 18px !important; color: var(--muted); margin: 6px 0; line-height: 1.4; }

.acct-board { margin-top: 14px; padding: 10px 14px; border-radius: 18px; background: rgba(255,255,255,0.07); font-size: 19px; color: var(--muted); }
.acct-board-h { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.acct-board-row { display: flex; align-items: center; gap: 10px; padding: 3px 6px; border-radius: 10px; color: var(--ink); text-align: left; }
.acct-board-row.me { background: rgba(255,210,63,0.14); }
.ab-rank { width: 34px; text-align: center; }
.ab-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-score { font-weight: 700; color: var(--accent); }
.acct-link.nowrap { white-space: nowrap; }

/* ---- Play With Friends: live races (js/race.js) ---- */
.race-panel { min-height: 268px; }
.race-gate { grid-column: 1 / -1; align-items: center; text-align: center; justify-content: center; padding: 22px 28px; }
.race-gate p { margin: 0; font-size: 19px; color: var(--muted); line-height: 1.4; max-width: 640px; }
.race-gate .ch-host-btns { margin-top: 6px; }
.rg-icon { font-size: 46px; line-height: 1; }
.race-join-row { display: flex; gap: 8px; }
#raceCode { flex: 1; min-width: 0; font: inherit; font-size: 32px; font-weight: 700; letter-spacing: 0.16em; text-align: center; text-transform: uppercase; padding: 6px 8px; border-radius: 18px; border: 3px solid var(--panel-edge); background: rgba(0,0,0,0.35); color: #fff; }
#raceCode:focus { outline: none; border-color: var(--accent); }
#raceCode::placeholder { font-size: 20px; letter-spacing: 0.04em; color: rgba(185,195,230,0.6); }
#raceJoinForm .ch-preview { min-height: 0; }
.race-invites { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.race-inv { flex: none; }
.race-inv-h { margin: 2px 0 0; font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.race-inv { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 14px; background: rgba(255,210,63,0.12); border: 1px solid rgba(255,210,63,0.35); }
.race-inv .acct-avatar { width: 32px; height: 32px; font-size: 18px; }
.race-inv-text { flex: 1; min-width: 0; font-size: 17px; line-height: 1.2; }
.race-inv-text small { display: block; font-size: 14px; color: var(--muted); }
.race-inv-none { margin: 0; font-size: 15px; color: var(--muted); }
.race-host-note { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.35; }
.type-btn { position: relative; }
.race-badge { position: absolute; top: -8px; right: 6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; background: var(--hot); box-shadow: 0 2px 6px rgba(0,0,0,0.4); }

#raceLobby { justify-content: center; padding: 0; background: rgba(4,6,20,0.62); backdrop-filter: blur(3px); animation: fade 0.25s; z-index: 25; }
.race-lobby { width: 820px; text-align: left; padding: 28px 40px; }
.race-lobby h2 { font-size: 50px; text-align: center; }
.rl-code { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 12px auto 4px; padding: 8px 10px 8px 18px; width: max-content; border-radius: 18px; background: rgba(0,0,0,0.35); border: 2px dashed var(--panel-edge); }
.rl-code-label { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.rl-code-val { font-size: 40px; font-weight: 700; letter-spacing: 0.18em; color: var(--accent); user-select: all; }
.rl-desc { text-align: center; font-size: 20px !important; margin: 4px 0 8px; }
.rl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.rl-list { max-height: 300px; overflow-y: auto; padding-right: 4px; }
.rl-list .fr-row { padding: 7px 10px; margin-bottom: 6px; }
.rl-list .fr-row.me { background: rgba(255,210,63,0.14); }
.rl-invited { font-size: 16px; color: var(--good); font-weight: 600; }
.rl-wait { text-align: center; font-size: 19px !important; margin: 10px 0 0; color: var(--ink) !important; }
.race-lobby .af-error { text-align: center; }
.race-lobby .dialog-btns { margin-top: 14px; }
.race-lobby .big-btn:disabled { opacity: 0.45; cursor: default; transform: none; }

.race-board { position: absolute; right: 30px; bottom: 26px; width: 360px; padding: 10px 12px; border-radius: 20px; background: var(--panel); border: 2px solid var(--panel-edge); box-shadow: 0 12px 30px rgba(0,0,0,0.35); z-index: 3; }
.rb-h { font-size: 14px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); margin: 0 4px 6px; display: flex; justify-content: space-between; }
.rb-h span { color: var(--muted); letter-spacing: 0.14em; }
.rb-row { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 10px; font-size: 18px; transition: background 0.3s; }
.rb-row.me { background: rgba(255,210,63,0.16); }
.rb-row.left { opacity: 0.5; }
.rb-row .acct-avatar { width: 28px; height: 28px; font-size: 16px; }
.rb-rank { width: 20px; text-align: center; font-weight: 700; color: var(--muted); }
.rb-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-score { font-weight: 700; color: var(--accent); }
.rb-flag { width: 22px; text-align: center; }
.race-marks { position: absolute; inset: 0; pointer-events: none; }
.race-marks.hidden { display: none; }
.race-mark { position: absolute; left: -6px; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 700; color: #1b1240; background: linear-gradient(135deg, #8fe3ff, #b48cff); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.4); transition: top 1.2s ease-out; }

.race-results { gap: 4px; }
.rr-row { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 12px; text-align: left; }
.rr-row.me { background: rgba(255,210,63,0.14); }
.rr-row.left { opacity: 0.55; }
.rr-row .acct-avatar { width: 32px; height: 32px; font-size: 18px; }
.rr-rank { width: 34px; text-align: center; font-size: 22px; }
.rr-name { flex: 1; min-width: 0; font-size: 21px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-score { font-size: 21px; font-weight: 700; color: var(--accent); }
.rr-wait { font-size: 17px; color: var(--muted); margin-top: 4px; }
#btnAgain:disabled { opacity: 0.5; cursor: default; transform: none; }
.race-pick { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; min-height: 34px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.race-chip, .race-pick-label { flex: none; }
.race-pick-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-panel .ch-box { min-height: 0; overflow: hidden; }
.race-pick-label { font-size: 16px; font-weight: 600; color: var(--muted); }
.race-pick-note { font-size: 16px; color: var(--muted); line-height: 1.35; }
.race-chip { font: inherit; font-size: 16px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 2px solid var(--panel-edge); background: transparent; color: var(--ink); }
.race-chip:hover { background: rgba(255,255,255,0.1); }
.race-chip.on { background: var(--good); border-color: var(--good); color: #0f2a0b; }
.race-chip:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; }
.rr-vote { font-size: 15px; font-weight: 700; color: var(--muted); min-width: 64px; text-align: right; }
.rr-vote.yes { color: var(--good); }
.race-gate .big-btn { white-space: nowrap; }

/* Warden profile pictures retain the existing avatar sizes and initials fallback. */
.acct-avatar[data-br-avatar] { position: relative; overflow: hidden; flex-shrink: 0; }
.acct-avatar[data-br-avatar] img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* ---- "You've been banned" (an admin suspended or banned the Warden Chat account) ---- */
#acctBan { justify-content: center; padding: 0; z-index: 40; background: rgba(30,4,10,0.78); backdrop-filter: blur(5px); animation: fade 0.3s; }
.ban-dialog { width: 640px; min-width: 0; border-color: rgba(255,93,115,0.55); box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 0 6px rgba(255,93,115,0.12); }
.ban-icon { font-size: 76px; line-height: 1; margin-bottom: 6px; }
.ban-dialog h2 { font-size: 50px; color: #ff8a9b; }
.ban-text { font-size: 22px !important; color: var(--ink) !important; margin: 10px 0; }
.ban-reason { text-align: left; font-size: 21px; line-height: 1.4; padding: 14px 18px; border-radius: 16px; background: rgba(255,93,115,0.12); border: 2px solid rgba(255,93,115,0.35); overflow-wrap: anywhere; }
.ban-label { display: block; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #ff9aa9; margin-bottom: 2px; }
.ban-when { font-size: 19px !important; margin: 12px 0 4px; }
.ban-when:empty { display: none; }
.ban-what { font-size: 18px !important; margin: 4px 0 0; }
.ban-dialog .big-btn { font-size: 20px; padding: 12px 20px; white-space: nowrap; }
.ban-dialog .big-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.ban-msg { font-size: 17px !important; min-height: 22px; margin: 10px 0 0; }
.acct-chip.restricted { border-color: rgba(255,93,115,0.6); }
.acct-ban-tag { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: #c4202f; padding: 3px 8px; border-radius: 999px; }
/* Outside the scaled world so the release stays in the viewport corner. */
#site-version { display: none; position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); z-index: 20; padding: 4px 8px; border-radius: 6px; color: #fff; background: rgba(14,20,48,.72); font: 600 12px/1.2 system-ui, sans-serif; pointer-events: none; }
body:has(#title:not(.hidden)) #site-version { display: block; }
