/* ============================================================
   Halcyon Bay — Driving Prototype
   Layout only. Two real faces: desktop-primary + phone-touch.
   ============================================================ */

:root {
  --coral:   #ff5d73;
  --cyan:    #34e5e8;
  --amber:   #ffc24b;
  --ink:     #0d1220;
  --ink-2:   #161d31;
  --paper:   #f4ede0;
  --hud-bg:  rgba(11, 16, 28, 0.72);
  --hud-line: rgba(52, 229, 232, 0.35);
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --disp: "Arial Black", "Helvetica Neue", Impact, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%; height: 100%;
  background: #05070d;
  overflow: hidden;
  font-family: var(--mono);
  color: var(--paper);
  overscroll-behavior: none;
  touch-action: none;
}

#game-root { position: fixed; inset: 0; width: 100vw; height: 100vh; }

#game-canvas {
  display: block;
  width: 100%; height: 100%;
  image-rendering: auto;
  background: #10131c;
}

/* ============================================================
   HUD
   ============================================================ */
#hud {
  position: absolute; inset: 0;
  pointer-events: none;
  padding: clamp(10px, 2vw, 22px);
  z-index: 10;
}
#hud-top-left  { position: absolute; top: clamp(10px,2vw,22px); left: clamp(10px,2vw,22px); }
#hud-top-right { position: absolute; top: clamp(10px,2vw,22px); right: clamp(10px,2vw,22px); text-align: right; }
#hud-bottom-left { position: absolute; bottom: clamp(10px,2vw,22px); left: clamp(10px,2vw,22px); }

.hud-panel {
  background: var(--hud-bg);
  border: 1px solid var(--hud-line);
  border-radius: 10px;
  padding: 10px 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

/* Speedometer */
#speedo { min-width: 168px; }
.speedo-value {
  font-family: var(--disp);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 0.9;
  letter-spacing: -1px;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(52,229,232,0.45);
}
.speedo-unit {
  font-family: var(--mono);
  font-size: 12px; margin-left: 6px; color: var(--paper); opacity: 0.7;
  letter-spacing: 1px;
}
.speedo-bar {
  margin-top: 8px; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.12); overflow: hidden;
}
#speed-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--amber) 70%, var(--coral));
  transition: width 0.06s linear;
}
.speedo-gear {
  margin-top: 8px; font-size: 11px; letter-spacing: 3px;
  color: var(--amber); opacity: 0.85;
}

/* Hint panel */
.hud-hint { max-width: 260px; }
.hint-title {
  font-family: var(--disp); font-size: 14px; letter-spacing: 1px;
  color: var(--coral);
}
.hint-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1px;
  color: var(--ink); background: var(--amber);
  padding: 1px 5px; border-radius: 4px; vertical-align: middle;
  margin-left: 4px;
}
.hint-body {
  margin-top: 6px; font-size: 11px; line-height: 1.55; opacity: 0.82;
}
.hint-body b { color: var(--cyan); font-weight: 700; }

/* ============================================================
   WANTED / HEAT STARS (System 5)
   ============================================================ */
.hud-wanted {
  margin-bottom: 10px;
  min-width: 168px;
  text-align: right;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-color: rgba(255,59,48,0.4);
}
.hud-wanted.active { opacity: 1; transform: translateY(0); }
/* while cooling (searching, no LOS), the whole panel pulses + desaturates */
.hud-wanted.cooling { border-color: rgba(52,229,232,0.5); animation: coolPulse 1.1s ease-in-out infinite; }
@keyframes coolPulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.wanted-label {
  font-family: var(--disp); font-size: 13px; letter-spacing: 2px;
  color: var(--coral);
}
.hud-wanted.cooling .wanted-label { color: var(--cyan); }
.wanted-stars { margin-top: 4px; font-size: 20px; line-height: 1; letter-spacing: 2px; }
.wstar { color: rgba(255,255,255,0.16); transition: color 0.2s ease, text-shadow 0.2s ease; }
.wstar.lit { color: var(--coral); text-shadow: 0 0 10px rgba(255,59,48,0.7); }
.hud-wanted.cooling .wstar.lit { color: var(--cyan); text-shadow: 0 0 10px rgba(52,229,232,0.6); animation: starFlick 0.9s ease-in-out infinite; }
@keyframes starFlick { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.wanted-sub {
  margin-top: 5px; font-size: 10px; letter-spacing: 1px; opacity: 0.75; color: var(--paper);
  min-height: 12px;
}

/* Telemetry */
.hud-tele {
  font-size: 10px; line-height: 1.6; opacity: 0.7;
  min-width: 150px; white-space: pre;
}
.hud-tele .k { color: var(--amber); }
.hud-tele .v { color: var(--cyan); }

/* ============================================================
   BUST CARD — cartoon "PINCHED!" (System 5)
   ============================================================ */
#bust-card {
  position: absolute; inset: 0; z-index: 45;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 50%, rgba(255,59,48,0.28), rgba(5,7,13,0.82) 70%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#bust-card.hidden { opacity: 0; }
.bust-inner { text-align: center; transform: rotate(-4deg); }
.bust-word {
  font-family: var(--disp);
  font-size: clamp(56px, 15vw, 150px);
  letter-spacing: -2px; color: var(--amber);
  text-shadow: 0 0 40px rgba(255,59,48,0.8), 6px 6px 0 rgba(255,59,48,0.5);
  animation: bustPop 0.4s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes bustPop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.bust-sub {
  margin-top: 12px; font-size: clamp(12px,2.4vw,16px); opacity: 0.9; color: var(--paper);
  letter-spacing: 1px;
}

/* ============================================================
   TITLE SCREEN
   ============================================================ */
#title-screen {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255,93,115,0.22), transparent 55%),
    radial-gradient(120% 90% at 50% 110%, rgba(52,229,232,0.22), transparent 55%),
    #070a12;
  transition: opacity 0.5s ease;
}
#title-screen.hidden { opacity: 0; pointer-events: none; }
.title-inner { text-align: center; padding: 24px; max-width: 640px; }
.title-kicker {
  font-size: 11px; letter-spacing: 4px; color: var(--cyan); opacity: 0.8;
  margin-bottom: 14px;
}
.title-word {
  font-family: var(--disp);
  font-size: clamp(48px, 12vw, 108px);
  line-height: 0.86; letter-spacing: -3px;
  color: var(--paper);
  text-shadow: 0 0 30px rgba(255,93,115,0.35);
}
.title-word .title-bay {
  display: block; color: var(--coral);
  text-shadow: 0 0 34px rgba(255,93,115,0.6);
}
.title-sub {
  margin-top: 18px; font-size: 14px; opacity: 0.8; line-height: 1.6;
}
#start-btn {
  margin-top: 26px;
  font-family: var(--disp); font-size: 22px; letter-spacing: 3px;
  color: var(--ink); background: var(--cyan);
  border: none; border-radius: 12px;
  padding: 16px 54px; cursor: pointer;
  box-shadow: 0 0 30px rgba(52,229,232,0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  pointer-events: auto;
}
#start-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 42px rgba(52,229,232,0.75); }
#start-btn:active { transform: translateY(1px) scale(0.99); }
.title-controls {
  margin-top: 34px; display: flex; gap: 40px; justify-content: center;
  flex-wrap: wrap;
}
.tc-col { display: flex; flex-direction: column; gap: 5px; font-size: 11px; opacity: 0.85; text-align: left; }
.tc-h { font-family: var(--disp); font-size: 12px; letter-spacing: 2px; color: var(--amber); margin-bottom: 4px; }
.tc-col b { color: var(--cyan); }
.title-foot { margin-top: 30px; font-size: 10px; opacity: 0.4; letter-spacing: 1px; }

/* ============================================================
   TOUCH CONTROLS — hidden on desktop, shown on coarse pointers
   ============================================================ */
#touch-controls {
  position: absolute; inset: 0; z-index: 20;
  pointer-events: none;
  display: none;
}
.touch-steer {
  position: absolute; bottom: 26px; left: 20px;
  display: flex; gap: 16px;
}
.touch-drive {
  position: absolute; bottom: 26px; right: 20px;
  display: flex; gap: 16px; align-items: flex-end;
}
.tbtn {
  pointer-events: auto;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(11,16,28,0.55);
  color: var(--paper);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  font-family: var(--disp);
  border-radius: 50%;
  width: 78px; height: 78px;
  font-size: 30px;
  display: flex; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
  transition: transform 0.06s ease, background 0.06s ease;
}
.tbtn:active, .tbtn.pressed { transform: scale(0.92); background: rgba(52,229,232,0.4); }
.tbtn-gas   { border-color: var(--cyan);  color: var(--cyan);  width: 96px; height: 96px; font-size: 36px; }
.tbtn-brake { border-color: var(--coral); color: var(--coral); }
.tbtn-hb    { border-color: var(--amber); color: var(--amber); font-size: 12px; letter-spacing: 1px; line-height: 1.1; border-radius: 16px; width: 74px; height: 74px; }
.tbtn-steer { border-color: var(--paper); font-size: 40px; }

/* Coarse-pointer / narrow devices get touch controls + phone HUD tweaks */
body.touch-face #touch-controls { display: block; }
body.touch-face #hud-top-right { max-width: 44%; }
body.touch-face .hud-hint { display: none; }        /* hint is on the title screen for phone */
body.touch-face #telemetry { display: none; }       /* keep phone HUD clean */
body.touch-face #hud-bottom-left { display: none; }
/* WANTED panel MUST read on phone too (System 5) — keep it, compact it */
body.touch-face .hud-wanted { display: block; min-width: 118px; padding: 7px 10px; }
body.touch-face .wanted-stars { font-size: 16px; }
body.touch-face .wanted-label { font-size: 11px; }

/* Portrait phones: keep speedo compact top-left, nothing crowds thumbs */
@media (max-width: 820px) and (orientation: portrait) {
  #speedo { min-width: 128px; }
  .title-controls { gap: 22px; }
}

/* ============================================================
   SYSTEM 6 — ECONOMY, JOBS, GARAGE
   ============================================================ */

/* Clams wallet (top-left, under speedo) */
#wallet {
  margin-top: 10px; min-width: 168px;
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--disp);
}
.wallet-icon { color: var(--amber); font-size: 16px; }
#clams-num {
  font-size: clamp(20px, 3vw, 28px); color: var(--amber); letter-spacing: -0.5px;
  text-shadow: 0 0 12px rgba(255,194,75,0.4);
}
.wallet-unit { font-family: var(--mono); font-size: 11px; opacity: 0.6; letter-spacing: 1px; }
#clams-num.bump { animation: clamBump 0.4s cubic-bezier(.2,1.5,.4,1); }
@keyframes clamBump { 0% { transform: scale(1.5); color: var(--cyan);} 100% { transform: scale(1); } }

/* Active job tracker (bottom-center-ish, above minimap on desktop) */
#job-tracker {
  position: absolute; bottom: clamp(10px,2vw,22px); left: 50%; transform: translateX(-50%);
  min-width: 260px; max-width: 340px; text-align: left;
  border-color: rgba(255,194,75,0.4);
}
#job-tracker.hidden { display: none; }
.jt-row { display: flex; justify-content: space-between; align-items: center; }
.jt-tag {
  font-family: var(--disp); font-size: 12px; letter-spacing: 2px; color: var(--amber);
}
.jt-timer {
  font-family: var(--disp); font-size: 20px; color: var(--cyan);
  text-shadow: 0 0 10px rgba(52,229,232,0.4);
}
.jt-timer.urgent { color: var(--coral); text-shadow: 0 0 12px rgba(255,93,115,0.7); animation: urgentPulse 0.6s ease-in-out infinite; }
@keyframes urgentPulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }
.jt-obj { margin-top: 6px; font-size: 12px; line-height: 1.4; opacity: 0.9; }
.jt-pay { margin-top: 4px; font-size: 12px; color: var(--amber); font-family: var(--disp); letter-spacing: 1px; }

/* Job banner (a giver's line) — bottom center, above the tracker */
#job-banner {
  position: absolute; bottom: clamp(90px, 14vh, 130px); left: 50%; transform: translateX(-50%);
  width: min(560px, 88vw);
  background: linear-gradient(180deg, rgba(16,22,38,0.95), rgba(9,12,22,0.95));
  border: 1px solid var(--hud-line); border-left: 4px solid var(--amber);
  border-radius: 12px; padding: 16px 20px; z-index: 30;
  box-shadow: 0 10px 40px rgba(0,0,0,0.55);
  pointer-events: auto;
  animation: bannerIn 0.28s cubic-bezier(.2,1,.3,1) both;
}
#job-banner.hidden { display: none; }
@keyframes bannerIn { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.jb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.jb-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px;
  color: var(--ink); background: var(--amber); padding: 2px 8px; border-radius: 5px;
}
.jb-giver { font-family: var(--disp); font-size: 14px; letter-spacing: 0.5px; color: var(--paper); }
.jb-text { font-size: 14px; line-height: 1.55; color: var(--paper); font-style: italic; opacity: 0.95; }
.jb-actions { margin-top: 14px; display: flex; align-items: center; gap: 16px; }
#jb-accept {
  font-family: var(--disp); font-size: 15px; letter-spacing: 1px;
  color: var(--ink); background: var(--cyan); border: none; border-radius: 9px;
  padding: 10px 22px; cursor: pointer; pointer-events: auto;
  box-shadow: 0 0 20px rgba(52,229,232,0.4); transition: transform 0.1s ease;
}
#jb-accept:hover { transform: translateY(-1px) scale(1.03); }
#jb-accept:active { transform: translateY(1px); }
.jb-key { font-family: var(--mono); font-size: 10px; opacity: 0.7; }
.jb-decline { font-size: 11px; opacity: 0.5; letter-spacing: 1px; }
/* accept/success/fail lines have no button */
#job-banner.line .jb-actions { display: none; }
#job-banner.success { border-left-color: var(--cyan); }
#job-banner.fail { border-left-color: var(--coral); }

/* Job toast (payout / warn) — center screen, brief */
#job-toast {
  position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
  font-family: var(--disp); font-size: clamp(20px, 4vw, 34px); letter-spacing: 0.5px;
  padding: 12px 28px; border-radius: 12px; z-index: 35; text-align: center;
  background: rgba(9,12,22,0.85); border: 1px solid var(--hud-line);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: toastIn 0.3s cubic-bezier(.2,1.4,.4,1) both;
}
#job-toast.hidden { display: none; }
#job-toast.success { color: var(--amber); border-color: rgba(255,194,75,0.5); text-shadow: 0 0 20px rgba(255,194,75,0.5); }
#job-toast.fail { color: var(--coral); border-color: rgba(255,93,115,0.5); }
#job-toast.info { color: var(--paper); font-size: clamp(15px,2.6vw,20px); }
@keyframes toastIn { from { transform: translate(-50%, -8px) scale(0.9); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }

/* ============================================================
   GARAGE MENU
   ============================================================ */
#garage-menu {
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 30%, rgba(255,176,58,0.14), transparent 55%),
              rgba(5,7,13,0.92);
  pointer-events: auto;
  transition: opacity 0.25s ease;
}
#garage-menu.hidden { display: none; }
.gm-inner {
  width: min(1040px, 94vw); max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(18,24,40,0.98), rgba(10,14,24,0.98));
  border: 1px solid var(--hud-line); border-radius: 18px; padding: 26px 30px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.gm-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.gm-kicker { font-size: 11px; letter-spacing: 3px; color: var(--cyan); opacity: 0.8; }
.gm-title { font-family: var(--disp); font-size: clamp(26px,4vw,40px); color: var(--paper); letter-spacing: -1px; margin-top: 4px; }
.gm-wallet { font-family: var(--disp); font-size: 22px; color: var(--amber); text-shadow: 0 0 12px rgba(255,194,75,0.4); }
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.gm-card {
  background: rgba(11,16,28,0.7); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.gm-card.owned { border-color: rgba(52,229,232,0.4); }
.gm-card.current { border-color: var(--cyan); box-shadow: 0 0 24px rgba(52,229,232,0.25); }
.gm-card.locked { opacity: 0.9; }
.gmc-top { display: flex; justify-content: space-between; align-items: baseline; }
.gmc-name { font-family: var(--disp); font-size: 18px; color: var(--paper); letter-spacing: 0.3px; }
.gmc-price { font-family: var(--disp); font-size: 16px; color: var(--amber); }
.gmc-price.free { color: var(--cyan); }
.gmc-blurb { font-size: 11px; line-height: 1.5; opacity: 0.7; min-height: 32px; }
.gmc-stats { display: flex; flex-direction: column; gap: 5px; }
.gmc-stat { display: flex; align-items: center; gap: 8px; font-size: 10px; }
.gmc-stat .lbl { width: 62px; letter-spacing: 1px; opacity: 0.7; text-transform: uppercase; }
.gmc-dots { display: flex; gap: 3px; }
.gmc-dot { width: 9px; height: 9px; border-radius: 2px; background: rgba(255,255,255,0.14); }
.gmc-dot.on { background: var(--cyan); box-shadow: 0 0 5px rgba(52,229,232,0.5); }
.gmc-dot.wt.on { background: var(--amber); box-shadow: 0 0 5px rgba(255,194,75,0.5); }
.gmc-actions { margin-top: 4px; display: flex; gap: 8px; }
.gmc-btn {
  flex: 1; font-family: var(--disp); font-size: 13px; letter-spacing: 1px;
  border: none; border-radius: 8px; padding: 10px; cursor: pointer; pointer-events: auto;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.gmc-btn:active { transform: translateY(1px); }
.gmc-btn.buy { background: var(--amber); color: var(--ink); }
.gmc-btn.buy:disabled { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); cursor: not-allowed; }
.gmc-btn.switch { background: var(--cyan); color: var(--ink); }
.gmc-btn.incar { background: rgba(52,229,232,0.15); color: var(--cyan); border: 1px solid var(--cyan); cursor: default; }
.gmc-btn.sell { background: transparent; color: var(--coral); border: 1px solid rgba(255,93,115,0.5); flex: 0 0 auto; padding: 10px 12px; }
.gm-foot { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gm-msg { font-size: 12px; opacity: 0.85; letter-spacing: 0.5px; min-height: 16px; }
.gm-msg.ok { color: var(--cyan); }
.gm-msg.no { color: var(--coral); }
#gm-close {
  font-family: var(--disp); font-size: 15px; letter-spacing: 1px;
  color: var(--ink); background: var(--paper); border: none; border-radius: 10px;
  padding: 12px 28px; cursor: pointer; pointer-events: auto;
}
#gm-close:hover { filter: brightness(1.1); }

/* Touch context-action button (ACCEPT / GARAGE) */
.tbtn-action {
  position: absolute; bottom: 130px; right: 20px;
  width: auto; height: auto; border-radius: 14px; padding: 12px 18px;
  font-size: 13px; letter-spacing: 1px; border-color: var(--amber); color: var(--amber);
  background: rgba(11,16,28,0.7);
}
.tbtn-action.hidden { display: none; }

/* ============================================================
   SYSTEM 7 — SECRETS & EXPLORATION
   ============================================================ */

/* Secrets counter (top-left, under wallet) */
#secrets-panel {
  margin-top: 10px; min-width: 168px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; align-items: center;
  position: relative;
}
.sec-row { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px; }
.sec-ico { font-size: 12px; width: 14px; text-align: center; }
.sec-ico.pkg { color: var(--amber); }
.sec-ico.flm { color: var(--coral); }
.sec-ico.jmp { color: var(--cyan); }
.sec-pct {
  grid-column: 1 / -1; margin-top: 3px; text-align: right;
  font-family: var(--disp); font-size: 15px; color: var(--paper); letter-spacing: 0.5px;
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 4px;
}
.sec-pct.tick { animation: pctTick 0.45s cubic-bezier(.2,1.5,.4,1); }
@keyframes pctTick { 0% { transform: scale(1.5); color: var(--amber); } 100% { transform: scale(1); } }

/* Airtime readout (mid-jump) — big, center-ish, glowy */
#airtime {
  position: absolute; top: 30%; left: 50%; transform: translateX(-50%);
  font-family: var(--disp); font-size: clamp(40px, 9vw, 84px); letter-spacing: -1px;
  color: var(--cyan); z-index: 36; text-align: center;
  text-shadow: 0 0 30px rgba(52,229,232,0.7), 0 6px 0 rgba(52,229,232,0.25);
  pointer-events: none;
}
#airtime.hidden { display: none; }
#airtime span { font-size: 1.1em; }
#airtime.land { animation: airLand 0.4s cubic-bezier(.2,1.4,.4,1) both; color: var(--amber); text-shadow: 0 0 30px rgba(255,194,75,0.7); }
@keyframes airLand { 0% { transform: translateX(-50%) scale(1.3); } 100% { transform: translateX(-50%) scale(1); } }

/* Secret toast (a find) — center-top, punchy, brief. Sits just under the job
   toast band so a payout + a find never overlap. */
#secret-toast {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
  font-family: var(--disp); font-size: clamp(16px, 3vw, 26px); letter-spacing: 0.5px;
  padding: 9px 22px; border-radius: 11px; z-index: 35; text-align: center;
  background: rgba(9,12,22,0.85); border: 1px solid var(--hud-line);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: toastIn 0.3s cubic-bezier(.2,1.4,.4,1) both; pointer-events: none;
}
#secret-toast.hidden { display: none; }
#secret-toast.success { color: var(--amber); border-color: rgba(255,194,75,0.5); text-shadow: 0 0 18px rgba(255,194,75,0.45); }
#secret-toast.info { color: var(--cyan); border-color: rgba(52,229,232,0.5); }

/* Rooster line — hint / milestone / reveal. Lower band, italic, quiet by
   default; "loud" (a milestone/reveal fired) gets an amber highlight. */
#rooster-line {
  position: absolute; bottom: clamp(72px, 11vh, 100px); left: 50%; transform: translateX(-50%);
  width: min(600px, 90vw); text-align: center;
  font-family: var(--mono); font-size: 12px; line-height: 1.5; font-style: italic;
  color: rgba(244,237,224,0.72); z-index: 29; pointer-events: none;
  background: rgba(9,12,22,0.55); border-radius: 9px; padding: 7px 16px;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
#rooster-line.hidden { display: none; }
#rooster-line.loud {
  color: var(--amber); font-style: normal; font-family: var(--disp); font-size: 13px; letter-spacing: 0.3px;
  border: 1px solid rgba(255,194,75,0.4); box-shadow: 0 0 24px rgba(255,194,75,0.2);
  animation: roosterPop 0.35s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes roosterPop { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Phone tweaks for System 7 */
body.touch-face #secrets-panel { min-width: 128px; margin-top: 8px; padding: 6px 10px; gap: 2px 10px; }
body.touch-face .sec-row { font-size: 11px; }
body.touch-face .sec-pct { font-size: 13px; }
body.touch-face #rooster-line { bottom: auto; top: 128px; width: min(70vw, 320px); font-size: 10px; padding: 5px 10px; }
body.touch-face #airtime { top: 24%; }
body.touch-face #secret-toast { font-size: clamp(13px, 3.4vw, 18px); top: 8%; }

/* Phone tweaks for System 6 */
body.touch-face #wallet { min-width: 128px; margin-top: 8px; padding: 6px 10px; }
body.touch-face #job-banner { bottom: auto; top: 12px; width: min(94vw, 460px); padding: 12px 14px; }
body.touch-face .jb-text { font-size: 12px; }
body.touch-face #jb-accept { display: none; } /* phone uses the ACTION button */
body.touch-face #job-tracker { bottom: auto; top: 92px; left: 12px; transform: none; min-width: 0; max-width: 60vw; padding: 8px 10px; }
body.touch-face .gm-grid { grid-template-columns: 1fr; }
body.touch-face .gm-inner { padding: 18px; }
