@font-face { font-family: "Geo"; font-weight: 400; font-display: swap; src: url("../fonts/noto-sans-georgian-georgian-400-normal.woff2") format("woff2"); unicode-range: U+10A0-10FF, U+1C90-1CBF, U+2D00-2D2F; }
@font-face { font-family: "Geo"; font-weight: 600; font-display: swap; src: url("../fonts/noto-sans-georgian-georgian-600-normal.woff2") format("woff2"); unicode-range: U+10A0-10FF, U+1C90-1CBF, U+2D00-2D2F; }
@font-face { font-family: "Geo"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+25A0-25FF; }
@font-face { font-family: "Geo"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+25A0-25FF; }
:root { --bg: #14181d; --panel: rgba(20, 24, 29, .82); --line: rgba(255, 255, 255, .12); --text: #f2f4f7; --muted: #a9b2bd; --green: #2ef28a; --red: #ff4d5e; --amber: #ffb300; --blue: #4aa8ff; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: 15px/1.5 "Geo", system-ui, sans-serif; touch-action: none; -webkit-user-select: none; user-select: none; }
canvas#scene { display: block; width: 100vw; height: 100vh; height: 100dvh; }
[hidden] { display: none !important; }
kbd { display: inline-block; min-width: 26px; padding: 1px 6px; margin-right: 6px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; font: 600 12px/1.6 "Geo", sans-serif; text-align: center; background: rgba(255, 255, 255, .06); }

.screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: linear-gradient(180deg, rgba(10, 14, 20, .25), rgba(10, 14, 20, .75)); }
#loading p { color: var(--muted); }
.spinner { width: 46px; height: 46px; margin: 0 auto 14px; border: 4px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: 0 30px 80px -30px #000; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 6px; background: #ffd400; color: #c40d0d; font-weight: 600; font-size: 13px; }
h1 { margin: 10px 0 4px; font-size: clamp(26px, 6vw, 36px); line-height: 1.2; }
h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.25; }
h2.pass { color: var(--green); } h2.fail { color: var(--red); }
.sub { margin: 0 0 18px; color: var(--muted); }
.choices { display: grid; gap: 10px; }
.districts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.districts a { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: 14px; }
.districts a.on { background: var(--green); border-color: var(--green); color: #0b2a18; font-weight: 600; }
.choices.row { grid-template-columns: 1fr 1fr; margin-top: 18px; }
.choice { display: grid; gap: 2px; text-align: left; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; cursor: pointer; transition: background .2s, border-color .2s; }
.choice b { font-size: 17px; }
.choice span { color: var(--muted); font-size: 14px; }
.choice:hover, .choice:focus-visible { background: rgba(46, 242, 138, .1); border-color: var(--green); outline: none; }
.choice.ghost b { color: var(--muted); }
details { margin-top: 16px; color: var(--muted); }
summary { cursor: pointer; color: var(--text); font-weight: 600; }
.keys { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.note { font-size: 13px; }
.legal { margin: 16px 0 0; font-size: 12px; color: #7d8794; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list li { padding: 10px 14px; border-radius: 10px; background: rgba(255, 179, 0, .12); border-left: 3px solid var(--amber); }
.list li.severe { background: rgba(255, 77, 94, .12); border-color: var(--red); }
.list li.ok { background: rgba(46, 242, 138, .12); border-color: var(--green); }

#hud { position: fixed; inset: 0; pointer-events: none; }
.top { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.where { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; max-width: 46%; }
.where #street { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.limit { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #111; border: 5px solid #d8181e; font: 700 16px/1 "Geo", sans-serif; }
.instr { flex: 1; min-width: 260px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; background: rgba(16, 86, 52, .9); border: 1px solid rgba(46, 242, 138, .5); font-weight: 600; font-size: 16px; }
.instr .icon { font-size: 30px; line-height: 1; }
.instr .text { flex: 1; }
.instr .dist { font-size: 18px; color: #c9ffe0; white-space: nowrap; }
.steps { position: absolute; top: 120px; left: 12px; margin: 0; padding: 12px 16px; list-style: none; display: grid; gap: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.steps li { color: var(--muted); }
.steps li.ok { color: var(--green); text-decoration: line-through; }
.faults { position: absolute; right: 12px; top: 120px; width: min(360px, 60vw); margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.faults li { padding: 8px 12px; border-radius: 10px; background: rgba(120, 80, 0, .9); border-left: 4px solid var(--amber); font-size: 14px; transition: opacity 1s; }
.faults li.severe { background: rgba(130, 20, 30, .92); border-color: var(--red); }
.faults li.old { opacity: .35; }
#minimap { position: absolute; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: 190px; height: 190px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); box-shadow: 0 10px 30px -10px #000; }
.dash { position: absolute; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto auto auto; grid-template-rows: auto auto; align-items: center; gap: 6px 10px; padding: 12px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.speedo { text-align: center; position: relative; min-width: 96px; }
.speedo b { display: block; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.speedo small { color: var(--muted); font-size: 12px; }
.gear { position: absolute; top: -4px; right: -18px; padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, .1); font-weight: 600; font-size: 13px; }
.ind { font-size: 22px; color: #3a414a; }
.ind.on { color: #3ef25e; text-shadow: 0 0 12px #3ef25e; }
.icons { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; font-size: 12px; }
.icons span { padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--muted); }
#i-belt.warn, #i-hand.warn { background: rgba(255, 77, 94, .25); color: #ffb3bb; }
#i-engine.on { background: rgba(46, 242, 138, .18); color: var(--green); }

#touch { position: fixed; inset: auto 0 0 0; padding: 0 10px max(10px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; pointer-events: none; }
#touch .pad { display: flex; gap: 8px; pointer-events: auto; }
#touch .mid { position: fixed; left: 10px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 88px); display: grid; grid-template-columns: repeat(2, 60px); gap: 6px; }   /* above the steering pad, clear of the instructions */
#touch button { min-width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line); background: rgba(20, 24, 29, .7); color: var(--text); font: 600 15px "Geo", sans-serif; }
#touch .mid button { min-width: 52px; height: 42px; font-size: 13px; border-radius: 12px; }
#touch .left button { width: 76px; height: 76px; font-size: 26px; }
#touch .gas { height: 110px; background: rgba(16, 86, 52, .8); }
#touch .brake { height: 84px; background: rgba(110, 22, 32, .8); }
#touch button.on { filter: brightness(1.6); }
@media (pointer: coarse) {
    #minimap { width: 120px; height: 120px; left: auto; right: 12px; bottom: auto; top: 128px; }
    .dash { bottom: 140px; right: 12px; padding: 8px 12px; }
    .speedo b { font-size: 32px; }
    .faults { top: auto; bottom: 230px; }
    .steps { top: 200px; font-size: 13px; }
    .where { max-width: 100%; }
}
