:root {
  --lime: #cef355;
  --ink: #1d1c1b;
  --danger: #ff3b4e;
  --police: #4d8bff;
  --gold: #ffd257;
  --paper: #f6f3ea;
  --font: 'Outfit', 'Avenir Next', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0c0a14; color: #fff; font-family: var(--font); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; touch-action: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
b.lime, .lime { color: var(--lime); }
kbd { display: inline-block; min-width: 1.7em; padding: .12em .45em; margin: 0 .12em; border-radius: .35em; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); font: 700 .78em var(--font); text-align: center; letter-spacing: .02em; }

/* ───────────── HUD ───────────── */
#hud { position: fixed; inset: 0; pointer-events: none; font-size: clamp(11px, 1.18vw, 21px); text-shadow: -.045em -.045em 0 rgba(0,0,0,.6), .045em -.045em 0 rgba(0,0,0,.6), -.045em .045em 0 rgba(0,0,0,.6), .045em .045em 0 rgba(0,0,0,.6), 0 .1em .4em rgba(0,0,0,.75); z-index: 5; }
#hud > * { position: absolute; }

.caption { top: 2.2%; left: 50%; transform: translateX(-50%); font-weight: 900; font-size: 1.75em; letter-spacing: .01em; white-space: nowrap; color: #fff; text-shadow: -.045em -.045em 0 rgba(0,0,0,.6), .045em -.045em 0 rgba(0,0,0,.6), -.045em .045em 0 rgba(0,0,0,.6), .045em .045em 0 rgba(0,0,0,.6), 0 .1em 0 rgba(0,0,0,.5), 0 .12em .5em rgba(0,0,0,.7); opacity: .96; transition: opacity .3s; }
.caption.swap { opacity: 0; }

/* top right */
.tr { top: 2.2%; right: 2%; display: flex; flex-direction: column; align-items: flex-end; gap: .15em; }
.clock { font-weight: 900; font-size: 1.55em; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.money { font-weight: 900; font-size: 1.9em; line-height: 1; color: var(--lime); font-variant-numeric: tabular-nums; transition: transform .2s; }
.money.gain { animation: pop .45s; }
.money.loss { animation: pop .45s; color: var(--danger); }
.goal { display: flex; flex-direction: column; align-items: flex-end; gap: .22em; margin: .05em 0 .25em; font-weight: 700; font-size: .7em; letter-spacing: .05em; opacity: .92; }
.goal-bar { width: 11.5em; height: .42em; border-radius: 1em; background: rgba(255,255,255,.2); overflow: hidden; }
.goal-bar i { display: block; height: 100%; width: 0; border-radius: 1em; background: var(--lime); transition: width .5s ease-out; }
.goal.done { color: var(--lime); }
.clock.late { color: var(--danger); animation: blink 1s steps(1) infinite; }
.stars { display: flex; gap: .16em; margin-top: .35em; }
.stars svg { width: 1.75em; height: 1.75em; fill: rgba(10,8,20,.55); stroke: rgba(255,255,255,.85); stroke-width: 1.3; stroke-linejoin: round; filter: drop-shadow(0 .1em .25em rgba(0,0,0,.55)); transition: fill .25s, stroke .25s, transform .25s; }
.stars svg.on { fill: var(--gold); stroke: #fff3c4; animation: starIn .5s cubic-bezier(.2,1.6,.4,1); }
.stars.hot svg.on { animation: starHot .5s steps(1) infinite; }
.stars.search svg.on { animation: starBlink .7s steps(1) infinite; }
.stars svg.out { animation: starOut .6s ease-in forwards; }
.legal-badge { display: flex; align-items: center; gap: .45em; margin-top: .4em; padding: .28em .7em .28em .3em; background: var(--lime); color: var(--ink); border-radius: 2em; font-weight: 900; font-size: .95em; letter-spacing: .06em; text-shadow: none; animation: starIn .6s cubic-bezier(.2,1.6,.4,1); }
.legal-badge img { width: 1.5em; height: 1.5em; border-radius: .35em; }
@keyframes pop { 30% { transform: scale(1.22); } }
@keyframes starIn { 0% { transform: scale(2.4) rotate(-25deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes starHot { 0% { fill: var(--gold); } 50% { fill: #fff; } }
@keyframes starBlink { 0% { opacity: 1; } 50% { opacity: .25; } }
@keyframes starOut { 0% { transform: none; opacity: 1; } 100% { transform: translateY(-1.4em) scale(.2) rotate(140deg); opacity: 0; } }

/* top left */
.tl { top: 2.2%; left: 1.8%; display: flex; flex-direction: column; align-items: flex-start; gap: .55em; max-width: 30%; }
.status { display: flex; align-items: center; gap: .5em; padding: .38em .75em; border-radius: 2em; background: rgba(12,10,22,.62); border: 1px solid rgba(255,255,255,.16); font-weight: 700; font-size: .95em; letter-spacing: .06em; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.status .dot { width: .62em; height: .62em; border-radius: 50%; background: var(--danger); box-shadow: 0 0 .6em var(--danger); animation: blink 1s steps(1) infinite; }
.status-label { opacity: .6; }
.status-value { font-weight: 900; }
.status-tag { padding: .08em .5em; border-radius: .3em; background: var(--danger); font-weight: 900; font-size: .82em; text-shadow: none; }
.status.legal { border-color: rgba(206,243,85,.6); }
.status.legal .dot { background: var(--lime); box-shadow: 0 0 .6em var(--lime); animation: none; }
.status.legal .status-tag { background: var(--lime); color: var(--ink); }
@keyframes blink { 50% { opacity: .25; } }

.ride { padding: .5em .8em .55em; border-radius: .7em; background: rgba(12,10,22,.62); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); min-width: 15em; }
.ride-top { display: flex; justify-content: space-between; gap: 1.2em; font-weight: 700; font-size: .78em; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.ride-fare { color: var(--lime); opacity: 1; }
.ride-route { font-weight: 900; font-size: 1.02em; margin-top: .12em; }
.ride-route i { font-style: normal; opacity: .55; margin: 0 .3em; }

.toasts { display: flex; flex-direction: column; gap: .35em; align-items: flex-start; }
.toast { padding: .4em .75em; border-radius: .6em; background: rgba(12,10,22,.7); border-left: .25em solid var(--lime); font-weight: 700; font-size: .9em; animation: toastIn .3s ease-out, toastOut .4s ease-in 3.6s forwards; max-width: 24em; }
.toast.bad { border-left-color: var(--danger); }
.toast.police { border-left-color: var(--police); }
@keyframes toastIn { from { transform: translateX(-1.5em); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(-1em); opacity: 0; } }

/* police scan card */
.scan { top: 11%; left: 50%; transform: translateX(-50%); width: 21em; padding: .65em .9em .75em; border-radius: .8em; background: rgba(10,14,34,.78); border: 1px solid rgba(77,139,255,.7); box-shadow: 0 0 1.6em rgba(77,139,255,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-align: left; }
.scan-head { display: flex; align-items: center; gap: .5em; font-weight: 900; letter-spacing: .08em; font-size: .92em; color: #cfe0ff; }
.scan-ico { width: .9em; height: .9em; border-radius: 50%; border: .18em solid var(--police); border-top-color: transparent; animation: spin .7s linear infinite; }
.scan-sub { font-weight: 700; font-size: 1.02em; margin: .25em 0 .45em; }
.scan-bar { height: .42em; border-radius: 1em; background: rgba(255,255,255,.16); overflow: hidden; }
.scan-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--police), #9fc2ff); border-radius: 1em; }
.scan.bad { border-color: var(--danger); box-shadow: 0 0 2em rgba(255,59,78,.55); animation: shake .35s; }
.scan.bad .scan-head { color: #ffd0d5; } .scan.bad .scan-ico { border-color: var(--danger); animation: none; border-radius: .15em; }
.scan.bad .scan-bar i { background: var(--danger); }
.scan.good { border-color: var(--lime); box-shadow: 0 0 2em rgba(206,243,85,.45); }
.scan.good .scan-head { color: var(--lime); } .scan.good .scan-ico { border-color: var(--lime); animation: none; }
.scan.good .scan-bar i { background: var(--lime); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 20% { transform: translateX(-52%); } 40% { transform: translateX(-48%); } 60% { transform: translateX(-51%); } 80% { transform: translateX(-49%); } }

/* bottom left: GPS + gauges */
.bl { left: 1.8%; bottom: 3.2%; display: flex; align-items: flex-start; gap: .9em; }
.map-wrap { position: relative; width: 11.2em; height: 11.2em; border-radius: 50%; padding: .28em; background: var(--danger); box-shadow: 0 .3em 1.2em rgba(0,0,0,.55); transition: background .4s; }
.map-wrap.legal { background: var(--lime); }
.map-wrap.wanted { animation: ring .5s steps(1) infinite; }
@keyframes ring { 0% { background: var(--danger); } 50% { background: var(--police); } }
.map-wrap canvas { width: 100%; height: 100%; border-radius: 50%; display: block; background: #15131f; }
.map-n { position: absolute; left: 50%; top: 50%; width: 1.25em; height: 1.25em; margin: -.625em 0 0 -.625em; border-radius: 50%; background: #fff; color: var(--ink); font-weight: 900; font-size: .72em; line-height: 1.25em; text-align: center; text-shadow: none; }
.bars { display: flex; flex-direction: column; gap: .42em; padding-top: 1.1em; }
.bar { display: flex; align-items: center; gap: .6em; }
.bar .track { width: 11.5em; height: .62em; border-radius: .2em; background: rgba(8,6,16,.6); overflow: hidden; box-shadow: 0 .1em .4em rgba(0,0,0,.5); }
.bar i { display: block; height: 100%; width: 0; border-radius: .2em; transition: width .12s linear; }
.bar label { font-weight: 900; font-size: .74em; letter-spacing: .1em; }
.bar.risk i { background: linear-gradient(90deg, #ff9a3d, #ff3b4e); }
.bar.car i { background: #3fd07a; }
.bar.turbo i { background: #41a5ff; }
.bar.clean i { background: #dfe9e6; }
.bar.clean.alert i { background: var(--danger); }
.bar.clean.alert label { color: var(--danger); animation: blink .4s steps(1) infinite; }
.prompt.clean { bottom: 23%; background: #fff; }
/* nom du quartier, en bas à droite, à l'entrée dans un nouveau secteur */
.zone { right: 15.5em; bottom: 5.4%; display: flex; flex-direction: column; align-items: flex-end; opacity: 0; pointer-events: none; }
.zone b { font: italic 700 2.1em/1 'Snell Roundhand', 'Segoe Script', 'Brush Script MT', cursive; transform: rotate(-4deg); transform-origin: right bottom; white-space: nowrap; }
.zone span { margin-top: .25em; font-weight: 900; font-size: .78em; letter-spacing: .22em; text-transform: uppercase; }
.zone.show { animation: zoneIn 4.6s ease-out forwards; }
@keyframes zoneIn { 0% { opacity: 0; transform: translateY(.6em); } 9% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (pointer: coarse), (max-aspect-ratio: 1/1) { .zone { display: none; } }
.prompt.clean kbd { background: var(--ink); color: #fff; border-color: var(--ink); }
.bar.risk.alert label { color: var(--danger); animation: blink .4s steps(1) infinite; }

/* bottom centre: objective */
.objective { left: 50%; bottom: 3.6%; transform: translateX(-50%); font-weight: 900; font-size: 1.6em; white-space: nowrap; text-shadow: -.045em -.045em 0 rgba(0,0,0,.6), .045em -.045em 0 rgba(0,0,0,.6), -.045em .045em 0 rgba(0,0,0,.6), .045em .045em 0 rgba(0,0,0,.6), 0 .08em 0 rgba(0,0,0,.6), 0 .1em .5em rgba(0,0,0,.8); }
.objective b { color: var(--gold); }
.objective b.lime { color: var(--lime); }
.objective.swap { animation: objIn .35s ease-out; }
@keyframes objIn { from { transform: translateX(-50%) translateY(.6em); opacity: 0; } }
.prompt { left: 50%; bottom: 17%; transform: translateX(-50%); padding: .5em 1em; border-radius: 2em; background: var(--lime); color: var(--ink); font-weight: 900; font-size: 1.1em; text-shadow: none; box-shadow: 0 .3em 1.4em rgba(206,243,85,.45); animation: bob 1s ease-in-out infinite; white-space: nowrap; }
.prompt kbd { background: var(--ink); color: var(--lime); border-color: var(--ink); }
@keyframes bob { 50% { transform: translateX(-50%) translateY(-.25em); } }

/* bottom right */
.br { right: 2%; bottom: 3.2%; display: flex; flex-direction: column; align-items: flex-end; gap: .3em; }
.speed { display: flex; align-items: baseline; gap: .3em; }
.speed b { font-weight: 900; font-size: 2.5em; line-height: .9; font-variant-numeric: tabular-nums; }
.speed span { font-weight: 700; font-size: .85em; opacity: .75; letter-spacing: .08em; }
.build { font-weight: 700; font-size: .7em; letter-spacing: .08em; opacity: .85; }

/* big banner + flash */
.banner { left: 0; right: 0; top: 30%; text-align: center; }
.banner-big { display: inline-block; font-weight: 900; font-size: 4.6em; line-height: 1; letter-spacing: .02em; padding: .08em .35em; }
.banner-small { font-weight: 700; font-size: 1.35em; margin-top: .5em; }
.banner.bad .banner-big { color: #fff; background: var(--danger); transform: rotate(-3deg); animation: slam .4s cubic-bezier(.2,1.5,.4,1); text-shadow: none; }
.banner.good .banner-big { color: var(--ink); background: var(--lime); transform: rotate(-2deg); animation: slam .5s cubic-bezier(.2,1.5,.4,1); text-shadow: none; }
@keyframes slam { 0% { transform: scale(3) rotate(8deg); opacity: 0; } }
.flash { inset: 0; opacity: 0; pointer-events: none; }
.flash.red { background: radial-gradient(ellipse at center, rgba(255,40,60,0) 40%, rgba(255,40,60,.55) 100%); animation: flash .9s ease-out; }
.flash.lime { background: radial-gradient(ellipse at center, rgba(206,243,85,.35) 0%, rgba(206,243,85,0) 70%); animation: flash 1.2s ease-out; }
.flash.white { background: #fff; animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ───────────── Contract ───────────── */
#contract { position: fixed; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2em; pointer-events: none; font-size: clamp(11px, 1.15vw, 20px); background: radial-gradient(ellipse at center, rgba(8,6,16,.25), rgba(8,6,16,.6)); }
.paper { position: relative; width: 25em; padding: 1.4em 1.6em 1.3em; background: var(--paper); color: var(--ink); border-radius: .5em; box-shadow: 0 1.2em 3em rgba(0,0,0,.6); transform: rotate(-1.5deg); animation: paperIn .45s cubic-bezier(.2,1.3,.4,1); }
@keyframes paperIn { from { transform: translateY(60vh) rotate(8deg); } }
.paper-head { display: flex; justify-content: space-between; align-items: center; }
.paper-head img { height: 1.7em; }
.paper-head span { font-weight: 900; letter-spacing: .25em; font-size: .85em; opacity: .55; }
.paper-title { font-weight: 900; font-size: 1.25em; margin: .9em 0 .7em; }
.paper-lines i { display: block; height: .5em; margin: .5em 0; border-radius: .3em; background: rgba(29,28,27,.13); }
.paper-lines i.short { width: 62%; }
.paper-sign { margin-top: 1.1em; }
.paper-sign span { font-weight: 700; font-size: .72em; letter-spacing: .1em; text-transform: uppercase; opacity: .55; }
.paper-sign svg { display: block; width: 100%; height: 5em; }
.paper-sign path { fill: none; stroke: #1b2a8a; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.paper-line { height: 2px; background: var(--ink); opacity: .5; margin-top: -.9em; }
.paper-stamp { position: absolute; right: 1.2em; bottom: 3.2em; padding: .15em .6em; border: .22em solid #1f9d4d; color: #1f9d4d; font-weight: 900; font-size: 1.7em; letter-spacing: .12em; border-radius: .25em; transform: rotate(-14deg); animation: slam .35s cubic-bezier(.2,1.5,.4,1); }
.contract-hint { padding: .5em 1.1em; border-radius: 2em; background: var(--lime); color: var(--ink); font-weight: 900; font-size: 1.15em; }
.contract-hint b { background: var(--ink); color: var(--lime); padding: .05em .45em; border-radius: .3em; }

/* ───────────── Screens ───────────── */
.screen { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; font-size: clamp(12px, 1.2vw, 21px); }
#screen-loading { background: radial-gradient(ellipse at 50% 120%, #7a2f6a 0%, #2a174a 45%, #0c0a14 100%); }
.load-box { width: 22em; text-align: center; }
.load-logo { width: 11em; margin-bottom: 1.6em; }
.load-title { font-weight: 900; font-size: 1.2em; margin-bottom: .8em; }
.load-bar { height: .5em; border-radius: 1em; background: rgba(255,255,255,.14); overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 0; background: var(--lime); border-radius: 1em; transition: width .25s; }
.load-tip { margin-top: 1em; font-weight: 500; font-size: .9em; opacity: .7; min-height: 2.6em; }

#screen-title { background: linear-gradient(90deg, rgba(10,8,20,.9) 0%, rgba(10,8,20,.6) 38%, rgba(10,8,20,0) 68%); justify-content: flex-start; }
.title-box { margin-left: 6%; max-width: 36em; }
/* fenêtre d'ordinateur très basse : l'écran-titre défile au lieu d'être rogné en haut et en bas */
@media (pointer: fine) and (max-height: 560px) {
  #screen-title { align-items: flex-start; overflow-y: auto; }
  #screen-title .title-box { margin-top: auto; margin-bottom: auto; padding: 1.2em 0; }
}
.title-stars { color: var(--gold); font-size: 1.9em; letter-spacing: .12em; text-shadow: 0 0 .6em rgba(255,210,87,.55); }
h1 { font-weight: 900; font-size: 6.6em; line-height: .92; letter-spacing: -.01em; font-style: italic; text-shadow: .045em .045em 0 var(--danger), 0 .1em .6em rgba(0,0,0,.5); }
.title-sub { font-weight: 700; font-size: 1.35em; margin-top: .5em; }
.title-sub b { color: var(--danger); font-weight: 900; }
.title-pitch { font-weight: 500; font-size: 1.05em; line-height: 1.5; margin: 1em 0 1.4em; opacity: .92; }
.title-pitch b { font-weight: 900; }
.btn { pointer-events: auto; cursor: pointer; border: 0; padding: .7em 1.4em; border-radius: 2em; background: var(--lime); color: var(--ink); font: 900 1.15em var(--font); letter-spacing: .02em; box-shadow: 0 .3em 1.6em rgba(206,243,85,.35); transition: transform .12s; }
.btn:hover { transform: translateY(-.1em) scale(1.03); }
.btn kbd { background: var(--ink); color: var(--lime); border-color: var(--ink); margin-left: .5em; }
.btn.ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; border: 1px solid rgba(255,255,255,.3); font-weight: 700; font-size: 1em; }
.keys { display: flex; flex-wrap: wrap; gap: .5em 1.1em; margin-top: 1.6em; font-weight: 500; font-size: .82em; opacity: .85; }
.title-by { display: flex; align-items: center; gap: .7em; margin-top: 2em; font-weight: 700; font-size: .8em; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.title-by img { height: 1.9em; }

#screen-pause, #screen-busted, #screen-win, #screen-over { background: rgba(8,6,16,.62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.card { width: 26em; max-width: 92vw; padding: 1.8em 1.9em; border-radius: 1.1em; background: rgba(18,15,30,.94); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 1.5em 4em rgba(0,0,0,.6); display: flex; flex-direction: column; gap: .85em; text-align: left; animation: paperIn .4s cubic-bezier(.2,1.2,.4,1); }
.card h2 { font-weight: 900; font-size: 2.2em; line-height: 1; }
.card p { font-weight: 500; line-height: 1.45; opacity: .92; }
.card p b { font-weight: 900; }
.card .btn { align-self: stretch; text-align: center; }
.opt { display: flex; align-items: center; gap: .6em; font-weight: 500; font-size: .92em; pointer-events: auto; cursor: pointer; }
.opt input { width: 1.1em; height: 1.1em; accent-color: var(--lime); }
.pv { border-color: rgba(255,59,78,.55); }
.pv-head { font-weight: 900; font-size: .78em; letter-spacing: .28em; color: var(--danger); }
.pv-fine { display: flex; justify-content: space-between; align-items: baseline; padding: .6em .9em; border-radius: .6em; background: rgba(255,59,78,.14); border: 1px dashed rgba(255,59,78,.6); }
.pv-fine span { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .8em; }
.pv-fine b { font-weight: 900; font-size: 1.5em; color: var(--danger); }
.pv-note { font-size: .92em; opacity: .85; }
.win { border-color: rgba(206,243,85,.6); }
.win-logo { width: 4.2em; height: 4.2em; border-radius: 1em; box-shadow: 0 0 2.2em rgba(206,243,85,.5); }
.win-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6em; }
.win-stats div { padding: .55em .65em; border-radius: .6em; background: rgba(255,255,255,.07); }
.win-stats span { display: block; font-weight: 700; font-size: .66em; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.win-stats b { font-weight: 900; font-size: 1.05em; }
#winStars { color: var(--gold); }

#fatal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 2em; background: #0c0a14; color: #ffd0d5; font: 500 15px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; }

/* ───────────── Touch ───────────── */
/* ───────────── Commandes tactiles : un volant à gauche, les pédales à droite ─────────────
   --tu est l'unité de taille (le diamètre d'un bouton rond) : tout le reste en découle, les feuilles suivantes ne règlent qu'elle. */
#touch { position: fixed; inset: 0; z-index: 6; pointer-events: none; --tu: 68px; }
#touch button { pointer-events: auto; display: grid; place-items: center; padding: 0; border-radius: 50%; width: var(--tu); height: var(--tu); background: rgba(12,10,22,.5); border: 2px solid rgba(255,255,255,.35); color: #fff; font: 900 calc(var(--tu) * .36) var(--font); touch-action: none; -webkit-tap-highlight-color: transparent; }
#touch button.down { background: var(--lime); color: var(--ink); }
#touch button svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; }
/* le volant : on le fait tourner du pouce ; lâché, il revient au centre (src/input.js) */
.t-wheel { position: absolute; left: 18px; bottom: 96px; width: calc(var(--tu) * 2.6); height: calc(var(--tu) * 2.6); border-radius: 50%; pointer-events: auto; touch-action: none; -webkit-tap-highlight-color: transparent; }
.t-wheel svg { display: block; width: 100%; height: 100%; opacity: .6; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); transition: transform .22s cubic-bezier(.2,.9,.3,1.25), opacity .15s; }
.t-wheel.held svg { opacity: .95; transition: opacity .15s; }
.w-rim { fill: none; stroke: #f1f1f4; stroke-width: 13; }
.w-spoke { fill: none; stroke: #f1f1f4; stroke-width: 11; stroke-linecap: round; }
.w-hub { fill: rgba(18,20,28,.82); stroke: var(--lime); stroke-width: 3; }
.w-mark { fill: var(--lime); }
/* à droite : turbo et frein à main au-dessus, action et frein en dessous, l'accélérateur sur toute la hauteur */
.t-right { position: absolute; right: 18px; bottom: 96px; display: grid; grid-template-columns: var(--tu) calc(var(--tu) * 1.22) calc(var(--tu) * .98); gap: calc(var(--tu) * .14) calc(var(--tu) * .16); justify-items: center; align-items: end; }
#touch .t-small { width: calc(var(--tu) * .76); height: calc(var(--tu) * .76); font-size: calc(var(--tu) * .3); }
#touch .t-boost { grid-column: 1; grid-row: 1; }
#touch .t-hand { grid-column: 2; grid-row: 1; }
#touch .t-act { grid-column: 1; grid-row: 2; background: rgba(206,243,85,.85); color: var(--ink); }
/* les pédales : un contour, des stries, et leur couleur quand on appuie */
#touch .t-pedal { align-items: end; border-radius: calc(var(--tu) * .2); border: 3px solid rgba(255,255,255,.72); background: repeating-linear-gradient(0deg, rgba(255,255,255,.17) 0 3px, transparent 3px calc(var(--tu) * .17)), rgba(12,10,22,.42); }
#touch .t-pedal span { padding-bottom: .55em; font-size: calc(var(--tu) * .17); letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
#touch .t-brake { grid-column: 2; grid-row: 2; width: calc(var(--tu) * 1.22); height: calc(var(--tu) * 1.02); }
#touch .t-gas { grid-column: 3; grid-row: 1 / span 2; width: calc(var(--tu) * .98); height: calc(var(--tu) * 1.86); }
#touch .t-brake.down { background: #ff4a5c; border-color: #ff4a5c; color: #fff; }
#touch .t-gas.down { background: var(--lime); border-color: var(--lime); color: var(--ink); }
@media (pointer: coarse) {
  .bl { bottom: 34%; } .objective { bottom: 2.5%; font-size: 1.3em; } .br { bottom: auto; top: 22%; }
  .keys { display: none; }
}
@media (max-aspect-ratio: 1/1) {
  #hud { font-size: clamp(10px, 2.4vw, 18px); }
  .caption { font-size: 1.15em; top: 1.2%; white-space: normal; text-align: center; width: 60%; }
  .tl { top: 9%; max-width: 60%; } .tr { top: 9%; }
  h1 { font-size: 4.4em; } .title-box { margin: 0 6%; }
  #screen-title { background: rgba(10,8,20,.72); }
}

@media (max-width: 1150px) and (min-aspect-ratio: 1/1) {
  .bar .track { width: 8em; }
  .objective { font-size: 1.35em; }
}
