:root {
  --navy: #1d2a44; --navy-2: #26375a; --navy-3: #31466f; --panel: rgba(22, 32, 54, .88); --hud: linear-gradient(180deg, rgba(38, 54, 88, .95), rgba(19, 28, 48, .95)); --hud-edge: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1.5px rgba(255,255,255,.06), 0 4px 0 rgba(0,0,0,.28), 0 6px 14px rgba(0,0,0,.18);
  --cream: #fbf3e4; --cream-2: #f3e6cc; --ink: #2b2233; --ink-2: #6b5d6e;
  --green: #5bd13b; --green-d: #2f9a1d; --red: #e8432f; --red-d: #a8261a; --gold: #ffc53d; --gold-d: #d48a12;
  --blue: #3fa9ff; --blue-d: #1f6fc0; --teal: #2ec4b6; --pink: #ff6fae;
  --cash: #7ee05a; --gem: #57c6ff;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --r: 16px;
  --font: 'Fredoka', system-ui, sans-serif; --display: 'Lilita One', 'Fredoka', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1d2a44; color: #fff; font: 500 15px/1.25 var(--font); user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
[hidden] { display: none !important; }

/* boot */
#boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 20%, #ffd28a 0%, #f39a5b 45%, #8f4f6e 100%); transition: opacity .5s; }
#boot.out { opacity: 0; pointer-events: none; }
.boot-inner { width: min(80vw, 360px); text-align: center; }
.logo { display: flex; flex-direction: column; align-items: center; font-family: var(--display); line-height: .9; transform: rotate(-4deg); filter: drop-shadow(0 6px 0 rgba(60, 20, 30, .35)); }
.logo span { -webkit-text-stroke: 6px #3a1d24; paint-order: stroke fill; }
.logo .l1 { font-size: 64px; color: #ffcf3f; }
.logo .l2 { font-size: 56px; color: #fff4dc; }
.logo .l3 { font-size: 34px; color: #ffcf3f; letter-spacing: .02em; }
.boot-bar { margin: 34px auto 10px; height: 14px; border-radius: 10px; background: rgba(40, 15, 25, .35); overflow: hidden; border: 3px solid rgba(40, 15, 25, .5); }
.boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(#8ff06a, #43b52a); border-radius: 6px; transition: width .2s; }
#boot-msg { font-weight: 600; color: #fff7e8; text-shadow: 0 2px 0 rgba(60, 20, 30, .4); min-height: 1.3em; }

/* map markers */
#markers { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.marker { position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform; }

/* ===== shared bits ===== */
.ic { width: 1.4em; height: 1.4em; object-fit: contain; vertical-align: middle; flex: none; pointer-events: none; }
.ic.big { width: 72px; height: 72px; }
h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .01em; }
.btn { --bg: var(--green); --bd: var(--green-d); display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 16px;
  border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 82%, #fff) 0%, var(--bg) 55%); border-bottom: 4px solid var(--bd);
  font-family: var(--display); font-size: 17px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); box-shadow: 0 3px 0 rgba(0, 0, 0, .18); transition: transform .08s, filter .15s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(3px); border-bottom-width: 1px; margin-bottom: 3px; }
.btn small { font-family: var(--font); font-weight: 600; font-size: 12px; opacity: .9; }
.btn.big { min-height: 54px; font-size: 22px; width: 100%; border-radius: 16px; }
.btn { --bs: #1f5e12; } .btn.blue { --bs: #174a85; } .btn.gold { --bs: #7a4a00; } .btn.red { --bs: #6a1a10; }
.btn.big:not(.ghost), .ev-opts .opt b { -webkit-text-stroke: 4px var(--bs); paint-order: stroke fill; text-shadow: none; }
.btn.big small, .ev-opts .opt small { -webkit-text-stroke: 0; }
.btn.sm { min-height: 34px; font-size: 15px; padding: 4px 10px; border-radius: 11px; }
.btn.blue { --bg: var(--blue); --bd: var(--blue-d); }
.btn.gold { --bg: var(--gold); --bd: var(--gold-d); }
.btn.red { --bg: var(--red); --bd: var(--red-d); }
.btn.ghost { --bg: rgba(255, 255, 255, .12); --bd: rgba(0, 0, 0, .25); background: rgba(255, 255, 255, .1); text-shadow: none; box-shadow: none; font-family: var(--font); font-weight: 600; font-size: 14px; }
.btn.locked, .btn:disabled { filter: grayscale(.85) brightness(.85); opacity: .7; cursor: default; }
.btn .ic { width: 22px; height: 22px; }
.link { color: var(--blue); font-weight: 600; text-decoration: underline; font-size: 13px; }
.pips { display: inline-flex; gap: 3px; margin-top: 4px; }
.pips i { width: 16px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); }
.pips i.on { background: linear-gradient(#9ff07c, #4cc22c); }
.badge { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: #4b5d86; color: #fff; letter-spacing: .03em; }
.dfilter { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; }
.dfilter button { flex: none; display: inline-flex; align-items: baseline; gap: 3px; border: 0; border-radius: 14px; padding: 5px 10px; font: 600 13px var(--font); color: #dfe7f8; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1.5px var(--dc, rgba(255,255,255,.25)); }
.dfilter button small { font-size: 11px; opacity: .8; }
.dfilter button.on { color: #10203a; background: var(--dc, #ffd56b); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
/* D2 pieces: the boot logo's stroked type, swallowtail ribbons, the gold level shield */
.ribbon { display: inline-grid; place-items: center; height: 38px; padding: 0 30px; background: linear-gradient(#ff6a4f, #e8432f 60%, #c7311f); color: #fff; font-family: var(--display); font-size: 21px; letter-spacing: .03em;
  text-transform: uppercase; white-space: nowrap; -webkit-text-stroke: 4px #6a1a10; paint-order: stroke fill; clip-path: polygon(0 0, 100% 0, calc(100% - 13px) 50%, 100% 100%, 0 100%, 13px 50%); }
.ribwrap { display: flex; justify-content: center; filter: drop-shadow(0 4px 0 rgba(0,0,0,.3)); }
.shield { display: grid; place-items: center; width: 30px; height: 34px; clip-path: polygon(50% 0, 100% 14%, 100% 60%, 50% 100%, 0 60%, 0 14%); background: linear-gradient(#ffe08a, #f6b52a 55%, #d48a12); flex: none; }
.shield::before { content: ''; grid-area: 1 / 1; width: calc(100% - 6px); height: calc(100% - 6px); clip-path: inherit; background: linear-gradient(#34507e, #1d2a44); }
.shield b { grid-area: 1 / 1; position: relative; font-family: var(--display); font-weight: 400; font-size: 17px; line-height: 1; margin-top: -2px; color: #fff; -webkit-text-stroke: 3px #121b2e; paint-order: stroke fill; }
.badge.b-rush { background: var(--red); } .badge.b-vip { background: linear-gradient(90deg, #b46cff, #ff6fae); } .badge.b-fragile { background: #d58a2f; } .badge.b-big { background: #2f8fd6; } .badge.b-express { background: linear-gradient(90deg, #ff8a1f, #ff3d5a); }

/* ===== hub ===== */
#hubui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hubui > * { pointer-events: auto; }
.topbar { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.who { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; max-width: 200px; }
.ava { width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #ffe6b8, #e8a75a); border: 3px solid #fff; display: grid; place-items: center; overflow: hidden; flex: none; box-shadow: 0 4px 0 rgba(0,0,0,.3); }
.ava .ic { width: 58px; height: 58px; margin-top: 8px; }
.lvwrap { position: absolute; left: 33px; top: 30px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.lvlbox { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.lvlbox .nm { font-family: var(--display); font-size: 18px; line-height: 1.05; color: #fff; text-align: left; text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 8px rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xpbar { position: relative; height: 16px; border-radius: 9px; background: rgba(0, 0, 0, .5); overflow: hidden; border: 2px solid #1d2a44; box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.xpbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#ffd56b, #f39b1d); border-radius: 7px; }
.xpbar em { position: absolute; inset: 0; font-style: normal; font-size: 10px; font-weight: 700; text-align: center; line-height: 12px; text-shadow: 0 1px 1px #000; }
.res { position: relative; display: inline-flex; align-items: center; height: 34px; border-radius: 17px; background: linear-gradient(180deg, #34507e, #1d2a44); box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), 0 3px 0 rgba(0,0,0,.35);
  padding: 0 12px 0 30px; font-family: var(--display); font-size: 18px; text-shadow: 0 2px 0 rgba(0,0,0,.35); white-space: nowrap; }
.res .ic { position: absolute; left: -10px; top: 50%; width: 40px; height: 40px; margin-top: -20px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.gear { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(180deg, #34507e, #1d2a44); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.12), 0 3px 0 rgba(0,0,0,.35); }
.gear svg { width: 23px; height: 23px; }
.clockbar { position: absolute; top: calc(72px + var(--safe-t)); left: 8px; right: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 600; font-size: 13px; pointer-events: none; }
.clockbar > * { pointer-events: auto; }
.clockchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 4px; border-radius: 15px; background: var(--panel); box-shadow: inset 0 0 0 2px rgba(255,197,61,.6), 0 3px 0 rgba(0,0,0,.3); }
.clockchip .tod { display: grid; } .clockchip .ic { width: 24px; height: 24px; }
.clockchip b { font-family: var(--display); font-weight: 400; font-size: 16px; }
.clockchip .day { font-size: 11.5px; color: #b9c6e6; }
.clockbar .rush, .clockbar .rainchip { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 15px; font-family: var(--display); font-size: 13.5px; text-shadow: 0 1px 0 rgba(0,0,0,.35); white-space: nowrap;
  background: linear-gradient(#ff6a4f, #e8432f 60%, #c7311f); clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%, 8px 50%); }
.clockbar .rainchip { background: linear-gradient(#7fd2ff, #2f6fd6); } .clockbar .rainchip .ic { width: 20px; height: 20px; }
.clockbar .rate { margin-left: auto; height: 30px; font-size: 16px; padding: 0 10px 0 26px; }
.clockbar .rate .ic { width: 34px; height: 34px; margin-top: -17px; left: -8px; }
.badge.b-rain { background: #2f6fd6; }
.fleetbank { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(180deg, #ffd56b, #f2a541); color: #4a2a00; border-radius: 10px; padding: 2px 9px 2px 4px; font-family: var(--display); font-size: 15px; border-bottom: 3px solid #c47a12; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
/* energy: the ⚡ chip in the top bar (the countdown to the next one hangs under it), its cost on the Start bar, the panel */
.topbar .energy { margin-left: auto; padding: 0 10px 0 27px; font-size: 17px; }
.topbar .energy .ic { left: -9px; width: 37px; height: 37px; margin-top: -18.5px; }
.topbar .energy .ent { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 2px); padding: 0 6px; border-radius: 7px; background: rgba(13, 22, 40, .82);
  font: 700 10.5px/15px var(--font); color: #bfe2ff; text-shadow: none; }
.topbar .energy .ent:empty { display: none; }
.topbar .energy.low b { color: #ffb24a; } .topbar .energy.over b { color: #8fe3ff; }
.topbar .energy.bump { animation: cashpop .6s cubic-bezier(.3,1.6,.5,1); }
.sb-cost { position: absolute; right: -6px; top: -12px; display: inline-flex; align-items: center; height: 26px; padding: 0 8px 0 3px; border-radius: 13px; background: linear-gradient(#5cb8ff, #2f6fd6);
  border: 3px solid #fff; font-family: var(--display); font-style: normal; font-size: 15px; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.sb-cost .ic { width: 22px; height: 22px; margin: -4px 0 -4px -6px; }
#startbar.short { background: linear-gradient(180deg, #b7c0b3, #98a294 50%, #858f81); border-bottom-color: #5d675a; } #startbar.short::after { display: none; }
#startbar.short .sb-foods, #startbar.short .sb-go .ic { filter: grayscale(.8); } #startbar.short .sb-go { -webkit-text-stroke-color: #4b5449; }
#startbar.short .sb-cost { background: linear-gradient(#ff6a4f, #c7311f); animation: bob 1.2s ease-in-out infinite; }
.goal .btn small.gen { display: inline-flex; align-items: center; margin-left: 2px; color: #4a2a00; font-weight: 700; opacity: 1; } .goal .btn small.gen .ic { width: 18px; height: 18px; }
.modal .lvcash.en { margin-top: -6px; color: #2f6fd6; }
.ic.eb { width: 1.25em; height: 1.25em; margin: -3px 0 -2px; }
.energy .card .en-icon .ic { width: 78px; height: 78px; margin: -4px 0 -2px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.2)); }
.en-bar { position: relative; height: 30px; margin: 8px 0 4px; border-radius: 15px; background: #2a3550; border: 3px solid #fff; box-shadow: 0 3px 0 rgba(0,0,0,.18); overflow: hidden; }
.en-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#7fd2ff, #2f8fe6 60%, #2268c4); border-radius: 0 12px 12px 0; }
.en-bar b { position: relative; display: block; font: 400 18px/24px var(--display); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.en-eta { min-height: 1.3em; } .en-eta b { color: var(--ink); }
.en-ways { margin: 4px 0 10px; text-align: left; } .en-ways .rl b { white-space: nowrap; }
.en-cups { margin: 2px 0 6px !important; }
.modal.energy [data-x="coffee"] small { margin-left: 4px; padding: 1px 9px; border-radius: 10px; background: rgba(90, 50, 0, .22); font: 400 18px/1.3 var(--display); color: #fff; -webkit-text-stroke: 0; text-shadow: 0 1px 0 rgba(0,0,0,.3); opacity: 1; }
.modal.energy .btn.ghost { color: #6b5a44; background: rgba(60, 40, 20, .08); box-shadow: none; margin-top: 4px; }

.tabs { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 6px 4px calc(6px + var(--safe-b)); background: linear-gradient(180deg, #2a3b60, #1b2740); border-top: 2px solid rgba(255,255,255,.08); z-index: 3; }
.tabs button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; flex: 1; padding: 4px 0 2px; border-radius: 12px; font-weight: 600; font-size: 12px; color: #b9c6e6; }
.tabs button .ic { width: 30px; height: 30px; filter: saturate(.6) brightness(.9); transition: transform .15s; }
.tabs button.on { color: #ffd56b; text-shadow: 0 1px 0 rgba(0,0,0,.45); }
.tabs button.on::before { content: ''; position: absolute; top: -22px; left: 50%; width: 52px; height: 52px; margin-left: -26px; border-radius: 50%; background: linear-gradient(180deg, #f6c544, #dd9a1c);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 0 0 3px #1b2740, 0 5px 10px rgba(0,0,0,.45); }
.tabs button.on .ic { position: relative; filter: none; transform: translateY(-13px) scale(1.25); }
.tabs .dot { position: absolute; top: 2px; right: 22%; width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid #1b2740; }

.sheet { position: absolute; left: 0; right: 0; bottom: calc(62px + var(--safe-b)); height: 44vh; background: linear-gradient(180deg, rgba(38,55,90,.97), rgba(24,34,58,.99)); border-radius: 24px 24px 0 0;
  box-shadow: inset 0 3px 0 rgba(255,197,61,.85), 0 -8px 20px rgba(0,0,0,.35); transition: height .28s cubic-bezier(.3,.8,.3,1); display: flex; flex-direction: column; z-index: 2; }
.sheet[data-state="min"] { height: 64px; }
.sheet[data-state="big"] { height: calc(100vh - 116px - var(--safe-t) - 62px - var(--safe-b)); height: calc(100dvh - 116px - var(--safe-t) - 62px - var(--safe-b)); }
.sheet[data-tab="garage"][data-state="big"] { height: 58vh; height: 58dvh; }
.grab { height: 22px; flex: none; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-rib { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); z-index: 2; cursor: grab; touch-action: none; }
.sheet-rib .ribbon:empty { display: none; }
.sheet-body > .sec-head:first-child { justify-content: center; margin-top: 6px; }
.sheet-body > .sec-head:first-child h2 { display: none; }
.sheet.dragging { transition: none; }
.sheet-body > .sec-head:first-child { touch-action: none; cursor: grab; }
.grab i { display: none; }
.sheet-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 12px 14px; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 2px 8px; }
.sec-head h2 { font-size: 22px; -webkit-text-stroke: 4px #121b2e; paint-order: stroke fill; } .sec-head h3 { font-size: 18px; color: #ffd56b; -webkit-text-stroke: 3px #121b2e; paint-order: stroke fill; }
.sec-head .sub { font-size: 13px; color: #9fb0d6; font-weight: 600; }
.hint { font-size: 14px; color: #b9c6e6; text-align: center; padding: 10px 6px; }

/* order cards */
.orders { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; padding-left: 12px; }
.ocard { position: relative; display: flex; align-items: center; gap: 9px; padding: 7px 10px 7px 0; border-radius: 16px; background: linear-gradient(180deg, #34507e, #2b3d63); border-bottom: 4px solid #16213a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14); cursor: pointer; transition: transform .1s, background .15s; }
.ocard:active { transform: translateY(2px); }
.ocard.sel { box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 2px #4fd4ff; }
.ocard.taken { background: linear-gradient(180deg, #3b7a45, #2b5a3a); border-bottom-color: #1a3a22; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 0 2px #8ff06a; }
.ofood { width: 58px; height: 58px; margin-left: -14px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, #f1e4cc); border: 3px solid #fff; display: grid; place-items: center; flex: none; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.ofood .ic { width: 42px; height: 42px; }
.oinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.oinfo b { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--display); font-weight: 400; font-size: 17px; line-height: 1.15; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.oinfo .onm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oinfo .badge { flex: none; font-family: var(--font); text-shadow: none; padding: 1px 8px; border-radius: 0; clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 50%, 100% 100%, 0 100%, 5px 50%); }
.oinfo small { font-size: 12px; color: #b9c6e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oinfo i { font-style: normal; font-weight: 700; }
.ometa { display: flex; align-items: center; gap: 4px; }
.ometa > span, .ometa .est { display: inline-flex; align-items: center; gap: 2px; background: rgba(0,0,0,.26); border-radius: 7px; padding: 1px 6px 1px 3px; font-size: 11px; font-weight: 600; color: #dfe7fb; white-space: nowrap; }
.ometa .ic { width: 14px; height: 14px; }
.ometa .est { padding-left: 6px; color: #b9c6e6; }
.ometa .est.fast { color: #9ff07c; } .ometa .est.slow { color: #ff9c8f; }
.opay { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.price { position: relative; display: inline-flex; align-items: center; height: 26px; padding: 0 9px 0 22px; margin-left: 10px; border-radius: 13px; background: rgba(0,0,0,.3); font-family: var(--display); font-size: 18px; color: var(--cash); text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.price .ic { position: absolute; left: -9px; top: 50%; width: 28px; height: 28px; margin-top: -14px; }
.otake { display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 12px; border-radius: 10px; font-family: var(--display); font-size: 14px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  background: linear-gradient(180deg, #8be06f, var(--green) 55%); border-bottom: 3px solid var(--green-d); white-space: nowrap; }
.taken .otake { background: #fff; color: var(--green-d); border-bottom-color: #bbb; text-shadow: none; }
.olife { position: absolute; left: 16px; bottom: -4px; height: 4px; max-width: calc(100% - 32px); border-radius: 2px; background: #ffd56b; }
.goals { display: flex; flex-direction: column; gap: 6px; }
.goal { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 14px; background: linear-gradient(180deg, #2e4470, #24345a); border-bottom: 3px solid #16213a; font-size: 14px; font-weight: 600; }
.goal > span { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.goal i { height: 6px; border-radius: 4px; background: rgba(0,0,0,.35); overflow: hidden; } .goal i u { display: block; height: 100%; background: linear-gradient(#ffd56b, #f39b1d); }
.goal.done { background: linear-gradient(180deg, #3b7a45, #2b5a3a); border-bottom-color: #1a3a22; } .goal em { font-style: normal; color: var(--cash); font-size: 18px; }
.goal > .ic { width: 30px; height: 30px; }
.goal small { color: #9fb0d6; }
.goal.gift { background: linear-gradient(180deg, #b07a1c, #8a5a12); border-bottom-color: #5a3a0a; } .goal.gift small { color: #ffe3a3; }
.goal small .ic.eb, .gd .ic.eb { width: 1.2em; height: 1.2em; margin-left: -1px; }

/* rows (upgrades, skills) */
.rows, .crows { display: flex; flex-direction: column; gap: 7px; }
.row, .crow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: linear-gradient(180deg, #34507e, #2b3d63); border-bottom: 4px solid #16213a; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.row > .ic { width: 46px; height: 46px; padding: 5px; border-radius: 50%; background: rgba(0,0,0,.24); box-shadow: inset 0 2px 0 rgba(0,0,0,.2); }
.rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rt b { font-family: var(--display); font-weight: 400; font-size: 17px; text-shadow: 0 2px 0 rgba(0,0,0,.3); } .rt small { font-size: 12px; color: #b9c6e6; line-height: 1.2; }
.max { font-style: normal; font-family: var(--display); color: #fff; font-size: 14px; padding: 2px 12px; background: linear-gradient(#ffe08a, #f6b52a 55%, #d48a12); clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%, 7px 50%); -webkit-text-stroke: 3px #7a4a00; paint-order: stroke fill; }
.req { font-style: normal; font-size: 13px; font-weight: 700; color: #9fb0d6; display: inline-flex; align-items: center; gap: 3px; }
.req .ic { width: 18px; height: 18px; }

/* garage */
.vcards { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; touch-action: pan-x; }
.vcard { flex: none; width: 104px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; border-radius: 16px; background: linear-gradient(180deg, #34507e, #2b3d63); border-bottom: 4px solid #16213a; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.vcard img { width: 84px; height: 72px; object-fit: contain; }
.vcard b { font-family: var(--display); font-weight: 400; font-size: 14px; text-align: center; line-height: 1.1; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.vcard small { font-size: 12px; color: var(--cash); font-weight: 700; }
.vcard.own small { color: #b9c6e6; }
.vcard.sel { background: linear-gradient(180deg, #3d5c90, #2f4572); box-shadow: inset 0 0 0 3px #ffd56b; }
.vcard:not(.own) img { filter: brightness(.7) saturate(.7); }
.vdetail { background: linear-gradient(180deg, #2e4470, #24345a); border-radius: 18px; padding: 10px 12px 12px; margin-bottom: 8px; box-shadow: inset 0 0 0 2px rgba(255,197,61,.45); }
.vdetail h3 { font-size: 25px; -webkit-text-stroke: 4px #121b2e; paint-order: stroke fill; } .desc { margin: 2px 0 8px; font-size: 13.5px; color: #c8d3ee; }
.stat { display: grid; grid-template-columns: 90px 1fr 74px; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin: 4px 0; }
.stat i { height: 11px; border-radius: 6px; background: rgba(0,0,0,.4); overflow: hidden; border: 2px solid #16213a; } .stat i u { display: block; height: 100%; background: linear-gradient(#7fd6ff, #3f8fe0); border-radius: 5px; }
.stat b { text-align: right; font-size: 13px; }
.actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; align-items: stretch; }
.riding { font-size: 13.5px; color: #b9c6e6; text-align: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sw { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid rgba(255,255,255,.25); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); }
.sw.box { border-radius: 8px; }
.sw.on { border-color: #fff; transform: scale(1.12); }

/* courier */
.pchars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 8px; }
.pchar { aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #ffe6b8, #e8a75a); display: grid; place-items: center; overflow: hidden; border: 3px solid rgba(255,255,255,.5); }
.pchar .ic { width: 100%; height: 100%; }
.pchar.on { border-color: #fff; box-shadow: 0 0 0 3px #ffd56b; }
.career { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.career span { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 14px; background: linear-gradient(180deg, #2e4470, #24345a); border-bottom: 3px solid #16213a; font-size: 11.5px; color: #9fb0d6; font-weight: 600; }
.career b { font-family: var(--display); font-weight: 400; font-size: 19px; color: #ffcf3f; -webkit-text-stroke: 4px #121b2e; paint-order: stroke fill; }

/* jobs */
.dcards { display: flex; flex-direction: column; gap: 9px; }
.dcard { border-radius: 18px; padding: 10px 12px 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--dc) 35%, #24345a), #24345a 60%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--dc) 55%, transparent); border-bottom: 4px solid #16213a; }
.dcard.open { box-shadow: inset 0 0 0 3px var(--dc); }
.dh { display: flex; justify-content: space-between; align-items: baseline; }
.dh b { font-family: var(--display); font-weight: 400; font-size: 24px; -webkit-text-stroke: 4px #121b2e; paint-order: stroke fill; }
.mult { font-family: var(--display); color: var(--cash); font-size: 18px; -webkit-text-stroke: 4px #121b2e; paint-order: stroke fill; }
.emp { color: #c8d3ee; font-weight: 600; font-size: 12.5px; }
.dcard p { margin: 4px 0 8px; font-size: 13.5px; color: #dfe7fb; }
.traits { display: flex; flex-wrap: wrap; gap: 5px; margin: -2px 0 9px; }
.traits span { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; color: #fff; background: color-mix(in srgb, var(--dc) 45%, rgba(0,0,0,.25)); }
.reqs { list-style: none; padding: 0; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #ff9c8f; }
.reqs li.ok { color: #9ff07c; }
.hired { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #ffd56b; }

/* fleet */
.empty { text-align: center; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty b { font-family: var(--display); font-weight: 400; font-size: 24px; color: #ffcf3f; -webkit-text-stroke: 5px #121b2e; paint-order: stroke fill; }
.empty p { margin: 0 0 6px; color: #c8d3ee; font-size: 14px; }
.bank { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(180deg, #3b7a45, #2b5a3a); border-bottom: 4px solid #1a3a22; box-shadow: inset 0 0 0 2px rgba(143,240,106,.5); border-radius: 16px; padding: 8px 10px; margin-bottom: 8px; }
.bank > span { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; }
.bank .ic { grid-row: span 2; width: 36px; height: 36px; }
.bank b { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--cash); -webkit-text-stroke: 5px #1a3a22; paint-order: stroke fill; }
.bank small { font-size: 12px; color: #c8d3ee; }
.cava { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #ffe6b8, #e8a75a); border: 2px solid #fff; }
.crow .sel { display: flex; gap: 4px; margin: 3px 0 1px; }
.crow select { font: 600 12px var(--font); background: #1d2a44; color: #fff; border: 1px solid #4b5d86; border-radius: 8px; padding: 3px 4px; max-width: 120px; }
.cbtns { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }

/* ===== ride HUD ===== */
#ridehud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#ridehud button { pointer-events: auto; }
.r-top { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; display: flex; gap: 8px; align-items: flex-start; }
.r-order { position: relative; flex: 1; min-width: 0; min-height: 66px; margin-left: 18px; display: flex; align-items: center; gap: 9px; padding: 6px 12px 8px 54px; border-radius: 18px;
  background: linear-gradient(180deg, #34507e, #1d2a44); border-bottom: 4px solid #121b2e; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 6px 12px rgba(0,0,0,.3); }
.r-food { position: absolute; left: -18px; top: 50%; margin-top: -34px; width: 68px; height: 68px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, #f1e4cc); border: 4px solid #fff;
  box-shadow: 0 0 0 3px var(--gold), 0 5px 0 3px rgba(0,0,0,.3); display: grid; place-items: center; overflow: hidden; }
.r-food .ic { width: 50px; height: 50px; }
.r-what { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.r-what small { font-size: 12px; color: #dfe7f8; font-weight: 600; }
.r-what b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.1; padding: 1px 2px; -webkit-text-stroke: 4px #121b2e; paint-order: stroke fill; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-dist { position: absolute; right: 12px; bottom: -14px; height: 24px; padding: 0 10px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-size: 15px; color: #fff; white-space: nowrap;
  text-shadow: 0 2px 0 rgba(0,0,0,.25); background: linear-gradient(180deg, #ffe08a, var(--gold) 55%); border-bottom: 3px solid var(--gold-d); }
.r-dist:empty { display: none; }
/* stopwatch: gold case, cyan time-left sweep (--p from the HUD), knob on top */
.r-timer { position: relative; flex: none; width: 84px; height: 84px; border-radius: 50%; padding: 5px; margin-top: 4px; background: linear-gradient(#ffe08a, #f6b52a 55%, #d48a12); box-shadow: 0 4px 0 rgba(0,0,0,.3); }
.r-timer::before { content: ''; position: absolute; left: 50%; top: -6px; width: 18px; height: 10px; margin-left: -9px; border-radius: 4px 4px 2px 2px; background: linear-gradient(#ffe08a, #d48a12); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.r-timer .tw { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(var(--tc, #57e0ff) calc(var(--p, 1) * 360deg), #16213a 0); }
.r-timer .tw > span { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(180deg, #34507e, #1d2a44); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.r-timer b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1; text-shadow: 0 2px 0 rgba(0,0,0,.35); font-variant-numeric: tabular-nums; }
.r-timer small { font-size: 9.5px; font-weight: 600; color: #b9c6e6; }
.r-timer.warn { --tc: #ffd56b; } .r-timer.warn b { color: #ffd56b; }
.r-timer.late { --tc: #e8432f; background: linear-gradient(#ff8a7a, #e8432f 55%, #a8261a); } .r-timer.late b { color: #fff; animation: pulse 0.8s infinite; } .r-timer.late small { color: #ffc2bb; }
@keyframes pulse { 50% { transform: scale(1.1); } }
.r-sub { position: absolute; top: calc(104px + var(--safe-t)); left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: flex-start; }
.r-left { display: flex; gap: 10px; align-items: flex-start; }
.r-pause { flex: none; display: flex; align-items: center; justify-content: center; gap: 5px; width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(180deg, #34507e, #1d2a44); border-bottom: 3px solid #121b2e; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 4px 10px rgba(0,0,0,.3); }
.r-pause i { width: 6px; height: 18px; border-radius: 2px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.r-pause:active { transform: translateY(2px); border-bottom-width: 1px; }
.modal.pause .card { display: flex; flex-direction: column; gap: 8px; }
.modal.pause .btn:not(.big) { min-height: 46px; font-size: 16px; }
.modal.pause .btn.ghost:not(.danger) { color: #6b5a44; background: rgba(60, 40, 20, .08); }
.r-cond { display: flex; gap: 8px; }
.r-cond .m { display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; }
.r-cond .ic { width: 26px; height: 26px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.r-cond i { display: flex; align-items: flex-end; width: 24px; height: 76px; padding: 2px; border-radius: 12px; background: rgba(0,0,0,.45); border: 2px solid #fff; box-shadow: 0 3px 0 rgba(0,0,0,.3); overflow: hidden; }
.r-cond u { display: block; width: 100%; height: var(--v, 100%); border-radius: 8px; background: linear-gradient(90deg, #ffb36b, #ff6a3d); transition: height .3s; }
.r-cond .integ u { background: linear-gradient(90deg, #9ff07c, #4cc22c); }
.r-cond .m.low i { animation: pulse .7s infinite; }
/* the courier run: the food is the life bar — five pips */
#ridehud.run .r-cond .integ i { position: relative; }
#ridehud.run .r-cond .integ i::after { content: ''; position: absolute; inset: 2px; border-radius: 8px; pointer-events: none;
  background: repeating-linear-gradient(to top, transparent 0 calc(20% - 2px), rgba(16, 24, 42, .85) calc(20% - 2px) 20%); }
.r-map { width: 100px; height: 100px; margin-left: auto; border-radius: 50%; border: 4px solid var(--gold); box-shadow: 0 0 0 2px #fff, 0 4px 0 2px rgba(0,0,0,.3); background: #26375a; }
.r-ctx { position: absolute; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; }
/* (on the autopilot, in portrait: between the speed dial and HOP, above STOP) */
#ridehud.auto .r-ctx { left: 104px; right: 118px; bottom: calc(136px + var(--safe-b)); transform: none; }
#ridehud.auto .ctx { max-width: 100%; white-space: normal; text-align: center; }
.ctx { display: flex; align-items: center; gap: 6px; padding: 8px 18px 8px 10px; border-radius: 18px; font-family: var(--display); font-size: 21px; color: #fff; -webkit-text-stroke: 4px var(--cs, #1f5e12); paint-order: stroke fill;
  background: linear-gradient(180deg, #8be06f, #5bd13b 50%, #3aa31f); border-bottom: 4px solid #237a12; box-shadow: 0 4px 10px rgba(0,0,0,.3); animation: popin .25s cubic-bezier(.3,1.6,.5,1); white-space: nowrap; }
.ctx .ic { width: 28px; height: 28px; }
.ctx small { font-family: var(--font); font-weight: 700; font-size: 13px; opacity: .92; margin-left: 2px; -webkit-text-stroke: 0; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.ctx.risky { --cs: #7a4a00; background: linear-gradient(180deg, #ffe08a, #ffc23a 50%, #e69a12); border-bottom-color: #a86a00; }
.ctx.danger { --cs: #6a1a10; background: linear-gradient(180deg, #ff8f80, #ff6a5a 50%, #d6372a); border-bottom-color: #8e1d14; }
.ctx.down { transform: translateY(3px); }
@keyframes popin { from { transform: scale(.4); opacity: 0; } }
.r-speed { position: absolute; left: 12px; bottom: calc(118px + var(--safe-b)); width: 86px; height: 62px; background: var(--hud); border-radius: 16px 16px 14px 14px; box-shadow: var(--hud-edge); }
.r-speed svg { position: absolute; left: 7px; top: 5px; width: 72px; height: 40px; overflow: visible; }
.r-speed .trk, .r-speed .val { fill: none; stroke-width: 6; stroke-linecap: round; } .r-speed .trk { stroke: rgba(0,0,0,.45); } .r-speed .val { stroke: #ffd56b; stroke-dasharray: 0 100; transition: stroke-dasharray .15s; }
.r-speed b { position: absolute; left: 0; right: 0; bottom: 13px; text-align: center; font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.r-speed small { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: 9.5px; color: #c9d5ef; font-weight: 600; }
.r-btn { position: absolute; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #3d5583, #1d2a44); border: 4px solid rgba(255,255,255,.85); box-shadow: 0 5px 0 rgba(0,0,0,.3); color: #fff; touch-action: none; }
.r-btn span { position: absolute; bottom: 9px; font-family: var(--display); font-size: 13px; letter-spacing: .03em; -webkit-text-stroke: 3px #10182a; paint-order: stroke fill; }
.r-btn.down { transform: scale(.93); }
.r-btn.horn { left: 14px; bottom: calc(26px + var(--safe-b)); width: 72px; height: 72px; }
.r-btn.horn .ic { width: 40px; height: 40px; }
.r-btn.hop { right: 128px; bottom: calc(30px + var(--safe-b)); width: 84px; height: 84px; border-color: #ffd56b; }
/* the autopilot in portrait: STOP takes the middle of the bottom row, HOP goes up over TURBO (clear of its charge ring) */
#ridehud.auto .r-btn.hop { right: 26px; bottom: calc(146px + var(--safe-b)); }
.r-btn.hop .ic { width: 44px; height: 44px; margin-top: -10px; }
.r-btn.hop.hint { border-color: #fff; animation: pulse .6s infinite; }
.r-btn.hop.perfect { border-color: #6fff5a; background: radial-gradient(circle at 50% 30%, #4fbf3a, #1f6a12); }
.r-btn.boost { right: 16px; bottom: calc(22px + var(--safe-b)); width: 104px; height: 104px; background: radial-gradient(circle at 50% 30%, #ff9d4d, #d6461d); }
.r-btn.boost .ic { width: 54px; height: 54px; margin-top: -12px; }
.r-btn.boost.on { box-shadow: 0 0 0 6px rgba(255, 170, 60, .45), 0 5px 0 rgba(0,0,0,.3); }
.r-btn.boost.empty { filter: grayscale(.8); }
/* turbo charge: segmented ring, filled up to --e */
.r-btn .ring { position: absolute; inset: -13px; border-radius: 50%; pointer-events: none; background: conic-gradient(#57e0ff var(--e, 100%), rgba(255,255,255,.22) 0);
  -webkit-mask: radial-gradient(closest-side, #0000 calc(100% - 7px), #000 calc(100% - 6px)), repeating-conic-gradient(#000 0 26deg, #0000 26deg 30deg); -webkit-mask-composite: source-in;
  mask: radial-gradient(closest-side, #0000 calc(100% - 7px), #000 calc(100% - 6px)) intersect, repeating-conic-gradient(#000 0 26deg, #0000 26deg 30deg); }
/* the autopilot's STOP (a red light, someone crossing, the door): a red octagon under the thumb */
.r-btn.stop { left: calc(50% - 48px); bottom: calc(24px + var(--safe-b)); width: 96px; height: 96px; border: 0; border-radius: 0; background: none; box-shadow: none;
  filter: drop-shadow(0 5px 0 rgba(0,0,0,.3)); animation: popin .2s cubic-bezier(.3,1.6,.5,1); }
.r-btn.stop::before, .r-btn.stop::after { content: ''; position: absolute; clip-path: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%); }
.r-btn.stop::before { inset: 0; background: #fff; }
.r-btn.stop::after { inset: 5px; background: radial-gradient(circle at 50% 30%, #ff7565, #d22a1c 70%); }
.r-btn.stop b { position: relative; z-index: 1; margin-top: -10px; font-family: var(--display); font-weight: 400; font-size: 27px; letter-spacing: .02em; -webkit-text-stroke: 4px #7a140c; paint-order: stroke fill; }
.r-btn.stop small { position: absolute; z-index: 1; left: 0; right: 0; bottom: 19px; text-align: center; font-size: 10.5px; font-weight: 800; color: #ffe1dd; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* the perfect second: a green rim, pulsing; late: it shakes; tapped: it dims while the bike pulls up and waits */
.r-btn.stop.now { animation: pulse .45s infinite; filter: drop-shadow(0 0 10px rgba(111, 255, 90, .8)) drop-shadow(0 5px 0 rgba(0,0,0,.3)); }
.r-btn.stop.now::before { background: #6fff5a; }
.r-btn.stop.late { animation: stopshake .18s infinite; }
.r-btn.stop.on { animation: none; }
.r-btn.stop.on::after { background: radial-gradient(circle at 50% 30%, #b0574d, #6e1f17 70%); }
.r-btn.stop.on b { opacity: .7; }
@keyframes stopshake { 25% { transform: translateX(-3px) rotate(-2deg); } 75% { transform: translateX(3px) rotate(2deg); } }
/* riding yourself: the speed dial warns while the bike slides */
.r-speed.warn .val { stroke: #ff5a4a; }
.r-speed.warn { animation: pulse .5s infinite; box-shadow: var(--hud-edge), 0 0 0 3px #ff5a4a; }
.r-keys { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font-size: 11px; color: rgba(255,255,255,.7); text-shadow: 0 1px 2px #000; white-space: nowrap; display: none; }
@media (hover: hover) and (pointer: fine) { .r-keys { display: block; } }
#ridehud.flash-camera::after { content: ''; position: fixed; inset: 0; background: rgba(255, 255, 255, .7); animation: fade .35s forwards; pointer-events: none; }
#ridehud.flash-bump::after { content: ''; position: fixed; inset: 0; box-shadow: inset 0 0 70px rgba(255, 60, 40, .55); animation: fade .45s forwards; pointer-events: none; }
@keyframes fade { to { opacity: 0; } }

/* ===== lanes & brake (?ctl prototype): no buttons — the dial drops to the corner and glows red on the brake ===== */
#ridehud.lb .r-btn, #ridehud.lb .r-ctx { display: none; }
#ridehud.lb .r-speed { bottom: calc(22px + var(--safe-b)); }
.r-speed.brk { box-shadow: var(--hud-edge), 0 0 0 3px #ff3b2f, 0 0 18px rgba(255, 59, 47, .6); }
.r-speed.brk b { color: #ffb3aa; }
.r-speed .gear { position: absolute; right: -10px; top: -12px; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-style: normal; font-size: 15px;
  color: #fff; -webkit-text-stroke: 3px #10182a; paint-order: stroke fill; background: linear-gradient(180deg, #8be06f, #3aa31f); border-bottom: 3px solid #237a12; }
.r-speed .gear.top { background: linear-gradient(180deg, #ffe08a, #e69a12); border-bottom-color: #a86a00; }
/* late brake: what comes next — a corner's limit as a road sign, a red light, the door */
.r-limit { position: absolute; left: 108px; bottom: calc(24px + var(--safe-b)); width: 58px; height: 58px; border-radius: 50%; background: #fff; border: 6px solid #e8432f; box-shadow: 0 4px 0 rgba(0,0,0,.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #1d2a44; }
.r-limit b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1; }
.r-limit small { font-size: 8.5px; font-weight: 700; text-transform: uppercase; color: #5a6680; margin-top: 1px; }
.r-limit[data-kind="light"], .r-limit[data-kind="ped"] { background: #e8432f; border-color: #fff; color: #fff; } .r-limit[data-kind="light"] b, .r-limit[data-kind="ped"] b { font-size: 15px; } .r-limit[data-kind="light"] small, .r-limit[data-kind="ped"] small { color: #ffe1dd; }
.r-limit[data-kind="door"] { border-color: #ffb238; } .r-limit[data-kind="door"] b { color: #d48a12; font-size: 24px; }
.r-limit.late { animation: pulse .4s infinite; box-shadow: 0 0 0 4px rgba(255, 59, 47, .5), 0 4px 0 rgba(0,0,0,.3); }
/* courier run: the brake is a pedal of its own under the right thumb (a touch anywhere else is a swipe). Held, it tips
   forward on the pivot at the top of its arm and the brake lights glow round it */
.r-btn.brake { display: none; }
#ridehud.run .r-btn.brake { display: block; right: 12px; bottom: calc(14px + var(--safe-b)); width: 100px; height: 132px; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); transform-origin: 50% 0; transition: transform .07s ease-out, filter .07s; }
#ridehud.run .r-btn.brake svg { display: block; width: 100%; height: 100%; }
#ridehud.run .r-btn.brake text { font-family: var(--display); font-size: 13px; letter-spacing: .08em; fill: #9aa2ad; stroke: #0c0e11; stroke-width: 2.5px; paint-order: stroke; }
#ridehud.run .r-btn.brake.down { transform: perspective(300px) rotateX(-26deg) translateY(3px); filter: brightness(.88) drop-shadow(0 0 10px rgba(255, 59, 47, .8)) drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
#ridehud.run .r-btn.brake.down text { fill: #ff8a7d; }
#ridehud .r-btn.brake.coached { box-shadow: none; filter: drop-shadow(0 0 5px #ffd56b) drop-shadow(0 0 5px #ffd56b) drop-shadow(0 5px 0 rgba(0,0,0,.3)); }
#ridehud.run .r-proto { bottom: calc(150px + var(--safe-b)); }
/* lane run: the three lanes (oncoming · ours · sidewalk) and the draft filling up behind a car */
.r-lanes { position: absolute; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.r-lanes .row { display: flex; gap: 6px; padding: 6px 8px; border-radius: 14px; background: var(--hud); box-shadow: var(--hud-edge); }
.r-lanes i { width: 26px; height: 34px; border-radius: 7px; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.25); transition: background .12s, transform .12s; }
.r-lanes i[data-l="-1"] { border-color: rgba(255, 120, 100, .5); } .r-lanes i[data-l="1"] { border-style: dashed; border-color: rgba(220, 220, 210, .55); }
.r-lanes i.on { background: linear-gradient(180deg, #ffe08a, var(--gold)); border-color: #fff; transform: scale(1.08); }
.r-lanes i[data-l="-1"].on { background: linear-gradient(180deg, #ff9d8a, #e8432f); }
.r-lanes .draft { position: relative; width: 150px; height: 18px; border-radius: 9px; background: rgba(0,0,0,.5); border: 2px solid #fff; overflow: hidden; }
.r-lanes .draft u { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8fe8ff, #57e0ff); }
.r-lanes .draft span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 11.5px; letter-spacing: .06em; color: #fff; -webkit-text-stroke: 3px #10182a; paint-order: stroke fill; }
.r-lanes .draft.full { animation: pulse .5s infinite; } .r-lanes .draft.full u { background: linear-gradient(90deg, #ffe08a, #ff9d2e); }
.r-lanes .draft.full span::after { content: ' · SWIPE OUT!'; }
/* a shortcut on offer: which way to swipe */
.r-hint { position: absolute; left: 50%; bottom: calc(120px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 7px 14px 7px 8px; border-radius: 16px; white-space: nowrap;
  font-family: var(--display); font-size: 17px; color: #fff; -webkit-text-stroke: 3px #1f5e12; paint-order: stroke fill; background: linear-gradient(180deg, #8be06f, #5bd13b 50%, #3aa31f); border-bottom: 4px solid #237a12;
  box-shadow: 0 4px 10px rgba(0,0,0,.3); animation: popin .25s cubic-bezier(.3,1.6,.5,1); }
.r-hint .ic { width: 26px; height: 26px; } .r-hint small { font-family: var(--font); font-weight: 700; font-size: 12px; -webkit-text-stroke: 0; margin-left: 2px; }
.r-proto { position: absolute; right: 10px; bottom: calc(8px + var(--safe-b)); font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.75); text-shadow: 0 1px 2px #000; letter-spacing: .03em; }
.r-pops .pop.gear { color: #9ff07c; font-size: 24px; }
/* the junction ahead: three arrows above the bike, the GPS's way lit, each other exit priced */
.r-turn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30px); display: flex; gap: 10px; animation: popin .2s cubic-bezier(.3,1.6,.5,1); }
.r-turn button { pointer-events: auto; display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 6px 8px 5px; border-radius: 14px; background: var(--hud); box-shadow: var(--hud-edge); color: #fff; opacity: .75; }
.r-turn button i { font-style: normal; font-size: 26px; line-height: 1; }
.r-turn button small { font-family: var(--display); font-size: 11px; letter-spacing: .03em; margin-top: 2px; white-space: nowrap; color: #c9d5ef; }
.r-turn button.on { opacity: 1; background: linear-gradient(180deg, #5fd8ff, #2aa3d8); box-shadow: 0 0 0 3px #fff, 0 4px 0 rgba(0,0,0,.3); } .r-turn button.on small { color: #fff; }
.r-turn button.good:not(.on) { opacity: 1; background: linear-gradient(180deg, #8be06f, #3aa31f); animation: pulse .7s infinite; } .r-turn button.good:not(.on) small { color: #fff; }
#ridehud.evmode .r-lanes, #ridehud.evmode .r-limit, #ridehud.evmode .r-hint, #ridehud.evmode .r-turn { opacity: 0; }

/* ===== modals ===== */
#modals { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.modal { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(10, 16, 30, .45); pointer-events: auto; opacity: 0; transition: opacity .2s; }
.modal.in { opacity: 1; } .modal.out { opacity: 0; }
.modal .card { width: min(100%, 380px); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--cream); color: var(--ink); border-radius: 22px; padding: 16px 16px 14px; box-shadow: 0 0 0 4px #ffd56b, 0 8px 0 4px rgba(0,0,0,.2), 0 20px 40px rgba(0,0,0,.35);
  transform: scale(.85) translateY(20px); transition: transform .28s cubic-bezier(.3,1.5,.5,1); text-align: center; border: 0; }
.modal.in .card { transform: none; }
.modal .card h2 { font-size: 28px; color: #ffcf3f; -webkit-text-stroke: 6px #3a1d24; paint-order: stroke fill; margin-bottom: 6px; line-height: 1.1; }
.modal .card p { margin: 4px 0 10px; font-size: 15px; color: var(--ink-2); font-weight: 500; }
.modal .small { font-size: 13px !important; }
.modal .btn.big { margin-top: 6px; }
.modal.event { background: rgba(10, 16, 30, .25); }
.event .card { background: var(--panel); color: #fff; }
.event .card h2 { color: #ffd56b; font-size: 23px; margin: 0; }
.event .card p { color: #dfe7fb; }
.event .card.good { box-shadow: 0 0 0 4px #6fff5a, 0 8px 0 4px rgba(0,0,0,.2); } .event .card.bad { box-shadow: 0 0 0 4px #ff5a4a, 0 8px 0 4px rgba(0,0,0,.2); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.ev-head { display: flex; align-items: center; justify-content: center; gap: 8px; }
.evi { width: 46px !important; height: 46px !important; }
.ev-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ev-opts .opt { flex-direction: column; gap: 0; min-height: 64px; white-space: normal; position: relative; }
.ev-opts .opt b { font-weight: 400; font-size: 19px; } .ev-opts kbd { position: absolute; top: 4px; right: 8px; font: 700 11px var(--font); opacity: .6; }
.ev-timer { height: 10px; border-radius: 6px; background: rgba(0,0,0,.45); border: 2px solid #121b2e; margin-top: 12px; overflow: hidden; } .ev-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff9d2e, #ffd56b); }
.qbar { height: 16px; border-radius: 9px; background: rgba(0,0,0,.45); border: 2px solid #121b2e; margin-top: 10px; overflow: hidden; } .qbar i { display: block; height: 100%; width: 0; background: linear-gradient(#9ff07c, #4cc22c); transition: width .08s; }
.qte-mash.pulse { animation: tapp .12s; } @keyframes tapp { 50% { transform: scale(.94); } }
.gauge { position: relative; height: 34px; border-radius: 17px; background: linear-gradient(90deg, #ff6a5a, #ffc23a 50%, #ff6a5a); margin: 6px 0 12px; border: 3px solid #fff; overflow: hidden; }
.gauge .zone { position: absolute; top: 0; bottom: 0; background: #5bd13b; }
.gauge .needle { position: absolute; top: -2px; bottom: -2px; width: 6px; margin-left: -3px; background: #1d2a44; border-radius: 3px; box-shadow: 0 0 0 2px #fff; }
.swipe-pad { padding: 18px; border-radius: 16px; border: 3px dashed rgba(255,255,255,.4); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.swipe-pad .arr { font-size: 56px; line-height: 1; animation: nudge .6s infinite alternate; } .swipe-pad small { color: #b9c6e6; }
@keyframes nudge { to { transform: translateY(-6px); } }
.modal.scene { place-items: end center; background: transparent; padding-bottom: calc(24px + var(--safe-b)); }
.scene .card { text-align: left; position: relative; overflow: visible; padding-top: 24px; }
.scene .card .ribwrap.top { top: -20px; } .scene .card .ribwrap.top .ribbon { height: 36px; font-size: 19px; padding: 0 28px; -webkit-text-stroke-width: 4px; }
.sc-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sc-row > span:not(.check) { flex: 1; display: flex; flex-direction: column; }
.sc-row small { font-size: 13px; color: var(--ink-2); font-weight: 600; } .sc-row b { font-family: var(--display); font-weight: 400; font-size: 25px; color: #3a2a40; } .sc-row em { font-style: normal; font-size: 13px; color: var(--ink-2); }
.scf, .scc { width: 62px !important; height: 62px !important; padding: 5px; background: radial-gradient(circle at 50% 35%, #fffaf0, #f1e4cc); border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 3px var(--gold), 0 4px 0 3px rgba(0,0,0,.15); }
.scc { padding: 0; object-fit: cover; object-position: 50% 0; }
.check { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; border-bottom: 3px solid var(--green-d); }
/* the door scenes play by themselves: a line that says so, its dots taking turns */
.sc-wait { margin: 0 0 2px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); text-align: center; }
.sc-wait i { font-style: normal; animation: scdot 1.2s infinite; } .sc-wait i:nth-child(2) { animation-delay: .2s; } .sc-wait i:nth-child(3) { animation-delay: .4s; }
@keyframes scdot { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
/* (between drops the ride goes on under the stars: touches go through to the road) */
.modal.rated { background: transparent; place-items: start center; padding-top: calc(110px + var(--safe-t)); pointer-events: none; }
.rated .card { width: min(100%, 320px); }
.stars { display: flex; justify-content: center; gap: 2px; } .stars .st { width: 30px; height: 30px; } .stars.big .st { width: 44px; height: 44px; animation: starpop .4s backwards cubic-bezier(.3,1.8,.5,1); }
@keyframes starpop { from { transform: scale(0) rotate(-40deg); } }
.quote { font-style: italic; } .quote small { font-style: normal; }
.paid { display: flex; justify-content: center; align-items: baseline; gap: 8px; font-family: var(--display); font-size: 30px; color: var(--green); -webkit-text-stroke: 5px #1f5e12; paint-order: stroke fill; }
.rated .card { box-shadow: 0 0 0 4px #ffd56b, 0 8px 0 4px rgba(0,0,0,.2), 0 20px 40px rgba(0,0,0,.35); border: 0; }
.paid .tip { font-size: 19px; color: #ffc53d; -webkit-text-stroke: 4px #7a4a00; }
.notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.good { color: #2f9a1d; } .bad { color: #c8321f; }
.rlines { background: #fff; border-radius: 14px; padding: 6px 12px; margin: 8px 0; text-align: left; }
.rl { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #e4d6bb; font-size: 14.5px; font-weight: 600; color: #4a3d4d; }
.rl:last-child { border: 0; } .rl b { font-family: var(--display); font-weight: 400; font-size: 17px; } .rl .ic { width: 22px; height: 22px; }
.rl.neg b { color: #c8321f; } .rl.pos b { color: #2f9a1d; }
/* the receipt's offer to ride on: the next order near the customer's door */
.rnext { background: #fff; border-radius: 14px; padding: 7px 12px 9px; margin: 8px 0 10px; text-align: left; box-shadow: inset 0 0 0 2px #ffd56b; }
.rnext > small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.rn-row { display: flex; align-items: center; gap: 10px; } .rn-row > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rn-row b { font-family: var(--display); font-weight: 400; font-size: 19px; color: #3a2a40; line-height: 1.1; } .rn-row em { font-style: normal; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.rn-row .rn-pay { font-size: 22px; color: var(--green); -webkit-text-stroke: 4px #1f5e12; paint-order: stroke fill; }
.rnf { width: 40px !important; height: 40px !important; padding: 3px; background: radial-gradient(circle at 50% 35%, #fffaf0, #f1e4cc); border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
.rn-b { font-style: normal; font-weight: 800; color: #b5520d; font-size: 11px; }
.receipt [data-next] { position: relative; }
.receipt [data-next] .rn-cost { display: inline-flex; align-items: center; height: 24px; padding: 0 8px 0 2px; margin-left: 6px; border-radius: 12px; background: linear-gradient(#5cb8ff, #2f6fd6); font-style: normal; font-size: 16px; -webkit-text-stroke: 0; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.receipt [data-next] .rn-cost .ic { width: 22px; height: 22px; margin: -4px 0 -4px -4px; }
.receipt [data-next].short { filter: grayscale(.85) brightness(.9); }
.receipt .btn.rhub { width: 100%; margin-top: 8px; color: #6b5a44; background: rgba(60, 40, 20, .08); }
.modal.receipt { background: radial-gradient(circle at 50% 42%, rgba(255,207,63,.42), rgba(10,16,30,.55) 62%); overflow: hidden; }
.modal.receipt::before { content: ''; position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(255,230,150,.13) 0 8deg, transparent 8deg 16deg); animation: spin 40s linear infinite; pointer-events: none; }
.receipt .card { position: relative; overflow: visible; padding-top: 34px; border: 0; box-shadow: 0 0 0 4px #ffd56b, 0 8px 0 4px rgba(0,0,0,.22), 0 24px 40px rgba(0,0,0,.4); }
.card .ribwrap.top { position: absolute; top: -24px; left: 0; right: 0; z-index: 2; }
.card .ribwrap.top .ribbon { height: 44px; font-size: 25px; padding: 0 34px; -webkit-text-stroke-width: 5px; }
.stars.arc { align-items: flex-end; margin: 2px 0 4px; }
.stars.arc .st { width: 36px; height: 36px; filter: drop-shadow(0 3px 0 rgba(150,90,0,.35)); }
.stars.arc .st:nth-child(1) { transform: rotate(-14deg); } .stars.arc .st:nth-child(5) { transform: rotate(14deg); }
.stars.arc .st:nth-child(2) { width: 42px; height: 42px; transform: rotate(-6deg) translateY(-6px); } .stars.arc .st:nth-child(4) { width: 42px; height: 42px; transform: rotate(6deg) translateY(-6px); }
.stars.arc .st:nth-child(3) { width: 50px; height: 50px; transform: translateY(-10px); }
.ramt { font-family: var(--display); font-size: 46px; line-height: 1; color: var(--green); -webkit-text-stroke: 7px #1f5e12; paint-order: stroke fill; filter: drop-shadow(0 4px 0 rgba(0,0,0,.18)); margin: 0 0 2px; }
.ramt.neg { color: #ff6a5a; -webkit-text-stroke-color: #6a1a10; }
.rxp2 { display: flex; align-items: center; gap: 8px; margin: 4px 2px 10px; }
.rxp2 .shield.next { filter: grayscale(.6) brightness(.95); }
.rxp2 .bar { position: relative; flex: 1; height: 18px; border-radius: 10px; background: #e9dcc2; border: 2px solid #d9c9a8; overflow: hidden; }
.rxp2 .bar u { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#ffd56b, #f39b1d); }
.rxp2 .bar s { position: absolute; top: 0; bottom: 0; background: linear-gradient(#a5d2ff, #5aa2ef); text-decoration: none; }
.rxp2 .bar em { position: absolute; inset: 0; font-style: normal; text-align: center; font-family: var(--display); font-size: 12px; line-height: 14px; color: #fff; -webkit-text-stroke: 3px #5a3a00; paint-order: stroke fill; }
.rgoal { font-weight: 700; color: #3f6fb8; font-size: 13.5px; margin: -4px 0 8px; display: flex; align-items: center; justify-content: center; gap: 4px; } .rgoal .ic { width: 20px; height: 20px; }
/* short screens (landscape phones): ribbon inside the card, smaller stars and amount, scroll if still too tall */
@media (max-height: 520px) {
  .receipt .card { overflow-y: auto; padding-top: 10px; }
  .card .ribwrap.top { position: static; margin-bottom: 2px; }
  .card .ribwrap.top .ribbon { height: 36px; font-size: 20px; }
  .stars.arc .st, .stars.arc .st:nth-child(n) { width: 28px; height: 28px; }
  .ramt { font-size: 32px; -webkit-text-stroke-width: 5px; }
  .receipt .rl { padding: 3px 0; }
  .rxp2 { margin: 2px 2px 6px; }
}
/* a short, wide screen (a phone on its side): the receipt beside the offer to ride on */
@media (max-height: 520px) and (min-width: 640px) {
  .receipt .card.rn { width: min(100%, 680px); display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: center; }
  .receipt .card.rn .rnext { margin-top: 0; }
}
.receipt .btn.big, .pop .btn.big { font-size: 23px; -webkit-text-stroke-width: 5px; }
.pop .ribwrap { margin: 0 0 8px; }
.pop .card { overflow: hidden; position: relative; }
.burst { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(255, 213, 107, .35) 0 10deg, transparent 10deg 20deg); animation: spin 8s linear infinite; z-index: 0; pointer-events: none; }
.pop .card > *:not(.burst) { position: relative; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.lvshield { display: flex; justify-content: center; margin: 4px 0 10px; filter: drop-shadow(0 5px 0 rgba(0,0,0,.25)); }
.lvshield .shield { width: 96px; height: 108px; }
.lvshield .shield::before { width: calc(100% - 12px); height: calc(100% - 12px); }
.lvshield .shield b { font-size: 54px; -webkit-text-stroke: 7px #121b2e; }
/* daily gift: days 1–4 on top, 5–7 below with the big day 7 twice as wide; today's glows, the ones taken this run are ticked */
.gdays { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 8px 0 10px; }
.gd { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px 6px; border-radius: 12px; background: #fff; border-bottom: 3px solid #e4d6bb; color: #4a3d4d; }
.gd small { font-size: 11px; font-weight: 700; color: #8a7a66; letter-spacing: .02em; }
.gd > .ic { width: 30px; height: 30px; }
.gv { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; } .gd b { font: 400 15px/1.15 var(--display); white-space: nowrap; }
.gd:last-child { grid-column: span 2; background: linear-gradient(180deg, #fff8e0, #ffe39a); } .gd:last-child > .ic { width: 38px; height: 38px; margin: -4px 0; }
.gd.now { background: linear-gradient(180deg, #ffe08a, var(--gold)); border-bottom-color: var(--gold-d); box-shadow: 0 0 0 3px #fff, 0 0 16px 4px rgba(255, 197, 61, .85); animation: gdpulse 1.3s ease-in-out infinite; z-index: 2 !important; }
.gd.now small { color: #6b4310; }
.gd.got { opacity: .5; } .gd.got::after { content: '✓'; position: absolute; top: 1px; right: 6px; font: 700 17px var(--font); color: var(--green-d); }
@keyframes gdpulse { 50% { transform: scale(1.07); } }
.unl { text-align: left; font-weight: 600; color: #4a3d4d; margin: 4px 0 8px; padding-left: 20px; }
.settings .set { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0; font-weight: 600; }
.settings input[type=range] { flex: 1; max-width: 190px; } .settings select { font: 600 14px var(--font); padding: 4px 8px; border-radius: 8px; }
.settings .actions { flex-direction: row; justify-content: space-between; }
.settings .set-priv { margin-top: -4px; line-height: 1.45; }
.settings .pid { font: 600 12px ui-monospace, Menlo, Consolas, monospace; word-break: break-all; user-select: all; -webkit-user-select: all; padding: 1px 5px; border-radius: 6px; background: rgba(60, 40, 20, .08); }
.settings a, .modal.privacy a, .i-legal a { color: #2f6fd6; text-decoration: underline; }
.modal.privacy a.btn { display: flex; margin-top: 6px; color: var(--ink-2); text-decoration: none; }
.modal.tip { background: transparent; }
.modal.tip .card { background: var(--panel); color: #fff; } .modal.tip p { color: #fff; font-size: 15.5px; }
.modal.tip.at-top { --tip-top: 130px; place-items: start center; padding-top: calc(var(--tip-top) + var(--safe-t)); }
.modal.tip.at-top .card { max-height: calc(100dvh - var(--tip-top) - var(--safe-t) - 16px); }
@media (max-height: 640px) { .modal.tip.at-top { --tip-top: 64px; } } /* (a short screen: the run's first-ride card is long) */
.modal.tip.at-bottom { place-items: end center; padding-bottom: calc(180px + var(--safe-b)); }

/* ===== toasts ===== */
#toasts { position: fixed; left: 50%; top: calc(196px + var(--safe-t)); transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: 90%; }
.toast { --ts: #121b2e; display: flex; align-items: center; justify-content: center; gap: 6px; color: #fff; background: linear-gradient(180deg, #34507e, #1d2a44); padding: 7px 16px 8px; border-radius: 16px; font-family: var(--display); font-size: 18px; line-height: 1.2; text-align: center; -webkit-text-stroke: 3.5px var(--ts); paint-order: stroke fill;
  animation: toastin .3s cubic-bezier(.3,1.6,.5,1); transition: opacity .4s, transform .4s; box-shadow: 0 0 0 2.5px #ffd56b, 0 4px 0 2px rgba(0,0,0,.3); }
.toast .ic { width: 26px; height: 26px; }
.toast.good { --ts: #1f5e12; background: linear-gradient(180deg, #8be06f, #5bd13b 50%, #3aa31f); box-shadow: 0 0 0 2.5px #fff, 0 4px 0 2px rgba(0,0,0,.3); }
.toast.bad { --ts: #6a1a10; background: linear-gradient(180deg, #ff8f80, #ff6a5a 50%, #d6372a); box-shadow: 0 0 0 2.5px #fff, 0 4px 0 2px rgba(0,0,0,.3); }
.toast.warn { --ts: #7a4a00; background: linear-gradient(180deg, #ffe08a, #ffc23a 50%, #e69a12); box-shadow: 0 0 0 2.5px #fff, 0 4px 0 2px rgba(0,0,0,.3); }
.toast.cash { background: none; box-shadow: none; color: var(--cash); font-size: 26px; -webkit-text-stroke: 4px #1d4a12; paint-order: stroke fill; }
.toast.out { opacity: 0; transform: translateY(-14px); }
@keyframes toastin { from { transform: scale(.5); opacity: 0; } }
body[data-mode="hub"] #toasts { top: auto; bottom: calc(46vh + 70px); }

/* ===== map markers ===== */
.mk { display: flex; flex-direction: column; align-items: center; padding-bottom: 10px; }
.mk .bub { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, #f1e4cc); border: 3px solid #fff; color: var(--ink);
  box-shadow: 0 0 0 2.5px var(--gold), 0 5px 0 2px rgba(0,0,0,.3); font-weight: 700; font-size: 13px; white-space: nowrap; }
.mk .bub .ic { width: 36px; height: 36px; }
.mk .bub .ic + .ic { position: absolute; right: -9px; bottom: -6px; width: 22px; height: 22px; }
.mk .bub::after { content: ''; position: absolute; left: 50%; bottom: -13px; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--gold); border-bottom: 0; }
.mk .cnt { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--red); color: #fff; font-family: var(--display); font-style: normal; font-weight: 400; font-size: 13px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.mk .bub em { position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%); font-style: normal; font-family: var(--display); font-weight: 400; font-size: 13px; color: #fff; background: var(--red); padding: 1px 9px; border-radius: 9px; border-bottom: 3px solid var(--red-d); }
.mk.me, .mk.cust { padding-bottom: 30px; }
.mk.me .bub, .mk.cust .bub { width: 44px; height: 44px; background: #fff; overflow: visible; box-shadow: 0 0 0 3px var(--red), 0 0 0 5px #fff, 0 6px 10px rgba(0,0,0,.4); }
.mk.me .bub .ic, .mk.cust .bub .ic { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 0; }
.mk.me .bub::after, .mk.cust .bub::after { display: none; }
.mk.cust .bub { box-shadow: 0 0 0 3px #ff9d2e, 0 0 0 5px #fff, 0 6px 10px rgba(0,0,0,.4); } .mk.cust .bub em { background: #ff9d2e; border-bottom-color: #c46a10; }
.mk.fleet { padding-bottom: 6px; }
.mk.fleet .bub { width: 30px; height: 30px; border-width: 2px; background: #2ec4b6; box-shadow: 0 3px 0 rgba(0,0,0,.3); } .mk.fleet .bub .ic { width: 24px; height: 24px; } .mk.fleet .bub::after { border-top-color: #fff; bottom: -9px; }
.mk.dim { opacity: .6; } .mk.dim .bub { filter: grayscale(.7); }
.mk.lock .bub { width: auto; height: auto; border-radius: 14px; background: rgba(22,32,54,.92); color: #fff; font-family: var(--display); font-weight: 400; font-size: 15px; padding: 5px 12px; display: flex; flex-direction: column; gap: 0; line-height: 1.05;
  border: 0; box-shadow: inset 0 0 0 2px var(--gold), 0 4px 0 rgba(0,0,0,.3); }
.mk.lock .bub .ic { width: 26px; height: 26px; position: static; }
.mk.lock .bub small { font-family: var(--font); font-size: 11px; color: #ffd56b; }
.mk.lock .bub::after { display: none; }
body[data-mode="ride"] #markers { display: none; }

/* ===== landscape / desktop ===== */
@media (min-aspect-ratio: 1/1) and (min-width: 700px) {
  .sheet { left: 10px; right: auto; width: 400px; bottom: calc(66px + var(--safe-b)); top: calc(128px + var(--safe-t)); height: auto !important; border-radius: 22px; }
  .sheet[data-state="min"] { height: 64px !important; top: auto; }
  .tabs { left: 10px; right: auto; width: 400px; bottom: 8px; border-radius: 18px; border: 0; padding-bottom: 6px; }
  .topbar, .clockbar { right: auto; width: 400px; }
  body[data-mode="hub"] #toasts { bottom: 30px; left: auto; right: 20px; transform: none; width: 340px; }
  .r-ctx { bottom: 40px; }
}
/* any landscape screen (phones on their side too): the autopilot keeps HOP beside TURBO, STOP goes under the left thumb */
@media (min-aspect-ratio: 1/1) {
  #ridehud.auto .r-ctx { left: 50%; right: auto; bottom: 40px; transform: translateX(-50%); }
  #ridehud.auto .ctx { white-space: nowrap; }
  #ridehud.auto .r-btn.hop { right: 128px; bottom: calc(30px + var(--safe-b)); }
  .r-btn.stop { left: 100px; bottom: calc(26px + var(--safe-b)); }
}
@media (max-height: 640px) { .sheet { height: 40vh; } .r-map { width: 88px; height: 88px; } .r-cond i { height: 58px; } }

/* first-time coaching */
.coach { position: absolute; left: 50%; top: calc(196px + var(--safe-t)); transform: translateX(-50%); width: min(86vw, 340px); background: #fff7e3; color: var(--ink); border: 3px solid #ffd56b;
  border-radius: 16px; padding: 10px 14px; font-size: 16px; font-weight: 600; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.2); animation: popin .3s cubic-bezier(.3,1.6,.5,1); pointer-events: none; }
.coach b { font-family: var(--display); font-weight: 400; color: #d6461d; }
#ridehud .coached { animation: coachpulse .7s ease-in-out infinite; z-index: 3; }
#ridehud .r-btn.coached { box-shadow: 0 0 0 8px rgba(255, 213, 107, .8), 0 5px 0 rgba(0,0,0,.3); }
#ridehud .r-btn.stop.coached { box-shadow: none; filter: drop-shadow(0 0 5px #ffd56b) drop-shadow(0 0 5px #ffd56b) drop-shadow(0 5px 0 rgba(0,0,0,.3)); }
#ridehud .ctx.coached { box-shadow: 0 0 0 6px rgba(255, 213, 107, .9); }
@keyframes coachpulse { 50% { transform: scale(1.08); } }

/* start bar: taken orders + Start, pinned above the tab bar */
#startbar { position: absolute; left: 10px; right: 10px; bottom: calc(88px + var(--safe-b)); z-index: 4; display: flex; align-items: center; gap: 10px; min-height: 62px; cursor: pointer;
  padding: 6px 10px 6px 10px; border-radius: 18px; background: linear-gradient(180deg, #8be06f, #5bd13b 50%, #45b52a); border-bottom: 5px solid var(--green-d);
  box-shadow: 0 4px 0 rgba(0,0,0,.2), 0 10px 22px rgba(0, 0, 0, .4); animation: popin .3s cubic-bezier(.3, 1.6, .5, 1); }
#startbar.bump { animation: sbbump .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes sbbump { 40% { transform: scale(1.04); } }
.sb-n { position: absolute; left: -6px; top: -10px; min-width: 28px; height: 28px; padding: 0 5px; border-radius: 14px; background: var(--red); border: 3px solid #fff; display: grid; place-items: center; font-family: var(--display); font-style: normal; font-size: 14px; }
.sb-foods { display: flex; flex: none; padding-right: 12px; }
.sb-foods .ic { width: 42px; height: 42px; margin-right: -14px; padding: 3px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, #f1e4cc); border: 2px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.sb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sb-info b { font-family: var(--display); font-weight: 400; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.sb-info small { font-size: 12px; color: #effbe8; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.sb-go { flex: none; display: inline-flex; align-items: center; gap: 3px; font-family: var(--display); font-size: 25px; color: #fff; -webkit-text-stroke: 5px #1f5e12; paint-order: stroke fill; padding: 0 2px; white-space: nowrap; }
.sb-go .ic { width: 32px; height: 32px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
.sheet.has-start .sheet-body { padding-bottom: 104px; }
/* minimised with the Start bar showing: keep the handle + heading peeking out above the bar */
.sheet.has-start[data-state="min"] { height: calc(160px + var(--safe-b) * 0); }
@media (min-aspect-ratio: 1/1) and (min-width: 700px) {
  #startbar { left: 18px; right: auto; width: 384px; bottom: 84px; }
  .sheet.has-start[data-state="min"] { height: 160px !important; }
}

/* ===== ride juice ===== */
#speedlines { position: fixed; inset: -12%; pointer-events: none; opacity: 0; transition: opacity .25s; z-index: 0;
  background:
    repeating-conic-gradient(from 3deg at 50% 46%, rgba(255,255,255,0) 0deg 5deg, rgba(255,255,255,.5) 5.3deg, rgba(255,255,255,0) 5.9deg 13deg),
    repeating-conic-gradient(from 0deg at 50% 46%, rgba(255,255,255,0) 0deg 8deg, rgba(255,255,255,.35) 8.2deg, rgba(255,255,255,0) 8.6deg 21deg);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 46%, transparent 45%, #000 78%); mask-image: radial-gradient(ellipse 60% 55% at 50% 46%, transparent 45%, #000 78%);
  animation: slj .18s steps(2) infinite; }
@keyframes slj { to { transform: rotate(3deg) scale(1.02); } }
.r-flow { position: absolute; top: calc(112px + var(--safe-t)); left: 50%; transform: translateX(-50%) rotate(-5deg); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.r-flow b { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); font-weight: 400; font-size: 17px; letter-spacing: .03em; color: #fff4dc; -webkit-text-stroke: 4px #3a1d24; paint-order: stroke fill; }
.r-flow em { font-style: normal; font-size: 40px; line-height: .95; color: #ffcf3f; -webkit-text-stroke: 6px #3a1d24; paint-order: stroke fill; filter: drop-shadow(0 4px 0 rgba(60,20,30,.35)); }
.r-flow i { width: 92px; height: 9px; border-radius: 5px; background: rgba(0,0,0,.45); border: 2px solid #3a1d24; overflow: hidden; } .r-flow u { display: block; height: 100%; background: linear-gradient(90deg, #ffd56b, #ff9d2e); }
.r-flow.hit { animation: flowhit .3s cubic-bezier(.3,1.8,.5,1); }
.r-flow.max em { color: #ff9d3d; animation: pulse .6s infinite; }
@keyframes flowhit { 40% { transform: translateX(-50%) rotate(-5deg) scale(1.18); } }
.r-pops { position: absolute; left: 0; right: 0; top: 38%; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.r-pops .pop { font-family: var(--display); font-size: 30px; color: #fff; -webkit-text-stroke: 5px #2a1640; paint-order: stroke fill; animation: popup 1.1s cubic-bezier(.2,1.4,.4,1) forwards; display: flex; align-items: baseline; gap: 6px; }
.r-pops .pop small { font-size: 20px; color: #ffd56b; }
.r-pops .pop.lost { color: #ff8f80; font-size: 22px; }
@keyframes popup { 0% { transform: scale(.3); opacity: 0; } 15% { transform: scale(1.12); opacity: 1; } 30% { transform: scale(1); } 75% { opacity: 1; transform: translateY(-10px); } 100% { opacity: 0; transform: translateY(-34px); } }

/* event dock: the card sits low so the street stays visible */
.evdock { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translate(-50%, 30px); width: min(94vw, 400px); opacity: 0; transition: opacity .2s, transform .25s cubic-bezier(.3,1.5,.5,1); pointer-events: auto; z-index: 6; }
.evdock.in { opacity: 1; transform: translate(-50%, 0); } .evdock.out { opacity: 0; transform: translate(-50%, 20px); }
.evdock .card { position: relative; background: linear-gradient(180deg, rgba(38,55,90,.96), rgba(22,32,54,.97)); color: #fff; border-radius: 22px; padding: 26px 12px 10px; text-align: center;
  box-shadow: 0 0 0 3px #ffd56b, 0 6px 0 3px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.45); }
.evdock .ev-head { position: absolute; top: -24px; left: 0; right: 0; gap: 0; filter: drop-shadow(0 4px 0 rgba(0,0,0,.3)); }
.evdock .ev-head .evi { width: 50px !important; height: 50px !important; padding: 5px; margin-right: -14px; position: relative; z-index: 1; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fffaf0, #f1e4cc); border: 3px solid #fff; }
.evdock .card h2.ribbon { color: #fff; height: 38px; font-size: 19px; padding: 0 24px 0 28px; margin: 0; }
.evdock .card p { margin: 3px 0 9px; color: #dfe7fb; font-size: 14.5px; font-weight: 500; }
.evdock .card.good { box-shadow: 0 0 0 3px #6fff5a, 0 6px 0 3px rgba(0,0,0,.3), 0 0 26px rgba(111,255,90,.5); } .evdock .card.bad { box-shadow: 0 0 0 3px #ff5a4a, 0 6px 0 3px rgba(0,0,0,.3), 0 0 26px rgba(255,90,74,.5); animation: shake .3s; }
#ridehud.evmode .r-btn, #ridehud.evmode .r-ctx, #ridehud.evmode .r-speed, #ridehud.evmode .coach { opacity: 0; pointer-events: none; }
#ridehud.evmode::before { content: ''; position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px rgba(255, 213, 107, .35); animation: fade 1.2s reverse; }

/* ===== top bar name ===== */

/* ===== settings + reset ===== */
.settings .set input[type=checkbox] { flex: none; width: 22px; height: 22px; accent-color: var(--green); }
.set-more { display: flex; justify-content: space-between; gap: 8px; margin: 6px 0 4px; }
.btn.danger { color: #c8321f; background: rgba(200, 50, 31, .08); border-bottom-color: rgba(200, 50, 31, .35); }
.settings .btn.ghost { color: var(--ink-2); background: rgba(0,0,0,.06); }
.reset .warn-ic .ic { width: 64px; height: 64px; }
.reset ul.lose { text-align: left; margin: 0 0 12px; padding: 10px 14px 10px 30px; background: #fff; border-radius: 12px; color: #4a3d4d; font-weight: 600; font-size: 14px; }
.reset ul.lose li { margin: 3px 0; }
.btn.hold { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.btn.hold i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(0, 0, 0, .28); }
.btn.hold span { position: relative; }
.reset .btn.ghost { margin-top: 8px; color: var(--ink-2); background: transparent; width: 100%; }

/* ===== intro ===== */
#intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; padding-top: calc(16px + var(--safe-t)); padding-bottom: calc(16px + var(--safe-b));
  background: linear-gradient(180deg, rgba(255, 196, 120, .55), rgba(29, 42, 68, .85)); transition: opacity .35s; }
#intro.out { opacity: 0; pointer-events: none; }
.i-card { width: min(100%, 390px); max-height: 100%; overflow-y: auto; background: var(--cream); color: var(--ink); border-radius: 26px; border: 0; padding: 18px 18px 16px; text-align: center;
  box-shadow: 0 0 0 4px #ffd56b, 0 10px 0 4px rgba(0,0,0,.18), 0 24px 50px rgba(0,0,0,.35); animation: popin .35s cubic-bezier(.3,1.5,.5,1); }
.i-card h2 { font-size: 30px; line-height: 1.1; color: #ffcf3f; -webkit-text-stroke: 6px #3a1d24; paint-order: stroke fill; margin: 8px 0 6px; text-wrap: balance; }
.i-card p { font-size: 15.5px; color: var(--ink-2); margin: 0 0 12px; line-height: 1.35; }
.i-art { position: relative; overflow: hidden; min-height: 150px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, #ffe2b0, #fbf3e4 70%); border-radius: 20px; margin-bottom: 6px; }
.i-art::before { content: ''; position: absolute; inset: -60%; background: repeating-conic-gradient(from 0deg, rgba(255, 197, 61, .18) 0 10deg, transparent 10deg 20deg); animation: spin 24s linear infinite; }
.i-art > * { position: relative; }
.i-art .ia.big { width: 190px; height: 190px; object-fit: contain; animation: bob 2s ease-in-out infinite; }
.ia-row { display: flex; align-items: center; gap: 6px; }
.ia-row .ia { width: 72px; height: 72px; } .ia-row i { font-style: normal; font-family: var(--display); font-size: 26px; color: #d48a12; }
.i-dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 12px; }
.i-dots i { width: 9px; height: 9px; border-radius: 50%; background: #e4d6bb; } .i-dots i.on { background: var(--green); width: 22px; border-radius: 5px; }
.i-btns { display: flex; gap: 8px; align-items: center; } .i-btns .btn.ghost { color: var(--ink-2); background: transparent; flex: none; } .i-btns .btn.big { flex: 1; }
.i-card p.i-legal { font-size: 12px; line-height: 1.35; margin: 12px 4px 0; color: var(--ink-2); opacity: .85; }
.i-card.pick h2 { margin-top: 0; }
.i-preview { position: relative; width: 104px; height: 104px; margin: 0 auto 8px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #ffe6b8, #e8a75a); border: 4px solid #fff; overflow: hidden; box-shadow: 0 0 0 3px #ffd56b, 0 5px 0 3px rgba(0,0,0,.14); }
.i-preview .ip { width: 116px; height: 116px; margin-top: 8px; margin-left: -6px; }
.i-helm { position: absolute; right: 4px; bottom: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 3px solid #fff; }
.i-chars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 8px; }
.i-chars .pchar { border: 3px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.i-chars .pchar.on { box-shadow: 0 0 0 3px var(--green), 0 2px 0 rgba(0,0,0,.12); }
.i-label { font-family: var(--display); font-size: 18px; color: #ffcf3f; -webkit-text-stroke: 4px #3a1d24; paint-order: stroke fill; text-align: left; margin: 4px 2px 6px; }
.i-card .swatches { justify-content: center; }
.i-card .sw { border-color: rgba(0,0,0,.12); } .i-card .sw.on { border-color: #3a2a40; }
.i-name { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-weight: 700; color: var(--ink-2); }
.i-name input { flex: 1; min-width: 0; font: 600 17px var(--font); padding: 9px 12px; border-radius: 12px; border: 2px solid #eadcc2; background: #fff; color: var(--ink); outline: none; }
.i-name input:focus { border-color: var(--green); }

/* ===== spotlight guide ===== */
#guide { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
.g-hole { position: absolute; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(10, 16, 30, .55), 0 0 0 4px #ffd56b inset, 0 0 18px 4px rgba(255, 213, 107, .8); transition: left .2s, top .2s, width .2s, height .2s, opacity .2s; }
.g-hand { position: absolute; font-size: 38px; line-height: 1; transform: translate(-30%, 0); animation: gtap 1s ease-in-out infinite; filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); transition: opacity .2s; }
@keyframes gtap { 50% { transform: translate(-30%, 10px) scale(.92); } }
.g-bubble { position: absolute; pointer-events: auto; background: #fff7e3; color: var(--ink); border: 3px solid #ffd56b; border-radius: 16px; padding: 10px 12px 8px; box-shadow: 0 6px 0 rgba(0,0,0,.18); transition: opacity .2s; text-align: center; }
.g-bubble p { margin: 0 0 4px; font-size: 16px; font-weight: 600; line-height: 1.3; } .g-bubble p b { font-family: var(--display); font-weight: 400; color: #d6461d; } .g-bubble p small { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.g-act:not(:empty) { margin: 6px 0 2px; }
.g-act .btn.ghost { color: var(--ink-2); background: rgba(0,0,0,.06); }
.g-skip { font: 600 11.5px var(--font); color: #9a8a9c; text-decoration: underline; margin-top: 2px; }

/* ===== career: premium finishes, contracts, achievements, ranks, fleet decisions, save code ===== */
.prem-row { margin-top: 6px; }
.sw.prem { position: relative; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.75), transparent 38%), var(--c); }
.sw.prem.metal { background: linear-gradient(135deg, rgba(255,255,255,.65), transparent 45%, rgba(0,0,0,.25) 70%, rgba(255,255,255,.35)), var(--c); }
.sw.prem.glow { box-shadow: 0 0 10px var(--c), inset 0 0 0 2px rgba(255,255,255,.5); }
.sw.prem.locked { filter: saturate(.55) brightness(.8); }
.sw.prem.locked small { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: #dfe7f8; white-space: nowrap; }
.prem-row { row-gap: 18px; padding-bottom: 12px; }
.sw.prem.mini { width: 22px; height: 22px; display: inline-block; vertical-align: middle; border-radius: 50%; }
.goal.bonus .sw { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.achs { display: flex; flex-direction: column; gap: 6px; }
.ach { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 14px; background: rgba(255,255,255,.05); border-bottom: 3px solid rgba(0,0,0,.25); }
.ach .ic { width: 26px; height: 26px; flex: none; opacity: .55; }
.ach.done { background: linear-gradient(90deg, rgba(255,213,107,.24), rgba(255,255,255,.05)); box-shadow: inset 0 0 0 1.5px rgba(255,213,107,.55); }
.ach.done .ic { opacity: 1; }
.ach > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ach b { font-size: 14px; } .ach small { font-size: 12px; color: #b9c6e6; }
.ach i { height: 5px; border-radius: 3px; background: rgba(0,0,0,.35); margin-top: 4px; overflow: hidden; } .ach i u { display: block; height: 100%; background: linear-gradient(90deg, #ffd56b, #ffb02e); }
.ach em { font-style: normal; font-family: var(--display); font-size: 14px; color: #8ff07c; }
.rankbar { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: 12.5px; color: #dfe7fb; }
.rankbar .rk { height: 6px; border-radius: 3px; background: rgba(0,0,0,.35); overflow: hidden; } .rankbar .rk u { display: block; height: 100%; background: var(--dc); }
.hired .perk { font-size: 12px; color: #9ff07c; font-weight: 700; }
.hired.rank-star { color: #ffd56b; }
.emp-warn { margin-top: 8px; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; background: rgba(255, 194, 58, .18); color: #ffe2a3; display: flex; gap: 6px; align-items: center; }
.emp-warn.bad { background: rgba(214, 55, 42, .25); color: #ffc2bb; }
.emp-warn .ic { width: 18px; height: 18px; }
.fevs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.fev { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,213,107,.24), rgba(255,255,255,.05)); box-shadow: inset 0 0 0 2.5px #ffd56b; border-bottom: 4px solid #16213a; }
.fev > .ic { width: 30px; height: 30px; flex: none; }
.lvcash { font-family: var(--display); font-size: 20px; color: #2f9a1d; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 0 6px; }
.lvcash .ic { width: 26px; height: 26px; }
textarea.code { width: 100%; height: 110px; border-radius: 12px; border: 2px solid #d9cdb4; padding: 8px; font: 11px/1.3 ui-monospace, monospace; word-break: break-all; resize: none; background: #fffaf0; color: #3a2a1a; margin: 6px 0 10px; }
.codebox .btn.ghost { color: #6b5a44; background: rgba(60, 40, 20, .08); box-shadow: none; }

/* ===== D2 motion ===== */
#fly { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.flycoin { position: fixed; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; pointer-events: none; will-change: transform; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
.topbar .cash.gain { animation: cashpop .8s cubic-bezier(.3,1.6,.5,1); }
.topbar .cash.gain b { color: var(--cash); }
@keyframes cashpop { 0% { transform: scale(1); } 25% { transform: scale(1.18); box-shadow: inset 0 0 0 2px #8ff06a, 0 0 18px rgba(126,224,90,.8), 0 3px 0 rgba(0,0,0,.35); } 100% { transform: scale(1); } }
.ribbon.pop, .modal .ribwrap .ribbon, .evdock .card h2.ribbon { animation: ribpop .45s .05s cubic-bezier(.3,1.6,.5,1) backwards; }
@keyframes ribpop { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.stars.arc .st { animation: starpop .45s backwards cubic-bezier(.3,1.8,.5,1); }
.stars.arc .st:nth-child(1) { animation-delay: .25s; } .stars.arc .st:nth-child(2) { animation-delay: .35s; } .stars.arc .st:nth-child(3) { animation-delay: .45s; } .stars.arc .st:nth-child(4) { animation-delay: .55s; } .stars.arc .st:nth-child(5) { animation-delay: .65s; }
.rxp2 .bar s { animation: xpfill .9s .9s cubic-bezier(.3,.8,.3,1) backwards; }
@keyframes xpfill { from { width: 0; } }
.lvshield { animation: shielddrop .6s .1s cubic-bezier(.3,1.5,.5,1) backwards; }
@keyframes shielddrop { from { transform: translateY(-70px) scale(.4) rotate(-15deg); opacity: 0; } }
.tabs button.on::before { animation: tabpop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes tabpop { from { transform: scale(.4); } }
.r-timer.warn { animation: tickwob 1s ease-in-out infinite; }
@keyframes tickwob { 0%, 45%, 100% { transform: rotate(0); } 10% { transform: rotate(-9deg); } 20% { transform: rotate(8deg); } 30% { transform: rotate(-5deg); } 38% { transform: rotate(3deg); } }
#startbar::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.4) 50%, transparent 58%) no-repeat; background-size: 250% 100%; animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 55% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
