:root{color-scheme:dark;font-family:Arial,Helvetica,sans-serif;color:#fff;background:#193f3c;font-synthesis:none}*{box-sizing:border-box}html,body,#game{width:100%;height:100%;margin:0;overflow:hidden}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible{outline:3px solid #f5c97b;outline-offset:4px}button:disabled{opacity:.5}canvas#world{display:block;width:100%;height:100%;touch-action:none}#hud{position:fixed;inset:0;pointer-events:none;user-select:none;padding:28px}#hud button{pointer-events:auto}.brand{position:absolute;left:28px;top:25px;text-shadow:0 2px 15px #071917}.brand b{font-weight:800;font-size:25px;letter-spacing:7px}.brand small{display:block;font-size:12px;letter-spacing:2px;margin-top:7px;color:#d7e3de}.pill{background:#132d29d9;border:1px solid #a4bcb62b;backdrop-filter:blur(14px);border-radius:9px}.top-actions{position:absolute;right:28px;top:24px;display:flex;gap:8px}.icon-btn{width:43px;height:43px;border:1px solid #a4bcb633;border-radius:9px;background:#132d29de;font-size:18px}.mission{position:absolute;top:87px;right:28px;width:310px;padding:18px 20px;border-left:3px solid #eebd6e;box-shadow:0 8px 25px #07191722}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:700;text-transform:uppercase;color:#f3c780}.mission h2{font-size:19px;margin:8px 0;line-height:1.2}.mission p{font-size:14px;line-height:1.5;color:#d9e4df;margin:0}.distance{margin-top:13px;color:#f3c780;font-size:13px}.compass{position:absolute;left:50%;top:28px;transform:translateX(-50%);font-size:12px;letter-spacing:7px;text-shadow:0 2px 6px #0009}.map-box{position:absolute;left:28px;bottom:30px;width:185px;height:185px;overflow:hidden;box-shadow:0 6px 30px #07191733}.map-box canvas{width:100%;height:100%;border-radius:9px}.map-label{position:absolute;left:0;right:0;bottom:0;padding:7px;background:#102b25df;text-align:center;font-size:10px;letter-spacing:1.6px}.vehicle{position:absolute;right:28px;bottom:30px;text-align:right}.speed{font-size:64px;line-height:1;letter-spacing:-3px;text-shadow:0 2px 20px #0006}.speed small{font-size:13px;letter-spacing:1px;padding-left:7px}.vehicle-name{font-size:12px;letter-spacing:1.8px;margin-top:8px;color:#e6f1eb}.bar{width:128px;height:3px;background:#ffffff33;margin:12px 0 8px auto}.bar i{display:block;height:100%;background:#f2c375;width:100%}.wallet{font-size:14px;color:#f7ce84}.hint{position:absolute;left:50%;bottom:36px;transform:translateX(-50%);padding:11px 18px;font-size:13px;white-space:nowrap;color:#e0eae6;background:#102b25c9;border-radius:7px}.key{display:inline-flex;align-items:center;justify-content:center;min-width:22px;padding:3px 5px;margin-right:6px;background:#ecf3ea;color:#18332a;border-radius:3px;font-size:11px;font-weight:700}.interaction{position:absolute;left:50%;top:65%;transform:translate(-50%,-50%);padding:12px 18px;font-size:15px;display:none;pointer-events:auto!important;border:1px solid #ecc17a70;background:#142f27ed;border-radius:8px;box-shadow:0 4px 20px #0003}.interaction.show{display:block}.subtitle{position:absolute;left:50%;bottom:105px;transform:translateX(-50%);width:max-content;max-width:min(620px,85vw);font-size:16px;line-height:1.6;text-align:center;padding:11px 20px;background:#081a16d9;border-radius:5px;opacity:0;transition:opacity .3s}.subtitle.show{opacity:1}.subtitle b{color:#f5c67a}.toast{position:absolute;left:50%;top:90px;transform:translateX(-50%);background:#163d32ed;border:1px solid #f1c67b60;padding:14px 24px;border-radius:8px;opacity:0;transition:opacity .3s;text-align:center;font-size:14px}.toast.show{opacity:1}.heat{position:absolute;left:50%;top:63px;transform:translateX(-50%);font-size:12px;letter-spacing:2px;color:#f7a68b;background:#37251cd9;padding:8px 14px;border-radius:20px;display:none}.heat.show{display:block}#intro{position:fixed;inset:0;display:flex;align-items:center;background:linear-gradient(90deg,#082722eb 0%,#0b3029b8 35%,#0c241b18 80%);padding:7vw;z-index:5}#intro.hide{display:none}.intro-content{max-width:510px}.intro-location{letter-spacing:4px;text-transform:uppercase;font-size:12px;color:#f3c986}h1{font-size:clamp(68px,10vw,132px);line-height:1;letter-spacing:8px;margin:22px 0 3px;font-weight:800}.intro-sub{font-size:16px;letter-spacing:5px;text-transform:uppercase;color:#dbe7db}.intro-copy{font-size:17px;line-height:1.75;color:#e3ebe2;max-width:405px;margin:30px 0}.primary{padding:15px 27px;border:0;border-radius:5px;background:#f1c379;color:#132a21;font-size:16px;font-weight:bold;box-shadow:0 4px 15px #0002}.secondary{padding:12px 20px;border:1px solid #8fa79a5c;border-radius:5px;background:#ffffff09;font-size:14px}.intro-meta{margin-top:24px;font-size:12px;color:#b4c5b8;line-height:1.8}.intro-foot{position:absolute;bottom:25px;left:7vw;font-size:11px;letter-spacing:2px;color:#c7d5cd}.modal-backdrop{position:fixed;inset:0;background:#071c17c9;display:none;align-items:center;justify-content:center;z-index:8;padding:20px;backdrop-filter:blur(8px)}.modal-backdrop.show{display:flex}.modal{width:560px;max-width:100%;max-height:90vh;overflow:auto;background:#153b32;border:1px solid #93b09d44;border-radius:12px;padding:28px;box-shadow:0 15px 70px #0005}.modal h2{font-size:27px;font-weight:500;margin:8px 0 20px}.modal p{font-size:15px;line-height:1.6;color:#d4e1d6}.modal .row{display:flex;gap:10px;flex-wrap:wrap;margin-top:17px}.modal label{display:flex;align-items:center;justify-content:space-between;font-size:15px;margin-top:17px}.modal select{padding:7px;background:#0c2922;border:1px solid #749586;color:white;border-radius:5px}.controls-list{display:grid;grid-template-columns:1fr 1fr;gap:13px;font-size:14px;color:#d5e4da}.large-map{width:100%;aspect-ratio:1;display:block;border-radius:8px;background:#172e29}.modal.map-modal{width:620px;padding:22px}.map-head{display:flex;justify-content:space-between;align-items:center}.map-head h2{margin:0 0 16px}.map-legend{font-size:12px!important}.touch-controls{display:none;position:absolute;inset:0;pointer-events:none}.stick{position:absolute;bottom:38px;left:28px;width:116px;height:116px;border:1px solid #e2ede94f;border-radius:50%;background:#11372944;touch-action:none;pointer-events:auto}.stick i{position:absolute;width:45px;height:45px;left:35px;top:35px;border-radius:50%;background:#eef5ec75;border:1px solid #fff8}.touch-actions{position:absolute;right:20px;bottom:40px;display:grid;grid-template-columns:repeat(2,58px);gap:10px}.touch-actions button{width:58px;height:58px;border:1px solid #f3f2db50;border-radius:50%;background:#12372ab8;font-size:12px;touch-action:none}.touch-actions button.action{background:#edc378;color:#183027;font-size:14px;font-weight:bold}.driving-controls{display:none}.driving .driving-controls{display:block}.walking-controls{display:block}.driving .walking-controls{display:none}#recover{position:absolute;right:28px;bottom:178px;border:0;padding:8px 13px;font-size:12px;color:#e7ecdf;background:#14382bcf;border-radius:5px}#loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#102f27;z-index:20;text-align:center;padding:30px;font-size:18px;line-height:1.7}#loading.hidden{display:none}.rotate-hint{display:none}.badge{display:inline-block;margin-top:16px;font-size:11px;letter-spacing:1.8px;color:#c5d6c9}.mute-state{font-size:12px}.hidden{display:none!important}
@media(pointer:coarse){.touch-controls{display:block}.hint{display:none}.map-box{width:115px;height:115px;bottom:auto;top:95px;left:18px}.interaction{top:58%;font-size:14px;max-width:65vw}.subtitle{bottom:183px;font-size:14px}.vehicle{right:24px;bottom:193px}.speed{font-size:37px}.bar{width:90px}.vehicle-name{font-size:10px}.brand{left:20px;top:18px}.brand b{font-size:21px}.brand small{font-size:10px}.top-actions{right:18px;top:16px}.mission{right:18px;top:76px;width:230px;padding:12px 14px}.mission h2{font-size:16px}.mission p{font-size:13px}.mission .eyebrow{font-size:10px}.distance{font-size:12px;margin-top:7px}.compass{display:none}.heat{top:18px;font-size:10px}.toast{top:225px;width:75vw}#recover{right:20px;bottom:285px}.intro-copy{font-size:16px;margin:22px 0}.intro-meta{margin-top:16px}}
@media(max-width:600px){#intro{padding:30px;background:linear-gradient(90deg,#082722e8,#0b30298c)}h1{font-size:71px}.intro-sub{font-size:12px;letter-spacing:4px}.intro-foot{left:30px;bottom:18px;font-size:9px}.brand small{max-width:180px}.mission{width:210px}.mission p{font-size:12px}.map-box{width:105px;height:105px}.map-label{font-size:8px}.modal{padding:22px}.controls-list{grid-template-columns:1fr}.rotate-hint{display:block;color:#e6d7b2;font-size:12px;margin-top:13px}.heat{top:61px;left:75px;font-size:9px;letter-spacing:0}.subtitle{max-width:90vw}.stick{left:20px;bottom:40px}.interaction{top:62%}.intro-location{font-size:10px;letter-spacing:3px}}
@media(max-height:520px){.intro-copy{margin:17px 0;font-size:14px}h1{font-size:62px;margin:10px 0}.intro-sub{font-size:12px}.intro-meta,.intro-foot,.rotate-hint{display:none}.mission{top:70px}.map-box{width:90px;height:90px;top:80px}.brand small{display:none}.subtitle{bottom:30px;font-size:13px;max-width:50vw}.vehicle{right:170px;bottom:28px}.touch-actions{bottom:20px}.stick{bottom:20px}.toast{top:70px;width:auto}.interaction{top:67%}#recover{right:175px;bottom:110px}.modal{max-height:94vh}}

#performancePanel{position:fixed;top:76px;right:16px;z-index:40;max-width:calc(100vw - 32px);padding:12px 15px;background:rgba(8,19,17,.9);color:#e6f3e9;border:1px solid #718578;border-radius:8px;font:12px/1.6 monospace;pointer-events:none;white-space:pre-wrap}#performancePanel[hidden]{display:none}

#busJobs{font-size:12px;font-weight:800;width:44px}
#busDispatch .modal{max-height:85dvh;overflow:auto}
#world{touch-action:none}

/* Minimal in-game HUD: objective, navigation and contextual state. */
#hud .brand,#hud .compass,#hud .hint,#hud .map-label,#hud .mission h2,#hud .mission .eyebrow{display:none}
#hud .top-actions{right:20px;top:20px;gap:0}
#hud .top-actions button[hidden]{display:none}
#pauseBtn{width:auto;min-width:58px;height:36px;padding:0 13px;font-size:14px;background:#11231dd9;border:0;border-radius:5px}
#hud .mission{left:20px;right:auto;top:20px;width:290px;max-width:calc(100vw - 160px);padding:11px 14px;background:#10231dc7;border:0;border-radius:5px;box-shadow:none;backdrop-filter:none}
#hud .mission p{font-size:14px;line-height:1.45;color:#fff}
#hud .mission .distance{margin-top:4px;font-size:12px;color:#eacb8d}
#hud .map-box{left:20px;bottom:20px;top:auto;width:148px;height:148px;border:1px solid #dde5da45;border-radius:6px;box-shadow:none;backdrop-filter:none}
#hud .map-box canvas{border-radius:5px}
#hud .vehicle{right:20px;bottom:22px;display:none}
body.driving #hud .vehicle{display:block}
#hud .speed{font-size:42px;letter-spacing:-1.5px}
#hud .speed small{font-size:11px;letter-spacing:.04em}
#hud .vehicle-name{display:none}
#hud .bar{width:80px;height:2px;margin-top:8px}
#hud .hud-wallet{position:absolute;right:96px;top:30px;font-size:14px;color:#f3e9cf;text-shadow:0 1px 5px #000}
#hud .interaction{top:auto;bottom:40px;max-width:calc(100vw - 380px);padding:9px 14px;font-size:14px;transform:translateX(-50%);border:0;border-radius:5px;background:#10231ddc;box-shadow:none}
#hud .subtitle{bottom:96px;font-size:15px;line-height:1.5;padding:8px 15px;max-width:min(640px,80vw)}
#hud .toast{top:105px;font-size:14px;padding:9px 16px;max-width:70vw;border:0;background:#10231de6}
#hud .heat{top:20px;font-size:12px;letter-spacing:.04em;border-radius:5px}
#pauseUtilities #recover{position:static;font-size:14px;padding:12px 16px}
#pause .modal{width:530px;background:#112b24;border-radius:8px}
#pause h2{margin-top:0;font-size:26px}
#pause a{color:#e7c889;font-size:14px}
.settings{border-top:1px solid #c4d1c22b;margin-top:20px;padding-top:16px}
.settings summary{font-size:15px;cursor:pointer;color:#e7ece2}
.settings .controls-list{margin-top:18px;line-height:1.5}
.settings p{font-size:14px}
@media(pointer:coarse){#hud .map-box{top:104px;bottom:auto;width:100px;height:100px}#hud .vehicle{bottom:176px}#hud .interaction{bottom:175px;max-width:65vw}#hud .subtitle{bottom:245px;font-size:14px}#hud .mission{max-width:calc(100vw - 150px);width:265px}}
@media(max-width:600px){#hud .mission{left:12px;top:12px;padding:9px 11px;max-width:calc(100vw - 105px)}#hud .mission p{font-size:13px}#hud .top-actions{right:12px;top:12px}#hud .hud-wallet{right:12px;top:58px;font-size:13px}#hud .map-box{left:12px}#hud .interaction{max-width:65vw}#hud .toast{top:110px;width:80vw;max-width:80vw}}
@media(max-height:520px){#hud .map-box{width:90px;height:90px;top:92px}#hud .subtitle{bottom:24px;max-width:52vw}#hud .vehicle{right:166px;bottom:24px}#hud .interaction{bottom:75px;max-width:50vw}#hud .mission{width:280px}#hud .toast{top:92px}}
/* Settings texture gallery: images are loaded only when opened. */
.texture-gallery{box-sizing:border-box;width:min(1160px,94vw);height:min(880px,92dvh);max-width:none;max-height:none;border:1px solid #52665a;border-radius:16px;padding:24px;background:#172c25;color:#f2ecdc;overflow:auto;box-shadow:0 20px 100px #0009}.texture-gallery::backdrop{background:#08140ed9;backdrop-filter:blur(8px)}.texture-gallery header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.texture-gallery h2{font-size:24px;margin:0 0 4px}.texture-gallery p{margin:0;color:#acbfb0}.texture-gallery button,.texture-gallery select,.texture-gallery input{font:inherit;color:inherit;border:1px solid #52665a;background:#233e33;border-radius:8px;padding:10px 14px}.texture-gallery button{cursor:pointer}.texture-gallery :focus-visible{outline:2px solid #e5bc76;outline-offset:3px}.gallery-tools{display:flex;gap:12px;margin:20px 0}.gallery-tools input{flex:1;min-width:0}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:16px}.gallery-grid[hidden],.gallery-viewer[hidden],.gallery-tools[hidden]{display:none}.texture-gallery .gallery-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;padding:8px;gap:7px;background:#20382e}.gallery-card img{width:100%;aspect-ratio:1;object-fit:contain;background:#101c16;border-radius:5px}.gallery-card span{font-size:13px;line-height:1.4}.gallery-card small{font-size:11px;color:#afc2b1}.gallery-viewer-bar{display:flex;align-items:center;gap:16px;margin:20px 0}.gallery-viewer-bar span{flex:1}.gallery-viewer a{color:#e5bc76}.gallery-viewer>img{display:block;width:100%;height:calc(92dvh - 245px);object-fit:contain;background:#101c16}.gallery-viewer nav{display:flex;justify-content:space-between;gap:12px;margin-top:14px}.texture-gallery .gallery-status{margin-top:12px;font-size:13px}.gallery-open{margin-top:16px}.texture-gallery .gallery-close{flex-shrink:0}@media(max-width:600px){.texture-gallery{padding:16px}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gallery-viewer-bar{flex-wrap:wrap}.gallery-viewer-bar span{flex-basis:60%}.gallery-tools{gap:8px}.gallery-tools select{max-width:130px}}

/* DialKit stays inside Settings so the driving HUD remains clear. */
#tuningOverlay { position:fixed; right:20px; bottom:20px; z-index:45; width:110px; color:#e7ece2; background:#11231df2; border:1px solid #c4d1c22b; border-radius:8px; box-shadow:0 8px 24px #0004; }
#tuningOverlay[open] { width:min(320px,calc(100vw - 40px)); }
#tuningOverlay>summary { cursor:pointer; padding:11px 14px; font-size:14px; user-select:none; }
#tuningOverlay>summary small { float:right; color:#eacb8d; }
#tuningOverlay>summary:focus-visible { outline:2px solid #f5c97b; outline-offset:3px; }
#gameDials { height:min(62dvh,620px); width:100%; overflow:hidden; color-scheme:dark; }
@media(pointer:coarse) { #tuningOverlay { bottom:180px; right:12px; } #gameDials { height:min(48dvh,460px); } }
#gameDials button { font: inherit; }

.map-legend { display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:12px; font-size:12px; color:#e7e6cd; }
.map-legend>span { display:inline-flex; align-items:center; gap:5px; }
.map-icon { display:inline-block; width:26px; height:26px; background-image:url('assets/textures/map-icons.png'); background-size:400% 200%; background-repeat:no-repeat; }
.map-icon-tea { background-position:0 0; }.map-icon-hospital { background-position:33.333% 0; }.map-icon-bus { background-position:66.667% 0; }.map-icon-garage { background-position:100% 0; }
.map-icon-market { background-position:0 100%; }.map-icon-ferry { background-position:33.333% 100%; }.map-icon-town { background-position:66.667% 100%; }.map-icon-landmark { background-position:100% 100%; }

/* Illustrated loading screens: keep the status node intact for every loading stage. */
#loading{
 --loading-art:url('./assets/loading/coastal-road.webp');
 flex-direction:column;align-items:flex-start;justify-content:flex-end;gap:12px;
 padding:clamp(28px,6vw,96px);padding-bottom:max(48px,8vh);text-align:left;
 background-image:linear-gradient(0deg,rgba(5,18,16,.94),rgba(5,18,16,.12) 58%,rgba(5,18,16,.08)),var(--loading-art);
 background-size:cover;background-position:center;color:#fff8e9;
 font-size:clamp(14px,1.3vw,19px);text-shadow:0 2px 12px #000;
}
#loading[data-scene="road"]{--loading-art:url('./assets/loading/hill-road.webp')}
#loading::before{content:"MAZHA / MONSOON COUNTY";font-size:clamp(20px,3vw,44px);font-weight:900;letter-spacing:.07em;line-height:1.15;max-width:100%;margin-bottom:4px}
#loading::after{content:"";width:clamp(90px,13vw,200px);height:3px;background:#f1c379;box-shadow:0 0 16px #f1c37944;margin-top:8px;animation:loading-breathe 1.8s ease-in-out infinite}
#loading a{color:#f1c379;text-decoration:underline;text-underline-offset:4px}
#loading[data-failed="true"]{overflow:auto}
#loading[data-failed="true"]::after{display:none}
#loading[data-failed="true"] p{max-width:640px;margin:0;overflow-wrap:anywhere;user-select:text;font-size:14px;line-height:1.5}
@keyframes loading-breathe{50%{opacity:.35}}
@media(max-width:600px){#loading{background-position:60% center;padding-bottom:max(36px,env(safe-area-inset-bottom))}#loading::before{max-width:260px;line-height:1.35}}
@media(prefers-reduced-motion:reduce){#loading::after{animation:none}}
