/* =============================================================================
   world/world.css — Campus World, full-screen.

   Kerala-style minimal HUD in deep valley green + deodar gold, with the app's
   orange accent. Glass panels, safe-area aware, touch controls only on touch
   devices, a text-size scale (--ts) and reduced-motion support.
   Loaded only by world.html (?v-hashed).
   ============================================================================= */

:root { --g: #123c34; --g2: #0c2a24; --gold: #e7c46a; --acc: #d4704a; --ink: #f5f1e6; --ink2: #c9d6cf; --glass: rgba(10, 30, 26, 0.72); --line: rgba(231, 196, 106, 0.35); --ts: 1; --r: 16px; --teal: #3fd6c1; --amber: #f0a73a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }       /* classes below set display; `hidden` must still win */
html, body { margin: 0; height: 100%; overflow: hidden; background: #0f1714; color: var(--ink); font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: calc(15px * var(--ts)); -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws { position: fixed; inset: 0; height: 100dvh; overflow: hidden; touch-action: none; user-select: none; }
.ws-canvas { position: absolute; inset: 0; }
.ws-canvas canvas { display: block; width: 100%; height: 100%; outline: none; }

/* loading */
.w-loading { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 30%, #1d4a3f 0%, #0c1e1a 65%); transition: opacity .7s ease; padding: 20px; }
.w-loading.gone { opacity: 0; pointer-events: none; }
.wl-card { width: min(440px, 100%); text-align: center; }
.wl-peak { font-size: 54px; animation: float 3s ease-in-out infinite; }
.wl-kicker, .ob-kicker { letter-spacing: .18em; font-size: .72rem; color: var(--gold); margin: 10px 0 2px; font-weight: 700; }
.wl-card h1 { margin: 0 0 18px; font-size: 2rem; font-family: Georgia, 'Times New Roman', serif; font-weight: 600; }
.wl-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; border: 1px solid var(--line); }
.wl-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--acc)); transition: width .25s ease; }
.wl-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink2); margin: 8px 2px; }
.wl-tip { min-height: 3em; font-size: .9rem; color: var(--ink2); margin-top: 18px; line-height: 1.45; }
@keyframes float { 50% { transform: translateY(-8px); } }
.w-unavailable { position: absolute; inset: 0; z-index: 60; display: grid; place-content: center; text-align: center; gap: 10px; padding: 24px; background: #0f1714; }
.w-unavailable h1 { margin: 0; font-size: 1.4rem; }
.w-unavailable p { margin: 0; color: var(--ink2); max-width: 42ch; }
.w-unavailable a { color: var(--gold); }

/* onboarding */
.w-onboard { position: absolute; z-index: 30; right: max(16px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); width: min(420px, calc(100% - 32px)); }
.ob-card { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); max-height: calc(100dvh - 40px); overflow: auto; }
.ob-steps { display: flex; gap: 10px; font-size: .78rem; color: var(--ink2); margin: 6px 0 14px; }
.ob-steps .on { color: var(--gold); font-weight: 700; }
.ob-steps .done { color: #9fd7b9; }
.ob-body label { display: block; font-weight: 700; margin: 12px 0 6px; font-size: .9rem; }
.ob-body input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink); font-size: 1rem; }
.ob-hint { color: var(--ink2); font-size: .85rem; margin: 6px 0 10px; line-height: 1.4; }
.ob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ob-grid h4 { grid-column: 1 / -1; margin: 8px 0 0; font-size: .75rem; letter-spacing: .1em; color: var(--gold); text-transform: uppercase; }
.ob-grid button, .ob-outfits button, .ob-spawns button { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); text-align: left; font-size: .88rem; }
.ob-grid button i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.ob-grid button.on, .ob-outfits button.on, .ob-spawns button.on { border-color: var(--gold); background: rgba(231, 196, 106, .16); }
.ob-outfits, .ob-spawns { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-colors { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ob-colors button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); background: var(--c); font-size: .8rem; }
.ob-colors button.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231, 196, 106, .35); }
.ob-err { color: #ff9c8a; min-height: 1em; font-size: .85rem; margin: 6px 0 0; }
.ob-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.ob-pri { background: linear-gradient(135deg, var(--gold), #d9a441); color: #1c1507; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 800; }
.ob-sec { background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.ob-foot { font-size: .75rem; color: var(--ink2); text-align: center; margin: 12px 0 0; }

/* HUD */
.w-hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; opacity: 0; transition: opacity .4s; }
.ws.playing .w-hud { opacity: 1; }
.w-hud button, .w-hud canvas { pointer-events: auto; }
.hud-fm { display: none; position: absolute; top: calc(112px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); max-width: min(320px, calc(100vw - 104px)); padding: 6px 10px; border: 1px solid rgba(231,196,106,.3); border-radius: 10px; background: rgba(12,20,16,.75); color: #f2e6be; font: 600 11px/1.35 Inter,system-ui,sans-serif; }
.hud-fm.on { display: block; }
.w-replay { position: absolute; inset: 0; z-index: 32; pointer-events: none; color: #fff; font: 600 14px system-ui, sans-serif; }
.w-replay[hidden] { display: none; }
.rp-top, .rp-controls, .rp-status { pointer-events: auto; position: absolute; background: rgba(12, 24, 31, .88); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; backdrop-filter: blur(8px); }
.rp-top { top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); min-height: 48px; padding: 6px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-controls { bottom: max(52px, env(safe-area-inset-bottom)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); padding: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.rp-top button, .rp-controls button { min-width: 48px; min-height: 48px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: #234254; color: #fff; font: inherit; }
.rp-controls button[data-rp="export"] { background: #d38731; color: #1c211e; }
.rp-status { bottom: max(8px, env(safe-area-inset-bottom)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); text-align: center; padding: 8px; font-size: 12px; }
.hud-tl { position: absolute; left: max(12px, env(safe-area-inset-left)); top: max(12px, env(safe-area-inset-top)); }
.hud-pill { display: flex; gap: 12px; align-items: center; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font-size: .9rem; }
.hud-pill b { color: var(--gold); }
.hud-name { font-weight: 800; max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hudName { position: relative; pointer-events: auto; touch-action: none; cursor: pointer; }
#hudName::before { content: ''; position: absolute; inset: -13px -8px; }
.hud-sub { margin: 6px 0 0 14px; font-size: .78rem; color: var(--ink2); text-shadow: 0 1px 3px #000; letter-spacing: .06em; }
.hud-tr { position: absolute; right: max(12px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); display: flex; gap: 8px; align-items: flex-start; }
.hud-mini { width: 132px; height: 132px; border-radius: 50%; border: 2px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, .45); background: #1f3226; cursor: pointer; }
.hud-btns { display: flex; flex-direction: column; gap: 6px; }
.hud-btns button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); }
.hud-turn { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -10px); background: rgba(12, 60, 70, .82); border: 1px solid rgba(60, 230, 255, .5); border-radius: 14px; padding: 8px 16px; font-weight: 800; opacity: 0; transition: .25s; white-space: nowrap; }
.hud-turn.show { opacity: 1; transform: translate(-50%, 0); }
.hud-clear-route { position: absolute; top: max(61px, calc(env(safe-area-inset-top) + 47px)); left: 50%; transform: translateX(-50%); min-height: 48px; padding: 7px 15px; border-radius: 13px; border: 1px solid rgba(60,230,255,.45); background: rgba(12,40,48,.88); color: #e8fcff; font-weight: 700; }
.hud-clear-route[hidden] { display: none; }
.hud-bl { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hud-loc { opacity: 0; transform: translateY(8px); transition: .5s; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.hud-loc.show { opacity: 1; transform: none; }
.hud-loc b { display: block; font-family: Georgia, serif; font-size: 1.9rem; font-weight: 600; }
.hud-loc small { color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: .75rem; }
.hud-loc::before { content: ''; display: block; width: 34px; height: 2px; background: var(--gold); margin-bottom: 8px; }
.hud-next { display: flex; align-items: center; gap: 12px; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; text-align: left; max-width: min(360px, 70vw); }
.hud-next small { display: block; font-size: .66rem; letter-spacing: .14em; color: var(--ink2); }
.hud-next b { font-size: .92rem; }
.hn-key { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--gold); font-weight: 800; flex: none; }
.hn-arrow { color: var(--ink2); font-size: 1.3rem; }
/* P4-BUG-5: "Where to next?" collapses to a compass chip (× or auto after 6 s); tap the chip to see it again */
.hud-next-wrap { position: relative; display: flex; align-items: flex-start; gap: 6px; }
.hud-next-x { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--ink2); font-size: 1rem; line-height: 1; padding: 0; display: grid; place-items: center; }
.hud-next-chip { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); font-size: 1.2rem; padding: 0; }
.hud-next-wrap.collapsed .hud-next, .hud-next-wrap.collapsed .hud-next-x { display: none; }
.hud-next-wrap.collapsed .hud-next-chip { display: grid; place-items: center; }
.hud-next-wrap.collapsed.fresh .hud-next-chip { animation: nextPulse 1.2s ease-out 2; }
.hud-next-wrap.off { display: none; }
@keyframes nextPulse { 0% { box-shadow: 0 0 0 0 rgba(231, 196, 106, .6); } 100% { box-shadow: 0 0 0 14px rgba(231, 196, 106, 0); } }
.hud-speed { position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); font-weight: 900; font-size: 1.6rem; text-shadow: 0 2px 8px #000; display: none; }
.ws.driving .hud-speed { display: block; }
/* the speed readout never sits on the "Where to next?" card: on narrow screens it moves to the right edge, and the card is narrower while driving */
@media (max-width: 760px) { .ws.driving .hud-speed { left: auto; right: max(14px, env(safe-area-inset-right)); bottom: auto; top: calc(max(12px, env(safe-area-inset-top)) + 150px); transform: none; font-size: 1.3rem; } }
.ws.driving .hud-next-wrap:not(.off) .hud-next { max-width: min(300px, 55vw); }
.hud-prompt { position: absolute; left: 50%; bottom: max(90px, calc(env(safe-area-inset-bottom) + 90px)); transform: translate(-50%, 6px); background: rgba(0, 0, 0, .62); border-radius: 12px; padding: 8px 14px; font-weight: 700; opacity: 0; transition: .2s; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
.hud-prompt.show { opacity: 1; transform: translate(-50%, 0); }
.hud-fps { position: absolute; right: 14px; bottom: 10px; font-size: .72rem; color: var(--ink2); text-shadow: 0 1px 2px #000; }

/* world labels */
.w-labels { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.w-label { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: .78rem; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: rgba(13, 43, 39, .78); border: 1px solid rgba(191, 230, 213, .35); will-change: transform; }
.w-label.landmark { font-size: .86rem; background: rgba(18, 60, 52, .88); border-color: var(--line); }
.w-label.pickup { background: rgba(60, 40, 10, .75); border-color: rgba(231, 196, 106, .5); color: #ffe7b0; }
.w-label.bus { background: rgba(120, 50, 20, .8); border-color: rgba(255, 154, 90, .6); }

/* toasts */
.w-toasts { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92vw, 520px); }
.w-toast { background: rgba(10, 30, 26, .9); border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px; font-weight: 600; font-size: .9rem; text-align: center; animation: tin .25s ease; transition: opacity .5s, transform .5s; }
.w-toast.good { border-color: rgba(143, 230, 170, .6); }
.w-toast.out { opacity: 0; transform: translateY(-6px); }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } }

/* touch controls — only on touch devices */
.w-touch { display: none; }
@media (pointer: coarse) {
  .ws.playing .w-touch { display: block; }
  /* joystick: rests visibly at its home corner, moves to the thumb, glows gold in the sprint zone */
  .t-joy { position: absolute; z-index: 12; left: calc(max(16px, env(safe-area-inset-left)) + 66px); top: calc(100% - max(22px, env(safe-area-inset-bottom)) - 66px); width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); background: radial-gradient(circle, rgba(0, 0, 0, .08), rgba(0, 0, 0, .22)); opacity: .5; pointer-events: none; transition: opacity .15s, border-color .15s, box-shadow .15s; }
  .t-joy.on { opacity: 1; transition: opacity .15s, border-color .15s, box-shadow .15s; }
  .t-joy.sprint { border-color: var(--gold); box-shadow: 0 0 18px rgba(231, 196, 106, .55); }
  .t-joy span { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(255, 255, 255, .78); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
  .t-joy i { position: absolute; left: 0; right: 0; top: calc(100% + 6px); text-align: center; font: 700 10px/1 system-ui, sans-serif; letter-spacing: .12em; color: rgba(255, 255, 255, .75); font-style: normal; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
  .t-joy.on i { display: none; }
  /* auto-run lock above the ring (BGMI-style): drag up onto it and release */
  .t-joy.on::before { content: 'RUN'; position: absolute; left: 50%; top: -88px; transform: translateX(-50%); padding: 6px 10px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .3); color: #fff; font: 800 11px/1 system-ui, sans-serif; letter-spacing: .12em; }
  .t-joy.lockarm::before { background: var(--gold); border-color: var(--gold); color: #1a1a1a; transform: translateX(-50%) scale(1.15); }
  .t-joy.locked { opacity: .95; border-color: var(--gold); box-shadow: 0 0 18px rgba(231, 196, 106, .55); }
  .t-joy.locked::before { content: 'AUTO-RUN'; position: absolute; left: 50%; top: -30px; transform: translateX(-50%); padding: 5px 9px; border-radius: 999px; background: var(--gold); color: #1a1a1a; font: 800 10px/1 system-ui, sans-serif; letter-spacing: .1em; white-space: nowrap; }
  .ws.left-handed .t-joy:not(.on) { left: calc(100% - max(16px, env(safe-area-inset-right)) - 66px); }
  .t-foot, .t-drive { position: absolute; z-index: 12; right: max(14px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2, 58px); gap: 10px; align-items: end; }
  .t-foot .t-act, .t-drive .t-act { grid-column: 1 / -1; justify-self: end; width: 72px; height: 72px; font-size: 1.5rem; }
  .t-foot button, .t-drive button, .t-top button { width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); font-size: 1.3rem; font-weight: 800; touch-action: none; }
  .t-foot button.down, .t-drive button.down { background: rgba(231, 196, 106, .35); }
  .t-act { background: linear-gradient(135deg, var(--gold), #d9a441) !important; color: #1c1507; }
  .t-drive, .t-fly { display: none; }
  .ws.rafting #tWave { display: none; }
  .ws.rafting #tJump { min-width: 68px; border-radius: 18px; font-size: .8rem; }
  .ws.flying .t-foot, .ws.flying .t-drive { display: none; }
  .ws.flying .t-fly { display: grid; position: absolute; z-index: 12; right: max(14px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); grid-template-columns: repeat(2, 58px); gap: 10px; }
  .t-fly button { width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); font-size: 1.3rem; font-weight: 800; touch-action: none; }
  .t-fly button.down { background: rgba(231, 196, 106, .35); }
  .ws.left-handed .t-fly { right: auto; left: max(14px, env(safe-area-inset-left)); }
  .ws.driving .t-foot { display: none; }
  .ws.driving .t-drive { display: grid; }
  .t-top { position: absolute; z-index: 12; right: max(14px, env(safe-area-inset-right)); top: 190px; display: flex; flex-direction: column; gap: 8px; }
  .t-top button { width: 44px; height: 44px; font-size: 1rem; }
  .ws.left-handed .t-foot, .ws.left-handed .t-drive, .ws.left-handed .t-top { right: auto; left: max(14px, env(safe-area-inset-left)); }
  /* short (landscape) screens: map + camera sit beside the action cluster instead of on top of it */
  @media (max-height: 520px) {
    .t-top { top: auto; bottom: max(18px, env(safe-area-inset-bottom)); right: calc(max(14px, env(safe-area-inset-right)) + 138px); }
    .ws.left-handed .t-top { right: auto; left: calc(max(14px, env(safe-area-inset-left)) + 138px); }
  }
  .ws.left-handed .hud-bl { left: auto; right: max(14px, env(safe-area-inset-right)); align-items: flex-end; }
  .hud-bl { bottom: max(150px, calc(env(safe-area-inset-bottom) + 150px)); }
  .hud-loc b { font-size: 1.4rem; }
  .hud-mini { width: 108px; height: 108px; }
  .w-onboard { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); transform: none; right: 50%; translate: 50% 0; }
}

/* full screens: map + settings */
.w-screen { position: absolute; inset: 0; z-index: 35; background: rgba(8, 20, 18, .94); backdrop-filter: blur(10px); display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.w-screen header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 6px 4px 12px; }
.w-screen header small { color: var(--gold); letter-spacing: .16em; font-size: .7rem; font-weight: 700; }
.w-screen header h2 { margin: 2px 0 0; font-family: Georgia, serif; font-weight: 600; font-size: 1.6rem; }
.w-screen .x { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 1.1rem; }
.map-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.map-tabs button { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 7px 14px; font-weight: 700; font-size: .85rem; }
.map-tabs button.on { background: rgba(231, 196, 106, .18); color: var(--gold); }
.map-body { flex: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; min-height: 0; }
.map-view { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); min-height: 0; }
.map-view canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.map-real { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(12,20,16,0.78); color: #f2efe6; font: 600 12px/1 Inter, system-ui, sans-serif; }
.map-real input { width: min(160px, 32vw); accent-color: #f0c766; }
.map-history { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; max-width: min(290px, calc(100% - 68px)); padding: 7px 9px; border-radius: 12px; background: rgba(12,20,16,.86); color: #f2efe6; font: 600 12px/1.3 Inter,system-ui,sans-serif; }
.map-history select { min-height: 40px; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #24352a; color: #fff; font: inherit; }
.map-history input[type="range"] { width: min(125px, 28vw); accent-color: #f0c766; min-height: 36px; }
.map-history small { flex-basis: 100%; color: #e2d8bc; font-size: 10px; overflow-wrap: anywhere; }
.map-ctl { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.map-ctl button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); font-size: 1.1rem; }
.map-list { overflow: auto; padding-right: 4px; }
.map-list h3 { margin: 14px 0 6px; font-size: .75rem; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
.map-progress { color: var(--ink2); font-size: .88rem; margin: 2px 0 8px; }
.map-place { border-radius: 12px; margin-bottom: 4px; }
.map-place.sel { background: rgba(231, 196, 106, .1); border: 1px solid var(--line); }
.mp-name { width: 100%; text-align: left; background: transparent; border: 0; padding: 9px 10px; display: flex; gap: 10px; align-items: center; font-weight: 600; }
.mp-name small { color: var(--ink2); font-weight: 400; }
.map-place:not(.found) .mp-name { opacity: .7; }
.mp-actions { display: flex; gap: 8px; padding: 0 10px 10px; }
.mp-actions button, .map-mission button, .map-garage button, .map-secondary { border: 1px solid var(--line); background: rgba(231, 196, 106, .14); border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.mp-actions button:disabled { opacity: .45; cursor: not-allowed; }
.map-mission { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); margin-bottom: 6px; }
.map-mission small { color: var(--ink2); }
.map-mission.done { border-color: rgba(143, 230, 170, .35); }
.tick { color: #8fe6aa; } .daily { font-size: .7rem; background: var(--acc); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.map-garage { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.map-garage button { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px; background: rgba(255, 255, 255, .04); }
.map-garage button.locked { opacity: .62; }
.map-garage span { font-size: 1.6rem; } .map-garage small { color: var(--ink2); font-weight: 400; }
.map-secondary { margin-top: 12px; background: transparent; }
@media (max-width: 760px) { .map-body { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } }

.w-settings .set-body { overflow: auto; max-width: 640px; width: 100%; margin: 0 auto; padding-bottom: 30px; }
.set-body h3 { color: var(--gold); letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; margin: 18px 0 8px; }
.set-body label { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.set-body label.chk { justify-content: flex-start; }
.set-body select, .set-body input[type=range] { max-width: 58%; }
.set-body select { background: rgba(0, 0, 0, .35); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.set-body button { border: 1px solid var(--line); background: rgba(231, 196, 106, .14); border-radius: 10px; padding: 10px 14px; min-height: 48px; font-weight: 700; margin-top: 10px; }
.set-body button.danger { background: rgba(200, 60, 50, .2); border-color: rgba(255, 120, 100, .5); display: block; margin-top: 22px; }
.set-note { color: var(--ink2); font-size: .85rem; line-height: 1.5; }
.set-note a { color: var(--gold); }
details { margin-top: 10px; } summary { cursor: pointer; font-weight: 700; }

/* overview, fade */
.w-overview { position: absolute; inset: 0; z-index: 45; background: #0f1714; }
.w-overview .ov-map { position: absolute; inset: 0; }
.w-overview .ov-status { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); background: var(--glass); padding: 8px 14px; border-radius: 12px; margin: 0; }
.w-overview .ov-status:empty { display: none; }
.w-overview #ovBack { position: absolute; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
.w-fade { position: absolute; inset: 0; z-index: 44; background: #000; opacity: 0; pointer-events: none; transition: opacity .35s; }
.w-fade.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
button:focus-visible, canvas:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* C7 phone */
.w-phone { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(8, 14, 12, .45); }
.w-phone[hidden] { display: none; }
.ph-frame { width: min(360px, calc(100vw - 32px)); height: min(640px, calc(100vh - 48px)); background: #10201b; color: #f3ecd8; border: 3px solid #2b3d36; border-radius: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.5); display: flex; flex-direction: column; overflow: hidden; }
.ph-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ph-bar .ph-title { flex: 1; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-bar button { background: none; border: 0; color: inherit; font-size: 20px; min-width: 32px; min-height: 32px; cursor: pointer; }
.ph-clock { font-size: 12px; opacity: .7; }
.ph-body { flex: 1; overflow-y: auto; padding: 12px 14px 18px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.ph-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border-radius: 16px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); color: inherit; cursor: pointer; }
.ph-grid button span { font-size: 28px; }
.ph-discover { display: grid; gap: 5px; margin-top: 12px; padding: 12px; border: 1px solid rgba(231,196,106,.48); border-radius: 15px; background: linear-gradient(135deg, rgba(91,64,34,.62), rgba(18,67,65,.55)); }
.ph-discover b { color: #ffe3a4; font-size: 14px; }
.ph-discover small { color: #e1e8de; font-size: 11px; line-height: 1.35; }
.ph-discover div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 4px; }
.ph-discover button { min-height: 48px; padding: 5px; border: 1px solid rgba(231,196,106,.5); border-radius: 9px; background: rgba(10,34,31,.86); color: #fff3d9; font: 700 11px/1.2 system-ui, sans-serif; }
.ph-xp { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ph-xp i { flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #e7c46a var(--p), rgba(255,255,255,.12) var(--p)); }
.ph-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.ph-row small { display: block; opacity: .72; font-size: 12px; }
.ph-row.done { opacity: .55; } .ph-row.now b, .ph-row.next b { color: #ffcf6a; }
.ph-row button, .ph-big { border: 1px solid rgba(231,196,106,.5); background: rgba(231,196,106,.14); color: inherit; border-radius: 10px; padding: 8px 12px; font-weight: 700; cursor: pointer; }
.ph-row button:disabled { opacity: .4; cursor: default; }
.ph-big { width: 100%; padding: 16px; font-size: 16px; margin: 10px 0; }
.ph-tag { font-size: 11px; opacity: .7; text-transform: uppercase; }
.ph-note { font-size: 12px; opacity: .8; margin: 8px 0; } .ph-note a { color: #ffcf6a; }
.w-phone h4 { margin: 12px 0 4px; font-size: 13px; color: #e7c46a; }
.ph-ach { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ph-ach div { padding: 8px; border-radius: 10px; background: rgba(255,255,255,.04); opacity: .55; font-size: 12px; }
.ph-ach div.got { opacity: 1; background: rgba(231,196,106,.12); }
.ph-ach span { font-size: 18px; } .ph-ach b, .ph-ach small { display: block; } .ph-ach small { opacity: .7; }
.ph-share { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 12px; border-bottom: 1px solid rgba(255,255,255,.07); }
.ph-share button { border: 1px solid rgba(231,196,106,.5); background: rgba(231,196,106,.14); color: inherit; border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.ph-share canvas { background: #fff; border-radius: 8px; image-rendering: pixelated; }

/* C8 minigame meter (the game itself is on the 3D sports ground) */
.w-mini { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 38; width: min(400px, calc(100vw - 32px)); }
.w-mini[hidden] { display: none; }
.mg-card { background: rgba(16, 32, 27, .92); color: #f3ecd8; border: 1px solid rgba(231,196,106,.35); border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.mg-card header { display: flex; align-items: center; gap: 8px; } .mg-card header b { flex: 1; } .mg-card header button { background: none; border: 0; color: inherit; font-size: 18px; min-width: 48px; min-height: 48px; }
.mg-card header .mg-practice { color: #ffd580; font-size: 13px; font-weight: 700; padding: 0 4px; }
.mg-card canvas { width: 100%; height: auto; display: block; border-radius: 8px; }
.mg-msg { font-size: 13px; margin: 6px 0; min-height: 1.2em; }
.mg-tap { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid rgba(231,196,106,.5); background: rgba(231,196,106,.18); color: inherit; font-weight: 800; font-size: 15px; }

/* H11 screensaver: HUD away, a caption of live data */
body.w-screensaver .w-hud, body.w-screensaver .w-touch, body.w-screensaver .w-labels { display: none !important; }
.w-saver { position: fixed; left: 50%; bottom: 7vh; transform: translateX(-50%); z-index: 45; text-align: center; color: #f6f1e4; text-shadow: 0 2px 12px rgba(0,0,0,.6); pointer-events: none; max-width: calc(100vw - 32px); }
.w-saver[hidden] { display: none; }
.w-saver b { display: block; font: 700 clamp(22px, 4vw, 44px)/1.1 'Fraunces', Georgia, serif; }
.w-saver span { display: block; margin-top: 6px; font-size: clamp(13px, 1.8vw, 18px); opacity: .92; }
.w-saver small { display: block; margin-top: 10px; font-size: 12px; opacity: .6; }
.w-saver p { margin: 8px auto 0; max-width: 640px; font-size: clamp(13px, 1.6vw, 16px); line-height: 1.45; opacity: .95; }
/* Phase 4 §3.6 crash & recovery card */
.w-guard { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(6, 14, 12, .55); padding: 16px; }
.w-guard[hidden] { display: none; }
.wg-card { width: min(420px, 100%); background: var(--glass); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 20px; padding: 20px; text-align: center; }
.wg-card h2 { margin: 0 0 6px; font: 600 1.3rem Georgia, serif; }
.wg-card p { margin: 0 0 14px; color: var(--ink2); }
.wg-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 10px; }
.wg-link { background: none; border: 0; color: var(--gold); text-decoration: underline; }
.wg-card pre { max-height: 30vh; overflow: auto; text-align: left; font-size: 11px; white-space: pre-wrap; user-select: text; }
/* H10 sandbox picker */
.ph-grid button.on { border-color: rgba(231,196,106,.8); background: rgba(231,196,106,.2); }
.ph-row input { width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.25); color: inherit; }

/* D1 intro title */
.w-intro { position: fixed; inset: 0; z-index: 46; display: grid; place-content: center; text-align: center; color: #f6f1e4; pointer-events: none; text-shadow: 0 4px 24px rgba(0,0,0,.55); }
.w-intro[hidden] { display: none; }
.w-intro h1 { font: 700 clamp(48px, 11vw, 132px)/1 'Fraunces', Georgia, serif; margin: 0; opacity: 0; transform: translateY(12px); transition: opacity 2.4s ease, transform 2.4s ease; letter-spacing: .02em; }
.w-intro p { margin: 10px 0 0; font-size: clamp(14px, 2vw, 20px); opacity: 0; transition: opacity 2.4s ease .6s; }
.w-intro.shown h1, .w-intro.shown p { opacity: 1; transform: none; }
.w-intro.out h1, .w-intro.out p { opacity: 0; }
.w-intro button { pointer-events: auto; position: fixed; right: 18px; bottom: 18px; }
@media (prefers-reduced-motion: reduce) { .w-intro h1, .w-intro p { transition: none; } }
/* D2 photo mode */
body.w-photomode .w-hud, body.w-photomode .w-touch, body.w-photomode .w-labels { display: none !important; }
.w-photo { position: fixed; right: 16px; top: 16px; z-index: 44; width: min(300px, calc(100vw - 32px)); }
.w-photo[hidden] { display: none; }
.pm-card { background: rgba(16, 32, 27, .9); color: #f3ecd8; border: 1px solid rgba(231,196,106,.35); border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; font-size: 13px; }
.pm-card header { display: flex; align-items: center; justify-content: space-between; } .pm-card header button { background: none; border: 0; color: inherit; font-size: 18px; min-width: 32px; min-height: 32px; }
.pm-card label { display: grid; gap: 4px; } .pm-card label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 8px; }
.pm-card select, .pm-card input[type=range] { width: 100%; }
.pm-help { opacity: .7; margin: 0; font-size: 12px; } .pm-actions { display: flex; gap: 8px; } .pm-actions button { flex: 1; }
@media (max-width: 520px) { .w-photo { top: auto; bottom: 12px; right: 12px; left: 12px; width: auto; } }
.w-tourcap { pointer-events: auto; cursor: pointer; }
.set-note { font-size: 12px; opacity: .75; }

/* G1 results card: one card for every timed finish */
.w-results { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none; }
.wr-card { pointer-events: auto; min-width: 230px; max-width: min(88vw, 340px); background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; text-align: center; backdrop-filter: blur(6px); animation: tin .25s ease; }
.wr-kind { margin: 0; color: var(--ink2); font-size: .85rem; letter-spacing: .02em; }
.wr-time { margin: 4px 0 2px; font-size: 2rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.wr-pb { margin: 0 0 12px; min-height: 1.1em; color: var(--gold); font-weight: 700; }
.wr-row { display: flex; gap: 8px; justify-content: center; }
.wr-row button { border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 8px 16px; font-weight: 700; }
.wr-row .wr-main { background: var(--gold); color: #1a1a10; border-color: var(--gold); }

/* T3 emote wheel */
.w-interaction { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: rgba(3, 12, 11, .7); pointer-events: auto; }
.w-interaction[hidden] { display: none; }
.wi-card { width: min(660px, 100%); max-height: 88dvh; overflow: auto; overscroll-behavior: contain; color: var(--ink); background: var(--g2); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 16px 50px rgba(0, 0, 0, .4); }
.wi-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: -14px; padding: 4px 0 10px; background: var(--g2); z-index: 1; }
.wi-head h2 { margin: 0; font-size: 1.18rem; }
.wi-head button { min-width: 48px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: inherit; }
.wi-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wi-content details { align-self: start; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.wi-content summary { min-height: 44px; display: flex; align-items: center; color: var(--gold); font-size: .84rem; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.wi-content details[open] { display: grid; align-content: start; gap: 6px; }
.wi-content button { min-height: 44px; text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--glass); color: inherit; font: inherit; }
.wi-content button:disabled { opacity: .48; }
.wi-content button:focus-visible, .wi-content button:not(:disabled):hover { outline: 2px solid var(--gold); outline-offset: 1px; }
@media (max-width: 600px) { .wi-content { grid-template-columns: 1fr; } .wi-content button { min-height: 48px; } }
.w-emotes { position: absolute; inset: 0; z-index: 38; display: grid; place-items: center; background: rgba(5, 15, 12, 0.25); }
.we-ring { position: relative; width: 0; height: 0; }
.we-ring button { position: absolute; left: 0; top: 0; transform: translate(calc(var(--x) - 50%), calc(var(--y) - 50%)); width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); display: grid; place-items: center; align-content: center; gap: 2px; backdrop-filter: blur(6px); }
.we-ring button span { font-size: 1.6rem; line-height: 1; }
.we-ring button small { font-size: .62rem; color: var(--ink2); }
.we-ring button:focus-visible, .we-ring button:hover { border-color: var(--gold); outline: none; }

/* T6 phone gallery */
.ph-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.ph-gallery figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; background: #0b1714; aspect-ratio: 16 / 10; }
.ph-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-gallery figcaption { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.ph-gallery figcaption button { border: 0; border-radius: 8px; background: rgba(0, 0, 0, .55); padding: 3px 7px; font-size: .8rem; }

/* O20 help */
.w-help { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(4, 12, 10, .6); padding: 16px; }
.wh-card { position: relative; width: min(640px, 100%); max-height: 88dvh; overflow: auto; background: var(--g2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.wh-card h2 { margin: 0 0 10px; font-size: 1.2rem; } .wh-card h3 { margin: 16px 0 8px; font-size: 1rem; color: var(--gold); }
.wh-x { position: absolute; top: 10px; right: 12px; border: 1px solid var(--line); background: transparent; border-radius: 50%; width: 32px; height: 32px; }
.wh-tabs { display: flex; gap: 6px; margin-bottom: 8px; } .wh-tabs button { border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 4px 12px; }
.wh-tabs button[aria-pressed="true"] { background: var(--gold); color: #1a1a10; border-color: var(--gold); }
.wh-controls table { width: 100%; border-collapse: collapse; font-size: .88rem; } .wh-controls th { text-align: left; font-weight: 600; color: var(--ink2); padding: 4px 8px 4px 0; } .wh-controls td { padding: 4px 0; }
.wh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; } .wh-cards div { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; } .wh-cards p { margin: 4px 0 0; font-size: .84rem; color: var(--ink2); }

/* F2 SVG icons: same look on every phone (emoji differ per platform) */
svg.ic { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; pointer-events: none; }

/* F5 pause menu row */
.set-pause { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.set-pause button { flex: 1 1 auto; border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 8px 12px; font-weight: 600; }
.set-pause .primary { background: var(--gold); color: #1a1a10; border-color: var(--gold); flex-basis: 100%; }

/* C11 touch indicators */
.t-drive button.t-ind { width: 46px; height: 46px; font-size: 1rem; justify-self: center; }

/* H12 photo book thumbnails */
.ph-thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 8px; margin-right: 8px; flex: none; }

/* H6 replay scrub bar */
.w-replay .rp-scrub { display: block; width: calc(100% - 24px); margin: 6px 12px 0; accent-color: var(--gold); }

/* A6/D6 underwater tint */
.ws-canvas::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; background: radial-gradient(ellipse at 50% 30%, rgba(40, 120, 120, .28), rgba(8, 48, 58, .62)); }
.ws.ws-under .ws-canvas::after { opacity: 1; }

/* O5 creator Randomise */
.ob-rand { margin: 0 0 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--gold); font: inherit; cursor: pointer; }

/* G3 level-up celebration */
.w-celebrate { position: absolute; left: 50%; top: 28%; transform: translate(-50%, -50%); z-index: 30; text-align: center; pointer-events: none; animation: wc-in 3.2s ease forwards; }
.w-celebrate b { display: block; font-family: Fraunces, Georgia, serif; font-size: calc(2.6rem * var(--ts)); color: var(--gold); text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.w-celebrate small { display: block; margin-top: 4px; font-size: .95rem; color: var(--ink); text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.wc-burst { position: absolute; left: 50%; top: 45%; width: 0; height: 0; }
.wc-burst i { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: var(--c); transform: rotate(var(--a)) translateY(0); opacity: 0; animation: wc-bit 1.1s .1s ease-out forwards; }
@keyframes wc-in { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.8); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } 20% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -56%); } }
@keyframes wc-bit { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))); } }

/* F3 HUD auto-hide (Settings): everything but prompts fades after 4 s idle */
.ws.hud-idle .w-hud > *:not(#hudPrompt) { opacity: 0; transition: opacity .5s; }

/* O1 What's new (help) */
.w-help .wh-new { margin: 0; padding-left: 1.1em; line-height: 1.45; }
.w-help .wh-new li { margin: 4px 0; }
.w-help .wh-new b { color: var(--gold); }

/* P4-B6 photo mode depth of field: on-screen preview of the focus-ellipse blur baked into the saved PNG */
.w-photo-dof { position: fixed; inset: 0; z-index: 43; pointer-events: none; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  -webkit-mask-image: radial-gradient(ellipse 50% 45% at 50% 52%, transparent 30%, #000 100%); mask-image: radial-gradient(ellipse 50% 45% at 50% 52%, transparent 30%, #000 100%); }
.w-photo-dof[hidden] { display: none; }

/* C8 challenge ladder row in the minigame card (Bronze → Silver → Gold) */
.mg-ladder { margin: 0 0 6px; padding: 5px 8px; border-radius: 8px; background: rgba(231,196,106,.12); color: #ffd580; font-size: 12px; font-weight: 700; line-height: 1.35; }
.mg-ladder[hidden] { display: none; }
.mg-ladder.done { background: rgba(43,187,102,.18); color: #b8f0c8; }

/* H13 touch "Wheelie" hold button: shown (by features/tricks.js) only while riding a two-wheeler, above the drive pad */
.t-wheelie { position: absolute; z-index: 12; right: max(14px, env(safe-area-inset-right)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 214px); min-width: 72px; height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); font: 800 .8rem/1 system-ui, sans-serif; letter-spacing: .04em; touch-action: none; }
.t-wheelie.down { background: rgba(231, 196, 106, .35); }
.t-wheelie[hidden] { display: none; }
.ws.left-handed .t-wheelie { right: auto; left: max(14px, env(safe-area-inset-left)); }

/* N3: Path-traced (beta) photo — the tracer overlay canvas (sized to the world canvas by showoff.js; under toasts z 40) and its progress row */
.w-photo-pt { position: fixed; z-index: 39; pointer-events: none; }
.pm-card [hidden] { display: none !important; }
.pm-pt { display: grid; gap: 4px; }
.pm-pt progress { width: 100%; height: 6px; accent-color: #e7c46a; }
.pm-pt small { opacity: .8; font-size: 12px; font-variant-numeric: tabular-nums; }

/* 2-minute feedback card (core/stats.js): small, bottom-centre, never blocks play */
.w-fb { position: absolute; z-index: 40; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 96px); transform: translateX(-50%); width: min(340px, calc(100% - 32px)); padding: 14px 16px; border-radius: 16px; background: rgba(14, 24, 20, .92); color: #f4efe3; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font: 500 14px/1.4 system-ui, sans-serif; animation: w-fb-in .35s ease-out; }
.w-fb-q { margin: 0 0 10px; font-weight: 700; }
.w-fb-row { display: flex; gap: 8px; align-items: center; }
.w-fb button { min-height: 40px; min-width: 52px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); color: inherit; font: 600 18px/1 system-ui, sans-serif; cursor: pointer; }
.w-fb .w-fb-main { flex: 1; font-size: 15px; background: #e7c46a; color: #1a1a1a; }
.w-fb .w-fb-x { margin-left: auto; min-width: 40px; font-size: 14px; background: transparent; opacity: .75; }
.w-fb textarea { width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .25); color: inherit; font: 14px/1.4 system-ui, sans-serif; resize: none; }
@keyframes w-fb-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (prefers-reduced-motion: reduce) { .w-fb { animation: none; } }

/* P5-F1 rear-view mirror bezels (the picture itself is drawn into the canvas by render/mirrors.js) */
.w-mirrors { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.w-mirrors i { position: absolute; box-sizing: border-box; border: 3px solid #15191d; border-radius: 10px; box-shadow: 0 3px 10px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .18); }
#tLook { font: 700 20px/1 system-ui, sans-serif; }

/* P5-U1 Online (ui/social.js, lane N-UX): HUD chip, player list, consent card, invite; phone "Online" status */
.so-chip { position: absolute; top: calc(100% + 8px); right: 0; display: flex; align-items: center; gap: 4px; min-height: 22px; padding: 2px 7px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--teal) 55%, transparent); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); font-weight: 700; font-size: .68rem; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); opacity: .9; }
.so-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 25%, transparent); flex: none; }
.so-chip.connecting { border-color: var(--line); color: var(--ink2); }
.so-chip.connecting .so-dot { background: var(--ink2); box-shadow: none; animation: so-pulse 1.1s ease-in-out infinite; }
.so-chip.reduced { border-color: color-mix(in srgb, var(--amber) 60%, transparent); }
.so-chip.reduced .so-dot { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 25%, transparent); }
.so-chip.offline, .so-chip.busy { border-color: rgba(255, 255, 255, .2); color: var(--ink2); }
.so-chip.offline .so-dot, .so-chip.busy .so-dot { background: transparent; border: 2px solid var(--ink2); box-shadow: none; }
.so-feed { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 12; width: min(280px, 55vw); display: grid; gap: 5px; pointer-events: none; }
.so-feed-line { margin: 0; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(12, 29, 26, .88); color: var(--ink); font-size: .78rem; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 760px) { .so-feed { bottom: calc(170px + env(safe-area-inset-bottom)); width: min(210px, 45vw); } }
@keyframes so-pulse { 50% { opacity: .3; } }
@media (pointer: coarse) { .so-chip { min-height: 48px; } }

.w-social { position: fixed; inset: 0; z-index: 42; display: grid; place-items: center; padding: 16px; background: rgba(8, 14, 12, .5); }
.w-social .so-card { width: min(440px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: #10201b; color: var(--ink); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); padding: 18px 18px 16px; overflow: hidden; animation: so-in .2s ease; }
@keyframes so-in { from { opacity: 0; transform: translateY(10px); } }
.so-head { display: flex; align-items: center; gap: 10px; }
.so-head h2, .so-consent h2 { flex: 1; margin: 0; font-family: Georgia, serif; font-weight: 600; font-size: 1.35rem; }
.so-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); font-size: 16px; flex: none; }
.so-sub { margin: 4px 0 10px; font-size: .78rem; color: var(--teal); letter-spacing: .02em; }
.so-rows { list-style: none; margin: 0; padding: 0 4px 0 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.so-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.so-row.blocked .so-who { opacity: .5; }
.so-who { min-width: 0; }
.so-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.so-dia { color: #f5f1e6; font-size: .8em; }
.so-row.party .so-name, .so-row.party .so-dia { color: var(--gold); }
.so-who small { display: block; color: var(--ink2); font-size: .75rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-talk { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .95rem; background: color-mix(in srgb, var(--teal) 22%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 55%, transparent); animation: so-pulse 1s ease-in-out infinite; }
.so-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.so-acts button, .so-reasons button, .so-inv-acts button, .so-wa { min-height: 36px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); font-size: .78rem; font-weight: 600; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
.so-acts button.on { border-color: color-mix(in srgb, var(--amber) 60%, transparent); background: color-mix(in srgb, var(--amber) 16%, transparent); }
.so-acts button.warn { color: #ffb4a4; }
.so-reasons { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(200, 60, 50, .1); border: 1px solid rgba(255, 120, 100, .3); }
.so-reasons small { flex-basis: 100%; color: var(--ink2); }
.so-reasons button.ghost { background: transparent; border-color: transparent; text-decoration: underline; }
.so-empty { margin: 16px 0; color: var(--ink2); font-size: .85rem; text-align: center; }
.so-invite { margin-top: 10px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--teal) 8%, transparent); border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); }
.so-invite small { display: block; color: var(--ink2); font-size: .75rem; }
.so-link { display: block; margin: 6px 0 8px; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .3); font-size: .75rem; overflow-wrap: anywhere; user-select: text; }
.so-inv-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.so-wa { background: #1f8f4e; border-color: #2bb866; color: #fff; }
.so-foot { display: flex; gap: 8px; margin-top: 12px; }
.so-primary, .so-ghost { min-height: 48px; padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.so-primary { flex: 1; border: 0; background: var(--gold); color: #1a1a1a; }
.so-ghost { border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: var(--ink2); }
.so-consent .so-card { width: min(420px, 100%); overflow-y: auto; padding: 22px; }
.so-kicker { margin: 0 0 4px; letter-spacing: .18em; font-size: .72rem; color: var(--teal); font-weight: 700; }
.so-points { list-style: none; margin: 14px 0 16px; padding: 0; display: grid; gap: 10px; }
.so-points li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.so-points span { font-size: 1.2rem; line-height: 1.2; flex: none; }
.so-points p { margin: 0; font-size: .88rem; line-height: 1.4; color: var(--ink); }
.so-consent-acts { display: flex; gap: 8px; }
@media (max-width: 420px) { .w-social { padding: 12px; place-items: end center; } .w-social .so-card { padding: 16px; border-radius: 20px; } .so-consent-acts { flex-direction: column-reverse; } }
@media (prefers-reduced-motion: reduce) { .so-chip .so-dot, .so-talk, .w-social .so-card { animation: none; } }
.ph-online { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 6px; border-radius: 14px; background: rgba(255, 255, 255, .04); }
.ph-online i { width: 12px; height: 12px; border-radius: 50%; background: #8a9690; flex: none; }
.ph-online.online i { background: var(--teal); } .ph-online.reduced i { background: var(--amber); } .ph-online.connecting i { background: var(--ink2); }
.ph-online small { display: block; font-size: 12px; opacity: .75; }
.w-social { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.w-social .so-card { box-sizing: border-box; max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom))); }
.w-social button, .w-social .so-wa { min-height: 48px; min-width: 48px; touch-action: manipulation; }
.w-social button:disabled { opacity: .45; cursor: not-allowed; }
.so-head, .so-foot, .so-invite, .so-consent-acts { flex-shrink: 0; }
.so-foot { flex-wrap: wrap; }
.so-sub { overflow-wrap: anywhere; }
.so-consent h2 { flex: none; }
.so-consent-acts { position: sticky; bottom: 0; background: #10201b; padding-top: 8px; }

/* P5-C1/V1/C5 chat bar, log, bubbles, voice + messages buttons, IIT Mandi messages overlay (ui/chat.js) */
.cw-actions { position: absolute; top: calc(100% + 36px); right: 0; display: flex; flex-direction: column; gap: 6px; }
.cw-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); font-size: 1.15rem; line-height: 1; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.cw-talk { display: grid; place-content: center; gap: 1px; border-radius: 15px; }
.cw-talk small { font: 800 9px/1 system-ui, sans-serif; letter-spacing: .08em; }
.cw-btn.on { background: color-mix(in srgb, var(--teal) 70%, transparent); border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 30%, transparent); }
.cw-log { position: absolute; left: max(12px, env(safe-area-inset-left)); top: 34%; width: min(360px, 60vw); display: flex; flex-direction: column; gap: 3px; pointer-events: none; z-index: 5; }
.cw-log.open { max-height: 38vh; overflow-y: auto; pointer-events: auto; background: rgba(0, 0, 0, .35); border-radius: 10px; padding: 6px; }
.cw-line { font-size: .8rem; line-height: 1.3; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); word-break: break-word; }
.cw-line b { color: #9ff3e8; } .cw-line.self b { color: #ffe08a; } .cw-line.party b, .cw-line.party i { color: #ffc83d; }
.cw-line i { font-style: normal; opacity: .75; font-size: .7rem; } .cw-line.sys { opacity: .8; font-style: italic; }
.cw-handoff { display: block; min-height: 32px; margin: 3px 0 5px; padding: 4px 9px; color: #fff2c3; background: rgba(17, 46, 42, .92); border: 1px solid rgba(231, 196, 106, .65); border-radius: 8px; font: 700 11px/1.2 system-ui, sans-serif; text-shadow: none; cursor: pointer; }
.cw-bar { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); z-index: 30; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.cw-chans, .cw-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.cw-chan, .cw-q, .cw-send, .cw-yes, .cw-no { border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--ink); border-radius: 99px; padding: 4px 10px; font-size: .75rem; cursor: pointer; }
.cw-chan.on { background: color-mix(in srgb, var(--teal) 45%, transparent); border-color: var(--teal); }
.cw-chan:disabled { opacity: .4; cursor: default; }
.cw-form { display: flex; gap: 6px; }
.cw-input { flex: 1; min-width: 0; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); color: var(--ink); padding: 8px 10px; font-size: 16px; }
.cw-send, .cw-yes { background: var(--teal); color: #03211d; font-weight: 700; border-color: transparent; }
.cw-voice-hint { margin: 0; color: #dcefe6; font-size: 11px; line-height: 1.3; }
.cw-bubble { position: fixed; left: 0; top: 0; max-width: 220px; padding: 4px 9px; border-radius: 12px; background: rgba(255, 255, 255, .92); color: #10201e; font-size: .78rem; pointer-events: none; z-index: 4; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); word-break: break-word; }
.cw-forum { position: absolute; inset: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); z-index: 40; display: flex; flex-direction: column; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cw-forum[hidden], .cw-bar[hidden], .cw-ask[hidden], .cw-bubble[hidden] { display: none; }
.cw-fhead { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; color: var(--ink); }
.cw-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.cw-ask { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); width: min(380px, calc(100vw - 24px)); z-index: 35; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--ink); }
.cw-ask p { margin: 0 0 10px; font-size: .85rem; line-height: 1.35; }
.cw-askrow { display: flex; gap: 8px; justify-content: flex-end; }
.ws.left-handed .cw-log { left: auto; right: max(12px, env(safe-area-inset-right)); }

/* Phones in portrait: one clean layout, nothing overlapping (owner, 2026-09-29).
   Top row: stats pill | minimap | 📱 ☰ ⛶ ✕ — then down the right edge, in order: online chip, 💬 🎙, ⟲ 📷.
   The separate Map button is hidden (tapping the minimap opens the map); ✉ lives inside the chat bar. */
@media (pointer: coarse) and (orientation: portrait) and (max-width: 560px) {
  .hud-tl { max-width: calc(100vw - 24px - 96px - 36px - 16px); }
  .hud-pill { gap: 7px; font-size: .8rem; padding: 6px 10px; overflow: hidden; white-space: nowrap; }
  .hud-name { overflow: hidden; text-overflow: ellipsis; min-width: 4ch; max-width: 11ch; flex: 0 1 auto; }
  .hud-pill > span:has(#hudPlaces) { display: none; }   /* places found: on the map screen; the name needs the room */
  .hud-sub { font-size: .72rem; }
  .hud-tr { gap: 6px; }
  .hud-mini { width: 96px; height: 96px; }
  .hud-btns { gap: 5px; }
  .hud-btns button { width: 36px; height: 36px; }
  .w-toasts { top: calc(max(12px, env(safe-area-inset-top)) + 106px); left: max(12px, env(safe-area-inset-left)); right: calc(max(12px, env(safe-area-inset-right)) + 46px); transform: none; width: auto; max-width: none; align-items: stretch; }   /* never over the right-hand buttons */
  .so-chip, .so-chip.connecting { min-height: 26px; top: calc(100% + 8px); }
  .cw-actions { top: calc(100% + 42px); gap: 6px; }
  .cw-btn { width: 48px; height: 48px; }
  .t-top { top: calc(max(12px, env(safe-area-inset-top)) + 158px + 148px + 41px); }
  #tMap, #wFull { display: none; }   /* map = tap the minimap; full screen is for desktops/landscape */
  .hud-bl { bottom: max(178px, calc(env(safe-area-inset-bottom) + 178px)); }
  .hud-next { max-width: calc(100vw - 28px - 44px); }
  .cw-log { top: 44%; width: min(300px, 68vw); }
}

/* 🪂 invite pulse (first minute) and the "someone nearby is talking — hold to reply" cue beside the mic */
#hudFun.fresh { animation: funPulse 1.4s ease-in-out 6; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 60%, transparent); }
@keyframes funPulse { 50% { transform: scale(1.12); } }
.cw-actions { position: absolute; }
.cw-speaker { position: absolute; right: 44px; top: 42px; white-space: nowrap; font-size: .7rem; font-weight: 700; color: #fff; background: rgba(10, 30, 26, .85); border: 1px solid var(--teal); border-radius: 99px; padding: 3px 8px; pointer-events: none; }
.cw-speaker[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { #hudFun.fresh { animation: none; } }

/* owner (2026-09-30): no ✕ in the main layout (Leave is in the menu), no ⟲ (the camera button + hold C cover it), no map button (tap the minimap) */
#wExit, #tLook, #tMap { display: none !important; }
#wFull { display: grid; place-items: center; color: var(--ink); }
/* phones in landscape: minimap + one short column top right; chip, 💬, 🎙 in a row under the minimap; 📷 beside the action buttons */
@media (pointer: coarse) and (max-height: 520px) {
  .hud-mini { width: 84px; height: 84px; }
  .hud-btns { gap: 4px; }
  .hud-btns button { width: 34px; height: 34px; }
  .so-chip, .so-chip.connecting { top: 92px; right: 40px; min-height: 26px; }
  .cw-actions { top: 122px; right: 40px; flex-direction: row; }
  .cw-btn { width: 34px; height: 34px; }
  .cw-speaker { right: 0; top: 40px; }
  .w-toasts { top: calc(max(10px, env(safe-area-inset-top)) + 76px); left: 50%; right: auto; transform: translateX(-50%); width: auto; max-width: calc(100vw - 380px); }   /* below the pill + its time/holiday line, between the left labels and the minimap */
}
/* desktop: a one-time keys intro */
.w-keys { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; width: min(560px, calc(100vw - 32px)); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink); font-size: .82rem; }
.w-keys ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 12px; margin: 8px 0; padding: 0; list-style: none; }
.w-keys kbd { display: inline-block; min-width: 18px; padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; font: 700 .72rem/1.3 system-ui, sans-serif; text-align: center; margin-right: 4px; }
.w-keys button { float: right; padding: 4px 12px; border-radius: 99px; border: 0; background: var(--teal); color: #03211d; font-weight: 700; cursor: pointer; }

/* P5-S16–S18 pickup match board: under the stats pill */
.sp-board { position: absolute; left: max(12px, env(safe-area-inset-left)); top: calc(max(12px, env(safe-area-inset-top)) + 64px); z-index: 6; max-width: min(320px, calc(100vw - 170px)); padding: 4px 10px; border-radius: 99px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.sp-board[hidden] { display: none; }

/* W7 Diwali (owner 2026-11-07: "hard to find, keep it noticeable"): a glowing lamp in the HUD column + a quick cracker bar */
#hudDiwali { margin-left: 8px; padding: 3px 10px; min-height: 28px; border-radius: 99px; border: 1px solid rgba(255, 196, 92, .85); pointer-events: auto; cursor: pointer;
  background: radial-gradient(circle at 30% 50%, rgba(255, 170, 60, .55), rgba(40, 24, 10, .85) 75%); color: #ffe2a6; font: 700 12px Inter, system-ui, sans-serif; letter-spacing: 0; text-shadow: none; vertical-align: middle; }
#hudDiwali[hidden] { display: none; }
#hudDiwali.dv-glow { animation: dv-glow 2.6s ease-in-out infinite; }
#hudDiwali.dv-new { animation: dv-glow 1.1s ease-in-out infinite; }
@keyframes dv-glow { 0%, 100% { box-shadow: 0 0 6px 1px rgba(255, 170, 60, .45); } 50% { box-shadow: 0 0 16px 5px rgba(255, 190, 80, .85); } }
@media (prefers-reduced-motion: reduce) { #hudDiwali.dv-glow, #hudDiwali.dv-new { animation: none; box-shadow: 0 0 10px 3px rgba(255, 180, 70, .7); } }
.w-dvbar { position: fixed; z-index: 34; left: calc(env(safe-area-inset-left) + 10px); top: calc(env(safe-area-inset-top) + 84px); width: min(250px, calc(100vw - 84px));
  max-height: calc(100vh - 140px); overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border-radius: 16px;
  background: rgba(18, 16, 12, .9); border: 1px solid rgba(255, 196, 92, .55); box-shadow: 0 8px 26px rgba(0, 0, 0, .45); pointer-events: auto; }
.w-dvbar[hidden] { display: none; }
.w-dvbar > b { grid-column: 1 / -1; font-size: 13px; color: #ffd27a; }
.w-dvbar button { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 8px; border-radius: 12px; border: 1px solid rgba(255, 196, 92, .35);
  background: rgba(255, 170, 60, .12); color: #f6ead2; font: 600 12px Inter, system-ui, sans-serif; text-align: left; cursor: pointer; }
.w-dvbar button span { font-size: 18px; }
.w-dvbar button:active { background: rgba(255, 170, 60, .3); }
@media (max-height: 420px) { .w-dvbar { top: calc(env(safe-area-inset-top) + 76px); left: calc(env(safe-area-inset-left) + 10px); width: min(330px, calc(100vw - 84px)); grid-template-columns: 1fr 1fr 1fr; max-height: calc(100vh - 16px); } }
