/* Kanpur Drive UI — modern, glassy, mobile-first (redesign 2026-11-04).
   Primary actions top-right (Gaadi, Cab, Where to, 🔊, ☰). Everything else lives in the ☰ menu or Settings.
   Popups (police, cab offers, garage) are bottom sheets so the road stays visible.
   Tokens are in :root. Phone rules: @media (max-width:640px), (max-height:480px) and body.touch.
   Bottom stacking on phones uses --dock (top of the pedal zone) and --nav-h (nav strip, when shown). */

:root {
  /* surfaces */
  --glass: rgba(17, 19, 27, .58); --glass-strong: rgba(19, 21, 30, .84); --glass-hud: rgba(17, 19, 27, .78); --solid: #14161e;
  --fill: rgba(255, 255, 255, .06); --fill-2: rgba(255, 255, 255, .10); --fill-3: rgba(255, 255, 255, .16);
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .16); --hi: inset 0 1px 0 rgba(255, 255, 255, .07);
  /* text */
  --txt: #f5f6f8; --muted: rgba(236, 239, 246, .64); --dim: rgba(236, 239, 246, .42);
  /* one vivid accent (Kanpur saffron) + status colours */
  --accent: #ff7a1a; --accent-2: #ffab5e; --accent-soft: rgba(255, 122, 26, .16); --accent-line: rgba(255, 122, 26, .42);
  --accent-grad: linear-gradient(135deg, #ff6a00 0%, #ff8f3a 55%, #ffb067 100%);
  --ok: #30d158; --info: #0a84ff; --warn: #ffd60a; --danger: #ff453a; --gold: #ffc21a;
  /* radius scale */
  --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 20px; --r-xl: 26px; --pill: 999px;
  /* layered shadows */
  --sh-1: 0 1px 2px rgba(0, 0, 0, .22), 0 4px 14px rgba(0, 0, 0, .22);
  --sh-2: 0 2px 6px rgba(0, 0, 0, .22), 0 12px 32px rgba(0, 0, 0, .34);
  --sh-3: 0 10px 30px rgba(0, 0, 0, .36), 0 30px 70px rgba(0, 0, 0, .44);
  --blur: blur(10px) saturate(150%); --blur-hud: none;   /* speed: blurring the live 3D canvas behind HUD bits costs a full repaint every frame */
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.3, 1.4, .5, 1);
  --gap: 12px; --edge: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}
/* no backdrop-filter support: solid fallbacks so text stays readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(20, 22, 31, .9); --glass-strong: rgba(20, 22, 31, .97); --glass-hud: rgba(20, 22, 31, .86); }
}
/* phones: the 3D canvas redraws every frame, so always-visible HUD bits skip blur; transient sheets keep a light blur */
body.touch { --blur: none; --blur-hud: none; --glass-hud: rgba(16, 18, 26, .8); --glass-strong: rgba(19, 21, 30, .92); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0e1016; font-family: var(--font); color: var(--txt); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss01"; }
body { --dock: 16px; --nav-h: 0px; }
#app canvas { display: block; cursor: grab; }
#app canvas:active { cursor: grabbing; }
button { font: inherit; cursor: pointer; color: inherit; -webkit-user-select: none; user-select: none; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
kbd { font: 600 9.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 5px; border-radius: 5px; background: var(--fill-2); color: var(--muted); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); }
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-2), var(--hi); }

/* ---------- loading ---------- */
#loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(120% 80% at 50% 30%, #1d1a1a 0%, #0e1016 60%); font-size: 14px; font-weight: 500; color: var(--muted); z-index: 30; transition: opacity .5s var(--ease); padding: 24px; text-align: center; }
#loading::before { content: ''; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--fill-2); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loading.hide, #intro.hide { opacity: 0; pointer-events: none; }
#loading.hide::before { animation: none; }

/* ---------- HUD (top-left): speed + place ---------- */
#hud { position: fixed; left: calc(var(--edge) + var(--safe-l)); top: calc(var(--edge) + var(--safe-t)); display: flex; gap: 8px; align-items: stretch; pointer-events: none; z-index: 5; }
.speedo, .info { background: var(--glass-hud); backdrop-filter: var(--blur-hud); -webkit-backdrop-filter: var(--blur-hud); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1), var(--hi); }
.speedo { padding: 9px 12px 8px; min-width: 86px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.speedo span { font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; line-height: .95; display: block; letter-spacing: -1.5px; }
.speedo small { color: var(--dim); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; margin-top: 2px; }
/* speed limit: like a real Indian road sign (white plate, red ring) */
#limitTag { display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; line-height: 1; margin-top: 6px; border: 2.5px solid #e5262d; border-radius: var(--pill); padding: 3px 7px 3px; background: #fff; color: #111; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.1px; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: background .2s, color .2s; }
#limitTag { display: none !important; }   /* owner 14 Nov: speed limit not shown */
#limitTag.over { background: #e5262d; color: #fff; border-color: #fff; animation: overPulse 1s ease-in-out infinite; }
@keyframes overPulse { 50% { box-shadow: 0 0 0 5px rgba(229, 38, 45, .35); } }
.info { padding: 9px 14px; max-width: 290px; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
#clock { font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .2px; }
#place { font-size: 15px; font-weight: 700; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.2px; }
#place::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); margin: 0 7px 2px 1px; vertical-align: middle; }
#rushTag, #wxTag { font-size: 11px; color: var(--muted); }
#rushTag:empty, #wxTag:empty, #targetInfo:empty, #nearby:empty { display: none; }
#targetInfo { font-size: 12px; color: var(--accent-2); font-weight: 600; margin-top: 2px; }
#nearby { font-size: 11px; margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); color: var(--muted); }
#nearby div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.55; }
#nearby i { opacity: .7; font-style: normal; font-variant-numeric: tabular-nums; }
#stats { display: none; position: fixed; left: calc(var(--edge) + var(--safe-l)); bottom: calc(10px + var(--safe-b)); font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--glass-hud); padding: 4px 10px; border-radius: var(--pill); pointer-events: none; }
body.showstats #stats { display: block; }
#vioTag { position: fixed; left: calc(var(--edge) + var(--safe-l)); top: calc(104px + var(--safe-t)); background: rgba(255, 69, 58, .9); color: #fff; padding: 5px 12px; border-radius: var(--pill); font-size: 11.5px; font-weight: 700; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s var(--ease); pointer-events: none; box-shadow: var(--sh-1); z-index: 5; }
#vioTag.show { opacity: 1; transform: none; }

/* ---------- primary actions (top-right) ---------- */
#topBtns { position: fixed; right: calc(var(--edge) + var(--safe-r)); top: calc(var(--edge) + var(--safe-t)); display: flex; gap: 6px; z-index: 12; }
#topBtns button { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 15px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--glass-hud); backdrop-filter: var(--blur-hud); -webkit-backdrop-filter: var(--blur-hud); box-shadow: var(--sh-1), var(--hi); font-size: 13.5px; font-weight: 600; letter-spacing: -.1px; transition: background .18s, border-color .18s, transform .12s var(--ease), box-shadow .18s; }
#topBtns button:hover { background: rgba(38, 42, 56, .82); border-color: var(--line-2); }
#topBtns button:active { transform: scale(.94); }
#topBtns button i { font-style: normal; font-size: 17px; line-height: 1; }
#topBtns button.on { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(255, 106, 0, .38), var(--hi); }
#topBtns button.on kbd { background: rgba(0, 0, 0, .18); color: rgba(255, 255, 255, .85); }
#menuBtn, #volBtn { width: 44px; justify-content: center; padding: 0 !important; }
#volBtn.muted { background: rgba(255, 69, 58, .92) !important; border-color: transparent !important; color: #fff; }

/* ---------- dropdowns: ☰ menu + 🔊 sound ---------- */
#menu, #volPop { position: fixed; right: calc(var(--edge) + var(--safe-r)); top: calc(66px + var(--safe-t)); z-index: 13; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--sh-3), var(--hi);
  opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: top right; pointer-events: none; transition: opacity .18s var(--ease), transform .22s var(--ease); }
#menu { width: 312px; padding: 10px; }
#volPop { width: 320px; max-height: calc(100vh - 90px - var(--safe-t)); overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px 10px; font-size: 13px; }
#menu.open, #volPop.open { opacity: 1; transform: none; pointer-events: auto; }
#volPop .vhead { position: sticky; top: -6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -16px 4px; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); background: inherit; z-index: 1; }
#volPop .vhead b { font-size: 15px; font-weight: 700; }
#muteAll { min-height: 36px; border: 1px solid var(--line-2); background: var(--fill); border-radius: var(--pill); padding: 0 14px; font-weight: 700; font-size: 12px; transition: background .15s, transform .12s; }
#muteAll:active { transform: scale(.95); }
#muteAll.on { background: var(--danger); border-color: transparent; color: #fff; }
#volPop label { display: block; margin: 12px 0; color: var(--txt); font-weight: 500; }
#volPop label span { float: right; }

/* menu tiles */
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mgrid button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 4px 10px; border-radius: var(--r); border: 1px solid transparent; background: var(--fill); font-size: 11.5px; font-weight: 600; line-height: 1.15; text-align: center; min-height: 80px; transition: background .15s, border-color .15s, transform .12s var(--ease); }
.mgrid button:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.mgrid button:active { transform: scale(.95); background: rgba(255, 122, 26, .24); }
.mgrid button i { font-style: normal; font-size: 24px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
.mgrid button kbd { position: absolute; top: 6px; right: 6px; font-size: 8.5px; padding: 2px 4px; opacity: .8; }
.mgrid button.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.mtoggle { display: flex; flex-direction: row-reverse; justify-content: space-between; gap: 10px; align-items: center; margin: 8px 2px 0; padding: 10px 6px 4px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); cursor: pointer; }

/* ---------- form controls: modern switches, sliders, inputs ---------- */
#panel .chk, #volPop .chk { display: flex; flex-direction: row-reverse; justify-content: space-between; gap: 14px; align-items: center; min-height: 44px; margin: 6px 0; cursor: pointer; line-height: 1.35; }
.chk input[type=checkbox], .mtoggle input[type=checkbox] { -webkit-appearance: none; appearance: none; flex: none; width: 46px; height: 28px; margin: 0; border-radius: var(--pill); cursor: pointer;
  background: var(--fill-3) radial-gradient(circle, #fff 0 10px, transparent 10.5px) no-repeat; background-size: 28px 28px; background-position: 0 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: background-color .2s var(--ease), background-position .22s var(--ease); }
.chk input[type=checkbox]:checked, .mtoggle input[type=checkbox]:checked { background-color: var(--accent); background-position: 18px 0; }
.chk input[type=checkbox]:active, .mtoggle input[type=checkbox]:active { background-size: 30px 28px; }

#panel input[type=range], #volPop input[type=range] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 28px; margin: 6px 0 0; background: transparent; cursor: pointer; accent-color: var(--accent); }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: var(--pill); background: rgba(255, 255, 255, .18); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 4px rgba(255, 122, 26, .0), 0 2px 6px rgba(0, 0, 0, .4); transition: box-shadow .15s, transform .15s; }
input[type=range]:active::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(255, 122, 26, .3), 0 2px 6px rgba(0, 0, 0, .4); transform: scale(1.05); }
input[type=range]::-moz-range-track { height: 6px; border-radius: var(--pill); background: rgba(255, 255, 255, .16); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: var(--pill); background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
/* value read-outs next to slider labels */
#panel label > span, #volPop label > span { float: right; min-width: 34px; text-align: center; padding: 1px 8px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent-2); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
#panel label > span:empty, #volPop label > span:empty { display: none; }

/* ---------- settings drawer ---------- */
#panel { position: fixed; right: calc(var(--edge) + var(--safe-r)); top: calc(66px + var(--safe-t)); width: 380px; max-height: calc(100% - 82px - var(--safe-t)); overflow: auto; overscroll-behavior: contain; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--sh-3), var(--hi);
  padding: 0 14px 14px; transform: translateX(calc(100% + 40px)); transition: transform .32s var(--ease); z-index: 14; font-size: 13px; }
#panel.open { transform: none; }
.ph { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; margin: 0 -14px 4px; padding: 14px 14px 10px; background: inherit; z-index: 2; font-size: 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.ph button, #garage .gh button { width: 36px; height: 36px; border-radius: 50%; background: var(--fill-2); border: none; font-size: 14px; display: inline-grid; place-items: center; transition: background .15s, transform .12s; }
.ph button:hover, #garage .gh button:hover { background: var(--fill-3); }
.ph button:active, #garage .gh button:active { transform: scale(.9); }
details.sec { margin: 8px 0; padding: 0 12px; border-radius: var(--r); background: var(--fill); border: 1px solid var(--line); }
details.sec summary { list-style: none; cursor: pointer; min-height: 48px; padding: 12px 0; font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
details.sec summary::-webkit-details-marker { display: none; }
details.sec summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease); }
details.sec[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details.sec[open] { padding-bottom: 6px; }
.presets { display: flex; gap: 6px; margin: 4px 0 10px; flex-wrap: wrap; }
.presets button { min-height: 36px; padding: 0 14px; font-size: 12.5px; font-weight: 600; border-radius: var(--pill); border: 1px solid var(--line-2); background: var(--fill); transition: background .15s, border-color .15s, transform .12s; }
.presets button:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.presets button:active { transform: scale(.95); }
#panel label { display: block; margin: 12px 0; color: var(--txt); font-weight: 500; }
#panel select, #panel input[type=search] { -webkit-appearance: none; appearance: none; width: 100%; min-height: 44px; margin-top: 8px; background-color: rgba(0, 0, 0, .22); color: var(--txt); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
#panel select { padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ffffffa0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
#panel select option { background: var(--solid); color: var(--txt); }
#panel select:focus, #panel input[type=search]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#panel input[type=search]::placeholder { color: var(--dim); }
.keys { font-size: 12px; color: var(--muted); line-height: 1.75; }
.keys b { color: var(--txt); font-weight: 700; }
.attr { font-size: 10px; color: var(--dim); margin: 14px 2px 0; line-height: 1.5; }
#findResults .res { display: flex; gap: 6px; align-items: stretch; }
#findResults button { display: block; width: 100%; min-height: 44px; text-align: left; margin: 5px 0; background: var(--fill); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; font-weight: 600; transition: background .15s, border-color .15s; }
#findResults button:hover { background: var(--accent-soft); border-color: var(--accent-line); }
#findResults .res button:first-child { flex: 1; min-width: 0; }
#findResults .tp { flex: 0 0 46px; width: 46px; text-align: center !important; font-size: 16px; white-space: nowrap; padding: 0 !important; }
#findResults small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-top: 1px; }
#dests { gap: 6px; }
#dests .dj { display: inline-flex; }
#dests .dj button { border-radius: var(--pill) 0 0 var(--pill); }
#dests .dj button + button { border-radius: 0 var(--pill) var(--pill) 0; border-left: none; padding-left: 10px; padding-right: 10px; }
/* ⭐ owner's own places: first in the Where to / Teleport chips, in accent colour */
#dests .dj.fav button { border-color: var(--accent-line); background: var(--accent-soft); font-weight: 700; color: var(--accent-2); }

/* ---------- minimap ---------- */
#minimap { position: fixed; right: calc(var(--edge) + var(--safe-r)); bottom: calc(var(--edge) + var(--safe-b)); width: 184px; height: 184px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 0 6px rgba(17, 19, 27, .35), var(--sh-2); background: #3a3d45; z-index: 4; transition: border-radius .25s var(--ease); }
#mmToggle { position: fixed; right: calc(var(--edge) + 2px + var(--safe-r)); bottom: calc(158px + var(--safe-b)); width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass-strong); box-shadow: var(--sh-1); font-size: 15px; z-index: 6; display: grid; place-items: center; transition: transform .12s, background .15s; }
#mmToggle::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; }   /* bigger tap target */
#mmToggle:hover { background: rgba(38, 42, 56, .95); }
#mmToggle:active { transform: scale(.9); }
body.bigmap #minimap { left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); border-radius: var(--r-xl); border-width: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 0 0 100vmax rgba(6, 8, 12, .45), var(--sh-3); z-index: 14; cursor: crosshair !important; }
body.bigmap #mmToggle { right: auto; left: calc(50% + min(calc(100vw - 40px), calc(100vh - 140px), 820px) / 2 - 24px); top: calc(50% - min(calc(100vw - 40px), calc(100vh - 140px), 820px) / 2 - 14px); bottom: auto; z-index: 15; background: var(--solid); }
#mmHint { display: none; }
body.bigmap #mmHint { display: block; position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); background: var(--glass-strong); border: 1px solid var(--line); padding: 8px 14px; border-radius: var(--pill); font-size: 12px; font-weight: 500; z-index: 15; white-space: nowrap; box-shadow: var(--sh-2); }
#pinMenu { position: fixed; z-index: 20; display: none; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 8px; min-width: 200px; box-shadow: var(--sh-3); }
#pinMenu.show { display: block; animation: popIn .18s var(--ease); }
#pinMenu b { display: block; font-size: 13px; margin: 4px 6px 8px; color: var(--accent-2); }
#pinMenu button { display: block; width: 100%; min-height: 44px; margin: 4px 0; padding: 0 12px; border-radius: var(--r-sm); border: 0; background: var(--fill-2); text-align: left; font-weight: 600; }
#pinMenu button:hover { background: var(--accent-soft); }
@keyframes popIn { from { opacity: 0; } }   /* opacity only: many users of it position with transform */

/* ---------- messages: subtitles, toasts, banners ---------- */
/* dialogue bar: speaker chip on top, line below */
#sub, #radioSub { position: fixed; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translate(-50%, 10px); max-width: min(640px, calc(100% - 440px)); min-width: 280px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); padding: 10px 16px 12px; border-radius: var(--r-lg); font-size: 15px; font-weight: 500; line-height: 1.42; opacity: 0; transition: opacity .25s var(--ease), transform .3s var(--ease); pointer-events: none; z-index: 7; box-shadow: var(--sh-2), var(--hi); }
#sub.show { opacity: 1; transform: translate(-50%, 0); }
#sub.amb { font-size: 13px; padding: 7px 13px 8px; }
#sub.amb.show { opacity: .72; }   /* street talk (tier 0): quieter voice, quieter subtitle */
#subWho, #rsWho { display: inline-flex; align-items: center; max-width: 100%; margin: 0 0 5px -2px; padding: 2px 9px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent-2); font-size: 11.5px; font-weight: 700; letter-spacing: .1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#subWho:empty, #rsWho:empty { display: none; }
#subText, #rsText { display: block; }
#radioSub { max-width: min(600px, calc(100% - 440px)); font-size: 13.5px; }
#radioSub.show { opacity: .97; transform: translate(-50%, 0); }
#rsWho { background: rgba(10, 132, 255, .18); color: #8cc8ff; font-size: 11px; }
#radioSub.promo #rsWho { background: var(--accent-soft); color: var(--accent-2); }
body.touring #radioSub { opacity: 0 !important; }
#msg { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 8px) scale(.98); max-width: min(480px, calc(100% - 32px)); background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); color: var(--txt); padding: 9px 16px; border-radius: var(--pill); font-size: 13px; font-weight: 600; text-align: center; opacity: 0; transition: opacity .22s var(--ease), transform .28s var(--spring); pointer-events: none; z-index: 8; box-shadow: var(--sh-2); }
#msg.show { opacity: 1; transform: translate(-50%, 0); }
#areaBanner { position: fixed; left: 50%; top: 15%; transform: translate(-50%, -14px); text-align: center; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease), transform .6s var(--ease); text-shadow: 0 2px 18px rgba(0, 0, 0, .75), 0 1px 3px rgba(0, 0, 0, .5); z-index: 3; max-width: calc(100% - 32px); }
#areaBanner.show { opacity: 1; transform: translate(-50%, 0); }
#areaBanner::after { content: ''; display: block; width: 56px; height: 3px; margin: 10px auto 0; border-radius: var(--pill); background: var(--accent-grad); box-shadow: 0 2px 10px rgba(255, 106, 0, .5); }
#bnHi { font-family: "Kohinoor Devanagari", "Noto Sans Devanagari", var(--font); font-size: 22px; color: var(--accent-2); font-weight: 700; }
#bnHi:empty, #bnSmall:empty { display: none; }
#bnBig { font-size: 36px; font-weight: 800; letter-spacing: -.8px; line-height: 1.1; }
#bnSmall { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: var(--pill); background: rgba(10, 12, 18, .5); text-shadow: none; }
#lookHint, #flyTag { position: fixed; left: 50%; top: calc(70px + var(--safe-t)); transform: translateX(-50%); border-radius: var(--pill); pointer-events: none; z-index: 6; box-shadow: var(--sh-1); }
#lookHint { font-size: 11.5px; font-weight: 500; background: var(--glass-strong); border: 1px solid var(--line); padding: 6px 12px; opacity: 0; transition: opacity .3s; }
#lookHint.show { opacity: 1; }
#flyTag { background: linear-gradient(135deg, rgba(10, 132, 255, .92), rgba(94, 92, 230, .92)); padding: 8px 16px; font-weight: 600; font-size: 12px; display: none; white-space: nowrap; }
#flyTag.show { display: block; animation: popIn .25s var(--ease); }
#audioOff { position: fixed; left: calc(var(--edge) + var(--safe-l)); bottom: calc(48px + var(--safe-b)); display: none; min-height: 40px; background: var(--danger); border: none; border-radius: var(--pill); padding: 0 16px; font-weight: 700; font-size: 12.5px; color: #fff; z-index: 12; box-shadow: 0 6px 18px rgba(255, 69, 58, .4); }
#audioOff.show { display: block; }
#audioOff:active { transform: scale(.96); }

/* ---------- navigation + train strips (top centre) ---------- */
#navBox { position: fixed; left: 50%; top: calc(var(--edge) + var(--safe-t)); transform: translateX(-50%); display: none; align-items: center; gap: 12px; background: linear-gradient(135deg, #0b7a4b, #0f9d63); padding: 7px 7px 7px 8px; border-radius: var(--r-lg); box-shadow: 0 8px 26px rgba(11, 122, 75, .4), var(--sh-1), var(--hi); z-index: 6; max-width: calc(100% - 660px); min-width: 240px; }
#navBox.show { display: flex; animation: popIn .25s var(--ease); }
#navIcon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .18); }
#navBox > div { min-width: 0; }
#navBox b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#navBox small { display: block; font-size: 11.5px; opacity: .85; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#navBox button { margin-left: auto; flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .18); border: none; font-size: 13px; transition: background .15s, transform .12s; }
#navBox button:hover { background: rgba(255, 255, 255, .28); }
#navBox button:active { transform: scale(.9); }
#trainHud { position: fixed; left: 50%; top: calc(70px + var(--safe-t)); transform: translateX(-50%); display: none; background: var(--glass-strong); backdrop-filter: var(--blur-hud); -webkit-backdrop-filter: var(--blur-hud); border: 1px solid rgba(90, 200, 250, .35); border-radius: var(--r-lg); padding: 9px 16px; font-size: 13px; text-align: center; z-index: 6; box-shadow: var(--sh-2), inset 0 3px 0 rgba(90, 200, 250, .7); }
#trainHud.show { display: block; }
#trainHud b, #trainHud span, #trainHud small { display: block; }
#trainHud b { font-weight: 700; }
#trainHud span { font-variant-numeric: tabular-nums; color: var(--muted); }
#trainHud span.over { color: #ff8a65; font-weight: 700; }
#trainHud small { color: #9fd3ff; font-size: 10.5px; margin-top: 3px; }

/* ---------- mission cards under the HUD (cab / Mazedaar / Kahani) ---------- */
#cabHud, #funHud, #stHud { position: fixed; left: calc(var(--edge) + var(--safe-l)); top: calc(124px + var(--safe-t)); width: 272px; background: var(--glass-hud); backdrop-filter: var(--blur-hud); -webkit-backdrop-filter: var(--blur-hud); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px 10px 15px; font-size: 12px; line-height: 1.4; display: none; z-index: 5; box-shadow: var(--sh-1), inset 3px 0 0 var(--hc, var(--accent)); }
#cabHud { --hc: var(--warn); }
#funHud { --hc: var(--accent); width: 280px; }
#stHud { --hc: var(--gold); width: 290px; }
#cabHud.show, #funHud.show, #stHud.show { display: block; animation: slideIn .28s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } }
#cabHud .cabTop { color: var(--warn); font-weight: 700; font-variant-numeric: tabular-nums; }
#cabMoney { font-size: 14px; }
#cabStatus { margin-top: 4px; font-weight: 600; }
#cabRules span, .gcRules span { display: inline-block; background: var(--fill-2); border-radius: var(--pill); padding: 2px 9px; margin: 4px 4px 0 0; font-size: 11px; font-weight: 500; }
#cabRules .rider { display: block; border-radius: var(--r-xs); }
#cabRules .rider.ask { color: #ffb74d; font-weight: 700; background: rgba(255, 152, 0, .18); }
#cabMeter, #fhMeter, #stMeter, #stArmor { height: 6px; margin-top: 8px; background: var(--fill-2); border-radius: var(--pill); overflow: hidden; }
#cabMeter i, #fhMeter i, #stMeter i, #stArmor i { display: block; height: 100%; border-radius: var(--pill); transition: width .3s var(--ease); }
#cabMeter i { width: 100%; background: var(--ok); }
/* police "gaadi roko" countdown: a slim pill at the bottom, not in the middle of the road */
#cabStatus2 { position: fixed; left: 50%; bottom: calc(140px + var(--safe-b)); transform: translateX(-50%); background: linear-gradient(135deg, #0a4fb4, #1565c0); border-radius: var(--pill); font-weight: 700; font-size: 13px; pointer-events: none; padding: 0; z-index: 9; white-space: nowrap; box-shadow: 0 6px 20px rgba(10, 79, 180, .45); }
#cabStatus2:not(:empty) { padding: 8px 18px; }

/* ---------- bottom sheets: police / cab offers, garage ---------- */
#gameCard, #garage { position: fixed; left: 50%; bottom: calc(var(--edge) + var(--safe-b)); transform: translate(-50%, 28px); width: min(480px, calc(100% - 420px)); min-width: 340px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 10px 18px 16px; box-shadow: var(--sh-3), var(--hi); opacity: 0; pointer-events: none; transition: opacity .22s var(--ease), transform .32s var(--ease); z-index: 16; max-height: 62vh; overflow: auto; overscroll-behavior: contain; }
#gameCard::before, #garage::before { content: ''; display: block; width: 38px; height: 5px; margin: 0 auto 12px; border-radius: var(--pill); background: var(--fill-3); }
#gameCard.show, #garage.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
#gameCard { box-shadow: var(--sh-3), var(--hi), inset 0 3px 0 rgba(255, 214, 10, .55); }
.gcHead { font-size: 17px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 8px; }
.gcRow { margin: 4px 0; font-size: 13.5px; line-height: 1.45; }
.gcRow i { color: var(--muted); }
.msPaper { margin: 8px 0 6px; padding: 10px 12px 11px; background: #f4ecd8; color: #1d1a14; border-radius: 6px; font-family: Georgia, 'Times New Roman', serif; box-shadow: 0 3px 12px rgba(0,0,0,.35); transform: rotate(-.6deg); }
.msPaper small { display: block; font: 800 10px/1.2 Inter, system-ui, sans-serif; letter-spacing: .14em; color: #8a1c1c; border-bottom: 1px solid rgba(0,0,0,.25); padding-bottom: 4px; margin-bottom: 6px; }
.msPaper b { display: block; font-size: 17px; line-height: 1.25; }
.msPaper span { display: block; font-size: 13px; line-height: 1.4; margin-top: 4px; color: #3b352a; }
.msPaper.bad { background: #efe3cf; } .msPaper.bad b { color: #7a0d0d; }
.msAuto { display: block; width: 100%; max-width: 380px; margin: 6px auto 4px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.gcHint { margin: 8px 0 2px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 210, 74, 0.14); border-left: 3px solid #ffd24a; font-size: 13px; line-height: 1.45; }
.gcBtns { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.gcBtns button { flex: 1 1 120px; min-height: 48px; padding: 10px 12px; border-radius: var(--r); border: none; font-weight: 700; font-size: 13.5px; background: var(--accent-grad); color: #fff; box-shadow: 0 6px 18px rgba(255, 106, 0, .3), var(--hi); transition: transform .12s var(--ease), filter .15s; }
.gcBtns button:hover { filter: brightness(1.08); }
.gcBtns button:active { transform: scale(.96); }
.gcBtns button:nth-child(2) { background: var(--fill-3); box-shadow: var(--hi); }
.gcBtns button:nth-child(3) { background: rgba(140, 100, 230, .35); box-shadow: var(--hi); }
#garage { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; box-shadow: var(--sh-3), var(--hi), inset 0 3px 0 rgba(90, 200, 250, .55); }
#garage::before, #garage .gh, #garage .keys { grid-column: 1 / -1; }
#garage .gh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 16px; font-weight: 700; }
#garage button[data-v] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 72px; padding: 8px 2px; text-align: center; background: var(--fill); border: 1px solid transparent; border-radius: var(--r); transition: background .15s, border-color .15s, transform .12s var(--ease); }
#garage button[data-v]:hover { background: rgba(90, 200, 250, .14); }
#garage button[data-v]:active { transform: scale(.94); }
#garage button.cur { border-color: #5ac8fa; background: rgba(90, 200, 250, .2); box-shadow: 0 0 0 3px rgba(90, 200, 250, .12); }
#garage .vi { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
#garage button[data-v] b { font-size: 11px; font-weight: 600; line-height: 1.2; }
#garage small { display: none; }
#garage .keys { text-align: center; margin: 6px 0 0; }
#garage button.story { border-color: rgba(255, 194, 26, .55); }

/* ---------- intro / start screen ---------- */
#intro { position: fixed; inset: 0; display: grid; place-items: center; overflow-y: auto; background: radial-gradient(90% 60% at 20% 10%, rgba(255, 122, 26, .22), transparent 60%), radial-gradient(70% 50% at 90% 90%, rgba(48, 160, 90, .14), transparent 60%), rgba(8, 10, 15, .84); z-index: 20; transition: opacity .45s var(--ease); padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l)); }
.card { position: relative; max-width: 520px; width: 100%; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); border-radius: 30px; padding: 28px; box-shadow: var(--sh-3), var(--hi); animation: cardIn .6s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.card .eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 5px 11px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent-2); font-size: 11.5px; font-weight: 700; letter-spacing: .3px; }
.card h1 { margin: 0; font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -1.4px; background: linear-gradient(90deg, #ff9933 0%, #ffd2a6 40%, #ffffff 58%, #7fdc8f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card .sub { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; padding: 0; list-style: none; }
.card .chips li { padding: 6px 11px; border-radius: var(--pill); background: var(--fill); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.card p { line-height: 1.6; font-size: 14px; color: rgba(245, 246, 248, .86); }
.card p.keys { font-size: 12px; color: var(--muted); padding: 10px 12px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .2); border: 1px solid var(--line); }
#start { position: relative; margin-top: 12px; width: 100%; min-height: 56px; padding: 14px; font-size: 16.5px; font-weight: 800; letter-spacing: -.1px; border: none; border-radius: var(--r-lg); background: var(--accent-grad); color: #fff; box-shadow: 0 10px 28px rgba(255, 106, 0, .4), var(--hi); transition: transform .12s var(--ease), filter .15s, box-shadow .2s; }
#start:hover { filter: brightness(1.07); box-shadow: 0 14px 34px rgba(255, 106, 0, .5), var(--hi); }
#start:active { transform: scale(.98); }
#startTour, #startStory { margin-top: 8px; width: 100%; min-height: 48px; padding: 12px; font-size: 14px; font-weight: 700; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--fill); transition: background .15s, transform .12s var(--ease); }
#startTour:hover { background: var(--fill-2); }
#startTour:active, #startStory:active { transform: scale(.98); }
#startStory { border-color: rgba(255, 194, 26, .5); color: var(--gold); background: rgba(255, 194, 26, .08); }
#startStory:hover { background: rgba(255, 194, 26, .14); }

/* ---------- touch controls ---------- */
#touch { display: none; }
body.touch #touch { display: block; }
#touch button { touch-action: none; user-select: none; -webkit-user-select: none; background: rgba(16, 18, 26, .42); border: 1.5px solid rgba(255, 255, 255, .28); color: #fff; font-weight: 800; letter-spacing: .4px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .12); transition: transform .08s, background .12s, border-color .12s; }
#touch button.on { background: rgba(255, 122, 26, .62); border-color: rgba(255, 190, 130, .8); transform: scale(.94); }
#touch button[data-touch=gas] { border-color: rgba(48, 209, 88, .6); background: rgba(20, 60, 34, .45); }
#touch button[data-touch=brake] { border-color: rgba(255, 69, 58, .6); background: rgba(70, 20, 20, .45); }
#touch button[data-touch=gas].on { background: rgba(48, 209, 88, .6); }
#touch button[data-touch=brake].on { background: rgba(255, 69, 58, .62); }
#touch .tl { position: fixed; left: calc(14px + var(--safe-l)); bottom: calc(18px + var(--safe-b)); display: flex; gap: 10px; }
#touch .tl button { width: 68px; height: 68px; font-size: 22px; border-radius: 50%; }
#touch .tr { position: fixed; right: calc(14px + var(--safe-r)); bottom: calc(18px + var(--safe-b)); display: flex; gap: 10px; align-items: flex-end; }
#touch .tr button { width: 70px; height: 92px; font-size: 12px; border-radius: 22px; }
#touch .tr button[data-touch=brake] { height: 70px; }
#touch .horn { position: fixed; left: calc(168px + var(--safe-l)); bottom: calc(26px + var(--safe-b)); width: 52px; height: 52px; font-size: 20px; border-radius: 50%; }

/* ---------- 📻 Kanpur FM now-playing chip ---------- */
#radioChip { position: fixed; left: calc(var(--edge) + var(--safe-l)); bottom: calc(var(--edge) + var(--safe-b)); display: none; align-items: center; gap: 8px; max-width: min(420px, calc(100% - 260px)); min-height: 44px; padding: 5px 5px 5px 14px; border-radius: var(--pill); background: var(--glass-strong); backdrop-filter: var(--blur-hud); -webkit-backdrop-filter: var(--blur-hud); border: 1px solid var(--accent-line); box-shadow: var(--sh-2), var(--hi); font-size: 12px; z-index: 6; cursor: pointer; }
#radioChip.on { display: flex; animation: popIn .25s var(--ease); }
#radioChip b { color: var(--accent-2); white-space: nowrap; font-weight: 800; }
#radioNow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: rgba(244, 245, 247, .9); font-weight: 500; }
#radioChip button { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--fill-2); font-size: 12px; transition: background .15s, transform .12s; }
#radioChip button:active { transform: scale(.9); }
#radioChip .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
#radioChip .eq i { width: 3px; background: var(--accent); border-radius: 2px; animation: eq .9s ease-in-out infinite; }
#radioChip .eq i:nth-child(2) { animation-delay: .2s; } #radioChip .eq i:nth-child(3) { animation-delay: .45s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
#radioChip.held .eq i { animation-play-state: paused; opacity: .45; }   /* radio waiting while someone talks */
body.showstats #stats { bottom: calc(66px + var(--safe-b)); }
body.touch:not(.bigmap) #radioChip { left: 50%; right: auto; top: calc(70px + var(--safe-t)); bottom: auto; transform: translateX(-50%); }

/* ---------- 🎯 Mazedaar (js/fun.js): mission panel, gaddha combo chip, daily kaam + badges ---------- */
#funHud .fhTop, #stHud .fhTop { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--accent-2); font-size: 12.5px; }
#stHud .fhTop { color: var(--gold); }
#fhX, #stX { flex: none; width: 30px; height: 30px; margin: -4px -4px -4px 0; border-radius: 50%; border: none; background: var(--fill-2); font-size: 11px; position: relative; }
#fhX::after, #stX::after { content: ''; position: absolute; inset: -7px; }   /* 44px tap target */
#fhStatus, #stStatus { margin-top: 4px; line-height: 1.4; }
#fhMeter { display: none; }
#fhMeter i { width: 100%; background: var(--ok); }
body:has(#cabHud.show) #funHud { top: calc(236px + var(--safe-t)); }
#gaddhaChip { position: fixed; left: 50%; top: calc(70px + var(--safe-t)); transform: translateX(-50%) scale(.9); padding: 6px 14px; border-radius: var(--pill); background: var(--glass-strong); border: 1px solid var(--line-2); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .2s, transform .25s var(--spring); pointer-events: none; z-index: 6; box-shadow: var(--sh-1); }
#gaddhaChip.show { opacity: 1; transform: translateX(-50%) scale(1); }
#gaddhaChip.hot { border-color: var(--accent); color: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-soft), var(--sh-1); }
.fSub { margin: 12px 0 6px; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.fTask { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; margin: 5px 0; border-radius: var(--r-sm); background: var(--fill); overflow: hidden; font-size: 13px; }
.fTask i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }
.fTask small { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fTask.done { background: rgba(48, 209, 88, .13); }
.fTask.done i { background: var(--ok); }
.fBadges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 50vh; overflow-y: auto; margin-top: 6px; }
.fBadge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 10px 4px; border-radius: var(--r); background: var(--fill); border: 1px solid transparent; opacity: .5; filter: grayscale(.6); }
.fBadge.got { opacity: 1; filter: none; background: var(--accent-soft); border-color: var(--accent-line); }
.fBadge b { font-size: 24px; }
.fBadge span { font-size: 11px; font-weight: 700; }
.fBadge small { font-size: 10px; color: var(--muted); line-height: 1.25; }

/* ---------- 🦉 Kahani (js/story.js): mission panel, blaster / whistle button, cutscene letterbox, hit flash ---------- */
#stMeter, #stArmor { display: none; }
#stMeter i, #stArmor i { width: 0; background: var(--ok); }
body:has(#funHud.show) #stHud, body:has(#cabHud.show) #stHud { top: calc(236px + var(--safe-t)); }
#stFire { position: fixed; right: 214px; bottom: calc(24px + var(--safe-b)); width: 84px; height: 84px; border-radius: 50%; display: none; z-index: 7;
  flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px solid var(--gold); background: radial-gradient(circle at 50% 35%, rgba(60, 50, 20, .9), rgba(18, 18, 22, .88));
  color: var(--gold); font-weight: 800; font-size: 11px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12); touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .1s; }
#stFire.show { display: flex; }
#stFire i { font-style: normal; font-size: 30px; line-height: 1; }
#stFire kbd { font-size: 9px; opacity: .7; }
#stFire:active { transform: scale(.92); background: rgba(255, 194, 26, .3); }
#stFire.hot { animation: stPulse .6s infinite alternate; }
@keyframes stPulse { to { box-shadow: 0 0 0 12px rgba(255, 194, 26, .25), 0 8px 24px rgba(0, 0, 0, .45); } }
body.touch #stFire kbd { display: none; }
body.touch #stFire { right: calc(16px + var(--safe-r)); bottom: calc(205px + var(--safe-b)); }   /* above the gas / brake pedals */
#stHitFx { position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: 0; box-shadow: inset 0 0 120px 30px rgba(229, 57, 53, .75); }
#stHitFx.on { animation: stHit .45s ease-out; }
@keyframes stHit { from { opacity: 1; } to { opacity: 0; } }
/* cutscene: letterbox bars, speech panel, everything else hidden */
#cine { position: fixed; inset: 0; pointer-events: none; z-index: 30; display: none; }
body.cine #cine { display: block; }
body.cine > *:not(#app):not(#cine):not(#gameCard):not(#areaBanner):not(#msFx):not(#intro):not(#msBrief) { opacity: 0 !important; pointer-events: none !important; }
#cine .cbar { position: absolute; left: 0; right: 0; height: 11vh; background: #000; }
#cine .cbar.top { top: 0; } #cine .cbar.bot { bottom: 0; }
body.cinecam #cine .cpanel { display: none; }
#msCap { position: absolute; left: 18px; top: calc(11vh + 12px); color: #fff; font: 800 13px/1 Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0,0,0,.8); display: none; }
body.cinecam #msCap { display: block; }
#msCap:empty { display: none; }
#cine .cpanel { position: absolute; left: 50%; bottom: calc(11vh + 14px); transform: translateX(-50%); width: min(720px, calc(100% - 32px)); display: flex; gap: 14px; align-items: center;
  background: rgba(14, 15, 21, .86); border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 14px 18px; box-shadow: var(--sh-3); }
body.cdayon #cine .cpanel { display: none; }
#cine.pop .cpanel { animation: cPop .28s var(--ease); }
@keyframes cPop { from { transform: translateX(-50%) translateY(10px); opacity: .3; } }
#cine .cav { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; background: var(--fill-2); box-shadow: var(--sh-1); }
#cine .ctext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#cine .ctext b { font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; }
#cine .ctext span { font-size: 17px; line-height: 1.42; color: #f3f3f3; font-weight: 500; }
#cSkip { position: absolute; right: calc(16px + var(--safe-r)); top: calc(11vh + 12px); pointer-events: auto; min-height: 40px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .55); color: #fff; border-radius: var(--pill); padding: 0 16px; font-size: 13px; font-weight: 600; }
body.cdayon #cSkip { display: none; }
#cine .cday { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; display: none; }
body.cdayon #cine .cday { display: flex; flex-direction: column; gap: 6px; animation: cPop .5s var(--ease); }
#cine .cday small { color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
#cine .cday b { font-size: clamp(26px, 6vw, 46px); color: #fff; letter-spacing: -.5px; text-shadow: 0 4px 24px rgba(0, 0, 0, .8); }
body.cdayon #app { filter: brightness(.45); transition: filter .4s; }

/* ---------- guided tour: spotlight ring + card ---------- */
#tourRing { position: fixed; z-index: 40; pointer-events: none; opacity: 0; transition: left .3s var(--ease), top .3s var(--ease), width .3s var(--ease), height .3s var(--ease), opacity .2s; border-radius: var(--r-lg); }
#tourRing.on { opacity: 1; box-shadow: 0 0 0 3px var(--accent), 0 0 24px 6px rgba(255, 122, 26, .45), 0 0 0 200vmax rgba(4, 6, 12, .62); }
#tourRing.on.center { box-shadow: 0 0 0 200vmax rgba(4, 6, 12, .62); }
#tourTip { position: fixed; z-index: 41; width: 340px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 16px 18px 14px; box-shadow: var(--sh-3), var(--hi), inset 0 3px 0 var(--accent); transition: left .3s var(--ease), top .3s var(--ease); }
#tourTip.hidden { display: none; }
#tourTip .tt-step { font-size: 11px; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: .8px; }
#tourTip h4 { margin: 4px 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
#tourTip p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: rgba(244, 245, 247, .86); }
.tt-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tt-dots { display: flex; gap: 5px; }
.tt-dots span { width: 7px; height: 7px; border-radius: var(--pill); background: var(--fill-3); transition: width .2s var(--ease), background .2s; }
.tt-dots span.done { background: rgba(255, 122, 26, .5); }
.tt-dots span.on { width: 18px; background: var(--accent); }
.tt-btns { display: flex; gap: 6px; }
.tt-btns button { min-height: 40px; border-radius: var(--pill); padding: 0 14px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line-2); background: var(--fill); transition: transform .12s; }
.tt-btns button:active { transform: scale(.95); }
.tt-btns .tt-main { background: var(--accent-grad); border-color: transparent; color: #fff; padding: 0 18px; box-shadow: 0 4px 14px rgba(255, 106, 0, .35); }
body.touring #sub { opacity: 0 !important; }
body.touring #menu, body.touring #volPop { z-index: 39; }
#tourTip.sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(16px + var(--safe-b)); transform: none !important; }

/* touch screens: no keyboard, so no key badges */
body.touch kbd { display: none !important; }

/* touch screens (any size): pedals own the bottom corners, so the minimap moves up under the top bar */
body.touch #minimap { top: calc(68px + var(--safe-t)); bottom: auto; width: 130px; height: 130px; }
body.touch #mmToggle { top: calc(166px + var(--safe-t)); bottom: auto; }
body.touch #funHud, body.touch #stHud { top: calc(124px + var(--safe-t)); }

/* while a bottom sheet is open, lift the subtitles + toasts above it */
body:has(#gameCard.show) #sub, body:has(#garage.show) #sub, body:has(#gameCard.show) #radioSub, body:has(#garage.show) #radioSub { bottom: calc(236px + var(--safe-b)); }
body:has(#gameCard.show) #msg, body:has(#garage.show) #msg { bottom: calc(340px + var(--safe-b)); }
/* a mission card sits under the HUD: drop the nearby list so they never overlap */
body:has(#cabHud.show) #nearby, body:has(#funHud.show) #nearby, body:has(#stHud.show) #nearby, body:has(#trainHud.show) #nearby { display: none; }

/* ---------- tablets / small laptops ---------- */
@media (max-width: 1100px) {
  #topBtns button span, #topBtns button kbd { display: none; }
  #topBtns button { width: 44px; padding: 0; justify-content: center; }
  #sub, #radioSub { max-width: calc(100% - 260px); }
  #navBox { max-width: calc(100% - 440px); }
  #gameCard, #garage { width: min(480px, calc(100% - 260px)); }
}

/* ---------- phones (portrait ≤640 wide, or landscape ≤480 tall): clean screen, essentials only ---------- */
@media (max-width: 640px), (max-height: 480px) {
  :root { --gap: 8px; --edge: 10px; }
  body.touch { --dock: 122px; }
  body:has(#navBox.show) { --nav-h: 62px; }
  #hud { flex-direction: column; align-items: flex-start; gap: 6px; }
  .speedo { min-width: 66px; padding: 7px 8px 7px; border-radius: var(--r); }
  .speedo span { font-size: 26px; letter-spacing: -1px; }
  .speedo small { font-size: 8.5px; margin-top: 1px; }
  #limitTag { font-size: 9.5px; margin-top: 4px; padding: 2px 6px; border-width: 2px; }
  .info { padding: 5px 11px; border-radius: var(--pill); max-width: calc(100vw - 160px - var(--safe-l) - var(--safe-r)); }
  #clock, #rushTag, #wxTag, #nearby, #targetInfo { display: none !important; }
  #place { font-size: 12px; }
  #place::before { width: 6px; height: 6px; margin-right: 6px; }
  #vioTag { top: calc(112px + var(--safe-t)); }
  #topBtns { gap: 6px; }
  #menu, #volPop { left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); width: auto; max-width: 420px; margin-left: auto; top: calc(62px + var(--safe-t)); }
  #volPop { max-height: calc(100% - 76px - var(--safe-t) - var(--safe-b)); }
  #menu { max-height: calc(100% - 76px - var(--safe-t) - var(--safe-b)); overflow-y: auto; overscroll-behavior: contain; }
  .mgrid { grid-template-columns: repeat(4, 1fr); }
  .mgrid button { min-height: 76px; font-size: 11px; padding: 10px 2px 8px; }
  #panel { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 82vh; max-height: 82dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; border-bottom: 0; transform: translateY(105%); padding: 0 calc(14px + var(--safe-r)) calc(16px + var(--safe-b)) calc(14px + var(--safe-l)); }
  #panel.open { transform: none; }
  #panel .ph::before { content: ''; position: absolute; left: 50%; top: 6px; width: 38px; height: 5px; margin-left: -19px; border-radius: var(--pill); background: var(--fill-3); }
  #minimap, body.touch #minimap { width: 112px; height: 112px; top: calc(62px + var(--safe-t)); bottom: auto; border-width: 2.5px; }
  #mmToggle, body.touch #mmToggle { right: calc(10px + var(--safe-r)); top: calc(146px + var(--safe-t)); bottom: auto; width: 36px; height: 36px; font-size: 13px; }
  #navBox { top: auto; left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); transform: none; bottom: calc(var(--dock) + var(--safe-b)); max-width: none; min-width: 0; padding: 6px 6px 6px 7px; }
  #navBox small { max-width: none; }
  #navIcon { width: 38px; height: 38px; }
  #trainHud { top: calc(136px + var(--safe-t)); left: calc(10px + var(--safe-l)); transform: none; font-size: 11px; max-width: calc(100% - 146px); text-align: left; padding: 7px 12px; }
  #cabHud, #funHud, #stHud, body.touch #funHud, body.touch #stHud { top: calc(136px + var(--safe-t)); left: calc(10px + var(--safe-l)); width: calc(100% - 146px - var(--safe-l) - var(--safe-r)); max-width: 300px; font-size: 11.5px; padding: 8px 10px 8px 13px; }
  #cabHud #cabRules { max-height: 54px; overflow: auto; }
  body:has(#cabHud.show) #funHud, body:has(#funHud.show) #stHud, body:has(#cabHud.show) #stHud { top: calc(252px + var(--safe-t)); }
  /* bottom stack: pedals → nav strip → dialogue → toast → police countdown */
  #sub, #radioSub { left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); bottom: calc(var(--dock) + var(--nav-h) + var(--safe-b)); transform: translateY(10px); max-width: none; min-width: 0; font-size: 14px; padding: 8px 13px 10px; border-radius: var(--r); }
  #sub.show, #radioSub.show { transform: none; }
  #radioSub { font-size: 12.5px; }
  #subWho, #rsWho { font-size: 10.5px; margin-bottom: 4px; }
  #msg { left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); bottom: calc(var(--dock) + var(--nav-h) + 96px + var(--safe-b)); transform: translateY(8px); max-width: none; border-radius: var(--r); font-size: 12px; padding: 8px 12px; }
  #msg.show { transform: none; }
  #cabStatus2 { bottom: calc(var(--dock) + var(--nav-h) + 146px + var(--safe-b)); font-size: 12px; }
  #areaBanner { top: 24%; }
  #bnBig { font-size: 24px; } #bnHi { font-size: 16px; } #bnSmall { font-size: 11px; }
  #gameCard, #garage { width: 100%; min-width: 0; left: 0; bottom: 0; transform: translateY(28px); border-radius: var(--r-xl) var(--r-xl) 0 0; border-bottom: 0; padding: 8px calc(14px + var(--safe-r)) calc(14px + var(--safe-b)) calc(14px + var(--safe-l)); max-height: 72vh; }
  #gameCard.show, #garage.show { transform: none; }
  #garage .vi { font-size: 22px; }
  #garage button[data-v] { min-height: 64px; }
  #garage button[data-v] b { font-size: 10px; }
  body.touch .keys, body.touch #garage .keys { display: none; }
  #lookHint, #flyTag, #gaddhaChip { top: calc(62px + var(--safe-t)); font-size: 10.5px; }
  #flyTag { white-space: normal; max-width: calc(100% - 150px); left: calc(10px + var(--safe-l)); transform: none; top: calc(112px + var(--safe-t)); }
  .card { padding: 22px 20px; border-radius: var(--r-xl); } .card h1 { font-size: 32px; } .card p { font-size: 13.5px; }
  body.bigmap #mmHint { font-size: 10.5px; max-width: calc(100% - 20px); white-space: normal; text-align: center; border-radius: var(--r); }
  /* radio chip: compact, on the right under the minimap */
  #radioChip, body.touch:not(.bigmap) #radioChip { left: auto; right: calc(10px + var(--safe-r)); top: calc(188px + var(--safe-t)); bottom: auto; transform: none; max-width: 112px; padding: 4px 4px 4px 10px; gap: 6px; min-height: 42px; }
  #radioChip b, #radioNow, #radioOff { display: none; }
  #radioChip button { width: 34px; height: 34px; }
  #stFire { width: 72px; height: 72px; }
  #cine .cbar { height: 7vh; }
  #cine .cpanel { bottom: calc(7vh + 8px); padding: 10px 12px; gap: 10px; border-radius: var(--r-lg); }
  #cine .cav { width: 44px; height: 44px; font-size: 24px; }
  #cine .ctext span { font-size: 14px; }
  #cSkip { top: calc(7vh + 8px); }
  /* bottom sheet open: the sheet owns the bottom, so the dialogue + toast move to the top of the screen */
  body:has(#gameCard.show) #sub, body:has(#garage.show) #sub, body:has(#gameCard.show) #radioSub, body:has(#garage.show) #radioSub { top: calc(62px + var(--safe-t)); bottom: auto; z-index: 17; }
  body:has(#gameCard.show) #msg, body:has(#garage.show) #msg { top: calc(150px + var(--safe-t)); bottom: auto; z-index: 17; }
  #audioOff { left: 50%; transform: translateX(-50%); bottom: calc(var(--dock) + var(--nav-h) + 96px + var(--safe-b)); white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
  #audioOff:active { transform: translateX(-50%) scale(.96); }
}
@media (max-width: 380px) { #garage { grid-template-columns: repeat(4, 1fr); } .mgrid { grid-template-columns: repeat(3, 1fr); } }

/* landscape phones (short + wide): dialogue, nav and toasts sit between the pedal clusters */
@media (max-height: 480px) and (min-width: 560px) {
  body.touch { --dock: 14px; }
  body.touch #sub, body.touch #radioSub, body.touch #navBox { left: calc(240px + var(--safe-l)); right: calc(240px + var(--safe-r)); }
  /* toast: top centre, between the speed box and the top buttons */
  body.touch #msg, body.touch:has(#gameCard.show) #msg, body.touch:has(#garage.show) #msg { top: calc(12px + var(--safe-t)); bottom: auto; left: calc(100px + var(--safe-l)); right: calc(270px + var(--safe-r)); }
  body.touch #stFire { right: calc(184px + var(--safe-r)); bottom: calc(22px + var(--safe-b)); }
  .mgrid { grid-template-columns: repeat(5, 1fr); }
  .mgrid button { min-height: 64px; }
  #menu, #volPop { max-width: 460px; }
  #gameCard, #garage { left: 50%; width: min(560px, calc(100% - 40px)); transform: translate(-50%, 28px); max-height: 86vh; }
  #gameCard.show, #garage.show { transform: translate(-50%, 0); }
  #garage { grid-template-columns: repeat(6, 1fr); }
  #panel { max-height: 92vh; max-height: 92dvh; width: min(560px, 100%); left: 50%; transform: translate(-50%, 105%); }
  #panel.open { transform: translate(-50%, 0); }
  #intro { place-items: start center; }
  .card .chips { display: none; }
  #areaBanner { top: 18%; }
  #cabHud, #funHud, #stHud, body.touch #funHud, body.touch #stHud, #trainHud { max-width: 280px; }
  body:has(#cabHud.show) #funHud, body:has(#funHud.show) #stHud, body:has(#cabHud.show) #stHud { top: calc(136px + var(--safe-t)); left: calc(300px + var(--safe-l)); }
  #flyTag { left: 50%; transform: translateX(-50%); top: calc(62px + var(--safe-t)); max-width: 50%; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  #loading::before { animation: spin 1.6s linear infinite !important; animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}

/* ⚡ Urja + ⛽ fuel (js/energy.js): two slim meters in the HUD, the stall / pump button, sleepy eyelids */
#needs { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px 10px; min-width: 118px; background: var(--glass-hud); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1), var(--hi); }
#needs .nd { display: grid; grid-template-columns: 16px 1fr 32px; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
#needs .nd i { font-style: normal; font-size: 13px; text-align: center; }
#needs .nd b { display: block; height: 7px; border-radius: var(--pill); background: var(--fill-2); overflow: hidden; }
#needs .nd u { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb300, #ffe066); transition: width .4s var(--ease); }
#needs #ndF u { background: linear-gradient(90deg, #12a36b, #5be0a8); }
#needs .nd span { text-align: right; color: var(--muted); }
#needs .nd.low u { background: linear-gradient(90deg, #ff7a1a, #ffab5e); }
#needs .nd.crit u { background: #ff453a; animation: ndPulse .8s ease-in-out infinite alternate; }
#needs .nd.crit span { color: #ff6b61; }
@keyframes ndPulse { to { opacity: .45; } }
#enAct { position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%); display: none; align-items: center; gap: 8px; max-width: min(92vw, 440px);
  padding: 11px 16px; border-radius: var(--pill); border: 1px solid var(--accent-line); background: var(--glass-strong); color: var(--txt); font-size: 14px; z-index: 8; box-shadow: var(--sh-2), var(--hi); cursor: pointer; }
#enAct.show { display: inline-flex; animation: slideUp .25s var(--ease); }
#enAct b { white-space: nowrap; }
#enAct span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#enAct kbd { font-size: 10px; padding: 2px 6px; border-radius: 6px; background: var(--fill-3); color: var(--muted); }
#enAct.hot { border-color: var(--warn); animation: enHot 1s ease-in-out infinite alternate; }
@keyframes enHot { to { box-shadow: 0 0 0 8px rgba(255, 214, 10, .18), var(--sh-2); } }
@keyframes slideUp { from { opacity: 0; transform: translate(-50%, 10px); } }
body.touch #enAct kbd { display: none; }
body.touch #enAct { bottom: calc(210px + var(--safe-b)); }
body.cine #enAct, body.cine #needs { display: none !important; }
#enBlink { position: fixed; inset: 0; pointer-events: none; z-index: 6; opacity: 0; background: radial-gradient(ellipse 120% 70% at 50% 50%, rgba(0, 0, 0, .55) 0%, #000 72%); }
@media (max-width: 640px), (max-height: 480px) {
  #needs { min-width: 66px; padding: 6px 7px; gap: 5px; border-radius: var(--r); }
  #needs .nd { grid-template-columns: 13px 1fr; gap: 4px; font-size: 10px; }
  #needs .nd span { display: none; }
  #needs .nd i { font-size: 11px; }
}

/* 🌴 Neon style (body.neon, Settings → Display): hot-pink + cyan accents, 80s-poster glow on titles and banners */
body.neon {
  --accent: #ff3fa4; --accent-2: #ff8ad0; --accent-soft: rgba(255, 63, 164, .16); --accent-line: rgba(255, 63, 164, .45);
  --accent-grad: linear-gradient(135deg, #ff3fa4 0%, #b04dff 55%, #2ef2ff 100%);
  --glass: rgba(24, 12, 40, .58); --glass-strong: rgba(26, 13, 44, .86); --glass-hud: rgba(22, 11, 38, .78); --solid: #1a0e2a;
}
body.neon h1, body.neon h2, body.neon .banner, body.neon #banner { text-shadow: 0 0 8px rgba(255, 63, 164, .55), 0 0 18px rgba(46, 242, 255, .25); }

/* ❤️ health (js/energy.js): bar, red hit / low-health edges, the BEHOSH screen */
#needs #ndH u { background: linear-gradient(90deg, #ff3b5c, #ff8aa0); }
#hpRed { position: fixed; inset: 0; pointer-events: none; z-index: 6; opacity: 0; background: radial-gradient(ellipse 110% 80% at 50% 50%, rgba(255, 0, 40, 0) 45%, rgba(200, 0, 30, .75) 100%); }
#hpDown { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(40, 0, 10, .55), rgba(0, 0, 0, .9)); }
#hpDown.show { display: flex; animation: fadeIn .6s ease; }
#hpDown div { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
#hpDown b { font-size: clamp(44px, 11vw, 96px); font-weight: 900; letter-spacing: .06em; color: #ff3b5c; text-shadow: 0 0 18px rgba(255, 59, 92, .7), 0 4px 0 #000; }
#hpDown span { font-size: 16px; color: #fff; opacity: .85; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 🎮 missions HUD (js/missions.js): copies of the 🦉 story HUD rules (#stHud → #msHud), plus the wanted stars */
#cabHud, #funHud, #msHud { position: fixed; left: calc(var(--edge) + var(--safe-l)); top: calc(124px + var(--safe-t)); width: 272px; background: var(--glass-hud); backdrop-filter: var(--blur-hud); -webkit-backdrop-filter: var(--blur-hud); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px 10px 15px; font-size: 12px; line-height: 1.4; display: none; z-index: 5; box-shadow: var(--sh-1), inset 3px 0 0 var(--hc, var(--accent)); }
#msHud { --hc: var(--gold); width: 290px; }
#cabHud.show, #funHud.show, #msHud.show { display: block; animation: slideIn .28s var(--ease); }
#cabMeter, #fhMeter, #msMeter, #stArmor { height: 6px; margin-top: 8px; background: var(--fill-2); border-radius: var(--pill); overflow: hidden; }
#cabMeter i, #fhMeter i, #msMeter i, #stArmor i { display: block; height: 100%; border-radius: var(--pill); transition: width .3s var(--ease); }
#funHud .fhTop, #msHud .fhTop { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--accent-2); font-size: 12.5px; }
#msHud .fhTop { color: var(--gold); }
#fhX, #msX { flex: none; width: 30px; height: 30px; margin: -4px -4px -4px 0; border-radius: 50%; border: none; background: var(--fill-2); font-size: 11px; position: relative; }
#fhX::after, #msX::after { content: ''; position: absolute; inset: -7px; }   /* 44px tap target */
#fhStatus, #msStatus { margin-top: 4px; line-height: 1.4; }
#msMeter, #stArmor { display: none; }
#msMeter i, #stArmor i { width: 0; background: var(--ok); }
body:has(#funHud.show) #msHud, body:has(#cabHud.show) #msHud { top: calc(236px + var(--safe-t)); }
#msFire.show { display: flex; }
#msFire i { font-style: normal; font-size: 30px; line-height: 1; }
#msFire kbd { font-size: 9px; opacity: .7; }
#msFire:active { transform: scale(.92); background: rgba(255, 194, 26, .3); }
#msFire.hot { animation: stPulse .6s infinite alternate; }
body.touch #msFire kbd { display: none; }
body.touch #msFire { right: calc(16px + var(--safe-r)); bottom: calc(205px + var(--safe-b)); }   /* above the gas / brake pedals */
#msHitFx { position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: 0; box-shadow: inset 0 0 120px 30px rgba(229, 57, 53, .75); }
#msHitFx.on { animation: stHit .45s ease-out; }
body.touch #funHud, body.touch #msHud { top: calc(124px + var(--safe-t)); }
body:has(#cabHud.show) #nearby, body:has(#funHud.show) #nearby, body:has(#msHud.show) #nearby, body:has(#trainHud.show) #nearby { display: none; }
#msFire { position: fixed; right: 214px; bottom: calc(24px + var(--safe-b)); width: 84px; height: 84px; border-radius: 50%; display: none; z-index: 7;
  flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px solid var(--gold); background: radial-gradient(circle at 50% 35%, rgba(60, 50, 20, .9), rgba(18, 18, 22, .88));
  color: var(--gold); font-weight: 800; font-size: 11px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12); touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .1s; }
#msStars { font-size: 18px; letter-spacing: 2px; margin: 2px 0 4px; color: rgba(255,255,255,.22); }
#msStars .on { color: #ffd23a; text-shadow: 0 0 8px rgba(255, 210, 58, .8); animation: msStar .6s ease-in-out infinite alternate; }
@keyframes msStar { from { opacity: .7; } to { opacity: 1; } }
#msMeter { display: none; }

@media (max-width: 640px), (max-height: 480px) {
  #cabHud, #funHud, #msHud, body.touch #funHud, body.touch #msHud { top: calc(136px + var(--safe-t)); left: calc(10px + var(--safe-l)); width: calc(100% - 146px - var(--safe-l) - var(--safe-r)); max-width: 300px; font-size: 11.5px; padding: 8px 10px 8px 13px; }
  body:has(#cabHud.show) #funHud, body:has(#funHud.show) #msHud, body:has(#cabHud.show) #msHud { top: calc(252px + var(--safe-t)); }
  #msFire { width: 72px; height: 72px; }
}
@media (max-width: 380px) {
  body.touch #msFire { right: calc(184px + var(--safe-r)); bottom: calc(22px + var(--safe-b)); }
  #cabHud, #funHud, #msHud, body.touch #funHud, body.touch #msHud, #trainHud { max-width: 280px; }
  body:has(#cabHud.show) #funHud, body:has(#funHud.show) #msHud, body:has(#cabHud.show) #msHud { top: calc(136px + var(--safe-t)); left: calc(300px + var(--safe-l)); }
}
#msFoot { display: none; margin-top: 8px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--txt); font: 700 13px var(--font); cursor: pointer; }
#msFoot:active { transform: scale(.97); }

/* 📱 Kamaai: property buy / visit prompt (same look as the chai prompt #enAct) */
#hsAct { position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%); display: none; align-items: center; gap: 8px; max-width: min(92vw, 440px);
  background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid #2e7d32; color: var(--txt); padding: 11px 16px; border-radius: var(--pill); font-size: 14px; z-index: 9; box-shadow: var(--sh-2); cursor: pointer; }
#hsAct.show { display: inline-flex; animation: slideUp .25s var(--ease); }
#hsAct span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#hsAct kbd { font-size: 10px; padding: 2px 6px; border-radius: 6px; background: var(--fill-3); color: var(--muted); }
body.touch #hsAct kbd { display: none; }
body.touch #hsAct { bottom: calc(210px + var(--safe-b)); }
body.cine #hsAct { display: none !important; }

/* 🕶️ Chikna Connection: GTA phone call, freeze-frame name cards, Iraa's green eyes + glitch, blast / flare flashes */
#msPhone { position: fixed; top: calc(70px + var(--safe-t, 0px)); left: 50%; transform: translate(-50%, -16px); width: min(420px, calc(100% - 32px)); z-index: 26; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(18,22,30,.96), rgba(10,12,18,.96)); border: 1px solid rgba(255,255,255,.14); border-radius: 22px; padding: 12px 14px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.55); transition: opacity .25s, transform .3s; }
#msPhone.show { opacity: 1; transform: translate(-50%, 0); }
#msPhone .ph { display: flex; gap: 10px; align-items: center; }
#msPhone .av { width: 42px; height: 42px; border-radius: 50%; background: #2e7d32; display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; animation: msRing 1.1s infinite; }
#msPhone .ph b { display: block; font-size: 14px; font-weight: 800; letter-spacing: .3px; color: #fff; }
#msPhone .ph small { font-size: 11px; color: #8bc34a; font-weight: 600; }
#msPhone .pl { margin-top: 9px; font-size: 16px; line-height: 1.4; color: #f3f3f3; font-weight: 500; }
@keyframes msRing { 0%, 100% { box-shadow: 0 0 0 0 rgba(139,195,74,.55); } 60% { box-shadow: 0 0 0 10px rgba(139,195,74,0); } }
body.msCall #sub { opacity: 0 !important; }
#msFx { position: fixed; inset: 0; pointer-events: none; z-index: 31; }
#msFx > * { position: absolute; opacity: 0; }
#msFx .eyes { left: 50%; top: 30%; transform: translate(-50%, -50%); display: flex; gap: 46px; }
#msFx .eyes i { width: 46px; height: 20px; border-radius: 50%; background: radial-gradient(ellipse at center, #eafff2 0 18%, #3dff8c 35%, rgba(0,255,100,0) 72%); filter: drop-shadow(0 0 14px #00ff6a); }
#msFx .glitch { left: 50%; top: 46%; transform: translate(-50%, -50%); font: 900 clamp(44px, 12vw, 110px)/1 Impact, 'Arial Black', sans-serif; color: #69f0ae; letter-spacing: 8px; text-shadow: 3px 0 #ff1744, -3px 0 #00e5ff; }
#msFx.iraa { background: radial-gradient(ellipse at center, rgba(0,0,0,.15) 30%, rgba(0,0,0,.75) 100%); animation: msDim 2.6s forwards; }
#msFx.iraa .eyes { animation: msEyes 2.4s forwards; }
#msFx.iraa .glitch { animation: msGlitch 2.2s .5s forwards; }
@keyframes msDim { 0% { opacity: 0; } 12%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes msEyes { 0% { opacity: 0; transform: translate(-50%, -50%) scaleY(.1); } 15% { opacity: 1; transform: translate(-50%, -50%) scaleY(1); } 45% { transform: translate(-50%, -50%) scaleY(.08); } 52%, 80% { opacity: 1; transform: translate(-50%, -50%) scaleY(1); } 100% { opacity: 0; } }
@keyframes msGlitch { 0% { opacity: 0; } 8% { opacity: 1; transform: translate(-48%, -50%) skewX(18deg); } 14% { transform: translate(-53%, -50%) skewX(-12deg); } 20%, 70% { opacity: 1; transform: translate(-50%, -50%); } 74% { opacity: .2; } 78% { opacity: 1; transform: translate(-46%, -50%); } 100% { opacity: 0; } }
#msFx .ncard { left: 6%; bottom: 24%; display: flex; flex-direction: column; transform: translateX(-30px) rotate(-3deg); }
#msFx .ncard b { font: 900 clamp(30px, 7vw, 64px)/.95 Impact, 'Arial Black', sans-serif; color: #fff; text-transform: uppercase; letter-spacing: 1px; -webkit-text-stroke: 2px #000; text-shadow: 4px 4px 0 #000; }
#msFx .ncard span { margin-top: 6px; align-self: flex-start; background: #ffd400; color: #111; font: 800 clamp(13px, 2.6vw, 20px)/1.2 Arial, sans-serif; padding: 4px 10px; transform: rotate(1deg); }
#msFx .ncard.on { animation: msCard 3.1s forwards; }
@keyframes msCard { 0% { opacity: 0; transform: translateX(-60px) rotate(-3deg); } 10%, 85% { opacity: 1; transform: translateX(0) rotate(-3deg); } 100% { opacity: 0; transform: translateX(20px) rotate(-3deg); } }
body.msFreeze #app canvas { filter: saturate(.25) contrast(1.25) brightness(.9); transition: filter .15s; }
#msFx .fl { inset: 0; }
#msFx.blast .fl { background: radial-gradient(circle at 50% 55%, #fff 0, #ffd180 25%, #ff6d00 55%, rgba(255,60,0,0) 80%); animation: msFlash 1.6s forwards; }
#msFx.flare .fl { background: radial-gradient(circle at 50% 50%, #fff 0, #ff5252 30%, rgba(255,0,0,0) 75%); animation: msFlash 1.2s forwards; }
#msFx.flash .fl { background: #fff; animation: msFlash .7s forwards; }
#msFx.reveal { background: radial-gradient(ellipse at center, rgba(0,40,20,0) 35%, rgba(0,30,10,.65) 100%); animation: msDim 4.2s forwards; }
#msFx.reveal .eyes { animation: msEyes 2.4s forwards; }
@keyframes msFlash { 0% { opacity: 0; } 8% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 640px) { #msPhone { top: calc(58px + var(--safe-t, 0px)); } #msPhone .pl { font-size: 15px; } #msFx .ncard { left: 5%; bottom: 30%; } }
#msPhone .ph > div { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; align-items: flex-start; }

/* 📱 clean HUD (11 Nov): data only when it matters. body.hud-full (☰ → 📊 Full HUD) brings the old cards back. */
body:not(.hud-full) #hud .info { display: none; }
body:not(.hud-full):not(.hud-speed) #hud .speedo { display: none; }
/* ❤️ + ₹ always on (owner 12 Nov), as one compact chip */
body:not(.hud-full) #needs { flex-direction: row; align-items: center; gap: 10px; padding: 6px 10px; min-width: 0; border-radius: 16px; background: rgba(14, 16, 24, .55); }
body:not(.hud-full) #needs #ndH { grid-template-columns: 14px 54px; }
body:not(.hud-full) #needs #ndH span { display: none; }
#needs .ndM { display: flex; gap: 3px; align-items: center; font-size: 12.5px; font-weight: 800; color: #ffe08a; }
#needs .ndM i { font-style: normal; font-weight: 900; color: #ffd24a; font-size: 13px; }
#needs .ndM span { text-align: left; color: #ffe08a; }
#needs .ndM.bump { animation: popIn .35s var(--ease); }
/* over the limit without the speedo: just a red Limit badge */
body:not(.hud-full).hud-over:not(.hud-speed) #hud .speedo { display: flex; padding: 4px 8px; min-width: 0; background: transparent; border: 0; box-shadow: none; }
body:not(.hud-full).hud-over:not(.hud-speed) #hud .speedo span, body:not(.hud-full).hud-over:not(.hud-speed) #hud .speedo small { display: none; }
body:not(.hud-full) #hud .speedo { min-width: 64px; padding: 6px 9px; border-radius: 16px; }
body:not(.hud-full) #hud .speedo span { font-size: 26px; }
body:not(.hud-full) #topBtns button { height: 40px; background: rgba(17, 19, 27, .45); }
body:not(.hud-full) #topBtns button:not(.on) span, body:not(.hud-full) #topBtns button kbd { display: none; }
body:not(.hud-full) #topBtns button { width: 40px; padding: 0; justify-content: center; }
body:not(.hud-full) #minimap { opacity: .92; }
/* mission objective: a slim pill top-centre instead of a big card */
body:not(.hud-full) #msHud { left: 50% !important; transform: translateX(-50%); top: calc(58px + var(--safe-t)) !important; width: min(92vw, 380px) !important; max-width: none;
  padding: 6px 12px 7px 14px !important; border-radius: 16px; font-size: 11.5px; background: rgba(14, 16, 24, .62); }
body:not(.hud-full) #msHud .fhTop { font-size: 12px; }
body:not(.hud-full) #msStatus { margin-top: 2px; font-size: 11px; opacity: .92; }
body:not(.hud-full) #msHud.show { animation: none; }
/* 🎯 objective marker (js/missions.js updateMarker): diamond + distance over the target, edge arrow when off screen */
#tgtMark { position: fixed; left: 0; top: 0; display: none; pointer-events: none; z-index: 6; --c: #ff3fa4; will-change: transform; }
#tgtMark i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; background: var(--c); transform-origin: 50% 50%; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  filter: drop-shadow(0 0 6px var(--c)); opacity: .95; }
#tgtMark b { position: absolute; left: 0; top: 13px; transform: translateX(-50%); white-space: nowrap; font: 700 11.5px/1 system-ui, sans-serif; color: #fff; padding: 3px 7px;
  border-radius: 10px; background: rgba(10, 12, 18, .55); text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
#tgtMark.edge i { clip-path: polygon(50% 0, 100% 100%, 50% 72%, 0 100%); width: 22px; height: 22px; left: -11px; top: -11px; }
#tgtMark.edge b { top: 16px; }
@media (max-width: 700px) {
  body:not(.hud-full) #msHud { left: calc(10px + var(--safe-l)) !important; transform: none; width: calc(100vw - 142px - var(--safe-l) - var(--safe-r)) !important; top: calc(60px + var(--safe-t)) !important; }
}
@media (min-width: 701px) { body:not(.hud-full):has(#navBox.show) #msHud { top: calc(72px + var(--safe-t)) !important; } }
/* area / destination banner: smaller + higher in the clean HUD (it is the only place-name display now) */
body:not(.hud-full) #areaBanner { top: calc(112px + var(--safe-t)); }
body:not(.hud-full) #bnBig { font-size: 21px; letter-spacing: -.3px; }
body:not(.hud-full) #bnHi { font-size: 14px; }
body:not(.hud-full) #bnSmall { font-size: 11px; margin-top: 4px; padding: 3px 9px; }
body:not(.hud-full) #areaBanner::after { margin-top: 6px; width: 40px; }
body:not(.hud-full).ms-on #flyTag { top: calc(124px + var(--safe-t)); font-size: 11px; padding: 5px 12px; opacity: .9; }
@media (min-width: 701px) { body:not(.hud-full).ms-on:has(#navBox.show) #flyTag { top: calc(140px + var(--safe-t)); } }

/* ⏸ pause screen */
#pauseOv { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 40; background: rgba(6, 8, 14, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.paused #pauseOv { display: flex; }
#pauseOv .pv { text-align: center; padding: 22px 26px; border-radius: 22px; background: rgba(20, 22, 32, .85); border: 1px solid var(--line); box-shadow: var(--sh-3); max-width: 86vw; }
#pauseOv .pvT { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
#pvPlay { font-size: 20px; font-weight: 800; padding: 14px 34px; border-radius: 999px; border: 0; color: #fff; background: var(--accent-grad); box-shadow: 0 8px 24px rgba(255, 106, 0, .4); cursor: pointer; }
#pvPlay:active { transform: scale(.96); }
#pauseOv .pvH { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* ✕ on every card (js/game.js closeCard) */
#gameCard .gcX { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
#gameCard .gcX:hover { background: rgba(255, 255, 255, .16); color: #fff; }
#gameCard .gcHead { padding-right: 38px; }

/* 🎮 mission chip + ▾ fold (js/missions.js) */
#msHud .msBtns { display: inline-flex; gap: 4px; }
#msHud #msMin { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer; }
body.ms-min #msHud, body.ms-auto-min #msHud { display: none !important; }
#msChip { position: fixed; left: calc(10px + var(--safe-l)); top: calc(60px + var(--safe-t)); z-index: 7; display: none; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 8px;
  border-radius: 999px; border: 1px solid rgba(255, 210, 74, .55); background: rgba(14, 16, 24, .72); color: #fff; font: 700 13px/1 system-ui, sans-serif; box-shadow: var(--sh-1); cursor: pointer; }
#msChip.show { display: inline-flex; animation: popIn .2s var(--ease); }
#msChip i { font-style: normal; font-size: 18px; }
#msChip small { font-weight: 600; font-size: 10.5px; color: var(--gold, #ffd24a); opacity: .9; }
body.cine #msChip { display: none !important; }

/* 🚤 ghat boat button (main.js ghatTick) */
#ghatAct { position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%); display: none; align-items: center; gap: 6px; padding: 11px 20px; border-radius: 999px;
  border: 1px solid rgba(120, 200, 255, .6); background: linear-gradient(135deg, rgba(10, 90, 160, .92), rgba(20, 140, 200, .92)); color: #fff; font: 700 14px/1 system-ui, sans-serif; box-shadow: var(--sh-2); z-index: 9; cursor: pointer; }
#ghatAct.show { display: inline-flex; animation: slideUp .25s var(--ease); }
body:has(#enAct.show) #ghatAct { bottom: calc(206px + var(--safe-b)); }

#msHud #msInfo { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); font-size: 12px; line-height: 1; cursor: pointer; }
/* ℹ️ mission details modal */
#msInfoModal { position: fixed; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; background: rgba(6, 8, 14, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
#msInfoModal.show { display: flex; }
#msInfoModal .mim { position: relative; width: min(92vw, 440px); max-height: min(82vh, 640px); overflow: auto; padding: 18px 18px 14px; border-radius: 20px; background: rgba(20, 22, 32, .96); border: 1px solid var(--line); box-shadow: var(--sh-3); animation: popIn .22s var(--ease); }
#msInfoModal .mimX { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 15px; cursor: pointer; }
#msInfoModal .mimHead { font-size: 18px; font-weight: 800; padding-right: 40px; color: var(--gold, #ffd24a); }
#msInfoModal .mimSub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
#msInfoModal .mimRow { font-size: 12.5px; margin-top: 8px; }
#msInfoModal .mimBlurb { font-size: 12.5px; line-height: 1.45; margin-top: 8px; color: var(--txt); opacity: .9; }
#msInfoModal .mimNow { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 210, 74, .12); border-left: 3px solid #ffd24a; font-size: 13px; }
#msInfoModal .mimStatus { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--muted); }
#msInfoModal .mimSteps { margin: 12px 0 0; padding-left: 20px; font-size: 12.5px; line-height: 1.7; }
#msInfoModal .mimSteps li { color: var(--muted); } #msInfoModal .mimSteps li.done { color: #7ddc8a; } #msInfoModal .mimSteps li.now { color: #fff; font-weight: 700; }
#msInfoModal .mimSteps li:empty { display: none; }
#msInfoModal .mimBtns { display: flex; gap: 8px; margin-top: 14px; }
#msInfoModal .mimBtns button { flex: 1; min-height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700; cursor: pointer; }
#msInfoModal .mimBtns .mimQuit { background: rgba(229, 57, 53, .18); border-color: rgba(229, 57, 53, .45); }
body.hud-speed #msChip { top: calc(122px + var(--safe-t)); }
@media (max-width: 700px) { body.hud-speed #msChip { top: calc(150px + var(--safe-t)); } }

/* 📱 owner 12 Nov: "in mobile don't show GPS route details at the bottom - not that important - on ✕ it stops suggesting the route".
   Phones keep the route line, the minimap path and GPS Didi's voice; the turn card (and its ✕ that killed the route) is gone. */
body.touch #navBox { display: none !important; }

/* 📱 owner 12 Nov: "update mobile UI better - less clutter" + "fix the landscape mode for game in mobile".
   Phones: smaller dialogue box, slimmer mission card; landscape (short screens) gets its own compact layout so nothing
   covers the road or the pedals: dialogue in the middle strip between the steering and pedal clusters, mission card
   top-left, smaller minimap / buttons / blaster. */
body.touch #sub { font-size: 13px; line-height: 1.35; padding: 7px 11px 8px; max-width: calc(100% - 24px); border-radius: 14px; }
body.touch #sub #subWho { font-size: 10.5px; }
body.touch #msHud #msStatus { font-size: 11px; }
@media (orientation: landscape) and (max-height: 520px) {
  body.touch #sub { bottom: calc(10px + var(--safe-b)); max-width: min(46vw, 420px); min-width: 0; font-size: 11.5px; line-height: 1.3; padding: 5px 10px 6px; }
  body.touch #msHud, body.touch #funHud, body.touch #cabHud, body.touch:not(.hud-full) #msHud { top: calc(52px + var(--safe-t)) !important; left: calc(10px + var(--safe-l)) !important; transform: none !important; width: min(34vw, 290px) !important; max-width: 290px; font-size: 11px; padding: 6px 9px 6px 12px; }
  body.touch #msHud .fhTop { font-size: 11.5px; }
  body.touch #minimap { width: 96px; height: 96px; top: calc(50px + var(--safe-t)); }
  body.touch #touch .tl button { width: 56px; height: 56px; font-size: 18px; }
  body.touch #touch .tr button { width: 60px; height: 74px; font-size: 11px; border-radius: 18px; }
  body.touch #touch .tr button[data-touch=brake] { height: 58px; }
  body.touch #touch .horn { left: calc(142px + var(--safe-l)); width: 44px; height: 44px; font-size: 16px; bottom: calc(22px + var(--safe-b)); }
  body.touch #msFire, body.touch #stFire { width: 58px; height: 58px; right: calc(18px + var(--safe-r)) !important; bottom: calc(100px + var(--safe-b)) !important; }   /* stacked above the pedals: the middle stays free for the dialogue */
  body.touch #msFire i, body.touch #stFire i { font-size: 22px; }
  body.touch #msFire span, body.touch #stFire span { font-size: 9px; }
}
/* portrait phones: the 7-button top bar runs right across the screen, so the ❤️ pill (#hud) moved under the minimap (it sat on ⏸) */
@media (orientation: portrait) and (max-width: 520px) {
  body.touch #hud { top: auto; left: auto; right: calc(10px + var(--safe-r)); top: calc(208px + var(--safe-t)); }
}

/* ---------- 🎮 title menu (13 Nov: New Game / Continue / Missions, no info text) ---------- */
#intro { place-items: center !important; background: radial-gradient(90% 60% at 20% 10%, rgba(255, 122, 26, .28), transparent 60%), radial-gradient(70% 50% at 90% 90%, rgba(48, 160, 90, .18), transparent 60%), rgba(6, 8, 13, .72); }
.card.title { max-width: 400px; padding: 26px 22px 16px; text-align: center; }
.card.title h1 { font-size: 46px; margin-bottom: 18px; }
#titleMenu { display: flex; flex-direction: column; gap: 9px; }
#titleMenu > button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 58px; padding: 11px 16px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--fill); color: #fff; text-align: left; cursor: pointer; transition: transform .12s var(--ease), background .15s, filter .15s; }
#titleMenu > button span { font-size: 16.5px; font-weight: 800; letter-spacing: -.1px; }
#titleMenu > button small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
#titleMenu > button:hover { background: var(--fill-2); }
#titleMenu > button:active { transform: scale(.98); }
#titleMenu > button.tmain { border: none; background: var(--accent-grad); box-shadow: 0 10px 28px rgba(255, 106, 0, .4), var(--hi); }
#titleMenu > button.tmain small { color: rgba(255, 255, 255, .85); }
#titleMenu > button.tmain:hover { filter: brightness(1.07); background: var(--accent-grad); }
#titleMenu #start { position: static; margin: 0; min-height: 58px; font-size: inherit; box-shadow: none; border: 1px solid var(--line-2); background: var(--fill); }
#contBtn[hidden] { display: none !important; }
.tmore { display: flex; gap: 8px; margin-top: 2px; }
.tmore button { flex: 1; width: auto !important; margin: 0 !important; min-height: 44px !important; padding: 9px !important; font-size: 13px !important; border-radius: var(--r) !important; }
.card.title .tcredit { margin: 14px 0 0; font-size: 10.5px; line-height: 1.4; color: var(--muted); opacity: .75; }
@media (max-height: 560px) { .card.title { padding: 14px 18px 10px; } .card.title h1 { font-size: 32px; margin-bottom: 10px; } .card.title .eyebrow { display: none; } #titleMenu > button { min-height: 46px; padding: 8px 14px; } #titleMenu > button small { display: none; } .card.title .tcredit { display: none; } }

/* ---------- 🎬 mission briefing modal ---------- */
#msBrief { position: fixed; inset: 0; z-index: 31; display: none; align-items: center; justify-content: center; padding: calc(12px + var(--safe-t)) 16px calc(12px + var(--safe-b)); background: rgba(4, 6, 12, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#msBrief.show { display: flex; }
#msBrief .mbx { position: relative; display: flex; flex-direction: column; width: min(100%, 460px); max-height: 100%; border-radius: 22px; background: rgba(18, 20, 30, .97); border: 1px solid var(--line-2); box-shadow: var(--sh-3); overflow: hidden; animation: popIn .22s var(--ease); }
#msBrief .mbBody { overflow-y: auto; padding: 20px 18px 6px; }
#msBrief .mbX { position: absolute; right: 12px; top: 12px; z-index: 1; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 15px; cursor: pointer; }
#msBrief .mbAct { font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--accent-2); padding-right: 44px; }
#msBrief .mbTitle { margin: 4px 0 0; font-size: 23px; font-weight: 800; line-height: 1.15; padding-right: 40px; }
#msBrief .mbChips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
#msBrief .mbChips span { padding: 5px 10px; border-radius: var(--pill); background: var(--fill); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
#msBrief .mbBlurb { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: rgba(245, 246, 248, .9); }
#msBrief .mbH { margin: 14px 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
#msBrief ol { margin: 0; padding-left: 22px; font-size: 13.5px; line-height: 1.5; }
#msBrief ol li { margin: 2px 0; }
#msBrief .mbTips { margin: 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.5; color: rgba(245, 246, 248, .82); }
#msBrief .mbTips li { margin: 3px 0; }
#msBrief .mbBtns { display: flex; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); background: rgba(18, 20, 30, .98); }
#msBrief .mbPlay { flex: 2; min-height: 52px; border: none; border-radius: var(--r-lg); background: var(--accent-grad); color: #fff; font-size: 17px; font-weight: 800; box-shadow: 0 8px 22px rgba(255, 106, 0, .38); cursor: pointer; }
#msBrief .mbBack { flex: 1; min-height: 52px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--fill); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
#msBrief .mbPlay:active, #msBrief .mbBack:active { transform: scale(.98); }
@media (orientation: landscape) and (max-height: 520px) { #msBrief .mbx { width: min(100%, 620px); } #msBrief .mbTitle { font-size: 19px; } #msBrief .mbBody { padding-top: 14px; } #msBrief .mbBtns { padding: 8px 14px 10px; } #msBrief .mbPlay, #msBrief .mbBack { min-height: 44px; } }
.tconfirm { display: flex; flex-direction: column; gap: 4px; padding: 4px 4px 8px; text-align: left; }
.tconfirm b { font-size: 16px; }
.tconfirm small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
/* nothing of the game HUD behind the title screen */
body:has(#intro:not(.hide)) #topBtns, body:has(#intro:not(.hide)) #minimap, body:has(#intro:not(.hide)) #mmToggle, body:has(#intro:not(.hide)) #touch, body:has(#intro:not(.hide)) #hud,
body:has(#intro:not(.hide)) #areaBanner, body:has(#intro:not(.hide)) #sub, body:has(#intro:not(.hide)) #msg, body:has(#intro:not(.hide)) #radioChip, body:has(#intro:not(.hide)) #needs,
body:has(#intro:not(.hide)) #navBox, body:has(#intro:not(.hide)) #stats, body:has(#intro:not(.hide)) #pauseBtn, body:has(#intro:not(.hide)) #msChip, body:has(#intro:not(.hide)) [id^=nd] { visibility: hidden !important; }
@media (max-height: 560px) { #titleMenu #start { min-height: 46px; } }
/* ⏸ pause now uses the title card (#intro in pause mode); the old small resume box stays off */
body.paused #pauseOv { display: none; }
body.paused #intro:not(.hide) { z-index: 60; }

/* ---------- ☰ one menu + picture modals (13 Nov) ---------- */
#menu, #volPop, #garage { left: 50% !important; right: auto !important; top: 50% !important; bottom: auto !important; margin: 0 !important; transform: translate(-50%, -47%) scale(.97) !important; transform-origin: center;
  width: min(560px, calc(100vw - 24px - var(--safe-l) - var(--safe-r))) !important; max-width: none !important; min-width: 0 !important; max-height: min(86vh, 86dvh, 720px) !important; overflow-y: auto; overscroll-behavior: contain;
  z-index: 35 !important; box-shadow: 0 0 0 100vmax rgba(4, 6, 12, .55), var(--sh-3) !important; }
#menu.open, #volPop.open, #garage.show { transform: translate(-50%, -50%) !important; }
#volPop { width: min(440px, calc(100vw - 24px)) !important; }
#menu { padding: 0 12px 12px; }
#menu .mhead, #placeModal .kmHead { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; margin: 0 -12px 8px; padding: 14px 14px 10px 18px; background: rgba(20, 22, 32, .96); border-bottom: 1px solid var(--line); }
#menu .mhead b, #placeModal .kmHead b { font-size: 17px; font-weight: 800; }
#menuX, #volX, #placeModal .kmX, #garageX { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 15px; cursor: pointer; flex: none; }
.mgrid { grid-template-columns: repeat(4, 1fr) !important; }
.mgrid button { min-height: 78px !important; }
.mgrid #volBtn { width: auto; height: auto; padding: 12px 4px 10px !important; border-radius: var(--r); }
.mgrid #volBtn.muted { background: rgba(255, 69, 58, .85) !important; }
#menuBtn { width: 48px !important; height: 48px !important; font-size: 20px; }
body.touch .mgrid kbd { display: none; }
@media (min-width: 700px) { .mgrid { grid-template-columns: repeat(5, 1fr) !important; } }
@media (orientation: landscape) and (max-height: 520px) { .mgrid { grid-template-columns: repeat(6, 1fr) !important; } .mgrid button { min-height: 62px !important; } #menu, #volPop, #garage { width: min(720px, calc(100vw - 40px)) !important; max-height: calc(100dvh - 20px) !important; } }

/* 🧭 places modal: tiles with satellite photos */
.kdModal { position: fixed; inset: 0; z-index: 36; display: none; align-items: center; justify-content: center; padding: calc(10px + var(--safe-t)) calc(10px + var(--safe-r)) calc(10px + var(--safe-b)) calc(10px + var(--safe-l)); background: rgba(4, 6, 12, .6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.kdModal.show { display: flex; }
.kdModal .kmx { display: flex; flex-direction: column; width: min(760px, 100%); height: min(100%, 860px); border-radius: 22px; background: rgba(18, 20, 30, .97); border: 1px solid var(--line-2); box-shadow: var(--sh-3); overflow: hidden; animation: popIn .2s var(--ease); }
#placeModal .kmHead { position: static; margin: 0; }
.pmBar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
#pmFind { flex: 1 1 220px; min-width: 0; height: 42px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--line-2); background: rgba(0, 0, 0, .25); color: #fff; font-size: 15px; }
.pmSeg { display: flex; gap: 4px; padding: 3px; border-radius: var(--pill); background: var(--fill); border: 1px solid var(--line); }
.pmSeg button { height: 36px; padding: 0 14px; border: 0; border-radius: var(--pill); background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; }
.pmSeg button.on { background: var(--accent-grad); color: #fff; }
#pmGrid { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px 14px; align-content: start; }
#pmGrid button.pt { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 0 0 9px; border-radius: 16px; border: 1px solid var(--line); background: var(--fill); color: #fff; text-align: left; overflow: hidden; cursor: pointer; transition: transform .12s var(--ease), border-color .15s; }
#pmGrid button.pt:active { transform: scale(.97); }
#pmGrid button.pt:hover { border-color: var(--accent-line); }
#pmGrid button.pt.fav { border-color: rgba(255, 194, 26, .6); }
#pmGrid .pimg { position: relative; display: block; height: 96px; margin-bottom: 6px; overflow: hidden; background: #26303a linear-gradient(135deg, #2b3542, #1d242d); }
#pmGrid .pimg i { position: absolute; left: 50%; top: 50%; width: 512px; height: 512px; background-repeat: no-repeat; background-size: 256px 256px; background-position: 0 0, 256px 0, 0 256px, 256px 256px; pointer-events: none; }
#pmGrid .pimg::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #ff6a00; border: 2px solid #fff; box-shadow: 0 0 0 4px rgba(255, 106, 0, .35); }
#pmGrid .pd { position: absolute; top: 6px; right: 6px; padding: 2px 8px; border-radius: var(--pill); background: rgba(0, 0, 0, .6); font-size: 11px; font-weight: 700; }
#pmGrid b { padding: 0 10px; font-size: 13px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#pmGrid small { padding: 0 10px; font-size: 11px; color: var(--muted); text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmNone { grid-column: 1 / -1; text-align: center; color: var(--muted); }
.pmCredit { margin: 0; padding: 6px 14px 8px; font-size: 10px; color: var(--muted); opacity: .7; border-top: 1px solid var(--line); }
@media (max-width: 420px) { #pmGrid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; } #pmGrid .pimg { height: 88px; } }

/* 🔑 garage as a modal with ride pictures */
#garage { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; padding: 0 12px 12px !important; box-shadow: 0 0 0 100vmax rgba(4, 6, 12, .55), var(--sh-3) !important; }
#garage .gh { position: sticky; top: 0; z-index: 2; margin: 0 -12px 4px !important; padding: 14px 14px 10px 18px; background: rgba(20, 22, 32, .96); border-bottom: 1px solid var(--line); font-size: 17px !important; }
#garage button[data-v] { min-height: 0 !important; padding: 0 0 8px !important; overflow: hidden; justify-content: flex-start !important; }
#garage .vimg { position: relative; display: block; width: 100%; height: 76px; margin-bottom: 4px; background: radial-gradient(80% 90% at 50% 70%, rgba(255, 255, 255, .14), rgba(255, 255, 255, .02)) center / cover no-repeat; font-size: 34px !important; }
#garage .vimg em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; }
#garage .vimg.pic { background-size: contain, cover; background-repeat: no-repeat; background-position: center; }
#garage .vimg.pic em { inset: auto auto 4px 6px; font-size: 16px; display: block; }
#garage button[data-v] b { font-size: 12px !important; padding: 0 6px; }
body.touch #garage .keys { display: none; }
#pmGrid { grid-auto-rows: max-content; min-height: 0; }
#pmGrid button.pt { height: auto; min-height: 148px; flex: none; }
@media (max-width: 420px) { #pmGrid button.pt { min-height: 138px; } }
#garage, #menu, #volPop { background: rgba(18, 20, 30, .97) !important; }
#garage::before { display: none; }

/* 🗂️ mission briefing tabs */
#msBrief .mbTabs { display: flex; gap: 6px; margin: 12px -18px 0; padding: 0 18px 10px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); position: sticky; top: -20px; z-index: 1; background: rgba(18, 20, 30, .98); padding-top: 8px; }
#msBrief .mbTabs::-webkit-scrollbar { display: none; }
#msBrief .mbTabs button { flex: none; height: 36px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--line-2); background: var(--fill); color: rgba(245, 246, 248, .8); font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
#msBrief .mbTabs button.on { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(255, 106, 0, .35); }
#msBrief .mbPane { padding: 12px 0 4px; min-height: 160px; animation: popIn .18s var(--ease); }
#msBrief .mbStepNo { font-size: 11.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--accent-2); }
#msBrief .mbStepT { margin: 3px 0 8px; font-size: 18px; font-weight: 800; line-height: 1.25; }
#msBrief .mbList { margin: 0; padding: 0; list-style: none; }
#msBrief .mbList li { margin: 0 0 8px; padding: 9px 12px; border-radius: 12px; background: var(--fill); font-size: 14px; line-height: 1.45; }
#msBrief .mbQ { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--gold, #ffd24a); border-radius: 0 12px 12px 0; background: rgba(255, 210, 74, .08); font-size: 13.5px; line-height: 1.45; font-style: italic; }
#msBrief .mbQ b { font-style: normal; color: var(--gold, #ffd24a); }
#msBrief .mbWho { margin: 0; font-size: 13.5px; line-height: 1.6; }
#msBrief .mbMini { margin: 0; padding-left: 22px; font-size: 13.5px; line-height: 1.55; }
#msBrief .mbHint { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
#msBrief .mbNext { display: block; width: 100%; margin: 12px 0 4px; min-height: 42px; border-radius: var(--r); border: 1px dashed var(--line-2); background: transparent; color: rgba(245, 246, 248, .85); font-size: 13.5px; font-weight: 700; cursor: pointer; }
#msBrief .mbx { height: min(100%, 700px); }
#msBrief .mbBody { flex: 1; }
/* 📷 place tiles: in-game photo, or a big emoji (no satellite) */
#pmGrid .pimg { height: 96px; display: grid; place-items: center; background: radial-gradient(90% 90% at 50% 40%, rgba(255, 140, 60, .22), rgba(255, 255, 255, .03)); }
#pmGrid .pimg::after { display: none; }
#pmGrid .pimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#pmGrid .pimg em { font-style: normal; font-size: 40px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }

/* 🍛 low health card (side) */
#lowHp { position: fixed; left: calc(10px + var(--safe-l)); top: 34%; z-index: 14; width: min(270px, calc(100vw - 120px)); padding: 10px 10px 8px; border-radius: 18px; background: rgba(40, 10, 14, .9); border: 1px solid rgba(255, 90, 90, .55); box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 3px rgba(255, 60, 60, .12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateX(-110%); pointer-events: none; transition: opacity .25s var(--ease), transform .35s var(--ease); }
#lowHp.show { opacity: 1; transform: none; pointer-events: auto; }
#lowHp .lhHead { display: flex; align-items: center; justify-content: space-between; }
#lowHp .lhHead b { font-size: 15px; font-weight: 800; color: #ff8a8a; animation: lhPulse 1.2s ease-in-out infinite; }
@keyframes lhPulse { 50% { opacity: .55; } }
#lowHp .lhX { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 13px; }
#lowHp .lhSub { margin: 2px 0 6px; font-size: 12px; color: rgba(255, 230, 230, .85); }
#lowHp .lhRow { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 5px; padding: 7px 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: #fff; text-align: left; cursor: pointer; }
#lowHp .lhRow.own { border-color: rgba(255, 194, 26, .6); background: rgba(255, 194, 26, .1); }
#lowHp .lhRow i { font-style: normal; font-size: 20px; }
#lowHp .lhRow span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#lowHp .lhRow b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lowHp .lhRow small { font-size: 11px; color: var(--muted); }
#lowHp .lhRow em { font-style: normal; font-size: 16px; }
#lowHp .lhRow:active { transform: scale(.97); }
@media (orientation: landscape) and (max-height: 520px) { #lowHp { top: 22%; width: 240px; } #lowHp .lhRow { padding: 5px 8px; } }
body:has(#intro:not(.hide)) #lowHp { visibility: hidden; }

/* 📍 "add your area" */
#areaAsk .aaBody { padding: 16px 18px 18px; font-size: 14px; line-height: 1.55; overflow-y: auto; }
#areaAsk .aaBody ol { margin: 8px 0 12px; padding-left: 22px; }
#areaAsk .aaInsta { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; margin-top: 6px; border-radius: var(--r-lg); background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; box-shadow: 0 8px 22px rgba(221, 42, 123, .35); }
#areaAsk .aaHandle { margin-top: 8px; text-align: center; font-size: 13px; color: var(--muted); }
#areaAsk .kmx { height: auto; max-height: 100%; width: min(440px, 100%); }
.pmMore { grid-column: 1 / -1; margin: 4px 0 6px; padding: 12px; border-radius: 14px; border: 1px dashed var(--line-2); background: transparent; color: rgba(245, 246, 248, .85); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.kdModal .kmHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 10px 18px; border-bottom: 1px solid var(--line); }
.kdModal .kmHead b { font-size: 17px; font-weight: 800; }
.kdModal .kmX { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 15px; cursor: pointer; }
body.touch #lowHp { width: min(232px, calc(100vw - 130px)); top: 30%; padding: 8px 8px 6px; }
body.touch #lowHp .lhRow { padding: 6px 7px; }
body.touch #lowHp .lhRow i { font-size: 17px; }

/* 🧭👮 GPS + police speak with an icon (no subtitles) on the left, with a speaking pulse */
#voIcon { position: fixed; left: calc(12px + var(--safe-l)); top: 42%; z-index: 13; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(14, 16, 24, .72); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: translateX(-120%); pointer-events: none; transition: opacity .2s, transform .3s var(--ease); }
#voIcon.on { opacity: 1; transform: none; }
#voIcon i { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-style: normal; font-size: 22px; background: rgba(0, 180, 255, .22); }
#voIcon.pol i { background: rgba(60, 110, 255, .28); }
#voIcon i::before, #voIcon i::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(0, 200, 255, .7); animation: voRing 1.1s ease-out infinite; }
#voIcon.pol i::before, #voIcon.pol i::after { border-color: rgba(255, 70, 70, .75); }
#voIcon i::after { animation-delay: .55s; }
@keyframes voRing { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
#voIcon span { font-size: 12px; font-weight: 700; color: rgba(245, 246, 248, .85); white-space: nowrap; }
body:has(#lowHp.show) #voIcon { top: auto; bottom: calc(150px + var(--safe-b)); }
body:has(#intro:not(.hide)) #voIcon { visibility: hidden; }

/* 13 Nov: subtitles only in cutscenes (#cine panel, 📞 phone panel); the bottom bar and radio subtitles stay off */
#sub, #radioSub { display: none !important; }
#voIcon.talk i { background: rgba(255, 140, 40, .25); }
#voIcon.talk i::before, #voIcon.talk i::after { border-color: rgba(255, 160, 60, .75); }
#voIcon.amb { opacity: .8; }
#voIcon.amb i { background: rgba(255, 255, 255, .12); width: 34px; height: 34px; font-size: 18px; }
#voIcon.amb i::before, #voIcon.amb i::after { border-color: rgba(255, 255, 255, .45); }
body.cine #voIcon { display: none; }

/* 13 Nov: area / place banner = a small chip in the top-left corner (not big on top) */
#areaBanner, body:not(.hud-full) #areaBanner { left: calc(12px + var(--safe-l)) !important; top: calc(12px + var(--safe-t)) !important; transform: translateX(-12px) !important; text-align: left; max-width: min(260px, calc(100vw - 150px));
  padding: 6px 12px 7px; border-radius: 14px; background: rgba(12, 14, 22, .62); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-shadow: none; z-index: 12; }
#areaBanner.show { transform: none !important; }
#areaBanner::after { display: none !important; }
#bnHi, body:not(.hud-full) #bnHi { font-size: 11.5px !important; line-height: 1.2; }
#bnBig, body:not(.hud-full) #bnBig { font-size: 14.5px !important; letter-spacing: -.1px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bnSmall, body:not(.hud-full) #bnSmall { display: block; margin-top: 2px !important; padding: 0 !important; background: none !important; font-size: 11px !important; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (orientation: landscape) and (max-height: 520px) { #areaBanner, body:not(.hud-full) #areaBanner { top: calc(62px + var(--safe-t)) !important; } }
body.cine #areaBanner { top: auto !important; bottom: calc(150px + var(--safe-b)) !important; }

/* ✈️ Udaan beside the phone driving controls (owner 14 Nov) */
#touch .tfly { position: fixed; left: calc(14px + var(--safe-l)); bottom: calc(98px + var(--safe-b)); display: flex; gap: 8px; align-items: center; }
#touch .tfly #tFly, #touch .tfly #tVeh, #touch .tfly #tShout { width: 56px; height: 56px; border-radius: 50%; font-size: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 0; }
#touch .tfly #tFly small, #touch .tfly #tVeh small, #touch .tfly #tShout small { font-size: 8.5px; font-weight: 700; margin-top: 2px; opacity: .85; }
body.flying #touch .tfly #tFly { background: rgba(10, 132, 255, .6); border-color: rgba(120, 190, 255, .9); }
#touch .tfly .tup { display: none; width: 46px; height: 46px; border-radius: 50%; font-size: 17px; padding: 0; }
body.flying #touch .tfly .tup { display: block; }
body.cine #touch .tfly { display: none; }
#touch .tfly #tVeh { touch-action: manipulation; }
@media (max-width: 640px) { body.touch #touch .tfly { bottom: calc(84px + var(--safe-b)); } body.touch #touch .tfly #tFly, body.touch #touch .tfly #tVeh, body.touch #touch .tfly #tShout { width: 50px; height: 50px; } }
@media (orientation: landscape) and (max-height: 520px) { body.touch #touch .tfly { bottom: calc(76px + var(--safe-b)); } body.touch #touch .tfly #tFly, body.touch #touch .tfly #tVeh, body.touch #touch .tfly #tShout { width: 44px; height: 44px; font-size: 17px; } body.touch #touch .tfly .tup { width: 40px; height: 40px; } }
/* 🎯 per-objective brief (same modal, no "Wapas") */
#msBrief.step .mbBack { display: none; }
#msBrief.step .mbPlay { flex: 1; }
body.touch #flyTag { display: none !important; }

/* 📱 full screen tip on the title card (owner 14 Nov) */
#intro .fsTip { display: block; margin: 10px auto 0; background: none; border: 1px dashed rgba(255,255,255,.3); color: rgba(255,255,255,.85); font: 600 12.5px Inter, sans-serif; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
#intro .fsTip[hidden], #fsHelp[hidden] { display: none; }
#fsHelp { margin: 10px 0 0; text-align: left; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.45; color: #e9ecf3; }
#fsHelp ol { margin: 6px 0 6px 18px; padding: 0; }
#fsHelp li { margin: 3px 0; }
#fsHelp p { margin: 4px 0 8px; font-size: 12px; opacity: .8; }
#fsHelp .fsIco { display: inline-block; background: rgba(10,132,255,.25); border-radius: 6px; padding: 0 4px; }
#fsHelp button { width: 100%; border: 0; border-radius: 10px; padding: 8px; background: rgba(255,255,255,.12); color: #fff; font: 700 13px Inter, sans-serif; }
body.paused #intro .fsTip, body.paused #fsHelp { display: none; }

/* owner 14 Nov: big map must win over the phone layout rules above (they used to push it half off the top and move the ✕) */
body.bigmap #minimap, body.touch.bigmap #minimap { left: 50% !important; top: 50% !important; right: auto !important; bottom: auto !important; transform: translate(-50%, -50%) !important; }
body.bigmap #mmToggle, body.touch.bigmap #mmToggle { right: auto !important; bottom: auto !important; width: 42px !important; height: 42px !important; font-size: 17px !important;
  left: calc(50% + min(calc(100vw - 40px), calc(100vh - 140px), 820px) / 2 - 28px) !important; top: calc(50% - min(calc(100vw - 40px), calc(100vh - 140px), 820px) / 2 + 8px) !important; }
body.touch.bigmap #mmHint { font-size: 11px; white-space: normal; max-width: calc(100% - 24px); text-align: center; }

/* 🗣️ owner 14 Nov: the speaker is just an icon, low on the left just above the controls (not mid-screen);
   tap it to see the name + the line, tap again to fold */
#voIcon { top: auto !important; bottom: calc(96px + var(--safe-b)); pointer-events: auto; cursor: pointer; padding: 4px; gap: 0; max-width: min(78vw, 420px); touch-action: manipulation; }
#voIcon .vt { display: none; }
#voIcon span { display: none; }
#voIcon.full { padding: 5px 12px 5px 5px; gap: 9px; border-radius: 22px; }
#voIcon.full .vt { display: block; min-width: 0; }
#voIcon.full span { display: block; font-size: 11px; color: rgba(255, 190, 120, .95); }
#voIcon .vt b { display: block; font-size: 12.5px; font-weight: 500; line-height: 1.3; color: #f5f6f8; white-space: normal; }
#voIcon.amb { opacity: .9; }
body.touch #voIcon { bottom: calc(146px + var(--safe-b)); }
@media (orientation: landscape) and (max-height: 520px) { body.touch #voIcon { bottom: calc(130px + var(--safe-b)); } }
body.flying.touch #voIcon { bottom: calc(196px + var(--safe-b)); }
body.flying #touch .tfly #tShout { display: none; }   /* flying: ⬆️⬇️ take that spot */
#touch .tfly #tShout { touch-action: manipulation; }

/* 📱 phones: the new objective's brief inside the top-left mission card (missions.js tipStep), folds after 9 s or on tap */
#msTip { display: none; margin: 6px 0 4px; padding: 7px 9px; border-radius: 12px; background: rgba(255, 210, 74, .12); border: 1px solid rgba(255, 210, 74, .35); font-size: 11.5px; line-height: 1.35; cursor: pointer; }
#msTip.show { display: block; animation: popIn .2s var(--ease); }
#msTip .mtNo { font-weight: 800; color: var(--gold, #ffd24a); font-size: 11px; margin-bottom: 3px; }
#msTip .mbList { margin: 0; padding: 0 0 0 2px; list-style: none; }
#msTip .mbList li { margin: 2px 0; }
#msHud.pulse { animation: msPulse 1.2s ease-out 2; }
@keyframes msPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 74, .7); } 100% { box-shadow: 0 0 0 14px rgba(255, 210, 74, 0); } }
body.touch #msHud { max-height: calc(100vh - 300px); overflow: auto; }
