@font-face{font-family:Manrope;src:url(vendor/manrope.woff2) format("woff2");font-weight:400 800;font-display:swap}
@font-face{font-family:Unbounded;src:url(vendor/unbounded.woff2) format("woff2");font-weight:400 900;font-display:swap}
:root{color-scheme:dark;--base:#050608;--surface:#0a0f16;--raised:#101923;--line:#263442;--muted:#a7bacd;--text:#eff7ff;--player:#57e4ff;--mood:#a3b2f6;--edge:clamp(14px,2.1vw,40px);font:600 16px/1.45 Manrope,system-ui,sans-serif}
*,*:before,*:after{box-sizing:border-box}
body{margin:0;background:var(--base);color:var(--text)}
h1,h2,p,dl,dd,figure{margin:0}
h1,h2,strong{font-family:Unbounded,system-ui,sans-serif}
button,input{font:inherit}
button{color:inherit;cursor:pointer;touch-action:manipulation}
button:disabled{cursor:default;opacity:.42}
button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--player);outline-offset:4px}
[hidden]{display:none!important}
.icon{width:22px;height:22px;display:inline-block;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linejoin:round;stroke-linecap:round;flex:none}
.app{min-height:100dvh;padding:0 var(--edge) var(--edge);display:grid;grid-template-rows:auto minmax(460px,1fr) auto;gap:14px;max-width:2400px;margin:auto}
.app[data-mood=chrome]{--mood:#c9f4f0}
.app[data-mood=grid]{--mood:#a7ff97}
.topbar{min-height:80px;display:flex;align-items:center;gap:18px;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:12px}
.brand img{display:block}
.brand h1{font-size:clamp(1.05rem,1.95vw,1.65rem);font-weight:800;line-height:1}
.drive-status{display:flex;align-items:center;gap:8px;font-size:.88rem;color:var(--muted)}
.status-dot,.profile-dot{display:block;width:8px;height:8px;background:var(--player);transform:rotate(45deg);flex:none}
.status-dot{background:#5f738b}
.status-dot[data-online=true]{background:var(--player);box-shadow:0 0 12px var(--player)}
.top-actions{display:flex;align-items:center;gap:9px}
.profile-button,.icon-button,.secondary,.primary{border:1px solid var(--line);min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--surface);padding:.63rem .84rem;font-weight:800;line-height:1.22}
.profile-button{max-width:min(24vw,220px)}
.profile-button span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.icon-button{width:46px;padding:0}
.profile-button:hover,.icon-button:hover,.secondary:hover,.plain-row:hover{border-color:var(--player);color:var(--player)}
.primary{background:var(--player);color:#071016;border-color:var(--player)}
.primary:hover{filter:brightness(1.12)}
.deck{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) clamp(270px,23.4vw,405px);gap:14px}
.map-shell{position:relative;min-width:0;min-height:490px;overflow:hidden;background:#080d15;border:1px solid #304657;isolation:isolate}
.map-frame,.offline-map,.map-labels{position:absolute;inset:0;width:100%;height:100%}
.map-frame{overflow:hidden}
.map-frame .maplibregl-canvas-container{position:absolute;inset:0}
.map-labels,.map-rails{pointer-events:none}
.map-labels{z-index:2}
.map-place{position:absolute;top:0;left:0;white-space:nowrap;color:#a6bdd2;text-shadow:0 1px #080d15,1px 0 #080d15,-1px 0 #080d15,0 -1px #080d15;font-size:.78rem;font-weight:800;padding:0 .25rem;user-select:none}
.map-rails{position:absolute;inset:0;z-index:3;border-left:2px solid var(--player);opacity:.62}
.map-rails::before,.map-rails::after{content:"";position:absolute;width:25px;height:25px;border-color:var(--player);border-style:solid}
.map-rails::before{top:0;left:0;border-width:2px 0 0 0}
.map-rails::after{bottom:0;right:0;border-width:0 2px 2px 0}
.map-hud{position:absolute;inset:17px 17px auto;display:flex;align-items:start;justify-content:space-between;gap:13px;z-index:4;pointer-events:none}
.map-hud>div{padding:11px 14px;background:#0a1019;border:1px solid var(--line);max-width:82%}
.map-hud h2{font-size:clamp(.95rem,1.42vw,1.44rem);margin-top:3px;line-height:1.15}
.map-hud span,.map-bottom{color:var(--muted);font-size:.76rem}
.map-hud button{pointer-events:auto}
.map-bottom{position:absolute;z-index:4;inset:auto auto 18px 17px;display:flex;gap:7px;align-items:center;flex-wrap:wrap;pointer-events:none}
.map-direction,#signal-label,.map-demo{padding:.42rem .59rem;background:#0a1019;border:1px solid var(--line)}
.map-direction{display:flex;gap:7px;align-items:center}
#compass-arrow{color:var(--player);font-size:1rem;line-height:1}
.attribution{position:absolute;bottom:0;right:0;background:#080d15;color:#99aebd;font-size:.69rem;padding:2px 5px;z-index:4}
.attribution a{color:inherit}
.car-marker{position:absolute;left:0;top:0;width:49px;height:49px;color:var(--player);pointer-events:none;z-index:3;filter:drop-shadow(0 0 8px var(--player))}
.car-marker svg{width:100%;height:100%;display:block}
.map-demo{position:absolute;left:50%;top:12px;transform:translateX(-50%);z-index:5;color:#ffd48d;font-size:.75rem;font-weight:800}
.sidebar{min-width:0;display:flex;flex-direction:column;gap:14px}
.territory-panel,.drive-panel{background:var(--surface);border:1px solid var(--line);padding:clamp(15px,1.65vw,27px);min-width:0}
.territory-panel{flex:1}
.panel-heading{display:flex;justify-content:space-between;gap:10px;align-items:start;min-width:0}
.panel-heading h2,.sound-status h2{font-size:clamp(.92rem,1.23vw,1.25rem);font-weight:750}
.panel-heading p,.sound-status p,.drive-footnote{color:var(--muted);font-size:.84rem;margin-top:.3rem;line-height:1.42}
.territory-icon,.sound-icon{width:41px;height:41px;border:1px solid var(--line);display:grid;place-items:center;color:var(--player);background:#0d1821;flex:none}
.total-stat{padding:clamp(17px,2.35vw,37px) 0 14px}
.total-stat>div{display:flex;align-items:baseline;gap:7px;color:var(--player)}
.total-stat strong{font-size:clamp(2.5rem,4.35vw,4.6rem);line-height:1;letter-spacing:-.06em;font-variant-numeric:tabular-nums}
.total-stat span{font-size:.93rem}
.total-stat p{color:var(--muted);margin-top:5px;font-size:.88rem}
.stat-grid{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}
.stat-grid div{padding:.52rem .3rem .56rem 0;min-width:0}
.stat-grid div:last-child{grid-column:span 2;border-top:1px solid var(--line)}
.stat-grid dd{font:750 clamp(1.1rem,1.7vw,1.65rem)/1.25 Unbounded,system-ui,sans-serif}
.stat-grid small{font:700 .75rem Manrope,system-ui,sans-serif}
.stat-grid dt{font-size:.77rem;color:var(--muted);margin-top:.23rem}
.plain-row{width:100%;min-height:45px;border:0;border-top:1px solid var(--line);padding:.8rem 0 .15rem;background:none;display:flex;justify-content:space-between;align-items:center;text-align:left;font-weight:800;color:var(--text)}
.plain-row .icon{width:17px}
.drive-buttons{display:grid;gap:7px;margin-top:12px}
.drive-panel>button{width:100%;margin-top:12px}
.drive-buttons .primary,.drive-buttons .secondary{justify-content:space-between;text-align:left}
.drive-footnote{margin-top:10px;font-size:.73rem}
.transport{background:var(--surface);border:1px solid var(--line);min-height:82px;padding:9px 12px;display:grid;grid-template-columns:minmax(134px,.75fr) auto minmax(0,1.58fr) minmax(107px,.48fr);gap:12px;align-items:center}
.sound-status{display:flex;align-items:center;gap:10px;min-width:0}
.sound-status p{white-space:nowrap}
.play-toggle{min-width:93px;min-height:61px;padding:0 12px;display:flex;align-items:center;justify-content:center;gap:7px;background:var(--player);color:#061018;border:1px solid var(--player);font-weight:850}
.play-toggle:hover{filter:brightness(1.12)}
.play-toggle .icon{width:25px;height:25px}
.mood-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;border:1px solid var(--line);padding:4px;min-width:0}
.mood-options button{min-height:44px;padding:5px 6px;background:none;border:1px solid transparent;color:var(--muted);font-size:clamp(.68rem,1vw,.9rem);font-weight:800;line-height:1.18}
.mood-options button:hover,.mood-options button[aria-pressed=true]{color:var(--mood);border-color:var(--mood);background:#151e2a}
.volume-wrap{display:flex;align-items:center;gap:8px;min-width:0;justify-content:end;color:var(--muted)}
.volume-wrap .icon{width:19px}
input[type=range]{accent-color:var(--player);min-width:0}
.volume-wrap input{width:min(90px,100%);min-height:44px}
.sheet{background:var(--surface);color:var(--text);border:1px solid #3b5366;width:min(92vw,530px);max-height:86dvh;padding:clamp(16px,4vw,30px);box-shadow:0 18px 75px #000c;overflow:auto}
.sheet::backdrop{background:#05080ca8;backdrop-filter:blur(3px)}
.sheet-header{display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:16px}
.sheet h2{font-size:clamp(1.2rem,3vw,1.85rem);line-height:1.2}
.sheet p,.setting small{color:var(--muted);font-size:.88rem;margin-top:5px;display:block}
.close-button{font-size:1.6rem;font-weight:500;background:var(--raised);width:44px;height:44px;border:1px solid var(--line);flex:none;display:grid;place-items:center;padding:0}
.field{display:grid;gap:6px;color:var(--muted);font-weight:800}
.field input{background:var(--base);color:var(--text);min-height:50px;width:100%;padding:.7rem;border:1px solid var(--line);border-radius:0}
.color-field{margin:15px 0;padding:0;border:0;color:var(--muted)}
.colors{--swatch-size:44px;display:grid;grid-template-columns:repeat(auto-fit,var(--swatch-size));gap:12px;justify-content:space-between;margin:12px 0 18px}
.color-option{position:relative;display:grid;width:var(--swatch-size);height:var(--swatch-size);cursor:pointer}
.color-option input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.color-option span{display:block;width:100%;height:100%;border-radius:50%;background:var(--swatch);box-shadow:0 0 11px -3px var(--swatch)}
.color-option input:checked+span{outline:3px solid white;box-shadow:0 0 16px var(--swatch)}
.color-option:has(input:focus-visible){border-radius:50%;outline:2px dashed var(--player);outline-offset:5px}
@media(pointer:coarse){.colors{--swatch-size:56px}}
.wide{width:100%;justify-content:space-between}
.setting{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-top:1px solid var(--line)}
.setting strong{font:800 1rem Manrope,system-ui,sans-serif}
.setting input{width:25px;height:25px;accent-color:var(--player);flex:none;cursor:pointer}
.notice{position:fixed;z-index:20;left:50%;bottom:105px;transform:translateX(-50%);background:#101a24;border:1px solid var(--line);color:var(--text);padding:.65rem 1rem;width:max-content;max-width:min(92vw,440px);font-size:.85rem}
.recap-bar{position:absolute;z-index:6;left:15px;right:15px;bottom:25px;padding:12px;background:#0a1019;border:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:11px;flex-wrap:wrap}
.recap-bar h2{font-size:1.12rem}
.recap-bar p{font-size:.84rem;color:var(--muted);margin-top:3px}
.recap-bar>div:last-child{display:flex;gap:6px;flex-wrap:wrap}
.recap-active .map-hud,.recap-active .map-bottom{display:none}
@media(min-width:900px) and (min-height:740px){
 .app{height:100dvh;grid-template-rows:auto minmax(0,1fr) auto}
 .map-shell{min-height:0}
 .sidebar{overflow:auto}
}
@media(max-width:899px){
 .app{grid-template-rows:auto auto auto}
 .deck{grid-template-columns:minmax(0,1fr) 270px}
 .transport{grid-template-columns:auto minmax(0,1fr) minmax(80px,.33fr)}
 .sound-status{display:none}
}
@media(max-width:679px){
 .app{gap:10px;--edge:10px}
 .topbar{min-height:66px;gap:7px}
 .brand{gap:6px}.brand img{width:34px;height:34px}
 .drive-status{font-size:.71rem;gap:5px}
 .profile-button{min-width:42px;max-width:22vw;padding:.4rem;font-size:.70rem}
 .deck{display:flex;flex-direction:column;gap:10px}
 .map-shell{min-height:clamp(350px,56dvh,590px)}
 .map-hud{inset:10px 10px auto}
 .map-hud>div{padding:8px 9px}
 .map-bottom{bottom:18px;left:10px}
 .sidebar{gap:10px}
 .stats-grid{gap:8px}
 .transport{grid-template-columns:auto minmax(0,1fr);padding:6px;gap:5px;min-height:69px;position:sticky;bottom:0;z-index:7}
 .volume-wrap{grid-column:1/-1;justify-content:start;padding:0 9px}
 .volume-wrap input{width:100%;min-height:34px}
 .mood-options button{font-size:.67rem}
 .play-toggle{min-width:63px;min-height:53px;padding:0 6px;font-size:.73rem}
 .play-toggle .icon{width:17px;height:17px}
 .notice{bottom:120px}
 .map-demo{top:56px}
}
.app.is-moving{
  height:100dvh;min-height:0;max-width:none;padding:0;gap:0;grid-template-rows:minmax(0,1fr) auto;
}
.is-moving .topbar,.is-moving .sidebar,.is-moving .map-hud,.is-moving .map-bottom,.is-moving .volume-wrap,.is-moving .sound-status,.is-moving .attribution,.is-moving .map-demo{display:none}
.is-moving .deck{display:block;min-height:0;height:100%;overflow:hidden}
.is-moving .map-shell{min-height:0;height:100%;border:0}
.is-moving .map-labels{display:none}
.is-moving .map-frame{touch-action:none;pointer-events:none}
.is-moving .transport{grid-template-columns:minmax(80px,1fr) minmax(240px,4fr);padding:6px;gap:5px;position:relative;border-inline:0;min-height:92px}
.is-moving .play-toggle,.is-moving .mood-options button{min-width:80px;min-height:80px;font-size:clamp(.75rem,2.15vw,1.25rem)}
.is-moving .mood-options{padding:0;border:0;gap:1px}
.is-moving .play-toggle .icon{width:25px;height:25px}
@media(max-width:350px){.is-moving .transport{padding-inline:0;gap:0}.is-moving .mood-options{gap:0}.is-moving .mood-options button{padding-inline:2px}.is-moving .play-toggle{padding:0;font-size:.7rem;gap:3px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.is-moving .map-demo{display:block;top:12px;font-size:1rem}
.app{grid-template-columns:minmax(0,1fr)}
.brand,.drive-status{min-width:0}
.drive-status #gps-status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top-actions{flex:none}
@media(max-width:350px){
 .is-moving .transport{grid-template-columns:minmax(0,1fr);grid-template-rows:80px 80px;padding:0 5px}
 .is-moving .mood-options{grid-template-columns:repeat(3,minmax(80px,1fr))}
}

.offline-map{cursor:grab;touch-action:none}
.offline-map.panning{cursor:grabbing}
.map-tools{position:absolute;z-index:5;top:75px;right:17px;display:flex;flex-direction:column;gap:4px}
.map-tools .map-zoom{font-size:1.45rem;line-height:1}
.map-country{color:#9fb1c3;font-size:.69rem;text-shadow:0 1px #080d15,1px 0 #080d15}
.recap-active .map-tools,.is-moving .map-tools{display:none}
@media(max-width:679px){.map-tools{top:63px;right:10px}.map-tools .icon-button{width:44px;min-height:44px}}

.intro{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;padding:clamp(22px,5vw,64px);overflow:auto;background:var(--base);color:var(--text)}
.intro[open]{display:grid;align-items:safe center;justify-items:center}
.intro::backdrop{background:var(--base)}
.intro-content{width:min(100%,720px);text-align:center}
.intro-brand{display:flex;justify-content:center;align-items:center;gap:clamp(8px,2vw,20px)}
.intro-brand img{width:clamp(40px,8vw,68px);height:auto}
.intro-brand h1{font-size:clamp(1.9rem,7.5vw,4.8rem);font-weight:800;line-height:1}
.intro p{margin-top:16px;font-size:clamp(1rem,1.7vw,1.25rem);color:var(--muted)}
.intro-highway{display:block;width:100%;height:clamp(115px,29dvh,215px);margin:clamp(22px,5dvh,54px) auto;overflow:hidden}
.intro-side-roads{fill:none;stroke:#27313b;stroke-width:2}
.intro-road{stroke:#333e48;stroke-width:17}
.intro-lanes{stroke:#71818d;stroke-width:1;stroke-dasharray:.75 1.1}
.intro-paint{stroke:var(--player);stroke-width:5;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:0;filter:drop-shadow(0 0 5px var(--player))}
.intro[open] .intro-paint{animation:intro-road-paint 4.5s cubic-bezier(.37,.12,.29,1) infinite}
@keyframes intro-road-paint{
  0%,6%{stroke-dashoffset:100;opacity:1}
  70%,87%{stroke-dashoffset:0;opacity:1}
  100%{stroke-dashoffset:0;opacity:0}
}
.intro-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.intro-actions button{min-height:52px;padding-inline:clamp(16px,4vw,36px)}
@media(max-width:380px){.intro-actions{display:grid}}
.is-moving .map-shell:has([data-basemap="raster"]) .attribution{display:block}
