/* GSL: San Francisco — UI. Direction: "pitch deck printed on a risograph":
   cream paper, 2px ink rules, hard offset shadows, orange / teal / gold spot colours. */
:root {
  /* colours, shadows and type stacks: css/brand.css */
  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --ease-out: cubic-bezier(.2, .9, .25, 1);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --kb: 0px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; touch-action: manipulation; }
html, body { margin: 0; height: 100%; height: 100dvh; overflow: hidden; background: var(--plum); font-family: var(--font); color: var(--paper-text); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior: none; position: fixed; inset: 0; width: 100%; }
input, textarea, select { font-size: 16px; } /* below 16px iOS zooms the page on focus */
button { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#map { position: fixed; inset: 0; touch-action: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

kbd { display: inline-block; min-width: 22px; padding: 1px 6px 0; text-align: center; font: 700 11px/16px var(--font); letter-spacing: .02em; color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-bottom-width: 3px; border-radius: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; background: var(--panel-2); border: 2px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .12s var(--ease-out), box-shadow .12s var(--ease-out), background-color .15s; touch-action: manipulation; user-select: none; -webkit-user-select: none; color: var(--paper-text); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }
.btn:disabled, .btn.primary:disabled, .btn.danger:disabled { background: var(--panel-2); color: var(--text-off); border-color: var(--line-soft); cursor: not-allowed; box-shadow: none; border-style: dashed; }
.btn:focus-visible, .mode:focus-visible, .swatch:focus-visible, .link:focus-visible, #dock button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.btn.primary { background: var(--gold); color: var(--on-gold); border-color: var(--plum); }
.btn.primary kbd { background: rgba(255, 255, 255, .92); }
.btn.danger { background: var(--panel-2); color: var(--rose); border-color: var(--rose); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; box-shadow: none; border-style: dashed; font-weight: 600; }
.btn.ghost.armed { border-style: solid; border-color: var(--flame); background: var(--flame); color: var(--on-gold); }
@media (hover: hover) { .btn:hover:not(:disabled) { background: var(--plum-3); } .btn.primary:hover:not(:disabled) { background: var(--gold-hi); } .btn.danger:hover:not(:disabled) { background: rgba(255, 90, 31, .22); } .btn.ghost:hover:not(:disabled) { background: var(--raise); } .btn.ghost.armed:hover { background: var(--flame); } }

/* ============================== HUD ============================== */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
body.in-menu #hud { display: none; }

#hud-left { position: absolute; top: calc(16px + var(--safe-t)); left: 16px; width: 252px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
#stats { position: relative; width: 100%; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--paper-text); }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; }
.stat { padding: 8px 12px 7px; min-width: 0; }
.stat + .stat { border-left: 2px solid var(--line-soft); }
.stat label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }
.stat b { display: block; font-size: 24px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat b[data-long='l'] { font-size: 19px; line-height: 26.4px; } .stat b[data-long='xl'] { font-size: 16px; line-height: 26.4px; } /* six-digit runway, seven-digit followers: keep the card's height, shrink the figure */
#stat-box-clout b { color: var(--paper-text); }
#stat-box-runway b { color: var(--mint); }
.stat.bump b { animation: stat-bump .5s var(--ease-out); }
.stat.drop b { animation: stat-drop .45s var(--ease-out); }
@keyframes stat-bump { 0% { transform: scale(1); } 35% { transform: scale(1.14); color: var(--flame); } 100% { transform: scale(1); } }
@keyframes stat-drop { 0% { transform: translateX(0); } 25% { transform: translateX(-3px); color: var(--flame); } 60% { transform: translateX(2px); } 100% { transform: translateX(0); } }
.stat b { transform-origin: left center; }
.stat.rank { border-left: 0; border-top: 2px solid var(--ink); background: var(--plum); color: var(--paper-text); border-radius: 0 0 3px 3px; padding: 6px 12px 9px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; }
.stat.rank label { color: var(--gold); }
.stat.rank b { font-size: 14px; font-weight: 700; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.rank.flash { animation: rank-flash 1.2s ease-out; }
@keyframes rank-flash { 0%, 40% { background: var(--gold); color: var(--on-gold); } 100% { background: var(--plum); color: var(--paper-text); } }
#rank-progress { grid-column: 1 / -1; height: 4px; margin-top: 6px; background: rgba(255, 248, 236, .2); border-radius: 2px; overflow: hidden; pointer-events: auto; }
#rank-progress i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .6s var(--ease-out); color: var(--on-gold); }

#floaters { position: absolute; left: calc(100% + 10px); top: 6px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.floater { white-space: nowrap; padding: 2px 9px; font-size: 14px; font-weight: 800; color: #fff; background: var(--plum); border-radius: 999px; animation: floater 1.9s var(--ease-out) forwards; }
.floater.clout { background: var(--flame); color: var(--on-gold); }
.floater.runway { background: var(--mint); color: var(--on-gold); }
.floater.neg { background: var(--plum); }
@keyframes floater { 0% { opacity: 0; transform: translateX(-12px) scale(.9); } 12% { opacity: 1; transform: translateX(0) scale(1); } 75% { opacity: 1; transform: translateY(-6px); } 100% { opacity: 0; transform: translateY(-16px); } }

#objective { position: relative; max-width: 320px; background: var(--panel); border: 2px solid var(--line); border-left-width: 10px; border-left-color: var(--flame); border-radius: var(--radius); padding: 7px 12px 8px; font-size: 15px; font-weight: 700; line-height: 1.25; box-shadow: var(--shadow); color: var(--paper-text); }
#objective::before { content: 'Objective'; display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
#objective.pop { animation: obj-pop .45s var(--ease-out); }
@keyframes obj-pop { 0% { transform: translateX(-14px); opacity: 0; } 100% { transform: none; opacity: 1; } }

#hud-top { position: absolute; top: calc(16px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
#timer { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 2px 16px 3px; font-size: 30px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; box-shadow: var(--shadow); color: var(--paper-text); }
#timer.low { background: var(--flame); color: var(--on-gold); animation: timer-low .5s ease-in-out infinite alternate; }
@keyframes timer-low { to { transform: scale(1.06); } }
#meter { width: 240px; text-align: center; }
#meter span { display: inline-block; padding: 1px 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--plum); color: var(--paper-text); border-radius: 2px 2px 0 0; }
#meter div { height: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; box-shadow: var(--shadow); color: var(--paper-text); }
#meter i { display: block; height: 100%; background: var(--mint); background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(255, 255, 255, .28) 6px 12px); border-right: 2px solid var(--ink); transition: width .25s ease-out, background-color .3s; color: var(--on-gold); }
#meter.hot i { background-color: var(--flame); }

/* minimap + waypoint */
#hud-right { position: absolute; top: calc(16px + var(--safe-t)); right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#minimap { position: relative; width: 150px; height: 150px; border: 2px solid var(--gold); border-radius: var(--radius); box-shadow: 0 0 0 1.5px var(--plum), var(--shadow); background: var(--panel-2); overflow: hidden; isolation: isolate; color: var(--paper-text); }
#minimap-map { position: absolute; inset: 0; }
#minimap-map .maplibregl-canvas { outline: 0; }
#minimap::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); box-shadow: inset 0 0 0 3px rgba(251, 247, 238, .55); pointer-events: none; }
#minimap-pins { position: absolute; inset: 0; }
.mm-pin { position: absolute; left: 0; top: 0; will-change: transform; }
.mm-player { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--c, #3b6cf6); border: 2px solid var(--ink); }
.mm-mission { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--accent); color: var(--on-gold); border: 2px solid var(--ink); font: 800 10px/14px var(--font); text-align: center; }
.mm-mission.done { background: #b9b2a2; }
.mm-mission.edge { opacity: .85; }
.mm-waypoint { width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); z-index: 2; }
.mm-waypoint::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--gold); animation: mm-pulse 1.4s ease-out infinite; }
.mm-waypoint.edge::after { content: ''; position: absolute; left: 50%; top: 50%; width: 0; height: 0; margin: -4px 0 0 -5px; border: 5px solid transparent; border-top: 0; border-bottom: 8px solid var(--ink); transform: rotate(var(--a, 0rad)) translateY(-2px); }
.mm-waypoint.edge { background: var(--gold); }
.mm-waypoint.edge::before { display: none; }
@keyframes mm-pulse { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
#minimap-me { position: absolute; left: 50%; top: 50%; width: 18px; height: 20px; z-index: 3; }
#minimap-me::before, #minimap-me::after { content: ''; position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 100%, 50% 76%, 0 100%); }
#minimap-me::before { background: var(--ink); }
#minimap-me::after { background: var(--c, #3b6cf6); transform: scale(.62); transform-origin: 50% 58%; }
#minimap-north { position: absolute; left: 0; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--plum); color: var(--paper-text); font: 800 9px/16px var(--font); text-align: center; z-index: 4; }
#waypoint { display: flex; align-items: center; gap: 6px; max-width: 230px; height: 26px; padding: 0 10px 0 4px; background: var(--plum); color: var(--paper-text); border-radius: 999px; font-size: 13px; }
#waypoint-arrow { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: var(--on-gold); font: 800 13px/18px var(--font); text-align: center; font-style: normal; transition: transform .12s linear; }
#waypoint-dist { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
#waypoint-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .75; font-weight: 600; }
#waypoint-label:empty { display: none; }

/* mission banner */
#banner { position: absolute; top: 25%; left: 0; right: 0; padding: 0 16px; text-align: center; animation: banner-in .55s var(--ease-out) both; }
#banner h1 { display: inline-block; margin: 0; padding: .08em .38em .12em; max-width: min(92%, 980px); font-size: clamp(32px, 5.2vw, 66px); line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--paper-text); background: var(--flame); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 7px 7px 0 var(--shade); transform: rotate(-2deg); text-wrap: balance; font-family: var(--poster-font); font-weight: 400; letter-spacing: .01em; text-transform: uppercase; color: #fff; -webkit-text-stroke: .09em var(--plum); paint-order: stroke fill; text-shadow: .04em .06em 0 var(--plum); padding: .14em .42em .16em; }
#banner[data-tone='good'] h1 { background: var(--gold); color: #fff; }
#banner[data-tone='bad'] h1 { background: var(--plum); color: var(--gold); }
#banner p { display: table; margin: 16px auto 0; max-width: min(640px, 100%); background: var(--panel); color: var(--paper-text); border: 2px solid var(--line); padding: 6px 14px; border-radius: var(--radius); font-weight: 700; font-size: 16px; box-shadow: var(--shadow); animation: banner-sub .5s .18s var(--ease-out) both; }
#banner.out { animation: banner-out .3s ease-in forwards; }
@keyframes banner-in { 0% { opacity: 0; transform: translateY(-26px) scale(.92); } 100% { opacity: 1; transform: none; } }
@keyframes banner-sub { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }
@keyframes banner-out { to { opacity: 0; transform: translateY(-14px); } }

/* bottom-centre stack: toasts / prompt / hotbar / dialog */
#hud-bottom { position: absolute; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); width: min(680px, calc(100vw - 32px)); display: flex; flex-direction: column; align-items: center; gap: 10px; }
#toasts { display: flex; flex-direction: column; gap: 6px; align-items: center; max-width: 100%; }
.toast { max-width: 100%; background: var(--panel); border: 2px solid var(--line); border-radius: 999px; padding: 6px 16px; font-size: 14px; font-weight: 600; text-align: center; box-shadow: var(--shadow); animation: toast-in .32s var(--ease-out) both; color: var(--paper-text); }
.toast.out { animation: toast-out .25s ease-in forwards; }
@keyframes toast-in { 0% { opacity: 0; transform: translateY(12px) scale(.96); } 100% { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }
.toast.promo { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--gold); border-radius: var(--radius); padding: 8px 18px 8px 10px; box-shadow: 5px 5px 0 var(--shade); animation: promo-in .6s var(--ease-out) both; color: var(--on-gold); }
.toast.promo .burst { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--plum); color: var(--gold); font-size: 22px; animation: spin-in .8s var(--ease-out) both; }
.toast.promo small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.toast.promo b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
@keyframes promo-in { 0% { opacity: 0; transform: translateY(18px) scale(.8) rotate(-3deg); } 60% { transform: scale(1.05) rotate(1deg); } 100% { opacity: 1; transform: none; } }
@keyframes spin-in { from { transform: rotate(-180deg) scale(.4); } to { transform: none; } }

#prompt { display: flex; align-items: center; gap: 8px; background: var(--gold); border: 2px solid var(--ink); border-radius: var(--radius); padding: 6px 14px 6px 8px; font-weight: 800; font-size: 15px; box-shadow: var(--shadow); animation: toast-in .2s var(--ease-out) both; color: var(--on-gold); }
#prompt .dash { font-size: 0; }
#prompt kbd { font-size: 13px; line-height: 20px; min-width: 26px; }
#hud.dialog-open #prompt { display: none; }

#hotbar { display: flex; gap: 8px; pointer-events: auto; }
#hotbar:empty { display: none; }
.slot { position: relative; flex: none; width: 56px; height: 56px; display: grid; place-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 26px; line-height: 1; cursor: pointer; user-select: none; -webkit-user-select: none; transition: transform .12s var(--ease-out), background-color .12s; color: var(--paper-text); }
.slot img, .slot svg, .slot .icon { max-width: 36px; max-height: 36px; pointer-events: none; }
/* icons are often dark emoji (the laptop): they sit on a light plate inside the plum slot; the selected slot is gold already */
.slot:not(.empty):not(.active) .icon { background: var(--paper-text); border-radius: 3px; box-shadow: 0 0 0 5px var(--paper-text); }
.slot .key, .slot kbd { position: absolute; top: -7px; left: -7px; min-width: 18px; height: 18px; padding: 0 4px; font: 800 10px/15px var(--font); text-align: center; color: var(--paper); background: var(--ink); border: 1.5px solid var(--ink); border-radius: 6px; }
.slot .count, .slot .qty { position: absolute; right: -6px; bottom: -6px; min-width: 20px; height: 18px; padding: 0 5px; font: 800 11px/15px var(--font); text-align: center; color: var(--paper-text); background: var(--panel-2); border: 1.5px solid var(--line-soft); border-radius: 999px; font-variant-numeric: tabular-nums; }
.slot .count:empty, .slot .qty:empty { display: none; }
.slot.empty { background: rgba(23, 16, 28, .6); box-shadow: none; border-style: dashed; cursor: default; color: var(--paper-text); }
.slot.active { background: var(--gold); transform: translateY(-5px); box-shadow: 3px 6px 0 var(--shade); color: var(--on-gold); }
.slot.active .key, .slot.active kbd { background: var(--accent); border-color: var(--ink); }

#dialog { pointer-events: auto; position: relative; width: 100%; margin-top: 14px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px 20px 26px; box-shadow: var(--shadow-lg); cursor: pointer; animation: dialog-in .28s var(--ease-out) both; user-select: none; -webkit-user-select: none; touch-action: manipulation; color: var(--paper-text); }
@keyframes dialog-in { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: none; } }
#dialog-speaker { position: absolute; top: -15px; left: 16px; display: flex; align-items: center; gap: 7px; padding: 3px 12px 3px 6px; background: var(--panel); border: 2px solid var(--line); border-radius: 999px; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--paper-text); }
#dialog-speaker::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--spk, var(--flame)); border: 2px solid var(--ink); }
#dialog-text { font-size: 19px; font-weight: 500; line-height: 1.35; min-height: 2.7em; text-wrap: pretty; }
#dialog-text .off { visibility: hidden; }
#dialog small { position: absolute; right: 14px; bottom: 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); white-space: pre; }
#dialog:not(.typing) small { animation: nudge 1s ease-in-out infinite alternate; color: var(--gold); }
@keyframes nudge { to { transform: translateX(3px); } }

/* dock: help + phone buttons (bottom-right, above the map attribution) */
#dock { position: absolute; right: 16px; bottom: calc(44px + var(--safe-b)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
#dock-buttons { display: flex; gap: 8px; }
#dock button { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 800; font-size: 13px; cursor: pointer; transition: transform .12s var(--ease-out), box-shadow .12s; touch-action: manipulation; color: var(--paper-text); }
#dock button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }
#dock button.on { background: var(--gold); color: var(--on-gold); }
#btn-phone { background: var(--plum) !important; color: var(--paper-text); }
#help { pointer-events: auto; width: 226px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px 12px; animation: toast-in .22s var(--ease-out) both; color: var(--paper-text); }
#help h4, .phone-side h3 { margin: 0 0 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
#help h4 { color: var(--gold); }
#help div, .menu-keys div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; }
#help span, .menu-keys span { display: flex; gap: 3px; }
#help em, .menu-keys em { font-style: normal; font-weight: 600; color: var(--text-dim); }

#fade { position: fixed; inset: 0; z-index: 60; background: var(--plum); opacity: 0; pointer-events: none; transition: opacity .28s ease; }
#fade.on { opacity: 1; pointer-events: auto; }

/* touch controls (js/touch.js builds #touch-surface, #stick, #touch-buttons; body.touch is set on coarse-pointer devices) */
#touch-surface { position: absolute; inset: 0; pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.touch { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.touch input, body.touch textarea { -webkit-user-select: text; user-select: text; }
body.touch #dock kbd, body.touch .phone-close kbd, body.touch #btn-help, body.touch #help { display: none; }
body:not(.touch) #btn-phone svg, body:not(.touch) #btn-fs, body:not(.touch) #btn-chat { display: none; }
@media (pointer: coarse) { .cta kbd, .cert-foot kbd { display: none; } }
#stick { position: fixed; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; border: 2px dashed var(--line); background: rgba(23, 16, 28, .6); pointer-events: none; color: var(--paper-text); }
#stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; border-radius: 50%; background: var(--plum); box-shadow: 0 0 0 3px var(--paper); transform: translate(-50%, -50%); }
#stick.sprint { border-style: solid; border-color: var(--flame); background: rgba(255, 90, 54, .18); }
#stick.sprint i { background: var(--flame); }
#touch-buttons { position: absolute; right: calc(16px + var(--safe-r)); bottom: calc(96px + var(--safe-b)); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
#touch-buttons button { pointer-events: auto; border: 2px solid var(--line-soft); box-shadow: var(--shadow); font-weight: 800; line-height: 1.15; touch-action: none; cursor: pointer; transition: transform .1s var(--ease-out), box-shadow .1s var(--ease-out); }
#tb-action { display: flex; align-items: center; gap: 9px; min-width: 68px; min-height: 68px; max-width: min(48vw, 230px); padding: 8px 18px 8px 10px; background: var(--gold); border-radius: 999px; font-size: 15px; text-align: left; color: var(--on-gold); }
#tb-action i { flex: none; position: relative; width: 46px; height: 46px; border-radius: 50%; background: var(--plum); }
#tb-action i::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; border: 3px solid var(--gold); }
#tb-action i::after { content: ''; position: absolute; inset: 19px; border-radius: 50%; background: var(--gold); color: var(--on-gold); }
#tb-action span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-wrap: balance; }
#tb-off { min-height: 48px; padding: 0 18px; background: var(--panel); border-radius: 999px; font-size: 14px; color: var(--paper-text); }
#touch-buttons button.down { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }
#hud.dialog-open #touch-buttons { display: none; }
body.touch #prompt.keyed { display: none; } /* shown on the action button instead */
.toast.rotate-hint { display: flex; align-items: center; gap: 4px; padding: 0 2px 0 14px; pointer-events: auto; background: var(--plum); color: var(--paper-text); }
.toast.rotate-hint button { width: 44px; height: 40px; border: 0; background: none; color: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
#gl-lost { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(20, 8, 24, .84); }
#gl-lost > div { max-width: 360px; padding: 18px 20px 20px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); text-align: center; color: var(--paper-text); }
#gl-lost b { font-size: 20px; font-weight: 800; } #gl-lost p { margin: 8px 0 16px; font-size: 14px; line-height: 1.35; color: var(--text-dim); }
#gl-lost .btn { min-height: 48px; font-size: 16px; }

/* ============================== START MENU ============================== */
#menu { position: fixed; inset: 0; z-index: 40; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column;
  background: var(--dots) 0 0 / 7px 7px, linear-gradient(100deg, rgba(23, 16, 28, .95) 0%, rgba(23, 16, 28, .86) 38%, rgba(23, 16, 28, .5) 70%, rgba(23, 16, 28, .34) 100%);
  transition: opacity .7s ease, transform .7s var(--ease-out); }
#menu.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.menu-wrap { flex: 1 0 auto; width: 100%; max-width: 1160px; margin: 0 auto; padding: 36px 40px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 540px; gap: 40px; align-items: center; }
.menu-brand { min-width: 0; animation: menu-rise .7s var(--ease-out) both; }
.menu-card { animation: menu-rise .7s .12s var(--ease-out) both; }
@keyframes menu-rise { 0% { opacity: 0; transform: translateY(22px); } 100% { opacity: 1; transform: none; } }







.menu-pitch { max-width: 440px; margin: 14px 0 22px 4px; font-size: 17px; line-height: 1.4; font-weight: 500; }
.menu-pitch b { background: linear-gradient(transparent 58%, var(--gold) 58%); font-weight: 700; }
.menu-keys { display: grid; grid-template-columns: repeat(3, max-content); gap: 2px 26px; margin-left: 4px; }
.menu-keys div { justify-content: flex-start; gap: 8px; }

.menu-card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 9px 9px 0 var(--shade); padding: 22px 24px 18px; color: var(--paper-text); }
.menu-step { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.menu-step:not(:first-child) { margin-top: 20px; }
.menu-step i { font-style: normal; font-size: 12px; font-weight: 800; padding: 1px 7px; background: var(--plum); color: var(--paper-text); border-radius: var(--radius-sm); }
.menu-step h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.menu-who { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.field { display: block; min-width: 0; }
.field > span { display: block; margin-bottom: 5px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.field input { width: 100%; height: 44px; padding: 0 12px; font: 700 18px var(--font); color: var(--paper-text); background: var(--panel-2); border: 2px solid var(--line-soft); border-radius: var(--radius); outline: 0; box-shadow: inset 2px 2px 0 rgba(10, 4, 14, .08); }
.field input::placeholder { color: var(--text-faint); font-weight: 500; }
.field input:focus { box-shadow: 3px 3px 0 var(--gold); }
.field input.shake { animation: shake .35s; border-color: var(--flame); }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.swatches { display: flex; gap: 6px; height: 44px; align-items: center; }
.swatch { width: 28px; height: 28px; padding: 0; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); cursor: pointer; transition: transform .15s var(--ease-out), box-shadow .15s; touch-action: manipulation; }
.swatch.on { transform: scale(1.18); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 12px 12px 14px; text-align: left; background: var(--panel-2); border: 2px solid var(--line-soft); border-radius: var(--radius); cursor: pointer; transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background-color .15s; touch-action: manipulation; color: var(--paper-text); }
.mode b { font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.mode span { font-size: 12.5px; line-height: 1.3; color: var(--text-dim); font-weight: 500; }
.mode.on { background: var(--gold); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--shade); color: var(--on-gold); }
.mode.on span { color: var(--on-gold); }
.mode .live { align-self: flex-start; margin-top: 2px; padding: 1px 8px 1px 18px; position: relative; font-style: normal; font-size: 11px; font-weight: 800; background: var(--plum); color: var(--paper-text); border-radius: 999px; }
.mode .live::before { content: ''; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #5ff0b5; animation: blink 1.2s ease-in-out infinite alternate; }
@keyframes blink { to { opacity: .3; } }
@media (hover: hover) { .mode:not(.on):hover { background: var(--panel-2); color: var(--paper-text); } .swatch:not(.on):hover { transform: scale(1.1); } }

.friends { margin-top: 10px; padding: 12px; border: 2px dashed var(--line-soft); border-radius: var(--radius); background: var(--panel-2); color: var(--paper-text); }
.seg { display: inline-flex; border: 2px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); color: var(--paper-text); }
.seg button { padding: 5px 12px; border: 0; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
.seg button + button { border-left: 2px solid var(--line-soft); }
.seg button.on { background: var(--gold); color: var(--on-gold); }
.friends-pane { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.code { display: flex; gap: 4px; }
.code span { display: grid; place-items: center; width: 36px; height: 46px; background: var(--panel-2); border: 2px solid var(--line-soft); border-radius: var(--radius); font-size: 24px; font-weight: 800; box-shadow: 2px 2px 0 var(--shade); color: var(--paper-text); }
.friends-side p { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.friends-side div { display: flex; gap: 14px; }
.link { padding: 0; border: 0; background: none; font-size: 13px; font-weight: 700; color: var(--rose); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.field.grow { flex: 1; }
#menu-join { letter-spacing: .3em; text-transform: uppercase; font-size: 22px; height: 48px; }
#menu-join::placeholder { letter-spacing: .3em; }

.cta { width: 100%; margin-top: 18px; height: 56px; font-size: 20px; font-weight: 800; border-radius: var(--radius); box-shadow: 5px 5px 0 var(--shade); }
.menu-note { min-height: 18px; margin: 10px 0 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-dim); }
.menu-note.err { color: var(--rose); }
.menu-foot { flex: none; padding: 8px 40px 14px; font-size: 11px; font-weight: 500; color: var(--text-dim); text-align: center; }

/* ============================== PHONE ============================== */
#phone { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: var(--dots) 0 0 / 7px 7px, rgba(43, 42, 51, .5); animation: fade-in .18s ease both; }
@keyframes fade-in { from { opacity: 0; } }
.phone-shell { display: flex; flex-direction: column; width: min(1140px, 100%); height: min(700px, 100%); background: var(--paper); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 10px 10px 0 var(--ink); overflow: hidden; animation: phone-in .32s var(--ease-out) both; }
@keyframes phone-in { 0% { opacity: 0; transform: translateY(26px) scale(.97); } 100% { opacity: 1; transform: none; } }
.phone-bar { flex: none; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; border-bottom: 2px solid var(--ink); background: var(--ink); color: var(--paper); }
.phone-bar b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.phone-os { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.phone-os i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.phone-status { margin-left: auto; font-size: 12px; font-weight: 700; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-close { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; background: var(--paper); color: var(--ink); border: 0; border-radius: 9px; font-size: 13px; font-weight: 800; cursor: pointer; }
.phone-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 390px; }
.phone-mapwrap { position: relative; min-height: 0; border-right: 2px solid var(--ink); background: #efe6d3; }
#phone-map { position: absolute; inset: 0; font-family: var(--font); }
.phone-legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 12px; padding: 5px 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; font-size: 12px; font-weight: 700; box-shadow: var(--shadow); }
.phone-legend span { display: flex; align-items: center; gap: 5px; }
.lg { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); }
.lg.me { background: #3b6cf6; } .lg.open { background: var(--accent); } .lg.done { background: var(--teal); } .lg.locked { background: #b9b2a2; }

.ph-pin { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--font); color: var(--ink); }
.ph-pin span { order: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; rotate: -45deg; background: var(--accent); color: var(--on-gold); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); font: 800 14px/1 var(--font); margin-bottom: 6px; }
.ph-pin span > * , .ph-pin span { }
.ph-pin span svg { rotate: 45deg; }
.ph-pin em { order: 1; max-width: 150px; padding: 1px 8px; font: 700 12px/1.5 var(--font); font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; }
.ph-pin.done span { background: var(--teal); }
.ph-pin.locked span { background: #b9b2a2; color: var(--ink); }
.ph-pin.live span { background: var(--gold); color: var(--ink); }
.ph-me { width: 0; height: 0; }
.ph-me i { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--c, #3b6cf6); border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--paper); }
.ph-me i::after { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid var(--ink); animation: mm-pulse 1.6s ease-out infinite; }
.ph-other { width: 0; height: 0; }
.ph-other i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); }
.ph-other em { position: absolute; left: 10px; top: -9px; padding: 0 6px; font: 700 11px/16px var(--font); font-style: normal; white-space: nowrap; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px; }
.ph-other em:empty { display: none; }
.ph-wp { width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); }

.phone-side { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.phone-side h3 small { margin-left: 6px; color: var(--muted); letter-spacing: .06em; }
.phone-me { border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: #fff; flex: none; }
.me-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.me-vest { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.me-top b { display: block; font-size: 18px; font-weight: 800; line-height: 1.1; }
.me-top small { font-size: 12px; font-weight: 700; color: var(--muted); }
.me-nums { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.me-nums div { padding: 7px 12px 8px; }
.me-nums div + div { border-left: 2px solid var(--ink); }
.me-nums label, .cert-stats label { display: block; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.me-nums b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.phone-missions, .phone-ladder { list-style: none; margin: 0; padding: 0; }
.phone-missions { display: flex; flex-direction: column; gap: 8px; }
.phone-missions li { display: flex; gap: 10px; padding: 10px; background: #fff; border: 2px solid var(--ink); border-radius: 12px; cursor: pointer; }
.phone-missions li.focus { box-shadow: var(--shadow); }
.phone-missions li.locked { background: transparent; border-style: dashed; color: var(--muted); cursor: default; }
.phone-missions li.live { background: #fff6d6; }
.phone-missions li.empty { border-style: dashed; color: var(--muted); font-size: 13px; cursor: default; }
.phone-missions .num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-gold); border: 2px solid var(--ink); font-size: 13px; font-weight: 800; }
.phone-missions li.done .num { background: var(--teal); color: var(--on-gold); }
.phone-missions li.locked .num { background: #e4dccb; color: #5a554c; border-color: var(--muted); }
.phone-missions li.live .num { background: var(--gold); color: var(--ink); }
.phone-missions .txt { flex: 1; min-width: 0; }
.phone-missions .txt b { display: block; font-size: 15px; font-weight: 800; line-height: 1.2; }
.phone-missions .txt p { margin: 2px 0 6px; font-size: 12.5px; line-height: 1.3; color: var(--muted); font-weight: 500; }
.phone-missions .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11.5px; font-weight: 700; }
.tag { padding: 0 7px; border: 1.5px solid currentColor; border-radius: 999px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.tag.open { color: #c2371a; } .tag.done { color: #0c7a5e; } .tag.live { color: var(--ink); background: var(--gold); border-color: var(--ink); }
.phone-missions .rw { color: var(--ink); }
.btn.taxi { margin-top: 8px; padding: 5px 10px; font-size: 13px; border-radius: var(--radius); box-shadow: 2px 2px 0 var(--shade); }
.btn.taxi em { font-style: normal; padding: 0 6px; background: var(--plum); color: var(--paper-text); border-radius: 999px; font-size: 12px; }
.phone-ladder { border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.phone-ladder li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 6px; padding: 5px 10px; font-size: 13px; color: var(--muted); }
.phone-ladder li + li { border-top: 1.5px solid var(--rule); }
.phone-ladder li b { font-weight: 600; }
.phone-ladder li em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12px; }
.phone-ladder li.past { color: var(--ink); }
.phone-ladder li.past span { color: var(--teal-deep); font-weight: 800; }
.phone-ladder li.now { background: var(--gold); color: var(--ink); }
.phone-ladder li.now b { font-weight: 800; }
.phone-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.phone-actions .btn { font-size: 13px; padding: 7px 12px; }

/* ============================== END SCREEN ============================== */
#certificate { position: fixed; inset: 0; z-index: 50; overflow: auto; display: grid; place-items: center; padding: 20px 16px; background: var(--dots) 0 0 / 7px 7px, linear-gradient(0deg, rgba(20, 8, 24, .94) 0%, rgba(74, 34, 56, .86) 55%, rgba(122, 68, 56, .78) 100%); animation: fade-in .4s ease both; transition: opacity .3s ease; }
#certificate.out { opacity: 0; pointer-events: none; }
.cert { position: relative; width: min(760px, 100%); padding: 34px 44px 28px; text-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 12px 12px 0 var(--shade); outline: 2px solid var(--ink); color: var(--ink); outline-offset: -12px; animation: cert-in .7s var(--ease-out) both; }
.cert-kicker::before { content: ''; display: block; height: clamp(74px, 13vw, 108px); margin: -6px 0 10px; background: url(../assets/lockup.svg) center / contain no-repeat; }
@keyframes cert-in { 0% { opacity: 0; transform: translateY(40px) rotate(-2deg) scale(.94); } 100% { opacity: 1; transform: none; } }
.cert-kicker { font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); color: #c2371a; }
.cert-pre { margin: 12px 0 0; font-size: 15px; font-weight: 500; color: var(--muted); }
.cert-name { display: inline-block; margin: 2px 0 8px; padding: 0 18px 2px; font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em; border-bottom: 3px solid var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cert h1 { margin: 6px auto 18px; max-width: 600px; font-size: clamp(26px, 4.4vw, 42px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; font-family: var(--poster-font); font-weight: 400; letter-spacing: .01em; text-transform: uppercase; line-height: 1.12; }
.cert h1 mark { background: linear-gradient(transparent 55%, var(--gold) 55%); color: inherit; }
.cert-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; text-align: left; }
.cert-stats div { padding: 8px 14px 9px; }
.cert-stats div + div { border-left: 2px solid var(--ink); }
.cert-stats .wide { grid-column: 1 / -1; border-left: 0; border-top: 2px solid var(--ink); background: var(--ink); color: var(--paper); display: flex; align-items: baseline; gap: 10px; }
.cert-stats .wide label { color: var(--gold); }
.cert-stats b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cert-stats .wide b { font-size: 18px; letter-spacing: 0; }
.cert-press { margin: 16px 0 0; padding: 10px 16px 12px; text-align: left; background: var(--paper-2); border: 2px dashed var(--ink); border-radius: 10px; transform: rotate(-.6deg); }
.cert-press figcaption { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cert-press figcaption span { color: #c2371a; }
.cert-press blockquote { margin: 3px 0 0; font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; font-family: Georgia, 'Times New Roman', serif; }
.cert-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 20px; }
.cert-sign { text-align: left; }
.cert-sign i { display: block; padding: 0 30px 0 6px; font: italic 30px/1 'Snell Roundhand', 'Brush Script MT', cursive; border-bottom: 2px solid var(--ink); }
.cert-sign small { font-size: 11px; font-weight: 600; color: var(--muted); }
.cert-foot .btn { height: 50px; padding: 0 20px; font-size: 17px; font-weight: 800; border-radius: 12px; box-shadow: 5px 5px 0 var(--ink); }
.cert-seal { position: absolute; top: -26px; right: -22px; width: 104px; height: 104px; display: grid; place-items: center; background: var(--accent); color: var(--on-gold); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 4px 4px 0 var(--ink); transform: rotate(14deg); font-size: 15px; font-weight: 800; line-height: 1.05; letter-spacing: .04em; animation: seal-in .6s .5s var(--ease-out) both; font-family: var(--title-font); font-weight: 400; letter-spacing: .01em; text-transform: lowercase; font-size: 19px; line-height: .95; -webkit-text-stroke: 5px var(--plum); paint-order: stroke fill; box-shadow: 4px 4px 0 var(--shade); }
.cert-seal::before { content: ''; position: absolute; inset: 6px; border: 2px dashed rgba(255, 255, 255, .8); border-radius: 50%; }
@keyframes seal-in { 0% { opacity: 0; transform: rotate(-30deg) scale(2); } 100% { opacity: 1; transform: rotate(14deg) scale(1); } }
.cert-confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.cert-confetti i { position: absolute; top: -20px; left: var(--x); width: 10px; height: 16px; background: var(--c); animation: confetti 3.4s var(--d) linear infinite; }
.cert-confetti i:nth-child(3n) { width: 12px; height: 12px; border-radius: 50%; }
@keyframes confetti { 0% { transform: translateY(-20px) rotate(var(--r)); } 100% { transform: translateY(105vh) rotate(calc(var(--r) + 540deg)); } }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 980px) {
  .menu-wrap { grid-template-columns: 1fr; gap: 22px; padding: 22px 16px 10px; max-width: 560px; align-items: start; }

  .menu-keys { display: none; }
  .menu-pitch { margin-bottom: 0; font-size: 15px; }
  .menu-card { padding: 18px 16px 14px; box-shadow: 6px 6px 0 var(--shade); }
  .menu-foot { padding: 8px 16px 14px; }
}
@media (max-width: 520px) {
  .menu-who { grid-template-columns: 1fr; gap: 10px; }
  .modes { grid-template-columns: 1fr; gap: 8px; }
  .mode { padding: 10px 12px; }
  .friends-pane { flex-wrap: wrap; }
  .code span { width: 32px; height: 42px; font-size: 21px; }
}
@media (max-width: 760px) {
  #hud-left { width: 206px; top: calc(10px + var(--safe-t)); left: 10px; gap: 8px; }
  .stat { padding: 6px 9px 5px; } .stat b { font-size: 19px; } .stat label { font-size: 9px; letter-spacing: .08em; }
  .stat.rank { padding: 5px 9px 7px; } .stat.rank b { font-size: 12px; }
  #floaters { left: auto; right: 8px; top: auto; bottom: 6px; z-index: 2; align-items: flex-end; }
  #objective { font-size: 13px; max-width: 100%; }
  #hud-right { top: calc(10px + var(--safe-t)); right: 10px; gap: 6px; }
  #minimap { width: 108px; height: 108px; border-radius: var(--radius); }
  #waypoint { max-width: 150px; font-size: 12px; }
  #hud-top { top: calc(200px + var(--safe-t)); }
  #timer { font-size: 24px; }
  #banner { top: 26%; }
  #hud-bottom { bottom: calc(10px + var(--safe-b)); width: calc(100vw - 20px); gap: 8px; }
  #dialog { padding: 18px 14px 24px; } #dialog-text { font-size: 16px; }
  .slot { width: 48px; height: 48px; font-size: 22px; } #hotbar { gap: 6px; }
  #dock { right: 10px; bottom: auto; top: calc(178px + var(--safe-t)); flex-direction: column-reverse; }
  #touch-buttons { right: 10px; bottom: calc(116px + var(--safe-b)); }
  #hud.dialog-open #touch-buttons { display: none; }
  #help { width: 200px; }
  #phone { padding: 0; }
  .phone-shell { width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; }
  .phone-bar { padding-top: calc(10px + var(--safe-t)); }
  .phone-os { display: none; }
  .phone-body { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .phone-mapwrap { height: 40vh; border-right: 0; border-bottom: 2px solid var(--ink); }
  .phone-side { overflow: visible; padding-bottom: calc(24px + var(--safe-b)); }
  .phone-legend { gap: 8px; font-size: 11px; padding: 4px 10px; }
  .cert { padding: 28px 18px 20px; box-shadow: 6px 6px 0 var(--ink); }
  .cert-seal { width: 78px; height: 78px; font-size: 15px; -webkit-text-stroke-width: 4px; top: -22px; right: -6px; }
  .cert-stats { grid-template-columns: 1fr 1fr; }
  .cert-stats div:nth-child(3) { display: none; }
  .cert-stats b { font-size: 22px; }
  .cert-press blockquote { font-size: 17px; }
  .cert-foot { flex-direction: column; align-items: stretch; }
  .cert-sign { display: none; }
}
@media (max-height: 560px) and (min-width: 761px) {
  #banner { top: 9%; } #banner h1 { font-size: clamp(30px, 9vh, 56px); }
}

/* phone overlay: settings */
.phone-settings { flex: none; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; font-weight: 700; }
.set-row small { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.set-note { margin: 2px 0 6px; font-size: 12px; line-height: 1.3; color: var(--muted); font-weight: 500; }
.set-row .btn { padding: 6px 14px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }

/* ============================== TOUCH TARGETS (coarse pointers) ============================== */
@media (pointer: coarse) {
  .btn, .seg button, .phone-close, #net-invite { min-height: 44px; }
  .seg button { padding: 5px 14px; }
  .swatches { gap: 8px; } .swatch { width: 36px; height: 36px; }
  .link { padding: 12px 0; }
  .btn.taxi { padding: 5px 12px; }
  .phone-close { padding: 0 16px; font-size: 14px; }
  .phone-missions li { padding: 12px 10px; }
}
body.touch #dock button { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: var(--radius); }
body.touch #btn-phone span { display: none; }
body.touch .slot { width: 48px; height: 48px; }

/* ============================== PHONES: PORTRAIT ============================== */
@media (max-width: 760px) and (orientation: portrait) {
  body.touch #hud-left { top: calc(8px + var(--safe-t)); left: calc(8px + var(--safe-l)); width: 198px; gap: 6px; }
  body.touch #objective { max-width: 198px; padding: 5px 10px 6px; font-size: 13px; line-height: 1.22; border-left-width: 8px; }
  body.touch #objective::before { display: none; }
  body.touch #objective { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; padding-bottom: 0; }
  body.touch #hud-right { top: calc(8px + var(--safe-t)); right: calc(8px + var(--safe-r)); gap: 6px; }
  body.touch #minimap { width: 100px; height: 100px; border-radius: var(--radius); }
  body.touch #waypoint { max-width: 150px; }
  /* phone / fullscreen / chat: a column down the right edge, under the minimap + waypoint chip */
  body.touch #dock { top: calc(150px + var(--safe-t)); right: calc(8px + var(--safe-r)); bottom: auto; }
  body.touch #dock-buttons { flex-direction: column-reverse; gap: 8px; }
  body.touch #hud-top { top: calc(222px + var(--safe-t)); max-width: calc(100vw - 132px); }
  body.touch #meter { width: min(240px, calc(100vw - 132px)); }
  body.touch #banner { top: 34%; }
  /* bottom stack spans the screen; toasts move to the top-centre so they never sit under the thumbs */
  body.touch #hud-bottom { left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); bottom: calc(8px + var(--safe-b)); width: auto; transform: none; gap: 8px; }
  body.touch #toasts { position: fixed; left: 66px; right: 66px; top: calc(222px + var(--safe-t)); max-width: none; }
  body.touch #hud:has(#timer:not([hidden])) #toasts { top: calc(268px + var(--safe-t)); }
  body.touch #hud:has(#meter:not([hidden])) #toasts { top: calc(264px + var(--safe-t)); }
  body.touch #hud:has(#timer:not([hidden])):has(#meter:not([hidden])) #toasts { top: calc(310px + var(--safe-t)); }
  body.touch .toast { border-radius: var(--radius); padding: 6px 12px; font-size: 13px; line-height: 1.25; }
  body.touch #hotbar { gap: 6px; max-width: 100%; }
  body.touch .slot { width: 46px; height: 46px; font-size: 22px; }
  body.touch #touch-buttons { right: calc(10px + var(--safe-r)); bottom: calc(74px + var(--safe-b)); }
  body.touch #hud.dialog-open #hotbar { display: none; }
  body.touch #dialog { margin-top: 12px; }
}

/* ============================== PHONES: LANDSCAPE ============================== */
@media (max-height: 520px) and (orientation: landscape) {
  body.touch #hud-left { top: calc(8px + var(--safe-t)); left: calc(10px + var(--safe-l)); width: 198px; gap: 6px; }
  body.touch .stat { padding: 5px 9px 4px; } body.touch .stat b { font-size: 18px; } body.touch .stat label { font-size: 9px; letter-spacing: .08em; }
  body.touch .stat.rank { padding: 4px 9px 6px; } body.touch .stat.rank b { font-size: 12px; } body.touch #rank-progress { margin-top: 4px; }
  body.touch #floaters { left: auto; right: 8px; top: auto; bottom: 6px; z-index: 2; align-items: flex-end; }
  body.touch #objective { max-width: 230px; padding: 5px 10px 0; font-size: 13px; line-height: 1.22; border-left-width: 8px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  body.touch #objective::before { display: none; }
  body.touch #hud-right { top: calc(8px + var(--safe-t)); right: calc(10px + var(--safe-r)); gap: 6px; }
  body.touch #minimap { width: 96px; height: 96px; border-radius: var(--radius); }
  body.touch #waypoint { max-width: 170px; font-size: 12px; }
  /* phone / fullscreen / chat: a row to the left of the minimap */
  body.touch #dock { top: calc(8px + var(--safe-t)); right: calc(116px + var(--safe-r)); bottom: auto; }
  body.touch #dock-buttons { gap: 8px; }
  body.touch #hud-top { top: calc(8px + var(--safe-t)); flex-direction: row; align-items: center; max-width: calc(100vw - 560px); }
  body.touch #timer { font-size: 22px; padding: 1px 12px 2px; }
  body.touch #meter { width: min(200px, calc(100vw - 600px)); min-width: 120px; }
  body.touch #banner { top: 30%; } body.touch #banner h1 { font-size: clamp(28px, 11vh, 52px); } body.touch #banner p { margin-top: 10px; font-size: 14px; }
  body.touch #hud-bottom { bottom: calc(8px + var(--safe-b)); width: min(560px, calc(100vw - 24px - var(--safe-l) - var(--safe-r))); gap: 8px; }
  body.touch #toasts { position: fixed; top: calc(8px + var(--safe-t)); left: 50%; width: max-content; max-width: min(300px, calc(100vw - 560px)); translate: -50% 0; }
  body.touch #hud:has(#timer:not([hidden])) #toasts, body.touch #hud:has(#meter:not([hidden])) #toasts { top: calc(52px + var(--safe-t)); }
  body.touch #hud-bottom { transform: none; left: 0; right: 0; margin: 0 auto; }
  body.touch .toast { border-radius: var(--radius); padding: 5px 12px; font-size: 13px; line-height: 1.25; }
  body.touch #hotbar { gap: 6px; }
  body.touch .slot { width: 46px; height: 46px; font-size: 22px; }
  body.touch #touch-buttons { right: calc(14px + var(--safe-r)); bottom: calc(14px + var(--safe-b)); }
  body.touch #tb-action { max-width: 200px; }
  body.touch #hud.dialog-open #hotbar { display: none; }
  body.touch #dialog { margin-top: 12px; padding: 16px 16px 22px; } body.touch #dialog-text { font-size: 15px; min-height: 2.6em; }
  /* phone overlay: edge to edge, map + list side by side */
  #phone { padding: 0; }
  .phone-shell { width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; }
  .phone-bar { padding: calc(6px + var(--safe-t)) calc(10px + var(--safe-r)) 6px calc(14px + var(--safe-l)); }
  .phone-os { display: none; }
  .phone-body { grid-template-columns: minmax(0, 1fr) min(360px, 48vw); }
  .phone-mapwrap { margin-left: var(--safe-l); border-left: 2px solid var(--ink); }
  .phone-side { padding: 12px calc(12px + var(--safe-r)) calc(16px + var(--safe-b)) 12px; gap: 14px; overscroll-behavior: contain; }
  .phone-legend { left: 8px; bottom: calc(8px + var(--safe-b)); gap: 8px; font-size: 11px; padding: 4px 10px; }
  /* start menu: brand left, form right, everything reachable by scrolling */
  .menu-wrap { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 18px; max-width: none; align-items: start; padding: calc(12px + var(--safe-t)) calc(14px + var(--safe-r)) 8px calc(14px + var(--safe-l)); }

.menu-pitch, .menu-keys { display: none; }
  .menu-card { padding: 14px 16px 12px; box-shadow: 5px 5px 0 var(--shade); }
  .menu-step:not(:first-child) { margin-top: 12px; } .menu-step { margin-bottom: 8px; }
  .mode { padding: 8px 10px 10px; } .mode span { font-size: 12px; }
  .cta { margin-top: 12px; height: 50px; }
  .menu-foot { padding: 4px 16px calc(8px + var(--safe-b)); }
}
@media (max-width: 760px) {
  .phone-bar { padding-left: calc(18px + var(--safe-l)); padding-right: calc(12px + var(--safe-r)); }
  .phone-body, .phone-side { overscroll-behavior: contain; }
  .phone-mapwrap { height: 38dvh; }
  .menu-wrap { padding-top: calc(22px + var(--safe-t)); padding-left: calc(16px + var(--safe-l)); padding-right: calc(16px + var(--safe-r)); }
  .menu-foot { padding-bottom: calc(14px + var(--safe-b)); }
  #certificate { padding-top: calc(28px + var(--safe-t)); padding-bottom: calc(20px + var(--safe-b)); }
}
#menu, #certificate { overscroll-behavior: contain; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body.touch .cta kbd, body.touch .cert-foot kbd { display: none; }
body.touch .phone-close, body.touch .seg button, body.touch .btn, body.touch #net-invite { min-height: 44px; } body.touch .phone-close { padding: 0 16px; font-size: 14px; }
body.touch #map .maplibregl-ctrl-bottom-right { right: auto; left: var(--safe-l); bottom: var(--safe-b); opacity: .8; }

/* ============================== RIDE-HAILING (js/rides.js + the phone's Ride tab) ============================== */
#dock #btn-hail { color: var(--mint); }
body:not(.touch) #btn-hail svg { display: none; }
body.touch #btn-hail span { display: none; }
body.ride-riding #tb-off { display: none !important; }
/* in-game ride card: lives in #hud-left under the objective */
#ride-hud { --c: var(--teal); pointer-events: auto; width: 100%; max-width: 252px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 10px 9px; font-size: 13px; line-height: 1.25; animation: fade-in .2s ease both; color: var(--paper-text); }
.rh-head { display: flex; align-items: center; gap: 7px; }
.rh-head b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); }
#ride-hud[data-state="approach"] .rh-dot, #ride-hud[data-state="routing"] .rh-dot { animation: rh-blink 1s steps(2) infinite; }
@keyframes rh-blink { 50% { opacity: .25; } }
.rh-sub { margin-top: 2px; color: var(--text-dim); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-nums { display: flex; align-items: baseline; gap: 10px; margin-top: 5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rh-nums b { margin-left: auto; font-size: 17px; font-weight: 800; }
.rh-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rh-btns button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 8px; background: var(--panel-2); border: 2px solid var(--line-soft); border-radius: var(--radius); font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; color: var(--paper-text); }
.rh-btns button:active { transform: translate(1px, 1px); }
.rh-btns button.off { opacity: .45; }
.rh-btns button.on, #rh-rate.on { background: var(--gold); color: var(--on-gold); }
.rh-btns kbd { min-width: 18px; padding: 0 4px; font-size: 10px; line-height: 14px; border-bottom-width: 2px; }
.rh-stars { display: flex; gap: 2px; margin-top: 4px; }
.rh-stars button { padding: 0 3px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--gold); -webkit-text-stroke: 1.5px var(--ink); cursor: pointer; }
.rh-stars button:hover { transform: scale(1.15); }
body.touch .rh-btns kbd { display: none; }
body.touch .rh-btns button { min-height: 40px; padding: 0 10px; font-size: 13px; }
body.touch #ride-hud { max-width: 198px; padding: 6px 8px 8px; }
body.touch .rh-stars button { font-size: 30px; padding: 2px 3px; }
body.phone-open #ride-hud { visibility: hidden; }
/* phone: tabs on the map, ride panel */
.phone-tabs { position: absolute; left: 12px; top: 12px; z-index: 3; box-shadow: var(--shadow); }
.phone-tabs button { padding: 6px 14px; font-size: 14px; }
.phone-hint { position: absolute; left: 50%; bottom: 14px; z-index: 3; translate: -50% 0; max-width: calc(100% - 24px); padding: 5px 14px; background: var(--ink); color: var(--paper); border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.phone-shell:not(.ride-mode) .phone-ride { display: none; }
.ride-mode .phone-side > section:not(.phone-ride), .ride-mode .phone-legend { display: none; }
.ride-mode #phone-map .maplibregl-canvas { cursor: crosshair; }
.phone-ride { display: flex; flex-direction: column; gap: 10px; flex: none; }
.phone-ride h3 { margin: 0; }
.ride-search { position: relative; }
.ride-search input { width: 100%; height: 44px; padding: 0 12px; background: #fff; border: 2px solid var(--ink); border-radius: 12px; font: 600 16px var(--font); color: var(--ink); outline: 0; -webkit-appearance: none; appearance: none; }
.ride-search input:focus { box-shadow: var(--shadow); }
#ride-results { position: absolute; left: 0; right: 0; top: 48px; z-index: 5; list-style: none; margin: 0; padding: 4px; background: #fff; border: 2px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; }
#ride-results button { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; min-height: 38px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 14px; cursor: pointer; }
#ride-results button:hover, #ride-results li:first-child button { background: var(--paper-2); }
#ride-results small { color: var(--muted); font-weight: 700; font-size: 11px; white-space: nowrap; }
#ride-results .none { padding: 8px; color: var(--muted); font-size: 13px; }
.ride-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ride-quick button { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 36px; padding: 3px 11px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.15; cursor: pointer; }
.ride-quick button small { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #c2371a; font-weight: 800; }
.ride-quick button:active { transform: translate(1px, 1px); }
.ride-plan, .ride-live { border: 2px solid var(--ink); border-radius: 14px; background: #fff; padding: 12px; }
.ride-empty { margin: 0; color: var(--muted); font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.ride-empty.err { color: #b3261e; font-weight: 700; }
.ride-empty.busy { animation: rh-blink 1s steps(2) infinite; }
.ride-to small { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.ride-to b { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; }
.ride-nums { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0 8px; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.ride-nums div { padding: 6px 8px; } .ride-nums div + div { border-left: 2px solid var(--ink); }
.ride-nums label { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.ride-nums b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ride-note { margin: 6px 0 10px; font-size: 12.5px; line-height: 1.35; color: var(--muted); font-weight: 500; }
#ride-go { width: 100%; background: var(--teal-deep); color: #fff; font-size: 16px; font-weight: 800; min-height: 46px; }
#ride-go em { font-style: normal; padding: 1px 8px; background: var(--ink); border-radius: 999px; font-size: 13px; }
.ride-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ride-acts .btn { font-size: 13px; padding: 7px 12px; }
/* a chosen destination puts the fare + Request button first, so it is never below the fold (short / landscape phones) */
#ride-planner { display: flex; flex-direction: column; gap: 10px; }
#ride-planner > .ride-plan:has(#ride-go) { order: -1; }
body.touch .ride-quick button, body.touch #ride-results button { min-height: 44px; }
body.touch .ride-acts .btn { min-height: 44px; }
@media (max-height: 560px) { body.touch .ride-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 3px; } body.touch .ride-quick button { flex: none; white-space: nowrap; } }
/* phone map on touch: 44px controls; the category filter is one swipeable row instead of a block over the map */
body.touch .mp-fab { min-height: 44px; }
body.touch .places-legend { flex-wrap: nowrap !important; left: 0 !important; right: 0; bottom: 6px !important; max-width: none !important; padding: 0 10px 4px; overflow-x: auto; scrollbar-width: none; }
body.touch .places-legend::-webkit-scrollbar, body.touch .ride-quick::-webkit-scrollbar { display: none; }
body.touch .places-legend button { flex: none; min-height: 44px !important; }
/* lock screen hint: keyboard wording on desktop, touch wording on phones */
.ph-lock .hint .t, body.touch .ph-lock .hint .k { display: none; }
body.touch .ph-lock .hint .t { display: inline; }
.ride-hist { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.ride-hist li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 2px; border-top: 1.5px solid var(--rule); }
.ride-hist li.head { border-top: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: #c2371a; }
.ride-hist li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ride-hist em { flex: none; font-style: normal; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none; }
.me-rides { padding: 6px 12px 8px; border-top: 2px solid var(--ink); font-size: 12.5px; color: var(--muted); font-weight: 600; }
.me-rides b { color: var(--ink); }
.ph-dest { width: 0; height: 0; }
.ph-dest i { position: absolute; left: -13px; top: -30px; width: 26px; height: 26px; border-radius: 50% 50% 50% 4px; rotate: -45deg; background: var(--teal); border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.ph-dest i::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
.ph-dest.err i { background: #b9b2a2; }
.ph-car { width: 0; height: 0; }
.ph-car i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 6px; background: #fff; border: 2.5px solid var(--ink); box-shadow: 0 0 0 3px var(--c, var(--teal)); }
@media (max-width: 760px) {
  .ride-mode .phone-mapwrap { height: 38vh; }
  .ride-quick { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .ride-quick button { flex: none; white-space: nowrap; min-height: 40px; }
  .phone-hint { font-size: 12px; bottom: 10px; }
}
#rh-rate[data-rate="5"] { background: var(--flame); color: var(--on-gold); }

/* minimap: hailed Waymo + destination, parked Waymos */
.mm-waymo { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 6px; background: #fff; color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 0 0 2px var(--c, var(--teal)); font: 800 10px/14px var(--font); text-align: center; z-index: 3; }
.mm-waymo.parked { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 3px; border-width: 1.5px; box-shadow: none; background: #fff; z-index: 1; }
.mm-waymo-dest { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50% 50% 50% 0; transform-origin: center; background: var(--teal); border: 2px solid var(--ink); z-index: 2; }

/* the phone is a device with its own look: shared controls keep ink on paper inside it */
#phone .seg { background: #fff; border-color: var(--ink); color: var(--ink); }
#phone .seg button + button { border-left-color: var(--ink); }
#phone .seg button.on { background: var(--ink); color: var(--paper); }
