/* Rijles interface.
   Two materials only:
   - road signage (blue direction signs, white sub-plates, yellow number plate) for everything the road tells you
   - paper (the instructor's note, the assessment form) for everything a person tells you */
:root {
  --sign: #0b4ea2; --sign-dk: #083b7c; --plateY: #f6c500; --red: #d4202b; --green: #1b8a4b; --amber: #e8900c;
  --lift: 0 4px 0 var(--black);   /* the hard bottom edge every raised element shares */
  --asphalt: #15181d; --paper: #f6f7f2; --ink: #1c2f6b; --black: #111;
  --ui: 'Overpass', 'Segoe UI', system-ui, sans-serif; --hand: 'Courier Prime', 'Courier New', monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0e13; color: #fff; font-family: var(--ui); user-select: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, rgba(8, 12, 24, 0) 58%, rgba(8, 12, 24, 0) 100%); }
.hidden { display: none !important; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--plateY); outline-offset: 2px; }

/* ---- materials ---- */
.sign { background: var(--sign); color: #fff; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 0 0 3px var(--sign), 0 7px 0 3px var(--sign-dk); }
.plate { background: #fff; color: var(--black); border: 2px solid var(--black); border-radius: 8px; box-shadow: var(--lift); }

#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { position: absolute; }

/* ---- direction sign ---- */
#nav { top: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 8px 20px 8px 14px; min-width: 290px; max-width: 46vw; }
#navIcon { font-size: 46px; font-weight: 900; line-height: 1; width: 52px; text-align: center; flex: none; }
.navBody { border-left: 3px solid #fff; padding-left: 14px; }
#navDist { font-size: 26px; font-weight: 800; line-height: 1.05; letter-spacing: .01em; }
#navText { font-size: 15px; font-weight: 600; line-height: 1.2; }
/* the last metres before a turn: the sign turns into a yellow diversion-style board */
#nav.soon { background: var(--plateY); color: var(--black); border-color: var(--black); box-shadow: 0 0 0 3px var(--plateY), 0 7px 0 3px #a98700; }
#nav.soon .navBody { border-left-color: var(--black); }

/* ---- progress plate ---- */
#stats { top: 16px; left: 16px; width: 248px; padding: 10px 12px 11px; font-size: 13px; font-weight: 600; }
#stats .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
#stats .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
#scoreVal { font-size: 26px; font-weight: 900; line-height: 1; }
#stats .row.small { margin-top: 7px; font-size: 12.5px; }
#stats .row.small b { font-weight: 800; }
#roadName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 128px; font-weight: 800; }
.bar { height: 9px; border: 2px solid var(--black); border-radius: 2px; margin-top: 5px; overflow: hidden; background: #fff; }
.bar.thin { height: 7px; }
.bar i { display: block; height: 100%; width: 100%; background: var(--green); transition: width .4s, background .4s; }
#progBar { background: var(--sign); width: 0; }

/* ---- minimap ---- */
#mapWrap { top: 16px; right: 16px; width: 208px; height: 208px; border-radius: 50%; overflow: hidden; border: 5px solid #fff; box-shadow: 0 0 0 2px var(--black), 0 6px 0 2px var(--black); }
#minimap { width: 100%; height: 100%; display: block; }

/* ---- sign explanation ---- */
#signCard { right: 16px; top: 244px; width: 208px; padding: 8px 10px; display: flex; gap: 10px; align-items: center; }
#signCard img { width: 54px; height: 54px; flex: none; }
#signCard b { display: block; font-size: 14px; font-weight: 800; line-height: 1.15; }
#signCard span { display: block; font-size: 12px; font-weight: 600; line-height: 1.25; margin-top: 2px; }
#signLight { position: absolute; right: 8px; top: 8px; width: 13px; height: 13px; border-radius: 50%; display: none; background: currentColor; border: 2px solid var(--black); }

/* ---- the instructor's note (paper) ---- */
#bubble { left: 18px; bottom: 26px; max-width: clamp(220px, 29vw, 400px); display: flex; gap: 11px; align-items: flex-start; padding: 10px 14px 10px 12px;
  background: var(--paper); color: #1b1b1b; border-left: 7px solid var(--ink); border-radius: 2px; box-shadow: 0 5px 0 rgba(0, 0, 0, .55); transform: rotate(-.5deg); transform-origin: left bottom; animation: slip .22s ease-out; }
#bubble.good { border-left-color: var(--green); } #bubble.minor { border-left-color: var(--amber); } #bubble.serious { border-left-color: #d9541a; } #bubble.critical { border-left-color: var(--red); background: #fdeeed; }
#avatar { width: 32px; height: 32px; flex: none; border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); font-weight: 900; font-size: 16px; display: grid; place-items: center; line-height: 1; padding-top: 2px; }
#insName { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ink); margin-bottom: 1px; }
#bubbleText { font-family: var(--hand); font-size: 16px; line-height: 1.28; }
@keyframes slip { from { transform: translateY(14px) rotate(-.5deg); opacity: 0; } }

#posText { width: 100%; margin-top: 8px; font: 12px/1.35 ui-monospace, Consolas, monospace; padding: 6px; border: 2px solid #1a1a1a; border-radius: 6px; resize: none; background: #f6f6f2; color: #111; }
#posBtn.small { font-size: 12.5px; }
#toasts { left: 50%; top: 104px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { background: #fff; color: #0f4d2a; border: 2px solid #0f4d2a; border-radius: 5px; font-weight: 800; font-size: 13.5px; padding: 3px 11px 2px; box-shadow: 0 3px 0 #0f4d2a; animation: rise 2.2s forwards; }
@keyframes rise { 0% { transform: translateY(8px); opacity: 0; } 12% { transform: none; opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-18px); opacity: 0; } }
#flash { inset: 0; opacity: 0; box-shadow: inset 0 0 150px 36px var(--red); transition: opacity .6s; }
#flash.on { opacity: .85; transition: none; }
#flash.minor { box-shadow: inset 0 0 130px 18px var(--amber); }

/* ---- dashboard ---- */
#dash { bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 8px; }
#gauge { width: 240px; height: 170px; }
/* driver's seat view: the speedometer moves to the bottom right corner, clear of the car's own steering wheel */
body.incar #dash { left: auto; right: 14px; transform: scale(.78); transform-origin: bottom right; }
body.touch.incar #dash { right: calc(256px + env(safe-area-inset-right)); }      /* left of the pedals */
.ind { font-size: 30px; color: rgba(255, 255, 255, .22); margin-bottom: 30px; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.ind.on { color: #35e06b; }
#limitImg { width: 76px; height: 76px; margin: 0 0 22px 4px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
#limitImg.over { animation: nudge .3s infinite; }
@keyframes nudge { 50% { transform: scale(1.12); } }
#keys { right: 16px; bottom: 10px; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .8); text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }

/* ---- overlays ---- */
.overlay { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(10, 14, 20, .55); z-index: 10; overflow: auto; padding: 18px; }
#menu { place-items: center start; padding-left: clamp(16px, 4vw, 64px); background: linear-gradient(90deg, rgba(10, 14, 20, .5), rgba(10, 14, 20, 0) 70%); }
.card { width: min(620px, 94vw); max-height: calc(100vh - 28px); overflow-y: auto; padding: 22px 26px; }
.card.small { width: 330px; text-align: center; }
.card h2 { margin: 0 0 12px; font-weight: 900; font-size: 24px; letter-spacing: -.01em; }

/* menu = a big blue direction sign */
.signpanel { background: var(--sign); color: #fff; border: 4px solid #fff; border-radius: 16px; box-shadow: 0 0 0 4px var(--sign), 0 10px 0 4px var(--sign-dk); }
.menuCard { width: min(420px, 94vw); padding: 18px 20px 14px; }
.settingsCard { width: min(520px, 94vw); padding: 18px 22px 18px; }
/* the main menu holds only what every drive needs: route, mode, start. The rest lives under Settings. */
.menuGrid { display: block; }
.brand { position: relative; }
button.gear { margin-left: auto; display: flex; align-items: center; gap: 6px; background: #fff; color: var(--black); border: 2px solid var(--black); border-radius: 7px; box-shadow: var(--lift); padding: 6px 10px 4px 8px; font-size: 12.5px; font-weight: 800; cursor: pointer; flex: none; }
button.gear i { font-style: normal; font-size: 17px; line-height: 1; margin-top: -3px; }
button.gear:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--black); }
#modeNote { margin-top: 7px; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.brand p { margin: 0; font-size: 12.5px; font-weight: 600; line-height: 1.2; max-width: 110px; }
.numberplate { display: flex; align-items: stretch; background: var(--plateY); color: var(--black); border: 2px solid var(--black); border-radius: 6px; overflow: hidden; box-shadow: 0 4px 0 var(--black); }
.numberplate .eu { background: var(--sign-dk); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: flex-end; padding: 0 5px 5px; }
.numberplate { flex: none; }
.numberplate .reg { font-weight: 900; font-size: 25px; letter-spacing: .05em; padding: 4px 9px 0; line-height: 1.1; white-space: nowrap; }
label { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin: 14px 0 5px; opacity: .9; }
.seg { display: flex; border: 2px solid #fff; border-radius: 6px; overflow: hidden; }
.seg button { flex: 1; background: none; border: 0; border-left: 2px solid #fff; color: #fff; padding: 7px 8px 5px; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: rgba(255, 255, 255, .14); }
.seg button.on { background: #fff; color: var(--sign); font-weight: 900; }
.seg.wrap { flex-wrap: wrap; border: 0; gap: 6px; overflow: visible; }
.seg.wrap button { flex: 0 1 auto; border: 2px solid #fff; border-radius: 6px; font-size: 12.5px; padding: 5px 9px 3px; }
.opts { display: grid; gap: 0 12px; }
.opts.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .opts.three { grid-template-columns: 1fr 1fr .8fr; }
/* dropdowns are white sub-plates, like the route nameplate */
select { width: 100%; appearance: none; -webkit-appearance: none; font: 800 14.5px var(--ui); color: var(--black); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 2px solid var(--black); border-radius: 7px; box-shadow: var(--lift); padding: 9px 28px 6px 10px; margin-bottom: 4px; cursor: pointer; text-overflow: ellipsis; }
select:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--black); }
select:hover { background-color: #f1f4f9; }
/* a route = a white street nameplate */
.route { background: #fff; color: var(--black); border: 2px solid var(--black); border-radius: 7px; box-shadow: var(--lift); padding: 7px 12px 6px; cursor: pointer; margin-bottom: 10px; opacity: .8; }
.route:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--black); }
.route.on { opacity: 1; box-shadow: var(--lift), inset 9px 0 0 var(--plateY); padding-left: 20px; }
.route b { display: block; font-size: 15.5px; font-weight: 900; line-height: 1.15; }
.route em { display: block; font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--sign); margin-top: 2px; }
.route span { display: none; font-size: 12.5px; font-weight: 600; line-height: 1.3; margin-top: 3px; color: #333; }
.route.on span { display: block; }
button.primary { display: block; width: 100%; margin-top: 16px; padding: 12px 12px 9px; font-size: 19px; font-weight: 900; letter-spacing: .01em; color: var(--black); background: var(--plateY); border: 2px solid var(--black); border-radius: 7px; box-shadow: 0 4px 0 var(--black); cursor: pointer; }
button.primary:hover { background: #ffd51f; }
button.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--black); }
button.ghost { display: block; width: 100%; margin-top: 13px; padding: 10px 10px 7px; font-size: 14.5px; font-weight: 800; color: var(--black); background: #fff; border: 2px solid var(--black); border-radius: 7px; box-shadow: var(--lift); cursor: pointer; }
button.ghost:hover { background: #f1f4f9; }
button.ghost:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--black); }
.fine { font-size: 11px; font-weight: 600; opacity: .8; margin: 9px 0 0; line-height: 1.35; }
#loading { padding: 26px 0; font-weight: 700; }

/* pause + help = white sub-plates */
.sheet { background: #fff; color: var(--black); border: 3px solid var(--black); border-radius: 12px; box-shadow: 0 9px 0 var(--black); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-weight: 600; margin-bottom: 16px; }
td { padding: 6px 6px 4px; border-bottom: 1.5px solid #d9d9d9; vertical-align: middle; }
kbd { display: inline-block; background: #fff; color: var(--black); border: 2px solid var(--black); border-radius: 4px; padding: 1px 6px 0; font: 800 12px var(--ui); box-shadow: 0 2px 0 var(--black); }
.sheet p { font-size: 14.5px; font-weight: 600; line-height: 1.45; margin: 0 0 10px; }

/* ---- assessment form (paper) ---- */
.form { background: var(--paper); color: #1b1b1b; border-radius: 3px; padding: 26px 30px 24px; box-shadow: 0 9px 0 var(--ink);
  background-image: linear-gradient(var(--ink), var(--ink)); background-size: 100% 5px; background-repeat: no-repeat; }
.formhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 14px; }
.formhead small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 4px; }
.formhead h2 { margin: 0; font-size: 25px; line-height: 1.12; }
.stamp { flex: none; font-weight: 900; font-size: 21px; letter-spacing: .14em; padding: 7px 12px 4px; border: 4px double currentColor; border-radius: 6px; transform: rotate(-7deg); margin-top: 2px; opacity: .88; color: var(--ink); }
.stamp.pass { color: var(--green); } .stamp.fail { color: var(--red); }
.resGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 12px; }
.resGrid div { display: flex; flex-direction: column-reverse; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }
.resGrid b { font-family: var(--hand); font-size: 24px; font-weight: 700; line-height: 1.1; }
.resGrid span, .formrow span { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.formrow { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
#resStars { font-size: 20px; letter-spacing: 3px; color: #1b1b1b; }
.form h3 { margin: 0 0 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.fitem { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0 7px; border-top: 1.5px dotted #8d94a8; border-left: 0 !important; position: relative; }
.fitem .n { flex: none; min-width: 34px; height: 30px; border: 2px solid var(--ink); font-family: var(--hand); font-weight: 700; font-size: 16px; display: grid; place-items: center; padding-top: 2px; }
.fitem b { display: block; font-size: 15px; font-weight: 800; padding-right: 86px; }
.fitem span { display: block; font-family: var(--hand); font-size: 13.5px; line-height: 1.3; color: #2c2c2c; margin-top: 1px; }
.fitem::after { position: absolute; right: 0; top: 9px; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.fitem.minor::after { content: 'minor'; color: #9a5b00; } .fitem.serious::after { content: 'serious'; color: #b8430f; } .fitem.critical::after { content: 'dangerous'; color: var(--red); }
.fitem.critical .n { border-color: var(--red); color: var(--red); }
.formbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; align-items: start; }
/* the report keeps its heading, scores and buttons in view; only the notes scroll */
#result > .form { display: flex; flex-direction: column; overflow: hidden; }
#result > .form > * { flex: none; }
#result > .form > #resList { flex: 0 1 auto; min-height: 60px; overflow-y: auto; overscroll-behavior: contain; margin-right: -14px; padding-right: 14px; border-bottom: 1.5px dotted #8d94a8; }
#resList .fitem:first-child { border-top: 0; }
#result .formbtns { margin-top: 0; padding-top: 14px; border-top: 2px solid var(--ink); }
#result .form h3 { padding-bottom: 6px; margin-bottom: 0; border-bottom: 1.5px dotted #8d94a8; }
.formbtns button { margin-top: 0; }
.formbtns .ghost { padding: 12px 10px 9px; font-size: 19px; font-weight: 900; }

@media (max-width: 900px) {
  #stats { width: 200px; } #mapWrap { width: 150px; height: 150px; } #signCard { top: 184px; width: 190px; }
  #nav { max-width: 60vw; min-width: 0; } .resGrid { grid-template-columns: repeat(2, 1fr); } .formbtns { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@media (max-width: 1180px) { #keys { display: none; } #bubbleText { font-size: 14.5px; } }

/* ============ touch controls ============ */
#touch, #rotate, .touchHelp { display: none; }
body.touch { touch-action: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body.touch #view { touch-action: none; }
body.touch #touch { display: block; inset: 0; pointer-events: none; }
body.touch #touch > * { position: absolute; pointer-events: auto; touch-action: none; }
body.touch.demo #tSteer, body.touch.demo #tPedals, body.touch.demo #tInd, body.touch.demo #tLook { display: none; }
body.touch #keys { display: none; }
body.touch .touchHelp { display: block; } body.touch #help table { display: none; }
#touch button { font: 800 13px var(--ui); color: var(--black); background: rgba(255, 255, 255, .9); border: 2px solid var(--black); border-radius: 9px; box-shadow: 0 3px 0 var(--black); padding: 0; cursor: pointer; }
#touch button.on { transform: translateY(2px); box-shadow: 0 1px 0 var(--black); background: var(--plateY); }
/* steering pad, bottom left */
#tSteer { left: calc(14px + env(safe-area-inset-left)); bottom: 12px; width: clamp(150px, 26vw, 230px); height: clamp(120px, 34vh, 190px); border-radius: 16px; display: grid; place-items: center; color: rgba(255, 255, 255, .92);
  background: rgba(10, 14, 20, .28); border: 2px dashed rgba(255, 255, 255, .55); }
#tSteer.on { background: rgba(10, 14, 20, .42); border-style: solid; }
#tWheel { width: min(64%, 120px); height: auto; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); transition: transform .05s linear; }
#tSteer span { position: absolute; bottom: 5px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
/* pedals, bottom right */
#tPedals { right: calc(14px + env(safe-area-inset-right)); bottom: 12px; display: flex; gap: 10px; align-items: flex-end; }
#touch #tBrake { width: clamp(84px, 13vw, 118px); height: clamp(64px, 19vh, 96px); background: rgba(255, 255, 255, .92); font-size: 13px; letter-spacing: .06em; }
#touch #tGas { width: clamp(72px, 11vw, 100px); height: clamp(96px, 30vh, 150px); background: rgba(53, 224, 107, .92); font-size: 16px; letter-spacing: .06em; }
#touch #tBrake.on { background: #ff8a80; } #touch #tGas.on { background: #1fd15c; }
/* indicators: either side of the speedometer */
#tInd { left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 350px; }
body.touch #dash .ind { display: none; }                 /* the indicator buttons light up instead */
#touch #tInd button.lit { background: #35e06b; color: #063; }
#touch #tInd button { width: 54px; height: 46px; font-size: 22px; color: #0f6a31; }
body.incar #tInd { left: auto; right: calc(240px + env(safe-area-inset-right)); transform: none; gap: 10px; bottom: 150px; }
/* glances: above the pedals */
#tLook { right: calc(14px + env(safe-area-inset-right)); bottom: clamp(118px, 34vh, 172px); display: flex; gap: 7px; }
#touch #tLook button { height: 40px; padding: 0 10px; font-size: 12.5px; white-space: nowrap; }
/* camera and pause: under the minimap */
#tSys { right: calc(14px + env(safe-area-inset-right)); top: 232px; display: flex; gap: 7px; }
#touch #tSys button { width: 52px; height: 38px; font-size: 12.5px; }
body.touch #signCard { display: none !important; }
/* the instructor's note moves up under the progress plate, clear of the steering pad */
body.touch #bubble { left: calc(14px + env(safe-area-inset-left)); bottom: auto; top: 150px; max-width: clamp(190px, 30vw, 330px); transform: none; }
body.touch #stats { left: calc(14px + env(safe-area-inset-left)); } body.touch #mapWrap { right: calc(14px + env(safe-area-inset-right)); }
.touchHelp p { font-size: 14.5px; font-weight: 600; line-height: 1.45; margin: 0 0 10px; }


/* ============ short screens (phones in landscape) ============ */
@media (max-height: 520px) {
  #nav { top: 8px; padding: 4px 12px 3px 8px; gap: 8px; min-width: 0; max-width: 44vw; border-width: 2px; border-radius: 9px; box-shadow: 0 0 0 2px var(--sign), 0 4px 0 2px var(--sign-dk); }
  #navIcon { font-size: 28px; width: 32px; } .navBody { padding-left: 8px; border-left-width: 2px; } #navDist { font-size: 17px; } #navText { font-size: 11.5px; }
  #stats { top: 8px; left: 10px; width: 168px; padding: 6px 8px 7px; font-size: 11px; } #scoreVal { font-size: 18px; } #stats .lbl { font-size: 8.5px; } #stats .row.small { margin-top: 4px; font-size: 10.5px; } #roadName { max-width: 84px; }
  .bar { height: 7px; margin-top: 3px; } .bar.thin { height: 5px; }
  #mapWrap { top: 8px; right: 10px; width: 104px; height: 104px; border-width: 3px; }
  #signCard { top: 122px; right: 10px; width: 170px; padding: 5px 7px; } #signCard img { width: 38px; height: 38px; } #signCard b { font-size: 12px; } #signCard span { font-size: 10.5px; }
  #toasts { top: 58px; } .toast { font-size: 11.5px; padding: 2px 8px 1px; }
  #dash { bottom: 4px; transform: translateX(-50%) scale(.62); transform-origin: bottom center; }
  body.incar #dash { transform: scale(.52); right: 150px; } body.touch.incar #dash { right: calc(196px + env(safe-area-inset-right)); }
  #bubble { max-width: 30vw; padding: 6px 9px 6px 8px; gap: 7px; } #bubbleText { font-size: 12.5px; line-height: 1.22; } #avatar { width: 24px; height: 24px; font-size: 12px; }
  body.touch #bubble { top: 92px; max-width: 36vw; padding: 5px 8px 4px 7px; } body.touch #bubbleText { font-size: 11.5px; line-height: 1.18; } body.touch #insName { font-size: 8.5px; }
  #tInd { gap: 214px; bottom: 6px; } #touch #tInd button { width: 48px; height: 40px; font-size: 19px; }
  #tSys { top: 122px; }
  /* menu and overlays */
  .overlay { padding: 8px; } #menu { padding-left: clamp(8px, 2vw, 24px); }
  .card { max-height: calc(100vh - 14px); max-height: calc(100dvh - 14px); padding: 12px 16px; }
  .menuCard { padding: 9px 14px 8px; width: min(660px, 97vw); } .settingsCard { padding: 10px 14px 12px; width: min(560px, 97vw); }
  .menuGrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
  .opts.two { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  button.gear { padding: 4px 8px 2px 6px; font-size: 11.5px; } .seg button { padding: 5px 8px 3px; font-size: 12.5px; }
  .brand { margin-bottom: 0; gap: 10px; } .numberplate .reg { font-size: 20px; padding: 3px 8px 0; } .brand p { font-size: 12px; max-width: none; }
  label { margin: 6px 0 3px; font-size: 9px; }
  select { padding: 6px 24px 3px 8px; font-size: 12.5px; margin-bottom: 2px; }
  .route { padding: 5px 9px 4px; margin-bottom: 7px; } .route.on { padding-left: 16px; } .route b { font-size: 13.5px; } .route em { font-size: 11px; margin-top: 0; } .route span, .route.on span { display: none; }
  button.primary { margin-top: 9px; padding: 8px 10px 6px; font-size: 16px; } button.ghost { margin-top: 8px; padding: 7px 8px 5px; font-size: 12.5px; }
  .fine { font-size: 9.5px; margin-top: 5px; }
  .card h2 { font-size: 18px; margin-bottom: 7px; } .sheet p, .touchHelp p { font-size: 12.5px; margin-bottom: 6px; }
  .form { padding: 14px 18px 12px; } .formhead { padding-bottom: 6px; margin-bottom: 8px; } .formhead h2 { font-size: 18px; } .stamp { font-size: 15px; padding: 4px 8px 2px; }
  .resGrid { grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 8px; } .resGrid b { font-size: 18px; } .formrow { margin-bottom: 8px; }
  .fitem { padding: 5px 0 4px; } .fitem b { font-size: 13px; } .fitem span { font-size: 12px; } .formbtns { grid-template-columns: 1fr 1fr; margin-top: 10px; } #result .formbtns { margin-top: 0; padding-top: 8px; } .formbtns .ghost { padding: 8px 10px 6px; font-size: 16px; }
}

/* ---- practice drills ---- */
#task { left: 16px; top: 146px; width: 250px; padding: 9px 12px 10px; }
#task b { display: block; font-size: 14px; font-weight: 900; letter-spacing: .02em; }
#task p { margin: 4px 0 0; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
#task small { display: block; margin-top: 6px; font-size: 11.5px; font-weight: 800; opacity: .9; }
#task small:empty { display: none; }
body.spot #nav { display: none; }
#practiceList { margin: 12px 0 4px; }
.route.ex { display: flex; gap: 12px; align-items: center; opacity: 1; padding-left: 12px; box-shadow: var(--lift); }
.route.ex:hover { box-shadow: var(--lift), inset 9px 0 0 var(--plateY); }
.route.ex i { flex: none; width: 38px; height: 38px; border-radius: 6px; background: var(--sign); color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 20px; }
@media (max-height: 520px) { #task { top: 96px; width: 210px; padding: 6px 9px 7px; } #task p { font-size: 11.5px; } .route.ex span { display: none; } .route.ex i { width: 30px; height: 30px; font-size: 16px; } }

/* ---- sub-screens of the menu: a header with a Back button, as in a game menu ---- */
.panelHead { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.panelHead h2 { margin: 0; }
.backBtn { flex: none; padding: 7px 13px 5px 10px; font-size: 13.5px; font-weight: 900; color: var(--black); background: #fff; border: 2px solid var(--black); border-radius: 7px; box-shadow: var(--lift); cursor: pointer; }
.backBtn:hover { background: var(--plateY); }
.backBtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--black); }
@media (max-height: 520px) { .backBtn { padding: 5px 10px 3px 8px; font-size: 12px; } }

/* ---- licence picker ---- */
.licLabel { display: block; margin-top: 12px; }
#licBtn { margin-top: 5px; text-align: left; padding-left: 14px; }
#licList { margin: 12px 0 4px; }
.route.ex.sel { box-shadow: var(--lift), inset 9px 0 0 var(--plateY); padding-left: 20px; }
.route.ex i { font-size: 17px; letter-spacing: -.02em; }
#practiceNote:empty { display: none; }
@media (max-height: 520px) { .licLabel { margin-top: 6px; } #licBtn { margin-top: 3px; } }

/* ==== simple display (the default): laid out like a car game ====
   Map bottom left, speed bottom right, the next turn small at the top, the score as a slim strip. Everything else is
   either hidden or only shows briefly. "Full" in Settings brings back the original display. */
#speedo { display: none; }
body.simple #gauge { display: none; }
body.simple #speedo { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: end; min-width: 108px; padding: 5px 14px 6px 16px; color: #fff;
  background: rgba(12, 16, 22, .62); border-radius: 14px; border: 2px solid rgba(255, 255, 255, .85); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
#spdNum { grid-row: 1 / 3; font-size: 50px; font-weight: 900; line-height: .95; font-variant-numeric: tabular-nums; text-align: right; min-width: 62px; }
#spdUnit { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; align-self: end; }
#spdGear { grid-column: 2; font-style: normal; font-size: 17px; font-weight: 900; line-height: 1; color: var(--plateY); align-self: start; }
#speedo.over #spdNum { color: #ff5a4d; }
body.simple #limitImg { width: 56px; height: 56px; margin: 0 0 4px 2px; }
body.simple .ind { font-size: 24px; margin-bottom: 14px; }
body.simple #keys { display: none; }
/* score: one slim strip - the percentage, its bar, and how far along the route we are */
body.simple #stats { width: 176px; padding: 6px 10px 7px; background: rgba(12, 16, 22, .62); color: #fff; border: 2px solid rgba(255, 255, 255, .85); border-radius: 12px; box-shadow: none; }
body.simple #stats > :nth-child(3) { display: none; }                 /* XP, faults and time are on the pause and report screens */
body.simple #stats .lbl { font-size: 9px; opacity: .85; } body.simple #scoreVal { font-size: 20px; }
body.simple #stats .row.small { margin-top: 4px; font-size: 11px; } body.simple #roadName { max-width: 92px; }
body.simple .bar { height: 6px; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .25); margin-top: 3px; } body.simple .bar.thin { height: 4px; }
/* next turn: a slimmer sign */
body.simple #nav { top: 12px; padding: 5px 16px 5px 10px; gap: 10px; min-width: 0; border-width: 2px; border-radius: 10px; box-shadow: 0 0 0 2px var(--sign), 0 5px 0 2px var(--sign-dk); }
body.simple #nav.soon { box-shadow: 0 0 0 2px var(--plateY), 0 5px 0 2px #a98700; }
body.simple #navIcon { font-size: 32px; width: 36px; } body.simple .navBody { border-left-width: 2px; padding-left: 10px; }
body.simple #navDist { font-size: 19px; } body.simple #navText { font-size: 13px; }
/* sign card: just the sign and its name */
body.simple #signCard { width: auto; max-width: 190px; padding: 5px 9px 5px 6px; gap: 7px; background: rgba(12, 16, 22, .62); color: #fff; border: 2px solid rgba(255, 255, 255, .85); border-radius: 12px; box-shadow: none; }
body.simple #signCard img { width: 38px; height: 38px; } body.simple #signCard span { display: none; } body.simple #signCard b { font-size: 12.5px; }
/* the instructor speaks in a subtitle line, not on a note */
body.simple #bubble { background: rgba(12, 16, 22, .74); color: #fff; border-left: 4px solid #fff; border-radius: 8px; box-shadow: none; transform: none; padding: 7px 14px 7px 12px; animation: none; }
body.simple #bubble.good { border-left-color: #35e06b; } body.simple #bubble.minor { border-left-color: var(--amber); } body.simple #bubble.serious { border-left-color: #ff8a3d; } body.simple #bubble.critical { border-left-color: #ff5a4d; background: rgba(70, 12, 10, .82); }
body.simple #avatar, body.simple #insName { display: none; }
body.simple #bubbleText { font-family: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
body.simple #task { top: 84px; }
/* where things sit (keyboard and mouse; a touch screen keeps its own layout, because the corners hold the controls) */
body.simple:not(.touch) #mapWrap { top: auto; right: auto; left: 16px; bottom: 16px; width: 176px; height: 176px; border-width: 3px; box-shadow: 0 0 0 2px rgba(0, 0, 0, .7); }
body.simple:not(.touch) #dash { left: auto; right: 16px; bottom: 14px; transform: none; align-items: flex-end; }
body.simple:not(.touch) #signCard { top: 12px; right: 16px; }
body.simple:not(.touch) #bubble { left: 50%; bottom: 20px; transform: translateX(-50%); max-width: min(560px, 46vw); text-align: center; }
@media (max-height: 520px) {
  body.simple #spdNum { font-size: 34px; min-width: 44px; } body.simple #speedo { min-width: 80px; padding: 3px 9px 4px 10px; } body.simple #limitImg { width: 42px; height: 42px; }
  body.simple #stats { width: 150px; padding: 4px 8px 5px; } body.simple #task { top: 64px; }
  body.simple:not(.touch) #mapWrap { width: 120px; height: 120px; }
}
body.simple #progText { white-space: nowrap; }
@media (max-height: 520px) { body.simple #roadName { max-width: 62px; } body.simple #stats .row.small { font-size: 10px; } }

/* ==== main menu: short, like a game's title screen ====
   One big Start button, three rows saying what you are about to drive (each opens its own screen), two small extras. */
.menuCard { width: min(360px, 94vw); padding: 16px 18px 12px; }
#menuBody #startBtn { margin-top: 12px; padding: 14px 12px 11px; font-size: 21px; }
.picks { margin-top: 12px; border: 2px solid var(--black); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: var(--lift); }
.pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 7px 12px; margin: 0; background: #fff; color: var(--black); border: 0; border-top: 1px solid #d5dae3; text-align: left; font-family: inherit; cursor: pointer; }
.pick:first-child { border-top: 0; }
button.pick:hover { background: #fff6cf; }
.pick small { flex: none; width: 58px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sign); }
.pick b { flex: 1; min-width: 0; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick i { flex: none; font-style: normal; font-size: 20px; font-weight: 900; line-height: 1; color: var(--sign); }
.pick.modeRow { cursor: default; padding: 6px 8px 6px 12px; } .pick.modeRow .seg { flex: 1; margin: 0; }
#modeNote { margin-top: 7px; }
.menuRow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.menuRow2 button.ghost { margin-top: 12px; padding: 9px 6px 6px; font-size: 13.5px; }
#routes #routePick { margin-top: 12px; }
#routes .route { opacity: 1; } #routes .route span { display: block; }
@media (max-height: 520px) {
  .menuCard { width: min(330px, 97vw); padding: 8px 12px 7px; }
  #menuBody #startBtn { margin-top: 7px; padding: 8px 10px 6px; font-size: 17px; }
  .picks { margin-top: 7px; } .pick { padding: 5px 8px 4px 10px; } .pick b { font-size: 12.5px; } .pick.modeRow { padding: 4px 6px 4px 10px; }
  #modeNote { display: none; } .menuRow2 button.ghost { margin-top: 7px; padding: 6px 5px 4px; font-size: 12px; }
  #routes .route span { display: none; }
}
.pick .seg { border-color: var(--sign); } .pick .seg button { color: var(--sign); border-left-color: var(--sign); padding: 5px 8px 3px; font-size: 13px; font-weight: 800; }
.pick .seg button.on { background: var(--sign); color: #fff; }
.menuCard .brand p { display: none; }                      /* the name plate and the gear are enough in the short menu */
.menuCard .brand .gear { margin-left: auto; position: static; }

/* ==== route screen: the route on a map, arrows to flip through routes and cities ==== */
.routeCard { width: min(900px, 96vw); padding: 16px 20px 18px; }
#routeCount { margin-left: auto; font-size: 20px; font-weight: 900; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.routeGrid { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 16px; margin-top: 12px; align-items: stretch; }
.routeSide { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.flip { display: flex; align-items: center; gap: 8px; background: rgba(8, 20, 44, .55); border: 2px solid #fff; border-radius: 9px; padding: 5px 6px; }
.flip > b, .flip > div { flex: 1; min-width: 0; text-align: center; }
.flip b { display: block; font-size: 17px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flip small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.flip button { flex: none; width: 38px; height: 34px; border: 2px solid var(--black); border-radius: 7px; background: var(--plateY); color: var(--black); font-size: 15px; font-weight: 900; cursor: pointer; box-shadow: 0 3px 0 var(--black); }
.flip button:hover { background: #ffe14d; } .flip button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--black); }
.flip.single button { visibility: hidden; }
.routeInfo { flex: 1; background: #fff; color: var(--black); border: 2px solid var(--black); border-radius: 8px; box-shadow: var(--lift); padding: 10px 12px; }
.routeInfo > b { display: block; font-size: 15px; font-weight: 900; line-height: 1.2; }
.routeInfo dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 9px 0 8px; font-size: 13px; }
.routeInfo dt { font-weight: 800; color: var(--sign); } .routeInfo dd { margin: 0; font-weight: 800; text-align: right; }
.routeInfo p { margin: 0; font-size: 12.5px; font-weight: 600; line-height: 1.35; color: #333; }
.routeSide button.primary { margin-top: 0; }
.routeMapWrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#routeMap { width: 100%; height: auto; display: block; border: 2px solid #fff; border-radius: 9px; background: #121820; }
@media (max-width: 700px) { .routeGrid { grid-template-columns: 1fr; } .routeMapWrap { order: -1; } }
@media (max-height: 520px) {
  .routeCard { padding: 8px 12px 10px; width: min(760px, 98vw); } .routeGrid { margin-top: 6px; gap: 10px; grid-template-columns: minmax(190px, 230px) minmax(0, 1fr); } .routeSide { gap: 6px; }
  #routeMap { height: calc(100vh - 128px); width: auto; max-width: 100%; margin: 0 auto; } .routeMapWrap { gap: 6px; }
  .flip { padding: 3px 4px; } .flip b { font-size: 14px; } .flip button { width: 32px; height: 28px; font-size: 13px; }
  .routeInfo { padding: 6px 9px; } .routeInfo > b { font-size: 13px; } .routeInfo dl { margin: 5px 0 4px; font-size: 12px; } .routeInfo p { display: none; } #routeCount { font-size: 16px; }
}
/* the route screen keeps the same backdrop as the main menu: the city itself, only lightly dimmed */
#routes { background: rgba(10, 14, 20, .28); }

/* route screen, second layout: city across the top, map on the left with the details beside it, the route list along the bottom */
.routeCard #cityFlip { margin-top: 12px; }
.routeGrid { grid-template-columns: minmax(0, 1fr) minmax(200px, 250px); margin-top: 12px; }
.routeGrid #routeMap { align-self: start; }
#routeList { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.rItem { text-align: left; padding: 8px 12px 6px; background: #d9e2f1; color: var(--black); border: 2px solid var(--black); border-radius: 8px; box-shadow: var(--lift); font-family: inherit; cursor: pointer; min-width: 0; }
.rItem b { display: block; font-size: 14.5px; font-weight: 900; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rItem span { display: block; font-size: 12px; font-weight: 800; color: var(--sign); margin-top: 2px; }
.rItem:hover { background: #fff; } .rItem:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--black); }
.rItem.on { background: #fff; box-shadow: var(--lift), inset 0 -6px 0 var(--plateY); }
/* a route not in the free version (data/registry.js FREE_ROUTES): a lock before its name, greyed */
.rItem.locked { background: #e6e9ef; color: #5d6472; } .rItem.locked.on { background: #f3f4f7; }
.rItem.locked em { color: #b3261e; }
.lockIc { width: 13px; height: 13px; fill: currentColor; vertical-align: -1px; margin-right: 5px; }
#routeOk.locked { background: #c9ced8; color: #4a5060; }
@media (max-width: 700px) { .routeGrid { grid-template-columns: 1fr; } }
@media (max-height: 520px) {
  .routeCard #cityFlip { margin-top: 5px; } .routeGrid { grid-template-columns: minmax(0, 1fr) minmax(180px, 220px); margin-top: 6px; }
  #routeMap { height: calc(100vh - 188px); width: auto; max-width: 100%; margin: 0 auto; }
  #routeList { margin-top: 7px; gap: 7px; } .rItem { padding: 4px 9px 3px; } .rItem b { font-size: 12.5px; } .rItem span { font-size: 10.5px; margin-top: 0; }
}
@media (max-height: 520px) { .routeGrid { grid-template-columns: auto minmax(180px, 1fr); } .routeGrid #routeMap { margin: 0; } }

/* ==== route screen, full width (the layout in use): a bar across the top with the city, the map filling the left,
   the list of routes down the right, key hints along the bottom. The city itself stays visible behind it. ==== */
#routes:not(.hidden) { display: flex; flex-direction: column; padding: 0; overflow: hidden; background: linear-gradient(180deg, rgba(8, 12, 20, .5), rgba(8, 12, 20, .32) 40%, rgba(8, 12, 20, .6)); }
.rsTop { flex: none; display: flex; align-items: center; gap: 16px; padding: 12px clamp(14px, 3vw, 44px) 11px; background: var(--sign); color: #fff; border-bottom: 3px solid #fff; box-shadow: 0 5px 0 var(--sign-dk); }
.rsTop h2 { margin: 0; font-size: 22px; font-weight: 900; white-space: nowrap; }
.rsTop .flip { margin: 0 0 0 auto; width: min(340px, 44vw); }
.rsBody { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 27vw, 360px); gap: clamp(10px, 1.6vw, 20px); padding: clamp(10px, 2vh, 20px) clamp(14px, 3vw, 44px) 6px; }
#routes #routeMap { width: 100%; height: 100%; max-width: none; margin: 0; min-height: 0; border: 3px solid #fff; border-radius: 12px; box-shadow: 0 0 0 2px var(--black), 0 6px 0 2px var(--black); background: #121820; }
.rsSide { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
#routes #routeList { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; margin: 0; overflow-y: auto; padding: 0 2px 6px 0; }
#routes .rItem { flex: none; padding: 9px 13px 8px; }
#routes .rItem b { font-size: 16px; white-space: normal; }
.rItem em, .rItem p { display: none; }
.rItem.on { box-shadow: var(--lift), inset 7px 0 0 var(--plateY); padding-left: 19px; }
.rItem.on em { display: block; margin-top: 6px; font-style: normal; font-size: 12.5px; font-weight: 800; }
.rItem.on p { display: block; margin: 4px 0 0; font-size: 12.5px; font-weight: 600; line-height: 1.35; color: #333; }
.rsSide button.primary { flex: none; margin-top: 0; }
.rsHints { flex: none; padding: 4px clamp(14px, 3vw, 44px) 12px; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.rsHints b { display: inline-block; margin-left: 14px; padding: 1px 6px 0; border: 1.5px solid rgba(255, 255, 255, .8); border-radius: 5px; font-weight: 800; }
.rsHints b:first-child { margin-left: 0; }
body.touch .rsHints { display: none; } body.touch .rsBody { padding-bottom: 12px; }
@media (max-width: 640px) { .rsBody { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; } #routes #routeList { flex-direction: row; overflow-x: auto; } #routes .rItem { min-width: 190px; } .rsTop h2 { display: none; } }
@media (max-height: 520px) {
  .rsTop { padding: 6px 14px 5px; gap: 10px; border-bottom-width: 2px; } .rsTop h2 { font-size: 16px; } .rsBody { padding: 8px 14px 8px; gap: 10px; grid-template-columns: minmax(0, 1fr) clamp(210px, 30vw, 270px); }
  #routes #routeList { gap: 6px; } #routes .rItem { padding: 5px 10px 4px; } #routes .rItem b { font-size: 13px; } .rItem.on { padding-left: 15px; } .rItem.on p { display: none; } .rItem.on em { margin-top: 2px; font-size: 11px; }
  .rsSide { gap: 7px; } .rsHints { display: none; }
}
#routes:not(.hidden) { align-items: stretch; justify-items: stretch; justify-content: flex-start; }      /* the bar and the body span the whole width */

/* ==== route screen, glass style: nothing boxed in - floating controls and frosted panels over the city ==== */
#routes:not(.hidden) { background: linear-gradient(180deg, rgba(6, 10, 18, .5), rgba(6, 10, 18, .12) 30%, rgba(6, 10, 18, .2) 65%, rgba(6, 10, 18, .55)); }
.rsTop { background: none; border: 0; box-shadow: none; padding: 16px clamp(14px, 3vw, 44px) 0; }
.rsTop h2 { font-size: 26px; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.rsTop .backBtn { padding: 9px 16px 7px 12px; font-size: 15px; }
#routes .flip { background: rgba(10, 16, 28, .5); border: 1px solid rgba(255, 255, 255, .28); border-radius: 14px; padding: 6px 7px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.rsBody { padding-top: 14px; align-items: stretch; }
#routes #routeMap { border: 0; box-shadow: none; border-radius: 18px; background: rgba(8, 14, 24, .46); -webkit-backdrop-filter: blur(10px) saturate(.9); backdrop-filter: blur(10px) saturate(.9); }
/* the routes and the Choose button sit in the bottom right corner */
.rsSide { justify-content: flex-end; gap: 10px; }
#routes #routeList { flex: 0 1 auto; gap: 8px; padding: 0; }
#routes .rItem { background: rgba(10, 16, 28, .52); color: #fff; border: 1px solid rgba(255, 255, 255, .24); border-radius: 12px; box-shadow: none; padding: 10px 14px 9px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .15s, border-color .15s; }
#routes .rItem:hover { background: rgba(20, 34, 58, .66); border-color: rgba(255, 255, 255, .5); }
#routes .rItem:active { transform: none; }
#routes .rItem span { color: #a9cbff; }
#routes .rItem.on { background: rgba(11, 78, 162, .78); border-color: #fff; box-shadow: inset 6px 0 0 var(--plateY); padding-left: 20px; }
#routes .rItem.on span { color: #fff; opacity: .9; }
#routes .rItem.on em { color: var(--plateY); }
#routes .rItem.on p { color: rgba(255, 255, 255, .9); }
.rsSide button.primary { border-radius: 12px; padding: 14px 12px 11px; font-size: 20px; }
.rsHints { padding-top: 8px; }
@media (max-height: 520px) { .rsTop { padding: 8px 14px 0; } .rsTop h2 { font-size: 17px; } .rsTop .backBtn { padding: 5px 11px 3px 8px; font-size: 12.5px; } .rsBody { padding-top: 8px; } #routes .rItem { padding: 5px 10px 4px; border-radius: 9px; } #routes .rItem.on { padding-left: 15px; } .rsSide button.primary { padding: 8px 10px 6px; font-size: 16px; border-radius: 9px; } }
#routes #routeMap { background: rgba(8, 14, 24, .6); }      /* a little darker, so the streets and names read clearly over the moving city */
/* the map has no panel at all: the streets and the route are drawn straight over the city */
#routes #routeMap { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }

/* ---- zooming the route map ---- */
.mapBox { position: relative; min-width: 0; min-height: 0; }
#routes #routeMap { position: absolute; inset: 0; touch-action: none; cursor: grab; }
#routes #routeMap.drag { cursor: grabbing; }
.mapZoom { position: absolute; left: 4px; bottom: 34px; display: flex; flex-direction: column; gap: 6px; }
.mapZoom button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 16, 28, .6); color: #fff; font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mapZoom button:hover { background: rgba(11, 78, 162, .8); border-color: #fff; }
@media (max-height: 520px) { .mapZoom { bottom: 26px; gap: 4px; } .mapZoom button { width: 32px; height: 32px; font-size: 17px; border-radius: 8px; } }
/* ---- route tiles: directly under the city selector (top right), larger; the chosen one blue, the others white ---- */
.rsTop .flip { width: clamp(260px, 29vw, 380px); }
.rsBody { grid-template-columns: minmax(0, 1fr) clamp(260px, 29vw, 380px); padding-top: 10px; }
.rsSide { justify-content: flex-start; gap: 12px; }
#routes #routeList { gap: 10px; }
#routes .rItem { background: #fff; color: var(--black); border: 2px solid var(--black); border-radius: 12px; box-shadow: 0 4px 0 rgba(0, 0, 0, .55); padding: 14px 18px 12px; -webkit-backdrop-filter: none; backdrop-filter: none; }
#routes .rItem b { font-size: 19px; }
#routes .rItem span { font-size: 14px; color: var(--sign); margin-top: 3px; }
#routes .rItem:hover { background: #fff6cf; border-color: var(--black); }
#routes .rItem.on { background: rgba(11, 78, 162, .92); color: #fff; border-color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .55), inset 7px 0 0 var(--plateY); padding-left: 24px; }
#routes .rItem.on span { color: #fff; }
#routes .rItem.on em { font-size: 14px; margin-top: 8px; } #routes .rItem.on p { font-size: 13.5px; margin-top: 5px; }
@media (max-height: 520px) {
  #routes .rItem { padding: 7px 12px 5px; border-radius: 9px; } #routes .rItem b { font-size: 14.5px; } #routes .rItem span { font-size: 11.5px; margin-top: 0; }
  #routes .rItem.on { padding-left: 17px; } #routes .rItem.on em { font-size: 11.5px; margin-top: 2px; } #routes #routeList { gap: 6px; } .rsSide { gap: 7px; } .rsBody { padding-top: 6px; }
}

/* ---- icons in the menu rows ---- */
.pIcon { flex: none; width: 22px; height: 22px; color: var(--sign); display: block; }
.pIconBox { flex: none; display: block; }
.pick small { width: 54px; }
.route.ex i.vi .pIcon { width: 26px; height: 26px; color: #fff; }
@media (max-height: 520px) { .pIcon { width: 18px; height: 18px; } .pick small { width: 48px; } .route.ex i.vi .pIcon { width: 20px; height: 20px; } }

/* "Start from" lives on the route screen, under the routes */
.startRow { display: block; margin: 0; }
.startRow label { text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
@media (max-height: 520px) { .startRow label { display: none; } }
/* the simple display keeps the round speed dial (preferred over the plain number), in the bottom right corner */
body.simple #gauge { display: block; }
body.simple #speedo { display: none; }
body.simple:not(.touch) #gauge { width: 204px; height: 145px; }
body.simple #limitImg { width: 60px; height: 60px; margin: 0 0 16px 2px; }
body.simple .ind { font-size: 26px; margin-bottom: 26px; }
@media (max-height: 520px) { body.simple:not(.touch) #gauge { width: 150px; height: 106px; } body.simple #limitImg { width: 44px; height: 44px; margin-bottom: 10px; } }

/* the sign card in the simple display: a quiet pill in the top right corner - the sign, then its name - that fades in
   with a slight slide and fades out; when the sign changes only the contents change (see Hud.signCard) */
body.simple #signCard {
  max-width: none; width: auto; padding: 0; gap: 8px; flex-direction: row;
  color: #fff; background: none; border: 0; border-radius: 0; box-shadow: none;
  animation: signIn .28s ease-out;
}
body.simple:not(.touch) #signCard { right: 16px; top: 14px; }
body.simple #signCard.leaving { animation: signOut .22s ease-in forwards; }
/* (no background at all: the sign itself, with a soft shadow so it stands out from the scene) */
body.simple #signCard img { width: 42px; height: 42px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
body.simple #signCard b { background: none; padding: 0; color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .75), 0 0 8px rgba(0, 0, 0, .35); }
body.simple #signLight { left: 34px; right: auto; top: -2px; width: 10px; height: 10px; }
@keyframes signIn { from { opacity: 0; transform: translateX(10px); } }
@keyframes signOut { to { opacity: 0; transform: translateX(10px); } }
@media (prefers-reduced-motion: reduce) { body.simple #signCard { animation: none; } body.simple #signCard.leaving { display: none; } }

body.simple:not(.touch) #bubble { max-width: min(500px, 38vw); }      /* clear of the dial and its indicator arrows */

/* the Start button closes the menu: choices first, then go */
.menuCard .picks { margin-top: 10px; }
#menuBody #startBtn { margin-top: 14px; }
@media (max-height: 520px) { #menuBody #startBtn { margin-top: 8px; } }

/* phones in landscape: the instructor's words stay compact (at most five lines; the voice says the whole sentence) */
@media (max-height: 520px) {
  body.simple.touch #bubble { top: 86px; max-width: 34vw; padding: 5px 9px 5px 8px; }
  body.simple.touch #bubbleText { font-size: 12px; line-height: 1.24; display: -webkit-box; -webkit-line-clamp: 5; line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---- handbook: signs & markings ---- */
.menuRow2 button.wide { grid-column: 1 / -1; margin-top: 0; }
.bookCard { width: min(900px, 96vw); max-height: 92vh; display: flex; flex-direction: column; padding: 16px 18px 12px; }
.bookBar { display: flex; gap: 10px; align-items: center; margin: 4px 0 2px; }
.bookBar .seg { flex: 0 1 320px; }
.bookBar input { flex: 1; min-width: 0; font: inherit; font-size: 14px; font-weight: 700; padding: 7px 10px 5px; border: 2px solid var(--black); border-radius: 6px; box-shadow: var(--lift); color: var(--black); }
#bookNote { margin: 8px 0 6px; }
#bookList { overflow-y: auto; padding: 2px 4px 10px 0; user-select: text; }
#bookList h3 { margin: 14px 0 7px; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
#bookList h3:first-child { margin-top: 2px; }
.bookGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 9px; }
.bookItem { display: flex; gap: 10px; align-items: flex-start; background: #fff; color: var(--black); border: 2px solid var(--black); border-radius: 7px; padding: 8px 10px 7px; }
.bookItem img { flex: none; width: 58px; height: 58px; object-fit: contain; }
.bookItem.mark img { width: 92px; height: 60px; object-fit: cover; border-radius: 4px; border: 1px solid #888; }
.bookItem div { min-width: 0; }
.bookItem b { display: block; font-size: 14px; font-weight: 900; line-height: 1.15; }
.bookItem small { display: block; font-size: 11.5px; font-weight: 700; color: var(--sign); margin: 1px 0 3px; }
.bookItem p { margin: 0; font-size: 12.5px; line-height: 1.3; color: #333; }
.bookItem em { display: inline-block; margin-top: 5px; font-style: normal; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #666; }
.bookItem em.seen { color: var(--green); }
@media (max-height: 520px) { .bookCard { padding: 9px 12px 8px; } .bookGrid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; } .bookItem img { width: 44px; height: 44px; } .bookItem.mark img { width: 70px; height: 46px; } .bookItem p { font-size: 11.5px; } }

/* live fault tally in the stats panel: dangerous / serious / minor so far, a count over its label in three equal
   columns (dimmed while zero; hidden in an exam) */
#stats .row.tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 6px; }
#stats .tally span { display: flex; flex-direction: column; align-items: center; padding: 2px 0 1px; border-radius: 6px; background: rgba(127, 127, 127, .12); opacity: .45; transition: opacity .3s; }
#stats .tally span.on { opacity: 1; }
#stats .tally b { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; line-height: 1.1; }
#stats .tally em { font-style: normal; }
#stats .tally small { font-size: 8.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; opacity: .85; }
#stats .tally i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
#stats .tally .crit i { background: #d4202b; } #stats .tally .ser i { background: #e8900c; } #stats .tally .min i { background: #e8c20c; }
#stats .tally span.on.crit { background: rgba(212, 32, 43, .18); }
#stats .tally span.bump { animation: tallyBump .5s ease-out; }
@keyframes tallyBump { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
#stats .row.tally.hidden { display: none; }
@media (max-height: 520px) { #stats .row.tally { margin-top: 4px; gap: 3px; } #stats .tally b { font-size: 12px; } #stats .tally small { font-size: 7.5px; } }

/* "ready to drive" checklist at the start, under the progress plate: the steps in order, ticked as they are done,
   the next one picked out in yellow; the first three can be tapped */
#prep { left: 16px; top: 200px; width: 248px; padding: 8px 10px 9px; pointer-events: auto; }
#prep .prepHead { display: flex; justify-content: space-between; align-items: baseline; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 5px; }
#prep .prepHead b { font-size: 16px; letter-spacing: 0; }
#prep.complete .prepHead b { color: var(--green); }
#prep ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
#prep li { display: flex; align-items: center; gap: 7px; padding: 3px 6px; border-radius: 6px; font-size: 12.5px; font-weight: 700; line-height: 1.2; border: 2px solid transparent; }
#prep li i { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid #9aa0a6; }
#prep li span { flex: 1; }
#prep li kbd { font: 800 11px var(--ui); min-width: 18px; text-align: center; padding: 1px 4px; border: 1.5px solid var(--black); border-radius: 4px; background: #f1f1ec; box-shadow: 0 1.5px 0 var(--black); margin-left: 3px; }
#prep li.done { opacity: .55; }
#prep li.done span { text-decoration: line-through; text-decoration-thickness: 1.5px; }
#prep li.done i { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2l2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E") center/100% no-repeat; }
#prep li.next { background: var(--plateY); border-color: var(--black); animation: prepPulse 1.4s ease-in-out infinite; }
#prep li.next i { border-color: var(--black); }
#prep li[data-act] { cursor: pointer; }
@keyframes prepPulse { 50% { box-shadow: 0 0 0 3px rgba(246, 197, 0, .45); } }
@media (max-height: 520px) { #prep { width: 220px; padding: 6px 8px; } #prep li { font-size: 11px; padding: 2px 5px; } #prep .prepHead { margin-bottom: 3px; } }

/* the mirror strip across the top of the screen (outside views): the direction sign and the toasts move down below it */
body.mirrorStrip #nav { top: calc(var(--mstrip, 120px) + 10px); }
body.mirrorStrip #toasts { top: calc(var(--mstrip, 120px) + 96px); }

/* ---- the instructor's chat: a small animated portrait on the left, half way down, with the messages as small
   see-through bubbles beside it (newest at the bottom, older ones fading back). Replaces the older note styles in
   every display (hence the #hud prefix). ---- */
#hud #bubble {
  left: calc(14px + env(safe-area-inset-left)); right: auto; top: auto; bottom: 30%; transform: none;      /* (grows upwards, clear of the map below) */
  max-width: min(360px, 34vw); padding: 0; gap: 8px; display: flex; align-items: flex-end;
  background: none; border: 0; border-radius: 0; box-shadow: none; animation: none; text-align: left; color: #fff;
}
#hud #bubble.hidden { display: none; }
#hud #avatar {
  display: block; width: 54px; height: 54px; flex: none; padding: 0; border: 2px solid rgba(255, 255, 255, .85); border-radius: 50%;
  overflow: hidden; background: none; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); animation: avBob 3.2s ease-in-out infinite; align-self: flex-end;
}
#avatar svg { width: 100%; height: 100%; display: block; }
#avatar .av-bg { fill: #2a64a8; } #avatar .av-skin { fill: #f1c6a2; } #avatar .av-shirt { fill: #1b3e6e; } #avatar .av-collar { fill: #f6c500; }
#avatar .av-hair, #avatar .av-hairback { fill: #6b3f26; } #avatar .av-hairshort { fill: #8d939b; display: none; }
#avatar .av-eyes { fill: #23262b; transform-origin: 32px 31px; animation: avBlink 4.6s infinite; }
#avatar .av-brows { fill: none; stroke: #4a2b1a; stroke-width: 1.3; stroke-linecap: round; }
#avatar .av-smile { fill: none; stroke: #8a3b2c; stroke-width: 1.4; stroke-linecap: round; }
#avatar .av-mouth { fill: #7a2a22; opacity: 0; transform-origin: 32px 38.5px; }
#avatar .av-tie, #avatar .av-glasses { display: none; }
#avatar .av-glasses { fill: none; stroke: #2a2d33; stroke-width: 1.2; }
/* talking: the open mouth moves, the smile line gives way to it */
#bubble.talking #avatar .av-mouth { opacity: 1; animation: avTalk .32s ease-in-out infinite alternate; }
#bubble.talking #avatar .av-smile { opacity: 0; }
/* the examiner: short grey hair, glasses, a tie, a grey suit */
#bubble.examiner #avatar .av-bg { fill: #4b5563; } #bubble.examiner #avatar .av-shirt { fill: #2b2f36; } #bubble.examiner #avatar .av-collar { fill: #e9ecef; }
#bubble.examiner #avatar .av-hair, #bubble.examiner #avatar .av-hairback { display: none; } #bubble.examiner #avatar .av-hairshort { display: block; }
#bubble.examiner #avatar .av-tie { display: block; fill: #9b1c24; } #bubble.examiner #avatar .av-glasses { display: block; }
#bubble.examiner #avatar .av-brows { stroke: #6b7077; }
@keyframes avBob { 50% { transform: translateY(-2px); } }
@keyframes avBlink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes avTalk { from { transform: scaleY(.35); } to { transform: scaleY(1.25); } }

#hud #chat { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
#hud #insName { display: block; margin: 0 0 0 6px; color: rgba(255, 255, 255, .78); font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
#hud #bubbleText { display: none; }
#chatList { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
#chatList .msg {
  --tone: 255, 255, 255;                                   /* the kind's colour (label, glow), set per kind below */
  position: relative; max-width: 100%; padding: 7px 12px 8px; border-radius: 16px 16px 16px 6px;
  background: linear-gradient(180deg, rgba(26, 32, 46, .66), rgba(12, 16, 24, .52));
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 6px 16px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
  color: #fff; transition: opacity .3s, transform .3s; transform-origin: left bottom; animation: msgIn .26s ease-out;
}
#chatList .msg .txt { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.32; letter-spacing: .005em; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
/* what kind of message: a small coloured label over the text */
#chatList .msg .kind { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 3px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--tone)); }
#chatList .msg .kind i { font-style: normal; display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; font-size: 9.5px; letter-spacing: 0; color: #101318; background: rgb(var(--tone)); }
#chatList .msg.good { --tone: 72, 222, 120; } #chatList .msg.minor { --tone: 245, 186, 66; } #chatList .msg.serious { --tone: 255, 140, 66; }
#chatList .msg.critical { --tone: 255, 96, 84; background: linear-gradient(180deg, rgba(96, 20, 18, .72), rgba(60, 12, 10, .6)); border-color: rgba(255, 96, 84, .45); }
#chatList .msg.nav { --tone: 110, 176, 255; } #chatList .msg.tip { --tone: 255, 214, 92; }
#chatList .msg.old { opacity: .62; transform: scale(.93); }
#chatList .msg.leaving { opacity: 0; transform: translateX(-8px); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@media (max-height: 520px) { #hud #avatar { width: 40px; height: 40px; } #chatList .msg { padding: 5px 9px 6px; } #chatList .msg .txt { font-size: 11.5px; } #hud #bubble { max-width: 38vw; } }
@media (prefers-reduced-motion: reduce) { #hud #avatar, #avatar .av-eyes, #bubble.talking #avatar .av-mouth, #chatList .msg { animation: none; } }

/* ---- soft game skin ----
   Same two materials (blue sign panels, white and yellow plates), drawn softer: rounder corners, a gentle gradient,
   a chunky bottom edge in a darker shade of the button's own colour instead of a hard black one, and a soft shadow.
   Buttons lift a little on hover and press down on click. */
:root {
  --edgeY: #b88d00;     /* bottom edge of a yellow button */
  --edgeW: #b4c0d4;     /* bottom edge of a white button */
  --edgeB: #062c5e;     /* bottom edge of a blue panel */
  --navy: #13284f;      /* text on white plates */
  --drop: 0 10px 18px rgba(3, 12, 32, .28);
  --softW: inset 0 2px 0 rgba(255, 255, 255, .9), 0 5px 0 var(--edgeW), var(--drop);
  --softY: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(150, 110, 0, .18), 0 6px 0 var(--edgeY), var(--drop);
}
.overlay { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#menu { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* sign panels: the white rim and blue outer ring stay, rounder and lit from above */
.signpanel { border-radius: 28px; border: 4px solid #fff;
  background: radial-gradient(130% 70% at 50% 0%, #1d6bcc 0%, var(--sign) 55%, #0a4590 100%);
  box-shadow: 0 0 0 5px var(--sign), 0 12px 0 5px var(--edgeB), 0 26px 44px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .22); }
.sheet { border: 0; border-radius: 26px; color: var(--navy);
  background: linear-gradient(180deg, #fff 0%, #f2f5fa 100%);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .55), 0 10px 0 var(--edgeW), 0 28px 50px rgba(0, 0, 0, .45); }
.sheet h2 { color: var(--sign); }
.card.small { width: 340px; padding: 24px 24px 22px; }

/* every button: chunky, rounded, presses down */
button.primary, button.ghost, button.gear, .backBtn, .flip button, select, .route, .rItem, #routes .rItem {
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, background-color .12s ease; }
button.primary { border: 0; border-radius: 18px; padding: 15px 14px 13px; font-size: 20px; color: #2a1d00;
  background: linear-gradient(180deg, #ffe36b 0%, var(--plateY) 52%, #ecb900 100%);
  box-shadow: var(--softY); text-shadow: 0 1px 0 rgba(255, 255, 255, .45); }
button.primary:hover { background: linear-gradient(180deg, #ffe97f 0%, #ffd11a 52%, #f2c000 100%); transform: translateY(-2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 8px 0 var(--edgeY), 0 14px 22px rgba(3, 12, 32, .3); }
button.primary:active { transform: translateY(5px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 1px 0 var(--edgeY), 0 3px 6px rgba(3, 12, 32, .25); }
.rsSide button.primary { border-radius: 18px; }

button.ghost, .backBtn, button.gear { border: 0; border-radius: 15px; color: var(--navy);
  background: linear-gradient(180deg, #fff 0%, #edf1f7 100%); box-shadow: var(--softW); }
button.ghost { padding: 11px 10px 9px; }
button.ghost:hover, .backBtn:hover, button.gear:hover { background: linear-gradient(180deg, #fff 0%, #fff6cf 100%); transform: translateY(-2px);
  box-shadow: inset 0 2px 0 #fff, 0 7px 0 var(--edgeW), 0 14px 22px rgba(3, 12, 32, .3); }
button.ghost:active, .backBtn:active, button.gear:active { transform: translateY(4px); box-shadow: inset 0 2px 0 #fff, 0 1px 0 var(--edgeW), 0 3px 6px rgba(3, 12, 32, .25); }
.sheet button.ghost { background: linear-gradient(180deg, #f4f7fc 0%, #e4eaf3 100%); }
button.gear { border-radius: 999px; padding: 7px 13px 5px 9px; }
.backBtn { border-radius: 999px; padding: 8px 16px 6px 12px; }
.menuRow2 button.ghost { border-radius: 14px; }

/* the route / licence / mode rows: one rounded white plate */
.picks { border: 0; border-radius: 18px; box-shadow: var(--softW); }
.pick { border-top-color: #e3e8f0; }
button.pick { transition: background-color .12s ease; }
button.pick:active { background: #ffefaa; }

/* segmented choice: a sunken pill track with a raised pill for the choice */
.seg { border: 0; border-radius: 999px; padding: 3px; gap: 3px; background: rgba(4, 22, 58, .35); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25); }
.seg button { border: 0 !important; border-radius: 999px; padding: 7px 10px 5px; transition: background-color .12s ease, color .12s ease, box-shadow .12s ease; }
.seg button.on { background: linear-gradient(180deg, #fff 0%, #e9eef6 100%); box-shadow: 0 3px 0 var(--edgeW), 0 4px 8px rgba(0, 0, 0, .2); }
.pick .seg { background: #e6ebf3; box-shadow: inset 0 2px 3px rgba(10, 30, 70, .14); }
.pick .seg button.on { background: linear-gradient(180deg, #1d6bcc 0%, var(--sign) 100%); color: #fff; box-shadow: 0 3px 0 var(--edgeB), 0 4px 8px rgba(0, 0, 0, .2); }
.seg.wrap { background: none; box-shadow: none; padding: 0; gap: 6px; }
.seg.wrap button { border: 2px solid rgba(255, 255, 255, .7) !important; }
.seg.wrap button.on { border-color: #fff !important; }

/* dropdowns, route and licence rows: rounded white plates with a soft edge */
select { border: 0; border-radius: 14px; color: var(--navy); box-shadow: var(--softW); padding: 10px 30px 8px 13px; background-position: right 12px center; }
select:hover { background-color: #fff6cf; }
select:active { transform: translateY(4px); box-shadow: inset 0 2px 0 #fff, 0 1px 0 var(--edgeW); }
.route, .rItem, #routes .rItem { border: 0; border-radius: 16px; color: var(--navy); box-shadow: var(--softW); }
.route:hover, .rItem:hover { transform: translateY(-1px); }
.route:active, .rItem:active { transform: translateY(4px); box-shadow: inset 0 2px 0 #fff, 0 1px 0 var(--edgeW); }
.route.on, .route.ex.sel, .route.ex:hover, .rItem.on, #routes .rItem.on { box-shadow: var(--softW), inset 0 0 0 3px var(--plateY), inset 10px 0 0 var(--plateY); }
.routeInfo { border: 0; border-radius: 16px; color: var(--navy); box-shadow: var(--softW); }

/* city flip: yellow pill arrows */
.flip { border-radius: 18px; }
.flip button { border: 0; border-radius: 12px; color: #2a1d00; background: linear-gradient(180deg, #ffe36b 0%, var(--plateY) 60%, #ecb900 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 var(--edgeY); }
.flip button:hover { transform: translateY(-1px); }
.flip button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edgeY); }
.mapZoom button { border-radius: 14px; }

/* keys and the number plate: softer edges, same shapes */
kbd { border: 0; border-radius: 7px; color: var(--navy); background: linear-gradient(180deg, #fff 0%, #e9eef6 100%); box-shadow: 0 0 0 1.5px #c9d2e0, 0 3px 0 var(--edgeW); padding: 2px 7px 0; }
.numberplate { border-radius: 9px; box-shadow: 0 5px 0 rgba(0, 0, 0, .55), 0 9px 16px rgba(0, 0, 0, .25); }
.bookBar input { border: 0; border-radius: 999px; padding: 9px 14px 7px; box-shadow: inset 0 2px 4px rgba(10, 30, 70, .18), 0 0 0 2px rgba(255, 255, 255, .8); }

/* dialogs pop in */
@keyframes popIn { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.overlay:not(.hidden) > .card { animation: popIn .22s cubic-bezier(.2, .9, .3, 1.2); }
@media (prefers-reduced-motion: reduce) { .overlay:not(.hidden) > .card { animation: none; } button, select, .route, .rItem { transition: none !important; } }

/* ---- the progress panel as a car's instrument cluster ----
   A dark, glossy panel set in a metal rim, turned a little towards the driver; glowing digits; the bars are lit LED
   strips sunk into the panel; the three fault counts are warning lamps that light up. --lvl = the main gauge colour. */
body #stats, body.simple #stats {
  --lvl: #38e07b;
  color: #e6eefb; border: 0; border-radius: 18px; padding: 10px 13px 11px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -25%, rgba(130, 175, 255, .18), transparent 62%),
    linear-gradient(180deg, #2b323d 0%, #171c24 52%, #0d1117 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 0 rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .05),
    0 0 0 2px #59616e, 0 0 0 3.5px #0a0d12, 0 5px 0 3px #06080b, 0 14px 26px rgba(0, 0, 0, .45);
  transform: perspective(700px) rotateY(9deg) rotateX(2deg); transform-origin: left center;
}
#stats::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(158deg, rgba(255, 255, 255, .11) 0%, rgba(255, 255, 255, .03) 36%, transparent 37%); }
#stats .lbl, body.simple #stats .lbl { color: #8ea2c0; opacity: 1; line-height: 1.2; align-self: center; }
#scoreVal, body.simple #scoreVal { color: var(--lvl); font-variant-numeric: tabular-nums; letter-spacing: .01em;
  text-shadow: 0 0 10px color-mix(in srgb, var(--lvl) 70%, transparent), 0 0 2px color-mix(in srgb, var(--lvl) 90%, #fff); transition: color .4s; }
#stats .row.small { color: #c9d6ea; }
#stats .row.small b, #roadName { color: #fff; }
#progText { font-variant-numeric: tabular-nums; }
/* bars: a dark slot with a lit, segmented strip in it */
#stats .bar, body.simple #stats .bar { height: 11px; border: 0; border-radius: 6px; padding: 2px; margin-top: 6px; background: #04060a;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .09); }
#stats .bar.thin, body.simple #stats .bar.thin { height: 8px; margin-top: 7px; }
#stats .bar i { border-radius: 4px; background-image: repeating-linear-gradient(90deg, transparent 0 7px, rgba(4, 6, 10, .8) 7px 9px), linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 60%);
  box-shadow: 0 0 8px color-mix(in srgb, var(--lvl) 75%, transparent); transition: width .4s, background-color .4s; }
#stats #progBar { background-color: #4da3ff; background-image: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 60%); box-shadow: 0 0 7px rgba(77, 163, 255, .7); }
/* fault counts: three warning lamps, dark until there is something to count */
#stats .tally span { background: rgba(0, 0, 0, .38); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .07); border-radius: 8px; opacity: .6; padding: 3px 0 2px; }
#stats .tally span.on { opacity: 1; }
#stats .tally span:not(.on) i { background: #353c47; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .7); }
#stats .tally i { width: 8px; height: 8px; }
#stats .tally span.on.crit i { background: #ff3b3b; box-shadow: 0 0 7px 1px #ff3b3b; }
#stats .tally span.on.ser i { background: #ff9a1f; box-shadow: 0 0 7px 1px #ff9a1f; }
#stats .tally span.on.min i { background: #ffd21f; box-shadow: 0 0 7px 1px #ffd21f; }
#stats .tally span.on.crit { background: rgba(255, 59, 59, .16); }
#stats .tally span.on.crit em { color: #ff6b6b; text-shadow: 0 0 8px rgba(255, 59, 59, .7); }
#stats .tally small { color: #8ea2c0; }
/* a special manoeuvre has no route: no distance to show */
body.spot #stats .row.small:not(:nth-child(3)), body.spot #stats .bar.thin { display: none; }
@media (prefers-reduced-motion: reduce) { body #stats, body.simple #stats { transform: none; } }

/* ---- the map and the speed dial, matching the cluster ----
   The dial is now a whole round instrument (its canvas is 240 x 220, drawn at twice that). The map sits in the same
   metal rim, with the cluster's dark outer ring and depth, and a glass reflection over it. */
#gauge { width: 240px; height: 220px; }
body.simple:not(.touch) #gauge { width: 204px; height: 187px; }
@media (max-height: 520px) { body.simple:not(.touch) #gauge { width: 150px; height: 137px; } }
#mapWrap, body.simple:not(.touch) #mapWrap {
  border: 0; padding: 5px;
  background: linear-gradient(170deg, #cfd5de 0%, #6b7380 35%, #262b33 70%, #7d8592 100%);
  box-shadow: 0 0 0 1.5px #0a0d12, 0 5px 0 1.5px #06080b, 0 14px 26px rgba(0, 0, 0, .45);
}
#minimap { border-radius: 50%; }
#mapWrap::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .75), inset 0 0 0 2px #07090d;
  background: radial-gradient(ellipse 70% 45% at 38% 18%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 70%); }
@media (max-height: 520px) { #mapWrap, body.simple:not(.touch) #mapWrap { padding: 3px; } #mapWrap::after { inset: 3px; } }

/* ---- the mini-map: a flat, see-through rounded panel; the street behind it shows through, a little blurred ---- */
#mapWrap, body.simple:not(.touch) #mapWrap {
  padding: 0; border: 1px solid rgba(255, 255, 255, .28); border-radius: 26px; overflow: hidden; transform: none;
  background: rgba(10, 16, 26, .18); -webkit-backdrop-filter: blur(6px) saturate(1.2); backdrop-filter: blur(6px) saturate(1.2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .18); filter: none;
}
#minimap { border-radius: 0; }
#mapWrap::after { display: none; }
@media (max-height: 520px) { #mapWrap, body.simple:not(.touch) #mapWrap { border-radius: 18px; } }

/* ---- pause: a game pause screen ----
   No card: the drive stays behind, dimmed and blurred with a dark vignette; a big glowing title, where you are and how
   it is going as small chips, a big yellow Resume, the other choices as dark glass buttons with icons, and the
   map-report link quietly at the bottom. */
#pause { background: radial-gradient(ellipse at 50% 45%, rgba(6, 12, 22, .35) 0%, rgba(4, 8, 16, .82) 100%);
  -webkit-backdrop-filter: blur(7px) saturate(1.1); backdrop-filter: blur(7px) saturate(1.1); }
.pauseCard { width: min(380px, 92vw); padding: 0; background: none; border: 0; box-shadow: none; text-align: center; color: #fff; overflow: visible; }
.pauseCard h2 { margin: 0; font-size: 46px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #fff; line-height: 1;
  text-shadow: 0 0 22px rgba(80, 170, 255, .55), 0 3px 0 rgba(0, 0, 0, .35); }
#pauseInfo { margin: 10px 0 0; font-size: 14px; font-weight: 700; color: #c9d6ea; font-variant-numeric: tabular-nums; }
#pauseInfo:empty { display: none; }
#pauseChips { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
#pauseChips:empty { display: none; }
#pauseChips span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 4px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #e6eefb; }
#pauseChips span b { font-weight: 900; color: var(--c, #fff); text-shadow: 0 0 8px color-mix(in srgb, var(--c, #fff) 60%, transparent); }
.bIcon { width: 20px; height: 20px; flex: none; }
.pauseCard button.primary { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; font-size: 22px; padding: 16px 18px 14px; border-radius: 20px; }
.pauseCard button.primary .bIcon { width: 22px; height: 22px; }
.pauseCard kbd { margin-left: auto; background: rgba(0, 0, 0, .14); color: inherit; box-shadow: none; border: 1px solid currentColor; opacity: .55; font-size: 11px; padding: 2px 7px 1px; border-radius: 6px; }
.pauseCard button.primary span { flex: 1; } .pauseCard button.primary .bIcon, .pauseCard button.primary kbd { width: 34px; }
.pauseCard button.primary kbd { margin-left: auto; }
.pauseList { display: grid; gap: 10px; margin-top: 14px; }
.pauseBtn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px 11px; border-radius: 16px; cursor: pointer; text-align: left;
  font: 800 15px var(--ui); color: #eef3fb; background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 16px rgba(0, 0, 0, .25);
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease, box-shadow .12s ease; }
.pauseBtn .bIcon { color: #7cc4ff; }
.pauseBtn kbd { margin-left: auto; }
.pauseBtn:hover { transform: translateX(4px); border-color: rgba(124, 196, 255, .7); background: linear-gradient(180deg, rgba(124, 196, 255, .24), rgba(124, 196, 255, .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 0 3px rgba(124, 196, 255, .14), 0 8px 18px rgba(0, 0, 0, .3); }
.pauseBtn:active { transform: translateX(4px) scale(.98); }
#endBtn .bIcon { color: #ffb34d; }
.linkBtn { display: inline-block; margin-top: 16px; padding: 6px 10px; background: none; border: 0; cursor: pointer; font: 700 12px var(--ui); color: rgba(220, 230, 245, .65);
  text-decoration: underline; text-underline-offset: 3px; }
.linkBtn:hover { color: #fff; }
.pauseCard #posText { background: rgba(0, 0, 0, .45); color: #e6eefb; border: 1px solid rgba(255, 255, 255, .2); }
body.touch .pauseCard kbd { display: none; }
@media (max-height: 520px) {
  .pauseCard h2 { font-size: 30px; } .pauseCard button.primary { margin-top: 12px; font-size: 18px; padding: 10px 14px 8px; }
  .pauseList { gap: 6px; margin-top: 8px; } .pauseBtn { padding: 8px 12px 6px; font-size: 13.5px; } #pauseChips { margin-top: 6px; } .linkBtn { margin-top: 6px; }
}

/* ---- loading screen ----
   The city's map fills the screen (drawn on #bootMap, fading in once the streets are loaded) under a dark vignette,
   the route drawing itself in is the progress; the number plate at the top (pulsing until the map is there); the
   city and route at the bottom. */
#boot { position: fixed; inset: 0; z-index: 60; overflow: hidden; color: #fff; transition: opacity .6s ease;
  background: radial-gradient(ellipse 120% 80% at 50% 40%, #142846 0%, #0a1426 55%, #05080f 100%); }
#boot.done { opacity: 0; pointer-events: none; }
#bootMap { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(1.04); transition: opacity .8s ease, transform 1.6s ease; }
#bootMap.on { opacity: 1; transform: none; }
#boot::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 55%, rgba(4, 7, 13, .75) 100%), linear-gradient(to top, rgba(4, 7, 13, .9) 0, transparent 26%); }
.bootPlate { position: absolute; z-index: 1; left: 50%; top: max(20px, 5vh); transform: translateX(-50%) scale(1.25); transform-origin: 50% 0;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .55), 0 0 40px rgba(246, 197, 0, .25); }
.bootBottom { position: absolute; z-index: 1; left: 50%; bottom: max(22px, 6vh); transform: translateX(-50%); width: min(560px, calc(100% - 32px)); }
@keyframes bootPulse { 50% { box-shadow: 0 5px 0 rgba(0, 0, 0, .55), 0 0 60px rgba(246, 197, 0, .55); } }
#boot:not(.mapped):not(.failed) .bootPlate { animation: bootPulse 1.6s ease-in-out infinite; }
#bootCity { text-align: center; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #c9d6ea; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
/* the stage, for screen readers only; shown when loading fails */
#loading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
#boot.failed #loading { position: static; width: auto; height: auto; clip: auto; white-space: normal; margin: 12px 0 0; font-size: 14px; font-weight: 700; color: #ffb3b3; text-align: center; }
#bootRetry { width: auto; margin: 14px auto 0; padding: 12px 28px 10px; }
@media (prefers-reduced-motion: reduce) { #boot .bootPlate { animation: none !important; } }
/* the futuristic layer: a faint neon grid behind the map, HUD corner brackets, and the route's name as a
   spaced-out monospace read-out */
#boot { background:
  linear-gradient(rgba(56, 208, 255, .055) 1px, transparent 1px) 0 0 / 44px 44px,
  linear-gradient(90deg, rgba(56, 208, 255, .055) 1px, transparent 1px) 0 0 / 44px 44px,
  radial-gradient(ellipse 120% 80% at 50% 40%, #0f2240 0%, #08111f 55%, #03060c 100%); }
.bootFrame { position: absolute; inset: 18px; z-index: 1; pointer-events: none; opacity: .75; --c: rgba(56, 208, 255, .85);
  background:
    linear-gradient(var(--c), var(--c)) top left / 26px 2px no-repeat, linear-gradient(var(--c), var(--c)) top left / 2px 26px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 26px 2px no-repeat, linear-gradient(var(--c), var(--c)) top right / 2px 26px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 26px 2px no-repeat, linear-gradient(var(--c), var(--c)) bottom left / 2px 26px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 26px 2px no-repeat, linear-gradient(var(--c), var(--c)) bottom right / 2px 26px no-repeat; }
#bootCity { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 11.5px; font-weight: 700; letter-spacing: .2em; color: #7fe6ff;
  text-shadow: 0 0 10px rgba(56, 208, 255, .6); }
#boot.mapped #bootCity::after { content: '_'; margin-left: .2em; animation: bootCaret 1s steps(1) infinite; }
@keyframes bootCaret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #boot.mapped #bootCity::after { animation: none; } }

/* ---- main menu: room to breathe ----
   The choices (route, licence, mode) as roomier rows, then the start button right under them as the one thing to
   press, then the other ways in (practise, demo, signs) as a row of light glass tiles, and quiet small print. */
.menuCard { width: min(400px, 94vw); padding: 20px 22px 18px; }
.menuCard .brand { margin-bottom: 4px; }
.menuCard .picks { margin-top: 16px; }
.menuCard .pick { padding: 12px 14px 11px; gap: 12px; }
.menuCard .pick.modeRow { padding: 9px 10px 9px 14px; }
.menuCard .pick b { font-size: 14.5px; }
#modeNote { margin: 10px 4px 0; font-size: 11.5px; opacity: .72; }
#menuBody #startBtn { margin-top: 18px; }
.menuTiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 16px; cursor: pointer;
  font: 800 12.5px var(--ui); color: #eaf2ff; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); transition: transform .12s ease, background-color .12s ease, border-color .12s ease; }
.tile .tIcon { width: 22px; height: 22px; color: #ffe36b; }
.tile:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .17); border-color: rgba(255, 255, 255, .45); }
.tile:active { transform: translateY(1px); }
#best { margin-top: 14px; text-align: center; font-size: 11px; opacity: .65; }
#best:empty { display: none; }
@media (max-height: 520px) {
  .menuCard { padding: 10px 14px 9px; }
  .menuCard .picks { margin-top: 8px; } .menuCard .pick { padding: 6px 10px 5px; } .menuCard .pick.modeRow { padding: 4px 6px 4px 10px; }
  #menuBody #startBtn { margin-top: 9px; }
  .menuTiles { margin-top: 8px; gap: 6px; } .tile { flex-direction: row; justify-content: center; padding: 6px 4px 5px; font-size: 11.5px; } .tile .tIcon { width: 16px; height: 16px; }
  #best { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }

/* ---- digital speed readout, bottom centre ----
   Replaces the round dial in every view: a dark glossy panel like the instrument cluster with the speed as a big
   glowing number, the unit and the gear beside it, and a lit bar under it that fills towards the limit (the marker)
   - amber just below the limit, red over it. The limit sign sits to its right and the indicator arrows either side. */
#hud #dash, body.simple:not(.touch) #dash, body.incar #dash, body.touch.incar #dash {
  left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); transform-origin: bottom center; align-items: center; gap: 14px; }
#hud #gauge { display: none !important; }
#hud #speedo, body.simple #speedo { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 196px; padding: 10px 18px 12px; border: 0; border-radius: 22px; color: #fff;
  background: radial-gradient(120% 90% at 50% -20%, rgba(130, 175, 255, .18), transparent 62%), linear-gradient(180deg, rgba(43, 50, 61, .92) 0%, rgba(13, 17, 23, .92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 0 rgba(0, 0, 0, .5), 0 0 0 2px #59616e, 0 0 0 3.5px #0a0d12, 0 5px 0 3px #06080b, 0 14px 26px rgba(0, 0, 0, .45); }
#speedo .spdTop { display: flex; align-items: center; justify-content: center; gap: 10px; }
#hud #spdNum { font-size: 58px; font-weight: 900; line-height: .9; min-width: 2.1ch; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  color: #fff; text-shadow: 0 0 14px rgba(120, 210, 255, .55); transition: color .2s, text-shadow .2s; }
#speedo .spdSide { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
#hud #spdUnit { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9fb4d6; opacity: 1; }
#hud #spdGear { font-style: normal; font-size: 13px; font-weight: 900; line-height: 1; padding: 3px 7px 2px; border-radius: 6px; white-space: nowrap;
  color: #2a1d00; background: #f6c500; box-shadow: 0 0 10px rgba(246, 197, 0, .45); }
#spdBar { position: relative; height: 10px; padding: 2px; border-radius: 6px; background: #04060a; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .09); }
#spdFill { display: block; height: 100%; width: 0; border-radius: 4px; background-color: #38d0ff; transition: width .15s linear, background-color .25s;
  background-image: repeating-linear-gradient(90deg, transparent 0 7px, rgba(4, 6, 10, .8) 7px 9px), linear-gradient(180deg, rgba(255, 255, 255, .4), transparent 60%); box-shadow: 0 0 8px rgba(56, 208, 255, .6); }
#spdLim { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8); }
#speedo.near #spdFill { background-color: #ffae2e; box-shadow: 0 0 8px rgba(255, 174, 46, .7); }
#hud #speedo.over #spdNum { color: #ff5a4d; text-shadow: 0 0 16px rgba(255, 74, 61, .8); animation: spdOver .6s ease-in-out infinite alternate; }
#speedo.over #spdFill { background-color: #ff4a3d; box-shadow: 0 0 10px rgba(255, 74, 61, .8); }
@keyframes spdOver { to { opacity: .72; } }
#hud #limitImg, body.simple #limitImg { width: 62px; height: 62px; margin: 0; }
#hud .ind, body.simple .ind { margin: 0; font-size: 28px; }
@media (max-height: 520px) {
  #hud #dash, body.simple:not(.touch) #dash, body.incar #dash, body.touch.incar #dash { bottom: 6px; transform: translateX(-50%) scale(.78); }
}
@media (prefers-reduced-motion: reduce) { #hud #speedo.over #spdNum { animation: none; } }

/* the speed-limit sign on its own in the bottom-right corner (the speed itself is in the middle); on touch screens,
   where the pedals are in that corner, just under the map in the top right */
#hud #limitImg, body.simple #limitImg { right: 18px; bottom: 18px; width: 78px; height: 78px; margin: 0; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
body.touch #hud #limitImg { bottom: auto; top: 240px; right: calc(16px + env(safe-area-inset-right)); width: 62px; height: 62px; }
@media (max-height: 520px) {
  #hud #limitImg, body.simple #limitImg { width: 54px; height: 54px; right: 12px; bottom: 10px; }
  body.touch #hud #limitImg { top: 124px; bottom: auto; width: 46px; height: 46px; }
}

/* in the driver-seat view of a car, the car's own instrument cluster shows the speed: the on-screen panel steps aside */
body.incar-cluster #hud #dash { display: none; }

/* report footer: both buttons the same height; slimmer on short (landscape phone) screens so the notes keep room */
#result .formbtns { align-items: stretch; }
#result .formbtns button { margin: 0; }
@media (max-height: 520px) {
  #result .formbtns button { padding: 7px 10px 5px; font-size: 15px; }
  #result .formrow { margin-bottom: 4px; }
}

/* ---- the speedometer: a dial, round over the top and flat along the bottom (drawn in src/engine/hud.js, gauge) - a ring of ticks lit green to the speed, red
   past the limit, and the speed in seven-segment digits in the middle - in place of the digital panel, in every view */
#hud #gauge, body.simple #gauge { display: block !important; width: 150px; height: 116px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
#hud #speedo, body.simple #speedo { display: none !important; }
@media (max-height: 520px) { #hud #gauge, body.simple #gauge { width: 132px; height: 102px; } }
/* (its flat bottom on the bottom edge of the screen) */
#hud #dash, body.simple:not(.touch) #dash, body.incar #dash, body.touch.incar #dash { bottom: 0; align-items: flex-end; }
#hud #gauge, body.simple #gauge { height: auto; filter: drop-shadow(0 -2px 10px rgba(0, 0, 0, .45)); }
#hud .ind, body.simple .ind { margin-bottom: 30px; }
@media (max-height: 520px) {
  #hud #dash, body.simple:not(.touch) #dash, body.incar #dash, body.touch.incar #dash { bottom: 0; }
  #hud #gauge, body.simple #gauge { height: auto; }
  #hud .ind, body.simple .ind { margin-bottom: 22px; }
}

/* ---- the speed-limit sign in the corner: smaller ---- */
#hud #limitImg, body.simple #limitImg { width: 56px; height: 56px; }
body.touch #hud #limitImg { width: 46px; height: 46px; }

/* ---- phones (a short landscape screen): the road comes first. The getting-ready checklist is left out (the instructor
   says each step, and the look and indicator buttons are there), the instructor shows as the portrait alone (the
   voice says it; it still moves its mouth when speaking), and the big blue direction sign in the middle is left out
   (the voice, the arrows on the road and the map give the way) ---- */
@media (max-height: 520px) {
  #hud #limitImg, body.simple #limitImg { width: 40px; height: 40px; }
  body.touch #hud #limitImg { width: 36px; height: 36px; }
  #hud #prep { display: none !important; }
  #hud #nav { display: none !important; }
  #hud #chat { display: none !important; }
  #hud #avatar { width: 40px; height: 40px; }
}
@media (max-height: 520px) {
  /* (on a touch phone, beside the map: below it are the horn, view and pause buttons) */
  body.touch #hud #limitImg { top: 12px; right: calc(124px + env(safe-area-inset-right)); }
}
/* (on any touch screen, the limit sign beside the map, not under it where the horn, view and pause buttons are) */
body.touch #hud #limitImg { top: 16px; bottom: auto; right: calc(232px + env(safe-area-inset-right)); }
@media (max-height: 520px) { body.touch #hud #limitImg { top: 12px; right: calc(124px + env(safe-area-inset-right)); } }

/* ---- the speed-limit sign as a small badge on the map's rim (placed there by src/engine/hud.js, placeLimit) ---- */
#hud #limitImg.onMap, body.simple #limitImg.onMap, body.touch #hud #limitImg.onMap { width: 36px; height: 36px; margin: 0; z-index: 3; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55)); }
@media (max-height: 520px) { #hud #limitImg.onMap, body.simple #limitImg.onMap, body.touch #hud #limitImg.onMap { width: 28px; height: 28px; } }

/* ============ a phone held upright (portrait) ============
   The same game, laid out for a tall screen. At the top the mirrors, then the progress plate (left) and the map with
   the limit sign on its rim (right), the horn, view and pause buttons under the map. At the bottom the steering pad
   (left), the speedometer (middle, on the bottom edge) and the pedals (right); above them one row with an indicator
   at each side and the glance buttons in between. As on a phone held sideways, the get-ready list, the big direction
   sign and the instructor's text are left out (the voice says it all). */
@media (orientation: portrait) and (max-width: 700px) {
  #hud #nav, #hud #prep, #hud #chat { display: none !important; }
  #hud #stats { top: calc(var(--mstrip, 0px) + 8px); left: calc(10px + env(safe-area-inset-left)); width: min(170px, 44vw); padding: 6px 8px 7px; font-size: 11px; }
  #hud #scoreVal { font-size: 18px; } #hud #stats .lbl { font-size: 8.5px; } #hud #stats .row.small { margin-top: 4px; font-size: 10.5px; } #hud #roadName { max-width: 80px; }
  #hud .bar { height: 7px; margin-top: 3px; } #hud .bar.thin { height: 5px; }
  #hud #mapWrap, body.touch #hud #mapWrap { top: calc(var(--mstrip, 0px) + 8px); right: calc(10px + env(safe-area-inset-right)); left: auto; bottom: auto; width: 112px; height: 112px; }
  #hud #bubble { top: calc(var(--mstrip, 0px) + 150px); bottom: auto; left: calc(10px + env(safe-area-inset-left)); }
  #hud #avatar { width: 40px; height: 40px; }
  #toasts { top: calc(var(--mstrip, 0px) + 130px); }
  /* the speedometer, small, on the bottom edge between the steering pad and the pedals */
  #hud #dash, body.touch.incar #dash, body.incar #dash { left: 50%; right: auto; bottom: 0; transform: translateX(-50%); }
  #hud #gauge, body.simple #gauge { width: 104px; height: auto; }
  /* the controls */
  body.touch #tSteer { left: calc(8px + env(safe-area-inset-left)); bottom: 10px; width: calc(50vw - 66px); height: 150px; }
  body.touch #tPedals { right: calc(8px + env(safe-area-inset-right)); bottom: 10px; gap: 8px; }
  #touch #tBrake { width: 58px; height: 86px; font-size: 11px; letter-spacing: .02em; }
  #touch #tGas { width: 60px; height: 132px; font-size: 14px; }
  body.touch #tInd, body.touch.incar #tInd { left: calc(8px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); bottom: 172px; transform: none; display: flex; justify-content: space-between; gap: 0; pointer-events: none; }
  #touch #tInd button { width: 52px; height: 44px; font-size: 20px; pointer-events: auto; }
  body.touch #tLook { left: 50%; right: auto; bottom: 174px; transform: translateX(-50%); gap: 6px; }
  #touch #tLook button { height: 40px; padding: 0 9px; font-size: 12px; }
  body.touch #tSys { top: calc(var(--mstrip, 0px) + 128px); right: calc(10px + env(safe-area-inset-right)); }
  #touch #tSys button { width: 46px; height: 34px; font-size: 11.5px; }
}

/* ---- phones: the progress plate shrinks to the instructor's confidence alone, a small pill with the percentage (the
   rest - faults, time, distance - is in the report at the end and on the pause screen) ---- */
@media (max-height: 520px), (orientation: portrait) and (max-width: 700px) {
  #hud #stats { width: auto; min-width: 0; padding: 5px 11px 4px; }
  #hud #stats > :not(.row:first-child) { display: none !important; }
  #hud #stats #scoreLbl { display: none; }
  #hud #stats .row:first-child { justify-content: center; }
  #hud #scoreVal { font-size: 20px; line-height: 1; }
}

/* ---- icons on the buttons (inline SVG line icons, in the button's own colour) ---- */
#touch button .ic { display: block; width: 22px; height: 22px; margin: 0 auto; pointer-events: none; }
#touch #tLook button { padding: 0 11px; } #touch #tLook button .ic { width: 31px; height: 22px; }
#touch #tInd button .ic { width: 26px; height: 26px; }
#touch #tInd button.lit .ic { fill: currentColor; }                      /* the arrow lights up solid while it blinks */
#touch #tSys button .ic { width: 20px; height: 20px; }
#touch #tBrake, #touch #tGas { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
#touch #tBrake .ic, #touch #tGas .ic { width: 28px; height: 28px; margin: 0; }
#touch #tBrake span, #touch #tGas span { font-size: 12px; letter-spacing: .06em; }
.withIc { display: flex; align-items: center; justify-content: center; gap: 9px; }
.withIc .bIcon { width: 22px; height: 22px; flex: none; }
@media (max-height: 520px), (orientation: portrait) and (max-width: 700px) {
  #touch #tBrake .ic, #touch #tGas .ic { width: 24px; height: 24px; }
  #touch #tBrake span, #touch #tGas span { font-size: 10.5px; }
  #touch #tLook button .ic { width: 27px; height: 19px; }
}

/* ---- the pedals: a brushed-metal frame round a ribbed black rubber pad, leaning back a little as seen from the seat;
   the brake wide and short, the accelerator tall and narrow. Held down, a pedal tips further in and its label lights. ---- */
#touch #tBrake.pedal, #touch #tGas.pedal {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0; padding: 0 0 6px; border: 0; border-radius: 13px 13px 17px 17px;
  background: linear-gradient(160deg, #d9dee5 0%, #8d949e 38%, #5d636c 62%, #a7aeb8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 5px 0 #1a1d22, 0 9px 16px rgba(0, 0, 0, .45);
  transform: perspective(240px) rotateX(16deg); transform-origin: 50% 100%; transition: transform .07s ease-out, box-shadow .07s, filter .07s; }
#touch .pedal::before {                                   /* the rubber pad, with its ribs */
  content: ''; position: absolute; inset: 5px 5px 24px; border-radius: 9px 9px 7px 7px;
  background: repeating-linear-gradient(180deg, #3a3e45 0 5px, #121418 5px 9px), #1d2025;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(255, 255, 255, .12); }
#touch .pedal span { position: relative; font: 900 10.5px/1 var(--ui); letter-spacing: .12em; color: #2a2e35; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
#touch #tBrake.pedal span { color: #8f1d14; } #touch #tGas.pedal span { color: #0f6a31; }
#touch #tBrake.pedal.on, #touch #tGas.pedal.on {
  background: linear-gradient(160deg, #e6eaf0 0%, #9aa1ab 38%, #666c75 62%, #b4bbc5 100%);
  transform: perspective(240px) rotateX(34deg) translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 0 #1a1d22, 0 4px 8px rgba(0, 0, 0, .4); }
#touch #tBrake.pedal.on span { color: #ff3b2f; text-shadow: 0 0 8px rgba(255, 59, 47, .8); }
#touch #tGas.pedal.on span { color: #19c45a; text-shadow: 0 0 8px rgba(25, 196, 90, .8); }
#touch #tBrake.pedal.on::before { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7), 0 0 0 2px rgba(255, 59, 47, .55); }
#touch #tGas.pedal.on::before { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7), 0 0 0 2px rgba(25, 196, 90, .55); }
@media (max-height: 520px), (orientation: portrait) and (max-width: 700px) {
  #touch .pedal span { font-size: 9px; } #touch .pedal::before { inset: 4px 4px 18px; } #touch #tBrake.pedal, #touch #tGas.pedal { padding-bottom: 5px; }
}

/* ---- the other touch controls in the same car-interior style as the pedals ---- */
/* dashboard switches: glances, mirror, camera, pause - dark glossy plastic in a thin metal edge; pressed, the icon lights */
#touch #tLook button, #touch #tSys button, #touch #tInd button {
  color: #d3d9e2; border: 0; border-radius: 10px;
  background: linear-gradient(180deg, #3b4048 0%, #23272d 55%, #191c21 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 0 rgba(0, 0, 0, .45), 0 0 0 1.5px #8d949e, 0 0 0 3px #121418, 0 4px 9px rgba(0, 0, 0, .45); }
#touch #tLook button.on, #touch #tSys button.on {
  transform: translateY(1px); color: #fff; background: linear-gradient(180deg, #2a2e35 0%, #1b1e23 100%);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .65), 0 0 0 1.5px #a7aeb8, 0 0 0 3px #121418, 0 2px 4px rgba(0, 0, 0, .4); }
#touch #tLook button.on .ic, #touch #tSys button.on .ic { filter: drop-shadow(0 0 4px rgba(140, 205, 255, .95)); color: #bfe3ff; }
/* the horn: a round pad */
#touch #tSys button[data-hold="KeyB"] { border-radius: 50%; width: 40px; height: 40px; align-self: center; }
#touch #tSys button[data-hold="KeyB"].on .ic { color: #ffd166; filter: drop-shadow(0 0 5px rgba(255, 196, 61, .95)); }
/* indicators: dashboard lamps - a dim green arrow that lights up and glows while it blinks */
#touch #tInd button { color: #2f7a48; }
#touch #tInd button.lit { color: #46ff7e; background: radial-gradient(80% 80% at 50% 45%, #1d4a2c 0%, #0f1c14 100%);
  box-shadow: inset 0 0 10px rgba(70, 255, 126, .35), 0 0 0 1.5px #8d949e, 0 0 0 3px #121418, 0 0 14px rgba(70, 255, 126, .55); }
#touch #tInd button.lit .ic { filter: drop-shadow(0 0 5px rgba(70, 255, 126, .95)); }
/* the steering pad: just the wheel, on a soft shadow, no box */
body.touch #tSteer { border: 0; background: radial-gradient(closest-side, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0)); }
body.touch #tSteer.on { background: radial-gradient(closest-side, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0)); }
#tWheel { width: min(82%, 150px); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .55)); }
#tSteer span { bottom: 2px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
@media (max-height: 520px) { #touch #tSys button[data-hold="KeyB"] { width: 36px; height: 36px; } }
@media (orientation: portrait) and (max-width: 700px) { #touch #tSys button[data-hold="KeyB"] { width: 34px; height: 34px; } #tWheel { width: min(88%, 130px); } }

/* ---- phones: one camera view (from behind the car), so no button to change it (see PHONE in src/main.js) ---- */
@media (max-height: 520px), (orientation: portrait) and (max-width: 700px) {
  #touch #tSys button[data-tap="KeyV"] { display: none; }
}

/* ======== home screen ======== */
button.primary.withIc { display: flex; align-items: center; justify-content: center; gap: 10px; }
/* the route row: its name, and under it the city, length and time */
.pickVal { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.menuCard .pickVal b, .pickVal b { flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickVal em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #66728a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* your best drive on this route: a small badge under the tiles */
#best { margin-top: 12px; text-align: center; opacity: 1; }
.bestBadge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.bestBadge small { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.bestBadge b { font-size: 14px; } .bestBadge i { font-style: normal; color: #ffd166; letter-spacing: 1px; }
.bestBadge em { font-style: normal; padding: 3px 8px 2px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.bestBadge.pass em { background: #2fbf63; color: #05200f; } .bestBadge.new { padding-right: 12px; } .bestBadge.new em { background: none; padding: 0; opacity: .85; }
/* the menu card stands out from a bright city behind it */
#menu { background: linear-gradient(90deg, rgba(4, 10, 24, .5) 0%, rgba(4, 10, 24, .18) 40%, rgba(4, 10, 24, 0) 62%); }

/* ======== pause screen: one glass panel - where you are, how it is going, then the choices ======== */
#pause .pauseCard { width: min(440px, 92vw); padding: 24px 24px 16px; border-radius: 26px; text-align: left;
  background: linear-gradient(180deg, rgba(30, 39, 54, .8), rgba(12, 17, 26, .9)); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12); }
#pause .pauseCard h2 { font-size: 30px; letter-spacing: .18em; text-align: left; }
#pause #pauseInfo { margin: 8px 0 0; font-size: 15px; font-weight: 800; color: #e6eefb; }
.pProg { margin-top: 12px; } .pProg.hidden { display: none; }
.pBar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.pBar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #38d0ff, #3dff76); box-shadow: 0 0 10px rgba(56, 208, 255, .6); }
.pMeta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #a9bad3; font-variant-numeric: tabular-nums; }
#pause #pauseChips { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 8px; margin-top: 14px; }
#pause #pauseChips span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 9px 4px 7px; border-radius: 14px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
#pause #pauseChips span b { font-size: 20px; line-height: 1; color: var(--c, #fff); } #pause #pauseChips span.big b { font-size: 24px; }
#pause #pauseChips small { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9fb0c8; }
.pToggles { display: flex; gap: 8px; margin-top: 12px; }
.pTog { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px 8px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #8fa3bf; font: 800 13px var(--ui); transition: background-color .12s, border-color .12s, color .12s; }
.pTog.on { color: #fff; background: rgba(56, 208, 255, .16); border-color: rgba(56, 208, 255, .55); }
.pTog .bIcon { width: 18px; height: 18px; } .pTog .off { display: none; } .pTog:not(.on) .on { display: none; } .pTog:not(.on) .off { display: inline; }
#pause .pauseCard button.primary { margin-top: 16px; }
#pause .pauseList { margin-top: 10px; gap: 8px; }
#pause .linkBtn { display: block; margin: 10px auto 0; }
/* short screens (a phone held sideways): side by side - where you are on the left, the choices on the right */
@media (max-height: 520px) {
  #pause .pauseCard { width: min(720px, 96vw); display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 14px 16px 10px; align-items: start; }
  #pause .pauseCard h2 { font-size: 22px; } #pause #pauseInfo { font-size: 13px; margin-top: 4px; }
  .pProg { margin-top: 8px; } #pause #pauseChips { margin-top: 8px; gap: 6px; } #pause #pauseChips span { padding: 6px 3px 5px; }
  #pause #pauseChips span b { font-size: 16px; } #pause #pauseChips span.big b { font-size: 18px; }
  .pToggles { margin-top: 8px; } .pTog { padding: 6px 8px 5px; font-size: 12px; }
  #pause .pauseCard button.primary { margin-top: 0; }
}

/* ---- seven-segment lettering (src/engine/segfont.js): readouts in the speedometer's style (.sevseg: .seg is the menu's switch) ---- */
.sevseg { display: inline-block; height: 1em; vertical-align: -0.12em; fill: currentColor; overflow: visible;
  filter: drop-shadow(0 0 4px color-mix(in srgb, currentColor 55%, transparent)); }
.sevseg .segOff { fill: currentColor; opacity: .12; }
.segText { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* the pause screen's title and numbers */
#pause .pauseCard h2 { font-size: 30px; line-height: 1; color: #f4f7fb; letter-spacing: 0; }
#pause .pauseCard h2 .sevseg { height: 30px; vertical-align: 0; filter: drop-shadow(0 0 8px rgba(160, 220, 255, .55)); }
.pMeta .sevseg { height: 15px; vertical-align: -2px; } .pMeta small { font-size: 11px; color: #8fa3bf; margin: 0 2px; }
#pause #pauseChips span b .sevseg { height: 1em; }

@media (max-height: 520px) { #pause .pauseCard h2 .sevseg { height: 22px; } }
button.ghost.withIc { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ======== the report (assessment form): the score in an inked ring, the faults by weight, the notes by colour ======== */
#result .formhead { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.resRing { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.resRing svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.resRing .rTrack { fill: none; stroke: rgba(27, 46, 90, .12); stroke-width: 8; }
.resRing .rArc { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .9s cubic-bezier(.2, .8, .2, 1); }
.resRing.good .rArc { stroke: #1f9d55; } .resRing.ok .rArc { stroke: #d48a00; } .resRing.low .rArc { stroke: #c0392b; }
.resRing b { font-family: var(--hand); font-size: 25px; font-weight: 700; line-height: 1; margin-top: -8px; }
.resRing span { position: absolute; bottom: 24px; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.resHeadText { min-width: 0; }
.resHeadText small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 4px; }
.resHeadText h2 { margin: 0; font-size: 23px; line-height: 1.12; }
#result #resStars { display: block; margin-top: 5px; font-size: 19px; letter-spacing: 3px; color: #1b1b1b; }
/* the figures: dangerous / serious / minor (in their colours once there is one), then time, distance, XP */
#result .resGrid { grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 4px 0 14px; }
#result .resGrid .rCrit b, #result .resGrid .rSer b, #result .resGrid .rMin b { color: #9aa1af; }
#result .resGrid .rCrit.on b { color: var(--red); } #result .resGrid .rSer.on b { color: #b8430f; } #result .resGrid .rMin.on b { color: #9a5b00; }
#result.practice .rCrit, #result.practice .rSer, #result.practice .rMin { display: none; }
#result.practice .resGrid { grid-template-columns: repeat(3, 1fr); }
/* each note: a strip down its left side in the colour of its weight (green: done right, in a drill) */
#resList .fitem { padding-left: 14px; }
#resList .fitem::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 4px; border-radius: 2px; background: #c6ccd8; }
#resList .fitem.minor::before { background: #e0a400; } #resList .fitem.serious::before { background: #d9541a; } #resList .fitem.critical::before { background: var(--red); }
#resList .fitem.good::before { background: #2fbf63; }
@media (max-width: 600px) {
  #result .formhead { grid-template-columns: auto 1fr; } #result .formhead .stamp { position: absolute; right: 18px; top: 16px; transform: rotate(-7deg) scale(.8); }
  .resRing { width: 74px; height: 74px; } .resRing b { font-size: 20px; } .resRing span { bottom: 18px; font-size: 7px; }
  .resHeadText h2 { font-size: 18px; padding-right: 64px; }
  #result .resGrid { grid-template-columns: repeat(3, 1fr); gap: 8px 10px; }
}
@media (max-height: 520px) {
  #result .formhead { gap: 12px; } .resRing { width: 60px; height: 60px; } .resRing b { font-size: 16px; margin-top: -4px; } .resRing span { display: none; }
  .resHeadText small { font-size: 9px; } .resHeadText h2 { font-size: 16px; } #result #resStars { font-size: 14px; margin-top: 2px; }
  #result .resGrid { grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 8px; }
}
#result > .form { position: relative; }
@media (max-width: 600px) { #result .resHeadText { padding-right: 62px; } #result .resHeadText h2 { padding-right: 0; } #result .formhead .stamp { top: 12px; right: 12px; transform: rotate(-7deg) scale(.72); } }
@media (max-width: 600px) { #result .resHeadText small { display: none; } #result .resHeadText { padding-right: 70px; } }
@media (max-width: 600px) {
  #result .resHeadText { padding-right: 0; }
  #result .formhead .stamp { position: static; grid-column: 2; justify-self: start; margin-top: -6px; transform: rotate(-5deg) scale(.75); transform-origin: left center; }
}

/* ============ the menu button while driving ============ */
/* (opens the pause screen; on a touch screen its own button under the minimap does it) - a round game button: a pause
   symbol in a glossy dark disc with a light rim, a coloured glow on hover, and it sinks a little when pressed */
.hudMenu { pointer-events: auto; z-index: 6; top: 16px; right: 240px; width: 50px; height: 50px; padding: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff; border: 3px solid rgba(255, 255, 255, .92);
  background: radial-gradient(circle at 50% 30%, #4a5566 0%, #232a35 55%, #121720 100%);
  box-shadow: 0 4px 0 #06080c, 0 8px 18px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .22);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.hudMenu svg { width: 24px; height: 24px; fill: currentColor; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)); }
.hudMenu:hover { transform: translateY(-1px) scale(1.06); border-color: #ffd23f; box-shadow: 0 5px 0 #06080c, 0 0 0 4px rgba(255, 210, 63, .28), 0 10px 22px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .25); }
.hudMenu:active { transform: translateY(3px); box-shadow: 0 1px 0 #06080c, 0 3px 8px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .15); }
.hudMenu:focus-visible { outline: 3px solid #ffd23f; outline-offset: 3px; }
body.touch .hudMenu { display: none; }
@media (max-width: 900px) { .hudMenu { right: 182px; } }
@media (max-height: 520px) { .hudMenu { top: 8px; right: 126px; width: 40px; height: 40px; border-width: 2px; } .hudMenu svg { width: 19px; height: 19px; } }
@media (prefers-reduced-motion: reduce) { .hudMenu, .hudMenu:hover, .hudMenu:active { transition: none; transform: none; } }
/* the simple display keeps the minimap bottom left: the button takes the top-right corner, the sign card below it */
body.simple:not(.touch) .hudMenu { right: 16px; top: 14px; }
body.simple:not(.touch) #signCard { top: 76px; }
@media (max-height: 520px) { body.simple:not(.touch) .hudMenu { top: 8px; right: 10px; } body.simple:not(.touch) #signCard { top: 50px; } }


/* ============ game style: lettering ============ */
/* Lilita One - a chunky, rounded display face (free, from Google Fonts) - white or yellow with a thick dark outline and a
   hard drop shadow, as casual games letter their buttons and titles */
:root { --game: 'Lilita One', 'Overpass', 'Segoe UI', system-ui, sans-serif; --gInk: #0a1733; }

/* ============ game style: the loading screen ============ */
#boot { --p: 0; background: #3fb0f2; }
#boot::before, #boot::after { content: none; }
#bootMap { display: none; }
.bootArt { position: absolute; inset: 0; width: 100%; height: 100%; }
.bootArt .carBob { animation: carBob .45s ease-in-out infinite; }
@keyframes carBob { 50% { transform: translateY(-1.3px); } }
.bootArt .bDash { animation: roadDash .5s linear infinite; }
@keyframes roadDash { to { stroke-dashoffset: 126; } }
.bootArt .bwheel { transform-box: fill-box; transform-origin: center; animation: wheelSpin .45s linear infinite; }
@keyframes wheelSpin { to { transform: rotate(360deg); } }
.bootArt .bCloud { animation: cloudDrift 26s linear infinite alternate; }
.bootArt .bc2 { animation-duration: 34s; animation-direction: alternate-reverse; }
@keyframes cloudDrift { to { transform: translateX(140px); } }
.bootArt .bSun { transform-box: fill-box; transform-origin: center; animation: sunTurn 40s linear infinite; }
@keyframes sunTurn { to { transform: rotate(360deg); } }
.bootStage { position: absolute; z-index: 1; left: 50%; top: max(18px, 5vh); transform: translateX(-50%); text-align: center; }
.gameTitle { display: inline-flex; flex-direction: column; align-items: center; transform: rotate(-3deg); animation: titleBob 3s ease-in-out infinite; }
@keyframes titleBob { 50% { transform: rotate(-2deg) translateY(-5px); } }
.gameTitle b { font: 400 clamp(64px, 11vw, 132px)/.9 var(--game); letter-spacing: .02em; color: #ffd23f;
  -webkit-text-stroke: clamp(8px, 1.1vw, 12px) var(--gInk); paint-order: stroke fill; text-shadow: 0 clamp(6px, .9vw, 10px) 0 var(--gInk); }
.gameTitle span { margin-top: 2px; font: 400 clamp(20px, 2.6vw, 30px)/1 var(--game); letter-spacing: .04em; color: #fff;
  -webkit-text-stroke: 6px var(--gInk); paint-order: stroke fill; text-shadow: 0 4px 0 var(--gInk); }
#boot .bootBottom { top: 37%; bottom: auto; width: min(560px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: center; gap: 12px; }
/* kept for the code that fills them, not shown: the screen stays to the title, what is loading and the bar */
#boot .bootTip, #boot #bootCity { display: none; }
#boot #loading { position: static; width: auto; height: auto; clip: auto; margin: 0; white-space: nowrap; overflow: visible;
  font: 400 clamp(22px, 2.6vw, 30px)/1 var(--game); color: #fff; -webkit-text-stroke: 6px var(--gInk); paint-order: stroke fill; text-shadow: 0 4px 0 var(--gInk); }
.bootBar { position: relative; width: min(420px, 90%); height: 30px; border-radius: 10px; background: #1b3358; border: 4px solid var(--gInk); box-shadow: 0 5px 0 var(--gInk); overflow: hidden; }
.bootFill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 1%); background: linear-gradient(#ffe36b 0%, #ffb21f 55%, #f08a00 100%); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .5); }
.bootFill::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 10px, transparent 10px 22px); animation: barStripes .8s linear infinite; }
@keyframes barStripes { to { background-position: 31px 0; } }
.bootPct { position: absolute; inset: 0; display: grid; place-items: center; font: 400 17px/1 var(--game); color: #fff; -webkit-text-stroke: 4px var(--gInk); paint-order: stroke fill; }
.bootTip { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 8px 14px 7px 8px; background: rgba(10, 30, 66, .8); color: #fff; border: 3px solid var(--gInk);
  border-radius: 12px; font: 700 13.5px/1.25 var(--ui); }
.bootTip i { flex: none; font: 400 13px/1 var(--game); font-style: normal; padding: 5px 8px 4px; border-radius: 7px; color: var(--gInk); background: #ffd23f; }
.bootTip.pop { animation: tipPop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tipPop { from { transform: scale(.9); opacity: .3; } }
#boot #bootCity { font: 400 14px/1 var(--game); letter-spacing: .06em; color: #fff; -webkit-text-stroke: 4px var(--gInk); paint-order: stroke fill; text-transform: none; }
#boot.mapped #bootCity::after { content: none; }
#boot.failed #loading { white-space: normal; font-size: 18px; text-align: center; }
@media (max-height: 520px) {
  .gameTitle b { font-size: clamp(40px, 7.4vw, 60px); -webkit-text-stroke-width: 7px; text-shadow: 0 5px 0 var(--gInk); } .gameTitle span { font-size: 15px; -webkit-text-stroke-width: 5px; }
  .bootStage { top: 12px; } .bootArt { transform: translateY(36px); }
  #boot #loading { font-size: 19px; } .bootBar { height: 24px; } #boot .bootBottom { gap: 7px; top: 27%; }
}
@media (prefers-reduced-motion: reduce) { .bootArt *, .gameTitle, .bootFill::after, .bootTip.pop { animation: none !important; } }

/* ============ game style: the home screen ============ */
/* full screen over the 3D city: no card. Top: the title, settings. Left: square buttons. Bottom right: the route card,
   licence and lesson/exam, and the slanted DRIVE button. */
#menu.home { display: block; padding: 0; background: linear-gradient(180deg, rgba(10, 12, 40, .45) 0%, rgba(10, 12, 40, 0) 26%, rgba(10, 12, 40, 0) 62%, rgba(10, 12, 40, .5) 100%); overflow: hidden; }
#menu.home .hmTop { position: absolute; left: max(18px, 3vw); right: max(18px, 3vw); top: max(14px, 3vh); display: flex; align-items: flex-start; justify-content: space-between; }
.hmLogo { display: flex; flex-direction: column; align-items: flex-start; transform: rotate(-3deg); transform-origin: 0 50%; }
.hmLogo b { font: 400 clamp(44px, 5.4vw, 64px)/.9 var(--game); color: #ffd23f; letter-spacing: .02em; -webkit-text-stroke: 8px var(--gInk); paint-order: stroke fill; text-shadow: 0 6px 0 var(--gInk); }
.hmLogo span { margin: 2px 0 0 4px; font: 400 18px/1 var(--game); color: #fff; -webkit-text-stroke: 5px var(--gInk); paint-order: stroke fill; text-shadow: 0 3px 0 var(--gInk); }
.hmSquare { width: 56px; height: 56px; padding: 0; display: grid; place-items: center; border-radius: 14px; cursor: pointer; border: 4px solid var(--gInk);
  background: linear-gradient(#6cc2ff, #2f8ef0 60%, #1d6fd0); box-shadow: 0 5px 0 var(--gInk), inset 0 3px 0 rgba(255, 255, 255, .35); transition: transform .1s; }
.hmSquare svg { width: 30px; height: 30px; fill: #fff; filter: drop-shadow(0 2px 0 var(--gInk)); }
.hmSquare:hover { transform: translateY(-2px); } .hmSquare:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gInk), inset 0 3px 0 rgba(255, 255, 255, .25); }
#menu.home #menuBody { position: absolute; inset: 0; pointer-events: none; }
#menu.home #menuBody > * { pointer-events: auto; }
.hmSide { position: absolute; left: max(18px, 3vw); top: 50%; transform: translateY(-46%); display: flex; flex-direction: column; gap: 16px; }
.hmTile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; background: none; border: 0; cursor: pointer; color: #fff;
  font: 400 15px/1 var(--game); letter-spacing: .02em; -webkit-text-stroke: 4px var(--gInk); paint-order: stroke fill; text-shadow: 0 3px 0 var(--gInk); }
.hmIc { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 16px; border: 4px solid var(--gInk); box-shadow: 0 5px 0 var(--gInk), inset 0 4px 0 rgba(255, 255, 255, .4); transition: transform .1s; }
.hmIc svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 0 rgba(18, 16, 42, .6)); }
.hmTile.c1 .hmIc { background: linear-gradient(#ffa25e, #ff7a2f 55%, #e05a18); }
.hmTile.c2 .hmIc { background: linear-gradient(#ffe36b, #ffc21f 55%, #e8a000); }
.hmTile.c3 .hmIc { background: linear-gradient(#7fd2ff, #36a2f5 55%, #1f77d0); }
.hmTile:hover .hmIc { transform: translateY(-3px) rotate(-3deg); } .hmTile:active .hmIc { transform: translateY(4px); box-shadow: 0 1px 0 var(--gInk), inset 0 4px 0 rgba(255, 255, 255, .3); }
.hmPlay { position: absolute; right: max(18px, 3vw); bottom: max(16px, 3.5vh); display: grid; grid-template-columns: auto auto; align-items: end; gap: 0 14px; }
.hmCards { display: flex; flex-direction: column; gap: 8px; width: min(330px, 38vw); }
.hmCard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px; text-align: left; cursor: pointer; color: #fff;
  background: linear-gradient(#2a8af0, #1763c4); border: 4px solid var(--gInk); border-radius: 14px; box-shadow: 0 5px 0 var(--gInk), inset 0 3px 0 rgba(255, 255, 255, .14); transform: skewX(-6deg); }
.hmCard > * { transform: skewX(6deg); }
.hmCardIc { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: #0d3a78; border: 3px solid var(--gInk); }
.hmCardIc svg { width: 32px; height: 32px; }
.hmCardTx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hmCardTx small { font: 400 12px/1 var(--game); letter-spacing: .08em; text-transform: uppercase; color: #ffd23f; }
.hmCardTx b { font: 400 20px/1.05 var(--game); color: #fff; -webkit-text-stroke: 4px var(--gInk); paint-order: stroke fill; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmCardTx em { font: 700 12px/1.2 var(--ui); font-style: normal; color: #dcefff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmCard i { font: 400 28px/1 var(--game); font-style: normal; color: #ffd23f; }
.hmCard:hover { filter: brightness(1.12); }
.hmRow { display: flex; gap: 8px; }
.hmChip { flex: none; display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; cursor: pointer; color: #fff; background: linear-gradient(#2a8af0, #1763c4); border: 4px solid var(--gInk);
  border-radius: 12px; box-shadow: 0 4px 0 var(--gInk); font: 400 15px/1 var(--game); -webkit-text-stroke: 3px var(--gInk); paint-order: stroke fill; }
.hmChip .pIconBox svg { width: 22px; height: 22px; } .hmChip b { font-weight: 400; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#menu .hmSeg { flex: 1; display: flex; margin: 0; padding: 3px; border: 4px solid var(--gInk); border-radius: 12px; background: #0d3a78; box-shadow: 0 4px 0 var(--gInk); }
#menu .hmSeg button { flex: 1; padding: 6px 8px 5px; border: 0; border-radius: 8px; background: none; color: #b5d8ff; cursor: pointer; font: 400 16px/1 var(--game); letter-spacing: .02em; }
#menu .hmSeg button.on { color: #fff; background: linear-gradient(#56d36a, #2fae46); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35); -webkit-text-stroke: 3px #135a22; paint-order: stroke fill; }
.hmDrive { position: relative; width: clamp(190px, 18vw, 250px); height: 112px; padding: 0; cursor: pointer; border: 5px solid var(--gInk); border-radius: 16px; transform: skewX(-8deg);
  background: linear-gradient(#ffe979 0%, #ffd23f 48%, #f5b400 49%, #f0a400 100%); box-shadow: 0 8px 0 var(--gInk), inset 0 5px 0 rgba(255, 255, 255, .55), inset 0 -6px 0 rgba(160, 90, 0, .35); transition: transform .1s, filter .1s; }
.hmDrive span { display: block; transform: skewX(8deg); font: 400 clamp(40px, 3.8vw, 52px)/1 var(--game); letter-spacing: .03em; color: #fff; -webkit-text-stroke: 8px var(--gInk); paint-order: stroke fill; text-shadow: 0 5px 0 var(--gInk); }
.hmDrive:hover { filter: brightness(1.05); transform: skewX(-8deg) translateY(-2px); }
.hmDrive:active { transform: skewX(-8deg) translateY(6px); box-shadow: 0 2px 0 var(--gInk), inset 0 5px 0 rgba(255, 255, 255, .45), inset 0 -6px 0 rgba(160, 90, 0, .35); }
.hmNote { grid-column: 1 / -1; margin: 10px 0 0; text-align: right; font: 400 14px/1.2 var(--game); color: #fff; -webkit-text-stroke: 4px var(--gInk); paint-order: stroke fill; }
#menu.home #best { position: absolute; left: 50%; bottom: max(16px, 3.5vh); transform: translateX(-50%); margin: 0; }
#menu.home #best:empty { display: none; }
@media (max-width: 760px) { .hmPlay { grid-template-columns: 1fr; gap: 10px; } .hmCards { width: min(330px, 70vw); } .hmDrive { width: 100%; height: 84px; } }
@media (max-height: 520px) {
  .hmLogo b { font-size: 38px; -webkit-text-stroke-width: 6px; } .hmLogo span { font-size: 14px; } .hmSquare { width: 44px; height: 44px; border-radius: 12px; } .hmSquare svg { width: 24px; height: 24px; }
  .hmSide { gap: 9px; } .hmIc { width: 48px; height: 48px; border-radius: 12px; } .hmIc svg { width: 28px; height: 28px; } .hmTile { font-size: 12.5px; }
  .hmCard { padding: 6px 10px 6px 7px; } .hmCardIc { width: 36px; height: 36px; } .hmCardTx b { font-size: 16px; } .hmCards { width: min(300px, 40vw); gap: 6px; }
  .hmDrive { height: 84px; width: 170px; } .hmDrive span { font-size: 36px; } .hmNote { font-size: 12px; margin-top: 6px; }
}
/* the home screen keeps to buttons: no best-score pill and no line about the mode under DRIVE (the elements stay for the code that fills them) */
#menu.home #best, #menu.home .hmNote { display: none !important; }
@media (prefers-reduced-motion: reduce) { .gameTitle { animation: none; } }

/* ============ game style: the other screens (licence, practise, signs, settings, routes, help, pause, report) ============ */
/* The same look as the home and loading screens: blue panels with a thick navy outline and a hard drop edge, headings in
   the outlined game lettering, chunky yellow main buttons, white cards and fields outlined in navy. */
.overlay:not(.home):not(#routes):not(#pause) { background: rgba(6, 22, 52, .5); }
#pause { background: radial-gradient(ellipse at 50% 45%, rgba(6, 22, 52, .35) 0%, rgba(4, 12, 32, .8) 100%); }

/* panels */
.signpanel, #pause .pauseCard { color: #fff; border: 4px solid var(--gInk); border-radius: 24px;
  background: linear-gradient(180deg, #3b9cf5 0%, #1f74d6 46%, #1763c4 100%);
  box-shadow: 0 8px 0 var(--gInk), 0 22px 44px rgba(3, 10, 30, .45), inset 0 3px 0 rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet { border: 4px solid var(--gInk); border-radius: 24px; box-shadow: 0 8px 0 var(--gInk), 0 22px 44px rgba(3, 10, 30, .45); }
#result > .form { border: 4px solid var(--gInk); border-radius: 20px; box-shadow: 0 8px 0 var(--gInk), 0 22px 44px rgba(3, 10, 30, .45); }

/* headings */
.signpanel h2, .rsTop h2, #pause .pauseCard h2, .sheet h2 { font: 400 30px/1 var(--game); letter-spacing: .01em; color: #fff;
  -webkit-text-stroke: 6px var(--gInk); paint-order: stroke fill; text-shadow: 0 4px 0 var(--gInk); }
.sheet h2 { color: #ffd23f; margin-bottom: 14px; }
#pause .pauseCard h2 .sevseg { display: none; }
#pause .pauseCard h2 .segText { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
#result #resTitle { font: 400 28px/1.05 var(--game); letter-spacing: .01em; color: var(--gInk); }
.signpanel .fine { opacity: 1; color: #dcefff; font-size: 12px; }
.signpanel label, #routes .startRow label { font: 400 14px/1 var(--game); letter-spacing: .03em; text-transform: none; opacity: 1; color: #fff;
  -webkit-text-stroke: 3px var(--gInk); paint-order: stroke fill; text-shadow: none; }

/* the main button: yellow, like DRIVE */
button.primary, .rsSide button.primary, #pause .pauseCard button.primary { border: 4px solid var(--gInk); border-radius: 16px; padding: 13px 14px 11px;
  background: linear-gradient(180deg, #ffe979 0%, #ffd23f 48%, #f5b400 49%, #f0a400 100%);
  color: #fff; font: 400 24px/1 var(--game); letter-spacing: .02em; -webkit-text-stroke: 6px var(--gInk); paint-order: stroke fill; text-shadow: 0 3px 0 var(--gInk);
  box-shadow: 0 6px 0 var(--gInk), inset 0 4px 0 rgba(255, 255, 255, .55), inset 0 -5px 0 rgba(160, 90, 0, .3); transition: transform .1s, filter .1s; }
button.primary:hover, .rsSide button.primary:hover, #pause .pauseCard button.primary:hover { background: linear-gradient(180deg, #ffe979 0%, #ffd23f 48%, #f5b400 49%, #f0a400 100%);
  filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 7px 0 var(--gInk), inset 0 4px 0 rgba(255, 255, 255, .55), inset 0 -5px 0 rgba(160, 90, 0, .3); }
button.primary:active, .rsSide button.primary:active, #pause .pauseCard button.primary:active { transform: translateY(4px);
  box-shadow: 0 2px 0 var(--gInk), inset 0 4px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(160, 90, 0, .3); }
button.primary .bIcon { filter: drop-shadow(0 2px 0 var(--gInk)); }
#pause .pauseCard button.primary kbd { -webkit-text-stroke: 0; text-shadow: none; font: 800 11px var(--ui); color: var(--gInk); background: rgba(255, 255, 255, .6);
  border: 2px solid var(--gInk); box-shadow: none; opacity: 1; }

/* the second button: blue */
button.ghost, .formbtns button.ghost, .sheet button.ghost { border: 4px solid var(--gInk); border-radius: 16px;
  background: linear-gradient(180deg, #6cc2ff 0%, #2f8ef0 55%, #1d6fd0 100%); color: #fff; font: 400 20px/1 var(--game); letter-spacing: .02em;
  -webkit-text-stroke: 5px var(--gInk); paint-order: stroke fill; text-shadow: 0 3px 0 var(--gInk);
  box-shadow: 0 6px 0 var(--gInk), inset 0 3px 0 rgba(255, 255, 255, .4); }
button.ghost:hover, .formbtns button.ghost:hover { background: linear-gradient(180deg, #6cc2ff 0%, #2f8ef0 55%, #1d6fd0 100%); filter: brightness(1.07); transform: translateY(-1px); }
button.ghost:active, .formbtns button.ghost:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gInk), inset 0 3px 0 rgba(255, 255, 255, .3); }
button.ghost .bIcon { filter: drop-shadow(0 2px 0 var(--gInk)); }

/* back: a small white game button */
.backBtn, .rsTop .backBtn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px 6px 10px; border: 3px solid var(--gInk); border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #dbe9ff 100%); color: var(--gInk); font: 400 17px/1 var(--game); letter-spacing: .02em;
  box-shadow: 0 4px 0 var(--gInk), inset 0 -3px 0 rgba(10, 40, 100, .12); }
.backBtn:hover { background: linear-gradient(180deg, #fff 0%, #fff1b8 100%); transform: translateY(-1px); box-shadow: 0 5px 0 var(--gInk), inset 0 -3px 0 rgba(10, 40, 100, .12); }
.backBtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gInk); }

/* fields */
.signpanel select, #routes select { border: 3px solid var(--gInk); border-radius: 12px; box-shadow: 0 4px 0 var(--gInk); color: var(--gInk); background-color: #fff; }
.signpanel select:hover, #routes select:hover { background-color: #fff6cf; }
.signpanel select:active, #routes select:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gInk); }
.signpanel .bookBar input { border: 3px solid var(--gInk); border-radius: 12px; box-shadow: 0 4px 0 var(--gInk); padding: 9px 14px 7px; color: var(--gInk); }
kbd { border: 2px solid var(--gInk); border-radius: 6px; background: #fff; color: var(--gInk); box-shadow: 0 2px 0 var(--gInk); }

/* switches (the signs book's tabs): like Lesson / Exam on the home screen */
.signpanel .seg:not(.wrap) { padding: 3px; gap: 3px; border: 3px solid var(--gInk); border-radius: 12px; background: #0d3a78; box-shadow: 0 4px 0 var(--gInk); }
.signpanel .seg:not(.wrap) button { border-radius: 8px; color: #b5d8ff; font: 400 16px/1 var(--game); letter-spacing: .02em; padding: 7px 10px 5px; }
.signpanel .seg:not(.wrap) button:hover { background: rgba(255, 255, 255, .1); }
.signpanel .seg:not(.wrap) button.on { color: #fff; background: linear-gradient(#56d36a, #2fae46); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35);
  -webkit-text-stroke: 3px #135a22; paint-order: stroke fill; }

/* list cards: licences, drills, routes, signs */
.signpanel .route { background: #fff; color: var(--gInk); border: 3px solid var(--gInk); border-radius: 14px; box-shadow: 0 4px 0 var(--gInk); }
.signpanel .route:hover { background: #fff8d6; transform: translateY(-1px); box-shadow: 0 5px 0 var(--gInk); }
.signpanel .route:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gInk); }
.signpanel .route.ex.sel { background: #fff3b0; box-shadow: 0 4px 0 var(--gInk), inset 0 0 0 3px #ffd23f; padding-left: 12px; }
.signpanel .route b { font: 400 18px/1.1 var(--game); letter-spacing: .01em; }
.signpanel .route.ex i { border: 3px solid var(--gInk); border-radius: 10px; background: linear-gradient(#5cb6ff, #1d6fd0); box-shadow: 0 3px 0 var(--gInk); }
#bookList h3 { font: 400 17px/1 var(--game); letter-spacing: .03em; color: #fff; -webkit-text-stroke: 4px var(--gInk); paint-order: stroke fill; }
#bookList .bookItem { border: 3px solid var(--gInk); border-radius: 14px; box-shadow: 0 4px 0 var(--gInk); }
#bookList .bookItem b { font: 400 16px/1.1 var(--game); letter-spacing: .01em; }
#routes .rItem { border: 3px solid var(--gInk); border-radius: 14px; box-shadow: 0 4px 0 var(--gInk); }
#routes .rItem:hover { border-color: var(--gInk); }
#routes .rItem b { font: 400 20px/1.1 var(--game); letter-spacing: .01em; }
#routes .rItem.on { background: linear-gradient(180deg, #2f8ef0, #1763c4); border-color: var(--gInk); box-shadow: 0 4px 0 var(--gInk), inset 7px 0 0 #ffd23f; }
#routes .rItem.on b { -webkit-text-stroke: 4px var(--gInk); paint-order: stroke fill; }
#routes .flip { background: #0d3a78; border: 3px solid var(--gInk); border-radius: 14px; box-shadow: 0 4px 0 var(--gInk); -webkit-backdrop-filter: none; backdrop-filter: none; }
.flip b { font: 400 20px/1.05 var(--game); letter-spacing: .02em; }
.flip button { border: 3px solid var(--gInk); border-radius: 10px; box-shadow: 0 3px 0 var(--gInk); }
.mapZoom button { border: 3px solid var(--gInk); border-radius: 12px; background: linear-gradient(180deg, #fff 0%, #dbe9ff 100%); color: var(--gInk); box-shadow: 0 3px 0 var(--gInk);
  font: 400 22px/1 var(--game); -webkit-backdrop-filter: none; backdrop-filter: none; }
.mapZoom button:hover { background: linear-gradient(180deg, #fff 0%, #fff1b8 100%); border-color: var(--gInk); }

/* pause: where you are on dark wells, the choices as white game buttons */
#pause #pauseInfo { color: #fff; }
#pause .pBar { height: 16px; border: 3px solid var(--gInk); border-radius: 9px; background: #0d3a78; }
#pause .pBar i { border-radius: 0; background: linear-gradient(#ffe36b 0%, #ffb21f 55%, #f08a00 100%); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45); }
#pause .pMeta, #pause .pMeta small { color: #dcefff; }
#pause #pauseChips span { background: #0d3a78; border: 3px solid var(--gInk); border-radius: 12px; box-shadow: 0 3px 0 var(--gInk); }
#pause #pauseChips small { color: #a9cdf5; }
#pause .pTog { border: 3px solid var(--gInk); border-radius: 12px; background: #0d3a78; color: #a9cdf5; font: 400 15px/1 var(--game); letter-spacing: .02em; box-shadow: 0 3px 0 var(--gInk); }
#pause .pTog.on { color: #fff; background: linear-gradient(#56d36a, #2fae46); -webkit-text-stroke: 3px #135a22; paint-order: stroke fill; }
#pause .pTog:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--gInk); }
#pause .pauseBtn { border: 3px solid var(--gInk); border-radius: 14px; background: linear-gradient(180deg, #fff 0%, #dbe9ff 100%); color: var(--gInk);
  font: 400 17px/1.1 var(--game); letter-spacing: .01em; box-shadow: 0 4px 0 var(--gInk); }
#pause .pauseBtn .bIcon { color: #1d6fd0; }
#pause .pauseBtn:hover { transform: translateY(-1px); background: linear-gradient(180deg, #fff 0%, #fff1b8 100%); border-color: var(--gInk); box-shadow: 0 5px 0 var(--gInk); }
#pause .pauseBtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gInk); }
#pause .linkBtn { color: rgba(255, 255, 255, .85); }

@media (max-height: 520px) {
  .signpanel h2, .rsTop h2, #pause .pauseCard h2, .sheet h2 { font-size: 24px; -webkit-text-stroke-width: 5px; text-shadow: 0 3px 0 var(--gInk); }
  button.primary, .rsSide button.primary, #pause .pauseCard button.primary { font-size: 20px; padding: 10px 12px 8px; }
  #pause .pauseBtn { font-size: 15px; padding: 9px 12px 7px; }
}
/* help opened from the pause screen goes on top of it */
#help { z-index: 12; }

/* the menu button while driving: the home screen's orange Practise tile, a little tilted and uneven like a sticker,
   on the keyboard screen (.hudMenu) and among the touch buttons (.tMenu) */
.hudMenu, #touch #tSys button.tMenu { color: #fff; border: 4px solid var(--gInk); border-radius: 16px 12px 17px 11px;
  background: linear-gradient(#ffa25e, #ff7a2f 55%, #e05a18); transform: rotate(-7deg);
  box-shadow: 0 5px 0 var(--gInk), 0 10px 18px rgba(0, 0, 0, .3), inset 0 4px 0 rgba(255, 255, 255, .4); transition: transform .12s, filter .12s; }
.hudMenu { width: 54px; height: 54px; }
.hudMenu svg, #touch #tSys button.tMenu .ic { fill: #fff; filter: drop-shadow(0 2px 0 var(--gInk)); }
.hudMenu svg { width: 28px; height: 28px; }
.hudMenu:hover { border-color: var(--gInk); filter: brightness(1.06); transform: rotate(-2deg) translateY(-2px) scale(1.05);
  box-shadow: 0 7px 0 var(--gInk), 0 12px 20px rgba(0, 0, 0, .3), inset 0 4px 0 rgba(255, 255, 255, .4); }
.hudMenu:active, #touch #tSys button.tMenu:active { transform: rotate(-7deg) translateY(4px); box-shadow: 0 1px 0 var(--gInk), inset 0 3px 0 rgba(255, 255, 255, .3); }
#touch #tSys button.tMenu { border-width: 3px; box-shadow: 0 4px 0 var(--gInk), inset 0 3px 0 rgba(255, 255, 255, .4); }
@media (max-height: 520px) { .hudMenu { width: 44px; height: 44px; border-width: 3px; } .hudMenu svg { width: 22px; height: 22px; } }
@media (prefers-reduced-motion: reduce) { .hudMenu:hover { transform: rotate(-7deg); } }

/* the other touch buttons in the same game style: the horn a yellow pad, the shoulder and mirror looks (and the camera)
   blue tiles; held down or glancing they turn green and sit pressed in */
#touch #tSys button[data-hold="KeyB"], #touch #tSys button[data-tap="KeyV"], #touch #tLook button {
  color: #fff; border: 3px solid var(--gInk); box-shadow: 0 4px 0 var(--gInk), inset 0 3px 0 rgba(255, 255, 255, .4); }
#touch #tSys button[data-tap="KeyV"], #touch #tLook button { border-radius: 12px; background: linear-gradient(#7fd2ff, #36a2f5 55%, #1f77d0); }
#touch #tSys button[data-hold="KeyB"] { border-radius: 50%; color: var(--gInk); background: linear-gradient(#ffe36b, #ffc21f 55%, #e8a000); }
#touch #tSys button[data-tap="KeyV"] .ic, #touch #tLook button .ic { filter: drop-shadow(0 2px 0 var(--gInk)); }
#touch #tSys button[data-hold="KeyB"] .ic { filter: none; }
#touch #tLook button.on, #touch #tSys button[data-hold="KeyB"].on, #touch #tSys button[data-tap="KeyV"]:active {
  color: #fff; background: linear-gradient(#7ef07f, #33c24a 55%, #229a38); transform: translateY(3px); box-shadow: 0 1px 0 var(--gInk), inset 0 3px 0 rgba(255, 255, 255, .3); }
#touch #tLook button.on .ic, #touch #tSys button[data-hold="KeyB"].on .ic { color: #fff; filter: drop-shadow(0 2px 0 var(--gInk)); }

/* the incoming-sign card in the game style: a white sticker outlined in navy, tilted a little the other way from the
   menu button above it; it pops in with a small bounce and tips away when the sign is passed */
#signCard, body.simple #signCard { padding: 6px 13px 6px 6px; gap: 9px; color: var(--gInk); background: linear-gradient(180deg, #fff 0%, #e3efff 100%);
  border: 4px solid var(--gInk); border-radius: 14px 11px 15px 12px; box-shadow: 0 5px 0 var(--gInk), 0 10px 18px rgba(0, 0, 0, .3), inset 0 -3px 0 rgba(10, 40, 100, .1);
  transform: rotate(3deg); transform-origin: 100% 0; animation: signInG .34s cubic-bezier(.3, 1.5, .5, 1); }
body.simple #signCard.leaving { animation: signOutG .2s ease-in forwards; }
@keyframes signInG { from { opacity: 0; transform: rotate(11deg) scale(.7); } }
@keyframes signOutG { to { opacity: 0; transform: rotate(9deg) scale(.8); } }
#signCard b, body.simple #signCard b { font: 400 16px/1.05 var(--game); letter-spacing: .01em; color: var(--gInk); text-shadow: none; }
#signCard span { color: #2c4a7a; }
body.simple #signCard img { width: 32px; height: 32px; filter: none; }
body.simple #signLight { left: 28px; top: 1px; width: 8px; height: 8px; }
/* (kept small: the sign and its name, no bigger than the menu button beside it) */
#signCard, body.simple #signCard { border-width: 3px; padding: 3px 10px 3px 3px; gap: 7px; border-radius: 11px 9px 12px 10px; box-shadow: 0 4px 0 var(--gInk), 0 8px 14px rgba(0, 0, 0, .28); }
#signCard b, body.simple #signCard b { font-size: 13.5px; }
@media (max-height: 520px) { #signCard, body.simple #signCard { padding: 2px 8px 2px 2px; } body.simple #signCard img { width: 28px; height: 28px; }
  #signCard b, body.simple #signCard b { font-size: 12px; } body.simple #signLight { left: 24px; } }
@media (prefers-reduced-motion: reduce) { #signCard, body.simple #signCard { animation: none; } }

/* outlined names that can be cut short with "…": the outline reaches a few pixels past the letters, and the box that
   cuts long names off clipped it - the left of the "W" in the route's name, the end of "B · Car". Room for it inside
   the box, taken back outside so nothing moves. */
.hmCardTx b { padding: 2px 4px; margin: -2px -4px; }
.hmChip b { padding: 2px 3px; margin: -2px -3px; max-width: 116px; }

/* the loading screen keeps to the title and the bar: what is loading ("Building Utrecht: streets, ...") is still read
   out to a screen reader, but not shown - only when loading fails does the message show, with the retry button */
#boot:not(.failed) #loading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* slanted like the route card on the home screen: the pause panel leans a little, and the buttons, switches and score
   boxes in it - and the main buttons on the other screens - lean like the card, their contents stood back up */
#pause .pauseCard { transform: skewX(-3deg); }
#pause .pauseCard > * { transform: skewX(3deg); }
button.primary, .rsSide button.primary, #pause .pauseCard button.primary, button.ghost, .formbtns button.ghost, .backBtn, .rsTop .backBtn,
#pause .pauseBtn, #pause .pTog, #pause #pauseChips span { transform: skewX(-6deg); }
button.primary > *, button.ghost > *, .backBtn > *, #pause .pauseBtn > *, #pause .pTog > *, #pause #pauseChips span > * { transform: skewX(6deg); }
button.primary:hover, .rsSide button.primary:hover, #pause .pauseCard button.primary:hover,
button.ghost:hover, .formbtns button.ghost:hover, .backBtn:hover, #pause .pauseBtn:hover { transform: skewX(-6deg) translateY(-1px); }
button.primary:active, .rsSide button.primary:active, #pause .pauseCard button.primary:active,
button.ghost:active, .formbtns button.ghost:active { transform: skewX(-6deg) translateY(4px); }
.backBtn:active, #pause .pauseBtn:active { transform: skewX(-6deg) translateY(3px); }
#pause .pTog:active { transform: skewX(-6deg) translateY(2px); }
#pause:not(.hidden) > .pauseCard { animation: popInSlant .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes popInSlant { from { transform: translateY(14px) scale(.96) skewX(-3deg); opacity: 0; } to { transform: skewX(-3deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #pause:not(.hidden) > .pauseCard { animation: none; } }

/* the fade to black when a lesson takes the car back to the route (src/main.js farOff): over the 3D view and the HUD, under the menus */
#fader { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .55s ease; z-index: 9; }
#fader.on { opacity: 1; transition-duration: .5s; }
/* "Getting the car ready" between DRIVE and the drive's first picture (src/main.js go): over everything, the wheel turning */
#readyCard { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 14px;
  background: rgba(10, 18, 40, .55); color: #fff; font: 800 clamp(18px, 3vw, 26px)/1.2 system-ui, sans-serif; letter-spacing: .02em; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
#readyCard.hidden { display: none; }
#readyCard i { width: 34px; height: 34px; border-radius: 50%; border: 5px solid rgba(255,255,255,.25); border-top-color: #ffd23f; animation: readySpin .8s linear infinite; }
@keyframes readySpin { to { transform: rotate(360deg); } }

/* the route screen's cities: all of them in a row, the chosen one lit; and the note over the map while one loads */
.cityTabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cityTabs button { border: 2px solid var(--black); border-radius: 9px; background: rgba(8, 20, 44, .55); color: #fff; font: 900 15px/1 var(--ui); padding: 9px 14px; cursor: pointer; }
.cityTabs button:hover { background: rgba(8, 20, 44, .8); }
.cityTabs button.on { background: var(--plateY); color: var(--black); }
.cityTabs button.busy { background: #fff; color: var(--black); animation: cityBusy 1s ease-in-out infinite alternate; }
@keyframes cityBusy { from { opacity: .55; } to { opacity: 1; } }
.mapBusy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; background: rgba(8, 14, 26, .72); color: #fff; font: 900 18px/1.3 var(--ui); border-radius: inherit; z-index: 3; }
#routeList.busy { opacity: .45; pointer-events: none; }
@media (max-width: 700px) { .cityTabs button { font-size: 12.5px; padding: 6px 9px; } }

/* ---- the keys drawn as a keyboard (src/engine/keymap.js): on the loading screen and in the help - desktop only ---- */
.keyMap svg { display: block; width: 100%; height: auto; }
.keyMap svg text { font-family: var(--game); }
.keyMap ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 14px; }
.keyMap li { display: flex; align-items: baseline; gap: 7px; font: 600 13px/1.3 var(--ui); }
.keyMap li i { flex: none; width: 13px; height: 13px; border-radius: 4px; border: 2px solid var(--gInk); transform: translateY(2px); }
.keyMap li b { flex: none; font: 400 14px/1 var(--game); letter-spacing: .02em; }
.keyMap li span { opacity: .85; }
.keyMap li:last-child { grid-column: 1 / -1; }
#boot #bootKeys { width: min(620px, calc(100vw - 32px)); margin-top: 6px; padding: 14px 16px 12px; border-radius: 16px; background: rgba(10, 30, 66, .82); border: 3px solid var(--gInk); box-shadow: 0 5px 0 var(--gInk); color: #fff; }
#boot #bootKeys li b { color: #ffd23f; }
#help #helpKeys { margin: 4px 0 14px; padding: 12px 14px 10px; border-radius: 14px; background: #f1f5fb; border: 2px solid #c9d2e0; color: var(--gInk); }
/* (not on a phone or tablet, which drive with the on-screen buttons; nor where the window is too short to fit it) */
body.touch .keyMap { display: none !important; }
@media (pointer: coarse), (max-width: 720px), (max-height: 700px) { #boot #bootKeys { display: none; } }

/* desktop app (Tauri): a Quit button on the home screen and in the pause menu; hidden in the browser */
.desktopOnly { display: none !important; }
body.desktopApp .desktopOnly { display: grid !important; }
body.desktopApp .pauseBtn.desktopOnly { display: flex !important; }
.hmTopBtns { display: flex; gap: 12px; }
.hmExit { background: linear-gradient(#ff8a7a, #f0553f 60%, #d23c2a); }
.hmExit svg { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; }

/* routes not in the free version (data/registry.js FREE_ROUTES): grey, with a lock - here too, over the route screen's own colours */
#routes .rItem.locked { background: #e4e7ee; color: #5d6472; }
#routes .rItem.locked:hover { background: #eef0f5; }
#routes .rItem.locked.on { background: linear-gradient(180deg, #8c95a8, #6a7387); color: #fff; }
#routes .rItem.locked em { color: #b3261e; }
#routes .rItem.locked.on em { color: #ffe08a; }

/* settings that only mean something on a touch screen (how to steer) */
.touchOnly { display: none; } body.touch .touchOnly { display: block; }
