:root{--gold:#e7ba56;--gold2:#ffdc7c;--ink:#080b10;--panel:#111722;--panel2:#171f2c;--line:#2a3547;--text:#f2f5f8;--muted:#9da8b8;--green:#40d889;--red:#ff5a61;--blue:#55a8ff}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#05070a;color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}button,input{font:inherit}button{cursor:pointer}#app{position:relative;width:100%;height:100%;display:grid;place-items:center;background:radial-gradient(circle at 50% 20%,#1f2938,#05070a 65%)}#game{width:100vw;height:56.25vw;max-height:100vh;max-width:177.78vh;display:block;background:#17262f;image-rendering:pixelated;box-shadow:0 0 80px #000}.hidden{display:none!important}
.screen{position:absolute;inset:0;z-index:20;display:grid;place-items:center;background:rgba(4,7,11,.86);backdrop-filter:blur(8px)}.start-screen{overflow:hidden;background:linear-gradient(135deg,rgba(3,6,10,.97),rgba(10,18,28,.9)),repeating-linear-gradient(90deg,transparent 0 39px,rgba(255,255,255,.03) 40px)}.startGlow{position:absolute;width:680px;height:680px;border-radius:50%;background:radial-gradient(circle,rgba(231,186,86,.22),transparent 66%);animation:pulse 4s ease-in-out infinite}.titleCard{text-align:center;position:relative;padding:40px;z-index:2}.micLogo{font-size:68px;filter:drop-shadow(0 8px 18px #000);animation:float 3s ease-in-out infinite}.kicker,.modalKicker,.obsHeader small,.panelWindow header small,.broadcastWindow header small{color:var(--gold);font-weight:800;letter-spacing:.24em;font-size:12px}.titleCard h1{margin:12px 0 4px;font-size:clamp(50px,6.5vw,94px);line-height:.82;letter-spacing:-.055em;text-shadow:0 10px 30px #000}.titleCard h1 em,.endingCard em{font-style:normal;color:var(--gold2)}.titleCard p{font-size:20px;color:#ccd4df;margin:22px 0 32px}.startButtons{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.goldBtn,.darkBtn{border:0;padding:15px 28px;font-weight:900;letter-spacing:.08em;border-radius:5px;transition:.2s;box-shadow:0 10px 25px rgba(0,0,0,.28)}.goldBtn{background:linear-gradient(135deg,var(--gold2),#c69236);color:#15100a}.darkBtn{background:#151c26;border:1px solid #344155;color:#fff}.goldBtn:hover,.darkBtn:hover{transform:translateY(-2px);filter:brightness(1.08)}.controlsLine{margin-top:30px;color:#768395;font-size:11px;letter-spacing:.08em}.version{position:absolute;right:22px;bottom:18px;color:#5f6b7b;font-size:10px;letter-spacing:.12em}
.hud{position:absolute;z-index:10;background:linear-gradient(180deg,rgba(10,14,21,.96),rgba(14,20,29,.93));border:1px solid rgba(231,186,86,.22);box-shadow:0 10px 35px rgba(0,0,0,.4)}#topHud{top:14px;left:50%;transform:translateX(-50%);width:min(96%,1220px);height:56px;border-radius:8px;display:flex;align-items:center;justify-content:space-between;padding:0 18px}.brand{display:flex;align-items:center;gap:12px;font-weight:900;font-size:13px;letter-spacing:.08em}.brandMark{background:var(--gold);color:#17110a;padding:7px 8px;border-radius:3px}.hudStats{display:flex;gap:16px;font-size:13px;align-items:center;flex-wrap:nowrap}.hudStats b{color:var(--gold2)}.quest{top:84px;right:calc((100% - min(96%,1220px))/2);width:300px;padding:14px 16px;border-left:3px solid var(--gold);border-radius:5px}.quest small{font-size:9px;color:var(--gold);font-weight:900;letter-spacing:.17em}.quest strong{display:block;font-size:14px;margin:5px 0 4px}.quest p{font-size:12px;color:#aeb8c6;margin:0;line-height:1.35}.hint{position:absolute;z-index:12;bottom:28px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;background:#0b1018e8;border:1px solid #3b4656;border-radius:8px;padding:10px 16px;font-weight:700;font-size:13px;box-shadow:0 10px 30px #0008}.hint kbd{background:var(--gold);color:#18110a;padding:5px 8px;border-radius:4px;font-weight:900}.toast{position:absolute;z-index:60;top:86px;left:50%;transform:translateX(-50%);background:#111923;border:1px solid var(--gold);border-radius:6px;padding:12px 20px;font-weight:800;box-shadow:0 12px 35px #000;animation:toastIn .3s ease}
.modal{width:min(92%,560px);background:linear-gradient(160deg,#17202c,#0e141d);border:1px solid #344053;border-top:3px solid var(--gold);padding:38px;border-radius:10px;box-shadow:0 30px 90px #000}.nameModal{text-align:center}.nameModal h2{font-size:27px;margin:10px 0 20px}.nameModal input{width:100%;background:#090d13;border:1px solid #3b485b;border-radius:5px;padding:15px;color:white;text-align:center;font-size:24px;font-weight:800;outline:0}.nameModal input:focus{border-color:var(--gold);box-shadow:0 0 0 3px #e7ba5620}.nameModal p{color:var(--muted);line-height:1.5;margin:18px 0 25px}
.dialog{position:absolute;z-index:30;left:50%;bottom:26px;transform:translateX(-50%);width:min(94%,1050px);min-height:150px;background:linear-gradient(145deg,#121a25f7,#090e16f7);border:1px solid #3b4758;border-top:3px solid var(--gold);border-radius:8px;box-shadow:0 22px 60px #000;display:flex;padding:20px}.portrait{flex:0 0 90px;height:90px;display:grid;place-items:center;background:linear-gradient(135deg,#d6aa4d,#7e5825);border:3px solid #f4d27e;color:#17110a;font-size:42px;font-weight:1000;border-radius:7px;box-shadow:inset 0 0 0 3px #0004}.dialogBody{padding:0 18px;flex:1;position:relative}.dialogBody small{color:var(--gold2);font-size:12px;letter-spacing:.14em;font-weight:900;text-transform:uppercase}.dialogBody p{margin:8px 0 16px;font-size:17px;line-height:1.45}.dialogBody>span{position:absolute;right:0;bottom:0;color:#7f8b9d;font-size:11px}.dialogChoices{display:flex;gap:8px;flex-wrap:wrap}.dialogChoices button{background:#1a2431;color:#fff;border:1px solid #364458;border-radius:4px;padding:8px 12px}.dialogChoices button:hover{border-color:var(--gold)}
.overlay{background:rgba(2,4,7,.9)}.panelWindow,.obsWindow,.broadcastWindow{width:min(95%,1160px);height:min(90%,680px);background:#0c1119;border:1px solid #303b4c;border-radius:9px;box-shadow:0 30px 100px #000;overflow:hidden}.panelWindow header,.broadcastWindow>header{height:86px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(180deg,#182230,#101720);border-bottom:1px solid #2c3747}.panelWindow h2,.broadcastWindow h2,.obsHeader h2{margin:3px 0 0}.closeBtn{width:40px;height:40px;border-radius:50%;border:1px solid #455164;background:#151d28;color:#fff;font-size:26px}.panelContent{height:calc(100% - 86px);overflow:auto;padding:24px}.statCards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}.statCard{background:#141d29;border:1px solid #293546;border-radius:6px;padding:17px}.statCard small{color:#8793a4;font-size:10px;letter-spacing:.1em}.statCard b{display:block;color:var(--gold2);font-size:23px;margin-top:6px}.itemGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}.itemCard{background:linear-gradient(145deg,#151e2a,#101720);border:1px solid #293649;border-radius:7px;padding:16px;position:relative}.itemIcon{font-size:30px}.itemCard h3{margin:9px 0 4px;font-size:15px}.itemCard p{color:#9aa6b7;font-size:12px;min-height:34px;line-height:1.4}.itemStats{display:flex;gap:5px;flex-wrap:wrap}.itemStats span{font-size:9px;background:#222e3e;color:#bac4d1;border-radius:3px;padding:4px 6px}.itemCard footer{display:flex;align-items:center;justify-content:space-between;margin-top:13px}.itemCard footer b{color:var(--gold2)}.itemCard footer button{background:var(--gold);border:0;border-radius:4px;padding:8px 10px;font-weight:900;font-size:11px}.itemCard footer button:disabled{background:#2b3543;color:#778291;cursor:not-allowed}.questList{display:grid;gap:12px}.questEntry{display:flex;gap:15px;padding:17px;background:#141d28;border:1px solid #2a3748;border-radius:6px}.questEntry.done{opacity:.6}.questCheck{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#202c3b;color:var(--gold);font-size:20px}.questEntry.done .questCheck{background:#164b35;color:#5bf0a4}.questEntry h3{margin:1px 0 5px}.questEntry p{margin:0;color:#99a5b5;font-size:13px}.helpGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.helpGrid div{background:#131c27;border:1px solid #293647;border-radius:6px;padding:15px}.helpGrid kbd{display:inline-block;min-width:34px;text-align:center;background:#e2b654;color:#15100a;font-weight:900;padding:6px;border-radius:3px;margin-right:10px}
.obsWindow{height:min(92%,700px)}.obsHeader{height:78px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;background:#17212e;border-bottom:1px solid #314052}.liveBadge{font-size:11px;font-weight:800;color:#aeb7c4}.liveBadge i{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--red);margin-right:5px}.obsGrid{height:calc(100% - 78px);display:grid;grid-template-columns:230px 1fr 255px}.obsSources,.obsChecklist{padding:18px;background:#101720}.obsSources{border-right:1px solid #2a3546}.obsChecklist{border-left:1px solid #2a3546}.obsGrid h3{font-size:10px;letter-spacing:.12em;color:#9aa5b4;margin:0 0 15px}.obsSources button{display:block;width:100%;text-align:left;background:#182230;border:1px solid #2e3a4b;color:#eaf0f6;padding:11px;margin-bottom:7px;border-radius:4px}.obsSources button.added{border-color:var(--green);color:#7af0b2;background:#133326}.obsSources p{font-size:11px;color:#738093;line-height:1.4}.obsPreview{padding:14px;background:#080c12}.previewPitch{height:74%;position:relative;display:grid;place-items:center;overflow:hidden;background:linear-gradient(90deg,transparent 49.5%,#fff5 50%,transparent 50.5%),repeating-linear-gradient(0deg,#23583c 0 38px,#286345 39px 76px);border:1px solid #3c4858}.previewPitch:after{content:"";position:absolute;width:110px;height:110px;border:2px solid #fff5;border-radius:50%}.previewPitch:before{content:"";position:absolute;inset:8%;border:2px solid #fff4}.previewPitch>*{z-index:2}.previewPitch>div:first-child{color:#ffffff88;font-weight:800}.previewCamera{position:absolute;right:18px;bottom:18px;width:140px;height:90px;background:#19202a;border:2px solid var(--gold);display:grid;place-items:center;font-size:30px}.previewCamera span{font-size:8px;position:absolute;bottom:5px}.previewScore{position:absolute;top:12px;left:50%;transform:translateX(-50%);display:flex;align-items:center;background:#09101ce8;border-bottom:2px solid var(--gold);height:38px;padding:0 12px;gap:10px;font-size:8px;white-space:nowrap}.previewScore strong{font-size:18px;color:var(--gold2)}.previewSponsor{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);background:#0a101ae8;padding:7px 18px;color:var(--gold2);font-size:8px;font-weight:900;letter-spacing:.09em}.audioMeters{height:38px;display:grid;grid-template-columns:80px 1fr 95px;align-items:center;gap:8px;font-size:9px;color:#93a0b1}.audioMeters i{height:7px;border-radius:3px;background:#283343;overflow:hidden}.audioMeters i.active{background:linear-gradient(90deg,var(--green) 0 70%,#ffe36e 71% 88%,#ff6767 89%);animation:meter .7s infinite alternate}.audioMeters button{font-size:8px;background:#202a37;color:#aeb9c7;border:1px solid #364456;padding:5px}.audioMeters button.ready{color:#5ff0a9;border-color:#38bb80}.obsChecklist ul{padding:0;margin:0;list-style:none}.obsChecklist li{padding:9px 0;border-bottom:1px solid #263141;font-size:11px;color:#aab4c2;display:flex;justify-content:space-between}.obsMessage{font-size:11px;line-height:1.45;background:#192331;border-left:3px solid var(--gold);padding:10px;margin:14px 0}.obsChecklist .goldBtn{width:100%;font-size:10px;padding:11px}
.broadcastWindow{height:min(92%,680px)}.broadcastMeta{display:flex;gap:12px;align-items:center}.broadcastMeta span{background:#222d3c;border-radius:4px;padding:8px 11px;font-size:11px;font-weight:800}.broadcastMeta .onAir{background:#a92531;color:white;animation:pulse 1.3s infinite}.broadcastGrid{display:grid;grid-template-columns:1fr 290px;height:calc(100% - 86px)}.matchStage{position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 40%,#3e6d50,#183b2c 70%),repeating-linear-gradient(0deg,transparent 0 40px,#fff05 41px)}.scoreBug{position:absolute;top:20px;display:grid;grid-template-columns:55px 32px 44px 32px 55px;align-items:center;background:#07101ae8;border-bottom:2px solid var(--gold);height:44px;text-align:center;font-size:10px}.scoreBug strong{font-size:18px;color:var(--gold2)}.scoreBug i{font-style:normal;background:#263345;padding:6px 0}.eventCard{width:min(88%,640px);min-height:190px;background:#0b111be8;border:1px solid #4a586b;border-top:3px solid var(--gold);padding:30px;text-align:center;border-radius:7px;box-shadow:0 20px 50px #0008}.eventCard small{color:var(--gold);font-weight:900;letter-spacing:.15em}.eventCard h3{font-size:28px;margin:12px 0 8px}.eventCard p{color:#b7c0cb;margin:0}.answerButtons{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:min(88%,640px);margin-top:12px}.answerButtons button{background:#151f2cdd;color:white;border:1px solid #4b596b;border-radius:5px;padding:12px;font-size:12px;font-weight:700}.answerButtons button:hover{border-color:var(--gold);background:#243043}.answerButtons button.correct{background:#17613f;border-color:#64eca5}.answerButtons button.wrong{background:#702731;border-color:#ff777c}.timerBar{width:min(88%,640px);height:5px;background:#0b1119;margin-top:9px}.timerBar i{display:block;width:100%;height:100%;background:var(--gold)}.chatPanel{background:#101721;border-left:1px solid #313c4b;padding:17px;display:flex;flex-direction:column}.chatPanel h3{font-size:10px;letter-spacing:.13em;color:#9ba6b6}.chatFeed{flex:1;overflow:hidden}.chatLine{border-bottom:1px solid #26303e;padding:10px 0;font-size:11px;animation:chatIn .3s ease}.chatLine b{color:#68aff7;display:block;margin-bottom:3px}.chatLine span{color:#c5ccd5}.broadcastScore{border-top:1px solid #303b49;padding-top:13px;display:flex;justify-content:space-between;align-items:center;font-size:9px;color:#9ba5b3}.broadcastScore strong{color:var(--gold2);font-size:18px}
.endingCard{text-align:center;width:min(92%,700px);padding:50px;background:linear-gradient(145deg,#17212e,#0b1018);border:1px solid #3a4658;border-top:4px solid var(--gold);box-shadow:0 30px 100px #000}.endingCard small{color:var(--gold);letter-spacing:.2em;font-weight:900}.endingCard h2{font-size:48px;line-height:.98;margin:16px 0}.endingCard p{color:#aeb8c6;line-height:1.6}.endingRewards{display:flex;justify-content:center;gap:10px;margin:22px 0}.endingRewards span{background:#202b39;border:1px solid #344255;border-radius:4px;padding:10px;font-size:12px;font-weight:800}
@keyframes float{50%{transform:translateY(-9px)}}@keyframes pulse{50%{opacity:.66}}@keyframes meter{to{filter:brightness(1.4);transform:scaleX(.86);transform-origin:left}}@keyframes toastIn{from{transform:translate(-50%,-15px);opacity:0}}@keyframes chatIn{from{transform:translateX(15px);opacity:0}}
.obsSources{overflow-y:auto}.obsSources button{padding:8px 10px;margin-bottom:5px;font-size:10px}.obsChecklist{overflow-y:auto}.questEntry:nth-child(10n+1):not(:first-child){border-top:7px solid #6d8f4e}.hud,.dialog,.panelWindow,.obsWindow,.broadcastWindow{text-rendering:geometricPrecision}.quest strong,.brand{letter-spacing:.04em}

/* ==== WERSJA RPG (Retro Pixel Portable) ==== */
:root{--gold:#8caf55;--gold2:#d9ee9a;--ink:#23251f;--panel:#f1f0dc;--panel2:#dfe6c4;--line:#3b4438;--text:#20251f;--muted:#667063;--green:#5f9d57;--red:#bf5d55;--blue:#638c99}
html,body{background:#1e2721;font-family:"Courier New",Consolas,monospace}
#game{background:#dfe6d8;image-rendering:pixelated;image-rendering:crisp-edges;box-shadow:0 0 0 5px #202820,0 18px 70px #000}

/* ---- TOP HUD ---- */
.hud{background:#f5f1dcf2;color:#252b24;border:4px solid #303a30;box-shadow:inset 0 0 0 3px #aebd9a,5px 5px 0 #17201899}
#topHud{border-radius:0;height:60px;padding:0 16px}
.brandMark{background:#789f4d;color:#fff;border:2px solid #263327;border-radius:0;box-shadow:2px 2px 0 #253025}
.hudStats{gap:14px;font-size:12px}
.hudStats>span{white-space:nowrap;display:inline-flex;align-items:center;gap:5px}
.hudStats b{color:#3d662f}
.musicBtn{background:#dbe7bd;color:#263225;border:2px solid #3a4938;padding:6px 10px;font-weight:900;font-size:11px;box-shadow:2px 2px 0 #263126;transition:transform .08s,background .15s;letter-spacing:.03em}
.musicBtn:hover{background:#c8dda2;transform:translate(-1px,-1px);box-shadow:3px 3px 0 #263126}
.musicBtn:active{transform:translate(1px,1px);box-shadow:1px 1px 0 #263126}
.musicBtn.off{background:#d6c9bf;color:#79544e}
.padHud{background:#2d3a2b;color:#8cd66e;border:2px solid #142011;padding:4px 8px;font-size:14px;font-weight:900;box-shadow:2px 2px 0 #142011;animation:padPulse 2s ease-in-out infinite}
@keyframes padPulse{50%{background:#3d5a2e;box-shadow:2px 2px 0 #142011,0 0 12px #8cd66e88}}

/* ---- QUEST HUD ---- */
.quest{border:4px solid #303a30;border-left:8px solid #6f964a;border-radius:0}
.quest small{color:#527437}
.quest small b{float:right;color:#252b24}
.quest p{color:#4d574c}

/* ---- START SCREEN ---- */
.screen{background:rgba(29,38,31,.88);backdrop-filter:none}
.start-screen{background-color:#dce5d6;background-image:linear-gradient(90deg,#bdcab4 2px,transparent 2px),linear-gradient(#bdcab4 2px,transparent 2px);background-size:18px 18px}
.startGlow{background:#9fba7638;border:8px dashed #5d744d}
.titleCard{background:#f5f0db;border:6px solid #283328;box-shadow:inset 0 0 0 5px #9faf8e,12px 12px 0 #1e281f88;padding:34px 55px}
.micLogo{filter:none}
.kicker,.modalKicker,.obsHeader small,.panelWindow header small,.broadcastWindow header small{color:#58733f}
.titleCard h1{color:#253025;text-shadow:4px 4px 0 #a9ba92}
.titleCard h1 em,.endingCard em{color:#64883e}
.titleCard p{color:#566054}
.goldBtn,.darkBtn{border-radius:0;box-shadow:4px 4px 0 #263127;border:3px solid #263127;transition:transform .1s,box-shadow .1s}
.goldBtn:hover,.darkBtn:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 #263127;filter:none}
.goldBtn:active,.darkBtn:active{transform:translate(2px,2px);box-shadow:2px 2px 0 #263127}
.goldBtn{background:#a9c86f;color:#20291f}
.darkBtn{background:#e6e4ce;color:#2a3329}
.controlsLine,.version{color:#4f5e4c}

/* ---- DIALOG ---- */
.dialog{background:#f7f3de;color:#222a21;border:5px solid #283229;border-top:5px solid #283229;border-radius:0;box-shadow:inset 0 0 0 4px #b0bf9f,8px 8px 0 #18201899}
.portrait{border-radius:0;background:#e8b476;border-color:#273028;box-shadow:inset 0 0 0 3px #fff7d2}
.dialogBody small{color:#4d7138}
.dialogBody>span{color:#5c6759}

/* ---- HINT (podpowiedź w grze) ---- */
.hint{background:#f6f1d9;color:#242c23;border:4px solid #2c352c;border-radius:0;box-shadow:4px 4px 0 #18201899;padding:11px 18px;font-size:14px}
.hint kbd{background:#91b55e;color:#1f281e;border-radius:0;font-size:14px;min-width:26px;text-align:center;box-shadow:2px 2px 0 #2c352c}
.hint.padMode kbd{background:#d97e5e;color:#fff;box-shadow:2px 2px 0 #2c352c}

/* ---- CONTROL HELP BOTTOM (lewy dolny róg — dymek z klawiszami) ---- */
.controlHelp{position:absolute;z-index:11;left:18px;bottom:18px;background:#f5f0d5;color:#242c23;border:4px solid #2c352c;padding:10px 12px;font-family:"Courier New",monospace;font-size:11px;font-weight:900;line-height:1.6;box-shadow:4px 4px 0 #18201899;max-width:340px}
.controlHelp .chTitle{color:#3d662f;font-size:9px;letter-spacing:.12em;margin-bottom:5px;border-bottom:2px dashed #aab69d;padding-bottom:4px}
.controlHelp .chRow{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.controlHelp .chRow span{display:inline-flex;align-items:center;gap:4px;margin-right:8px}
.controlHelp kbd{background:#789f4d;color:#fff;padding:2px 6px;font-size:10px;font-weight:900;min-width:20px;text-align:center;box-shadow:1px 1px 0 #263127;border:1px solid #263127}
.controlHelp.padMode kbd{background:#c96f4a;color:#fff}
.controlHelp.padMode .chTitle{color:#a03d2a}

/* ---- TOAST ---- */
.toast{background:#eef0d6;color:#263026;border:4px solid #334033;border-radius:0;box-shadow:5px 5px 0 #18201899}

/* ---- OKNA (Panel, OBS, Broadcast, Modal, Ending) ---- */
.panelWindow,.obsWindow,.broadcastWindow,.modal,.endingCard{background:#eeeeda;color:#222922;border:5px solid #293329;border-radius:0;box-shadow:inset 0 0 0 4px #aebc9d,10px 10px 0 #172018aa}
.panelWindow header,.broadcastWindow>header,.obsHeader{background:#d7e2bd;border-bottom:4px solid #334033}
.closeBtn{border-radius:0;background:#e4d7c6;color:#3a302a;border:2px solid #3a302a;box-shadow:2px 2px 0 #3a302a;font-weight:900}
.closeBtn:hover{background:#f0dfc5;transform:translate(-1px,-1px);box-shadow:3px 3px 0 #3a302a}
.panelContent{background:#e8ead6}
.statCard,.itemCard,.questEntry,.helpGrid div{background:#f4f0dd;color:#273027;border:3px solid #5e6d59;border-radius:0;box-shadow:3px 3px 0 #9aaa8d}
.statCard small,.itemCard p,.questEntry p{color:#5d675a}
.statCard b,.itemCard footer b{color:#4d7336}
.itemStats span{background:#d7e2c2;color:#364233;border-radius:0}
.itemCard footer button{background:#9dbc67;border:2px solid #344133;border-radius:0;box-shadow:2px 2px 0 #344133}
.itemCard footer button:hover:not(:disabled){transform:translate(-1px,-1px);box-shadow:3px 3px 0 #344133}
.itemCard footer button:disabled{background:#b0b19a;color:#66695c;box-shadow:none}
.panelWindow h2,.broadcastWindow h2,.obsHeader h2{color:#273027}

/* ---- OBS PANEL ---- */
.obsSources,.obsChecklist,.chatPanel{background:#dde4c9;color:#263026}
.obsPreview{background:#2c332d}
.obsSources button{background:#f1efd9;color:#273027;border:3px solid #5b6957;border-radius:0}
.obsSources button.added{background:#bed994;color:#2a542b;border-color:#3f653d}
.obsChecklist li{color:#374336;border-bottom-color:#9aaa8c}
.obsMessage{background:#f3efd9;color:#334032}

/* ---- CHAT / TRANSMISJA ---- */
.chatLine span{color:#3f493d}
.chatLine b{color:#456d78}
.broadcastScore strong{color:#4b7534}
.endingRewards span{background:#d9e3c3;color:#2c372a;border:3px solid #586755;border-radius:0}
.endingCard .darkBtn{margin-left:8px}

/* ---- TELEFON ---- */
.phoneShell{width:min(92%,390px);height:min(92%,720px);background:#202820;border:7px solid #111711;box-shadow:inset 0 0 0 3px #657260,12px 12px 0 #1118;padding:16px 14px 12px;color:#263026;display:flex;flex-direction:column}
.phoneSpeaker{width:70px;height:6px;background:#0a0e0b;margin:-7px auto 10px}
.phoneShell>header{height:34px;background:#dce8c7;border:3px solid #344234;display:flex;align-items:center;justify-content:space-between;padding:0 9px;font-size:10px}
.phoneProfile{display:flex;gap:12px;align-items:center;background:#f2efd9;border:3px solid #465443;border-top:0;padding:13px}
.phoneAvatar{width:52px;height:52px;background:#9fbd69;border:3px solid #2f3a30;display:grid;place-items:center;font-size:27px}
.phoneProfile small,.phoneProfile strong,.phoneProfile span{display:block}
.phoneProfile small{font-size:8px;color:#60705d}
.phoneProfile strong{font-size:16px}
.phoneProfile span{font-size:9px;color:#5a6858;margin-top:3px}
.phoneTabs{display:grid;grid-template-columns:repeat(3,1fr);margin-top:8px}
.phoneTabs button{padding:9px 3px;border:2px solid #364336;background:#aebd9d;color:#263026;font-size:9px;font-weight:900}
.phoneTabs button.active{background:#ddecba;border-bottom-color:#ddecba}
.phoneContent{background:#eef0db;border:3px solid #364336;border-top:0;flex:1;overflow:auto;padding:10px}
.phoneShell>footer{display:flex;align-items:center;justify-content:space-between;color:#c8d2c2;font-size:9px;padding-top:9px}
.phoneShell>footer button{background:#d8e9b1;border:2px solid #111711;padding:5px 9px;font-weight:900}
.contactCard{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:8px;border-bottom:2px solid #bac5aa;padding:9px 2px}
.contactPic{width:38px;height:38px;background:#91ae65;border:3px solid #344134;display:grid;place-items:center;font-weight:900}
.contactCard strong,.contactCard small{display:block}
.contactCard small{font-size:8px;color:#63705f}
.contactCard button,.onlineBtn,.socialBtn{background:#9fbd69;border:2px solid #344134;padding:6px 8px;font-size:8px;font-weight:900}
.contactCard button.selected{background:#e2c46f}
.emptyPhone{padding:25px 10px;text-align:center;color:#657061;font-size:10px;line-height:1.6}
.onlineStatus{padding:10px;background:#d9e6c1;border:2px solid #52604e;margin-bottom:8px;font-size:10px}
.onlineStatus b{display:block;margin-bottom:4px}
.onlineArea{width:100%;min-height:74px;resize:none;background:#f7f4df;border:2px solid #52604e;padding:7px;font:8px monospace;color:#253025;margin:7px 0}
.onlineActions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.onlineActions button{background:#a4c171;border:2px solid #364336;padding:8px 4px;font-size:8px;font-weight:900}
.socialStat{display:flex;justify-content:space-between;padding:10px 5px;border-bottom:2px dashed #aab69d;font-size:10px}
.socialStat b{color:#426335}
.badgeGrid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px}
.badge{background:#dce7c8;border:2px solid #62705e;padding:8px;text-align:center;font-size:8px}
.badge span{display:block;font-size:20px;margin-bottom:4px}
.netBadge{position:absolute;z-index:13;left:22px;top:86px;background:#f1efd9;color:#263026;border:4px solid #354135;padding:8px 11px;font-size:9px;font-weight:900;box-shadow:4px 4px 0 #1118}

/* ---- USTAWIENIA ---- */
.settingsTabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-bottom:14px}
.settingsTabs button{padding:10px 4px;border:3px solid #364336;background:#aebd9d;color:#263026;font-size:10px;font-weight:900;font-family:"Courier New",monospace}
.settingsTabs button.active{background:#ddecba;border-color:#4d7336;color:#1f2a1e}
.settingsGrid{display:grid;gap:14px}
.settingsSection{background:#f4f0dd;border:3px solid #5e6d59;box-shadow:3px 3px 0 #9aaa8d;padding:15px}
.settingsSection h3{margin:0 0 10px;font-size:11px;color:#3d5a2e;letter-spacing:.1em}
.settingDesc{font-size:10px;color:#5d675a;line-height:1.5;margin:5px 0 12px}
.settingToggle{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:2px dashed #b3c0a4;font-size:11px;cursor:pointer;user-select:none}
.settingToggle:hover{color:#3d5a2e}
.settingToggle input[type=checkbox]{width:18px;height:18px;accent-color:#6d9a52;cursor:pointer;flex:0 0 18px}
.settingRange{width:100%;accent-color:#6d9a52;height:22px;cursor:pointer}

/* ---- KONTROLER (test) ---- */
.padDots{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-top:10px}
.padDot{background:#dfe6c4;border:2px solid #62705e;padding:6px 2px;text-align:center;font-size:9px;font-weight:900;color:#4a564a;font-family:"Courier New",monospace}
.padDotOn{background:#8cc95f;border-color:#33591f;color:#132009;box-shadow:0 0 0 2px #cfe9a8 inset}
.padMapGrid{display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:10px;color:#3c4a3a}
.padMapGrid div{background:#e6ecd4;border:2px solid #7d8b78;padding:7px 8px;display:flex;align-items:center;gap:8px}
.padMapGrid kbd{background:#6d9a52;color:#fff;border:2px solid #2f4426;padding:3px 6px;font-weight:900;font-size:9px;min-width:34px;text-align:center;flex:0 0 auto}

/* ---- FOKUS NAWIGACJI PADEM ---- */
.gpFocus{outline:4px solid #e2c46f!important;outline-offset:2px;box-shadow:0 0 0 3px #4d7336,0 0 22px #e2c46f88!important;position:relative;z-index:5}
button.gpFocus{background:#ddecba!important;color:#1f2a1e!important;transform:translateY(-1px)}
.itemCard.gpFocus,article.gpFocus{background:#fbf8e6!important}

/* ---- HUD MAŁE ELEMENTY ---- */
#weatherHud{font-size:10px;background:#d9e6c1;border:2px solid #52604e;padding:2px 7px;white-space:nowrap;font-weight:900;color:#3d5a2e}
#clockHud{font-size:12px;font-weight:900;color:#3d662f;font-variant-numeric:tabular-nums;letter-spacing:.05em;min-width:44px;display:inline-block;text-align:center;background:#eef2d5;border:2px solid #52604e;padding:2px 6px}

/* ---- MOBILE ---- */
@media(max-width:900px){
  .quest{display:none}
  .hudStats{gap:6px;font-size:11px}
  .hudStats>span:not(#clockHud):not(#padHud){display:none}
  .obsGrid{grid-template-columns:180px 1fr}
  .obsChecklist{display:none}
  .broadcastGrid{grid-template-columns:1fr}
  .chatPanel{display:none}
  .statCards{grid-template-columns:1fr 1fr}
  .helpGrid{grid-template-columns:1fr}
  .titleCard h1{font-size:54px}
  .controlsLine{display:none}
  .controlHelp{display:none}
  #weatherHud,#clockHud{display:none}
}

/* Lektor PL v2.1 */
.lectorBtn{
  min-width:98px;
  white-space:nowrap;
}
.lectorBtn.off{
  opacity:.62;
  filter:grayscale(.35);
}


/* ZNACZNIKI MISJI v2.2 */
.questTargetHud{
  margin-top:7px;padding:6px 8px;border:2px solid #4d5c49;background:#fff0a0;color:#1e291f;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  font:900 8px "Courier New",monospace;box-shadow:2px 2px 0 #253127;
}
.questTargetHud b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.questTargetHud span{flex:0 0 auto;color:#725a14}
.mapMissionTarget{
  display:grid;grid-template-columns:1fr auto;gap:5px 14px;margin:0 0 14px;padding:12px;
  background:#fff0a0;color:#1c281e;border:3px solid #475744;box-shadow:4px 4px 0 #263228;
}
.mapMissionTarget strong{grid-column:1/-1;font-size:9px;color:#725a14}
.mapMissionTarget b{font-size:14px}.mapMissionTarget span{font-weight:900}
.mapMissionTarget small{grid-column:1/-1;line-height:1.5;color:#495448}
.mapCardTarget{outline:4px solid #e5bd3e!important;background:#fff2a9!important}


/* ============================================================
   EASY ONLINE CROSSPLAY v2.4
   ============================================================ */
.easyOnlineStatus{
  border-width:3px;
  box-shadow:3px 3px 0 #29352b;
}
.easyOnlineStart{
  display:grid;
  gap:8px;
  padding:12px;
  background:#eef1d9;
  border:3px solid #485847;
  box-shadow:4px 4px 0 #29342b;
}
.easyOnlineStart label{
  text-align:center;
  font:900 8px "Courier New",monospace;
  color:#586251;
}
.easyHostBtn,.easyJoinBtn{
  width:100%;
  min-height:42px;
  border:3px solid #314033!important;
  font:900 10px "Courier New",monospace!important;
  box-shadow:3px 3px 0 #202a22;
}
.easyHostBtn{
  background:#b8d87c!important;
}
.easyJoinBtn{
  background:#e8cf68!important;
}
.easyOr{
  text-align:center;
  font:900 8px "Courier New",monospace;
  color:#6f7868;
}
.roomCodeInput{
  width:100%;
  height:52px;
  box-sizing:border-box;
  text-align:center;
  text-transform:uppercase;
  letter-spacing:8px;
  background:#fffbea;
  color:#1f2b21;
  border:4px solid #465747;
  outline:none;
  font:900 24px "Courier New",monospace;
  box-shadow:3px 3px 0 #29342b inset;
}
.roomCodeInput:focus{
  background:#fff1a6;
  border-color:#8c7423;
}
.easyRoomCodeBox{
  padding:14px;
  margin:8px 0;
  text-align:center;
  background:#fff0a0;
  color:#1c281e;
  border:4px solid #475744;
  box-shadow:5px 5px 0 #263228;
}
.easyRoomCodeBox.joined{
  background:#d8ecc4;
}
.easyRoomCodeBox small{
  display:block;
  margin-bottom:6px;
  font:900 8px "Courier New",monospace;
}
.easyRoomCodeBox strong{
  display:block;
  letter-spacing:8px;
  font:900 30px "Courier New",monospace;
}
.easyRoomCodeBox p{
  margin:8px 0;
  font:900 8px "Courier New",monospace;
}
.easyRoomCodeBox button{
  width:100%;
  padding:9px;
  background:#d5e7b1;
  border:3px solid #39493c;
  font-weight:900;
}
.easyConnectedActions{
  margin:8px 0 12px;
}
.onlineWarning{
  padding:8px;
  margin:0;
  background:#f4d4c9;
  border:2px solid #9a5348;
  font-size:8px;
  font-weight:900;
}
.legacyOnlineBox{
  margin-top:12px;
  padding:8px;
  background:#dddcc8;
  border:2px solid #6c7166;
}
.legacyOnlineBox summary{
  cursor:pointer;
  font:900 8px "Courier New",monospace;
  color:#4b5549;
}
.legacyOnlineBox small{
  display:block;
  padding:6px 0 2px;
  color:#667064;
  font-size:7px;
}


/* ============================================================
   ONLINE EXPANSION v2.5
   ============================================================ */
.coopOnlineExtras{margin-top:12px;padding-top:10px;border-top:3px solid #475744}
.coopOnlineTitle{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;padding:7px;background:#dce8c7;border:2px solid #4e5e4b;font:900 8px "Courier New",monospace}
.coopOnlineGrid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.coopOnlineGrid button,.coopPrimaryBtn,.coopEventBtn{min-height:38px;border:2px solid #3b493c;background:#eef0d8;color:#202a21;font:900 8px "Courier New",monospace;box-shadow:2px 2px 0 #283229}
.coopPrimaryBtn{width:100%;background:#f0d26d;margin-bottom:6px}
.coopEventBtn{width:100%;background:#ef9d79;margin-bottom:6px}
.coopTiny{font-size:7px;line-height:1.5;color:#5c6759}
.coopContractList{display:grid;gap:9px}
.coopContract{display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;padding:10px;background:#f2efd9;border:3px solid #566553;box-shadow:3px 3px 0 #2d382f}
.coopContract.legendary{background:linear-gradient(135deg,#3a241d,#6d3327);color:#fff1c1;border-color:#e1b84b;box-shadow:0 0 0 3px #241811,5px 5px 0 #1d1512}
.coopContractIcon{font-size:26px;text-align:center}
.coopContract b{display:block;font-size:10px}
.coopContract small,.coopContract em{display:block;font-size:7px;margin-top:3px}
.coopContract p{font-size:8px;line-height:1.45;margin:5px 0}
.coopContract button{min-width:115px;padding:9px 7px;font-weight:900}
.coopCurrent,.coopWorldAlert{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px;margin-bottom:10px;border:3px solid #556452;background:#fff0a0}
.coopWorldAlert{background:#f2b49c}
.coopActiveHead{display:flex;justify-content:space-between;gap:12px;padding:9px;background:#dbe9c7;border:3px solid #4e5e4b}
.coopTarget{padding:7px;margin:8px 0;background:#e4e0cb;border:2px solid #6c7568;font-size:8px;font-weight:900}
.coopRoleGrid,.coopActionGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin:8px 0}
.coopRoleGrid button.selected{background:#f0d26d}
.coopProgress,.coopBossHp{height:18px;background:#352f2a;border:3px solid #192019;overflow:hidden;margin:8px 0}
.coopProgress i,.coopBossHp i{display:block;height:100%;background:linear-gradient(90deg,#65944d,#c4d766)}
.coopBossHp i{background:linear-gradient(90deg,#9b3434,#e0604d)}
.coopBossHp.gauntlet{height:24px;box-shadow:0 0 10px rgba(226,178,60,.45)}
.gauntletTitle{padding:9px;text-align:center;background:#30201b;color:#ffd876;border:3px solid #d3aa45;font:900 11px "Courier New",monospace}
.coopClue{padding:13px;margin:9px 0;background:#fff0a0;border:3px dashed #745d20}
.coopClue small{display:block;margin-bottom:7px}.coopClue b{font-size:12px}
.coopChoiceList{display:grid;gap:6px;margin:10px 0}
.coopScore{text-align:center;font:900 30px "Courier New",monospace;padding:10px}
.speedwayOnlineLight{text-align:center;padding:16px;margin:10px 0;background:#9d4b43;color:white;border:4px solid #392522;font:900 18px monospace}
.speedwayOnlineLight.go{background:#4f993f;box-shadow:0 0 18px rgba(95,255,76,.6)}
.coopResult{padding:8px;background:#e7e3cf;border:2px solid #626b60;font-size:8px;line-height:1.7}
.coopRankRow{display:flex;justify-content:space-between;padding:7px;border-bottom:1px solid #7b8175;background:#eeecd9}
.coopEmojiGrid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.coopEmojiGrid button{font-size:28px;min-height:58px}
.coopGiftList{display:grid;gap:6px;margin-top:10px}
.coopGiftList button{padding:9px;text-align:left}
.coopTeamHero{text-align:center;padding:12px;background:#252f28;color:#f4e7aa;border:3px solid #d1b451}
.coopTeamStats{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:9px 0}
.coopTeamStats div{text-align:center;padding:8px;background:#e8e5d1;border:2px solid #596657}
.coopTeamStats b{display:block;font-size:16px}.coopTeamStats span{font-size:7px}
.coopSuccess{padding:15px;text-align:center;background:#d8edc1;border:4px solid #4f6e44}
.dangerBtn{margin-top:14px;background:#bb5c50!important;color:white!important}
@media(max-width:700px){
  .coopContract{grid-template-columns:36px 1fr}.coopContract button{grid-column:1/-1}
  .coopTeamStats{grid-template-columns:1fr 1fr}
}


/* OFFICIAL LOGO + AUTOUPDATE v2.6 */

.brand{gap:10px}
.brandLogo{width:34px;height:34px;display:block;object-fit:contain;filter:drop-shadow(0 3px 6px rgba(0,0,0,.35))}
.brandTitleWrap{display:flex;align-items:center;gap:10px}
.micLogo{display:flex;justify-content:center;align-items:center;margin-bottom:14px}
.officialGameLogo{width:min(420px,68vw);max-height:260px;object-fit:contain;display:block;filter:drop-shadow(0 16px 40px rgba(0,0,0,.28))}
.titleCard{max-width:min(960px,94vw)}
.titleCard p{max-width:720px;margin-left:auto;margin-right:auto}
@media(max-width:900px){
  .officialGameLogo{width:min(320px,78vw);max-height:190px}
  .brandLogo{width:26px;height:26px}
  .brandTitleWrap{gap:6px}
}


/* ============================================================
   MOBILE GAMEPLAY v2.8
   ============================================================ */
html.mobileGame,
html.mobileGame body{
  overscroll-behavior:none;
  touch-action:none;
  -webkit-user-select:none;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}

html.mobileGame input,
html.mobileGame textarea{
  -webkit-user-select:text;
  user-select:text;
  touch-action:auto;
}

.mobileControls{
  position:fixed;
  inset:0;
  z-index:75;
  pointer-events:none;
  font-family:"Courier New",monospace;
}

.mobileControls button{
  -webkit-appearance:none;
  appearance:none;
  border:0;
  color:#f7edc4;
  font-family:"Courier New",monospace;
  font-weight:1000;
  pointer-events:auto;
  touch-action:none;
  user-select:none;
}

.mobileTopBar{
  position:absolute;
  top:max(8px,env(safe-area-inset-top));
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:6px;
  padding:5px;
  background:rgba(13,18,15,.82);
  border:2px solid rgba(211,175,80,.48);
  box-shadow:0 5px 18px rgba(0,0,0,.35);
  backdrop-filter:blur(5px);
}

.mobileTopBar button{
  width:42px;
  height:38px;
  font-size:17px;
  background:linear-gradient(#2b342b,#111711);
  border:1px solid #9a8140;
}

.mobileTopBar.compact{
  left:auto;
  right:max(8px,env(safe-area-inset-right));
  transform:none;
}

.mobileDpad{
  position:absolute;
  left:max(15px,env(safe-area-inset-left));
  bottom:max(17px,calc(env(safe-area-inset-bottom) + 8px));
  width:154px;
  height:154px;
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  grid-template-rows:1fr 1fr 1fr;
  gap:4px;
  pointer-events:none;
}

.mobileDir,
.mobileDpadCenter{
  border-radius:10px!important;
  border:2px solid rgba(219,181,78,.62)!important;
  background:linear-gradient(145deg,rgba(37,46,38,.94),rgba(10,14,11,.94))!important;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.035),
    0 5px 14px rgba(0,0,0,.38);
  display:grid;
  place-items:center;
  font-size:19px!important;
  pointer-events:auto;
}

.mobileUp{grid-column:2;grid-row:1}
.mobileLeft{grid-column:1;grid-row:2}
.mobileDpadCenter{grid-column:2;grid-row:2;pointer-events:none;background:rgba(18,24,19,.8)!important}
.mobileRight{grid-column:3;grid-row:2}
.mobileDown{grid-column:2;grid-row:3}

.mobileDir.pressed,
.mobileAction.pressed{
  transform:scale(.93);
  filter:brightness(1.35);
  background:linear-gradient(145deg,#725c25,#201c12)!important;
}

.mobileActions{
  position:absolute;
  right:max(16px,env(safe-area-inset-right));
  bottom:max(20px,calc(env(safe-area-inset-bottom) + 9px));
  width:190px;
  height:150px;
  pointer-events:none;
}

.mobileAction{
  position:absolute;
  border-radius:50%!important;
  border:3px solid #d6b354!important;
  box-shadow:
    inset 0 0 0 3px rgba(0,0,0,.55),
    0 8px 20px rgba(0,0,0,.45),
    0 0 14px rgba(211,171,70,.14);
  background:
    radial-gradient(circle at 35% 25%,rgba(255,232,154,.18),transparent 30%),
    linear-gradient(145deg,#49391d,#17130d)!important;
  text-shadow:0 2px 2px #000;
}

.mobileAction.main{
  width:82px;
  height:82px;
  right:0;
  bottom:0;
  font-size:11px;
}

.mobileAction.secondary{
  width:62px;
  height:62px;
  left:20px;
  bottom:5px;
  font-size:10px;
  border-color:#9aa38f!important;
  background:linear-gradient(145deg,#374039,#131713)!important;
}

.mobileAction.sprint{
  width:72px;
  height:42px;
  right:55px;
  top:0;
  border-radius:9px!important;
  font-size:8px;
}

.mobileModeLabel{
  position:absolute;
  right:max(15px,env(safe-area-inset-right));
  bottom:max(172px,calc(env(safe-area-inset-bottom) + 160px));
  padding:5px 8px;
  background:rgba(10,14,11,.78);
  border:1px solid rgba(211,175,80,.42);
  color:#e5cc7b;
  font-size:7px;
  font-weight:900;
  letter-spacing:.09em;
}

.mobileRotate{
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:auto;
  display:grid;
  place-items:center;
  background:rgba(5,8,6,.96);
  padding:24px;
}

.mobileRotateCard{
  width:min(360px,90vw);
  padding:28px 20px;
  text-align:center;
  background:#eeeeda;
  color:#253025;
  border:5px solid #293329;
  box-shadow:inset 0 0 0 4px #aebc9d,9px 9px 0 rgba(0,0,0,.5);
}

.mobileRotatePhone{font-size:48px;margin-bottom:12px}
.mobileRotateCard strong{display:block;font-size:18px;margin-bottom:9px}
.mobileRotateCard span{display:block;font-size:11px;line-height:1.55;color:#5f695c;margin-bottom:17px}
.mobileRotateCard button{
  padding:10px 14px;
  background:#a8c978;
  border:3px solid #334133;
  color:#243024;
  font-size:9px;
}

@media (pointer:coarse), (max-width:900px){
  #topHud{
    top:max(5px,env(safe-area-inset-top));
    width:min(94%,920px);
    height:43px;
    padding:0 8px;
    pointer-events:none;
  }
  #topHud .brand{font-size:9px}
  #topHud .brandLogo{width:25px;height:25px}
  #topHud .brandMark{padding:4px 5px;font-size:8px}
  #topHud .brandTitleWrap>span:last-child{display:none}
  #topHud .hudStats{gap:5px;font-size:9px}
  #topHud .hudStats .musicBtn{display:none}
  #topHud #weatherHud{display:none}
  #topHud #padHud{display:none}
  #topHud #clockHud{display:inline-block!important;font-size:9px;min-width:37px}

  .quest{display:none!important}
  .hint{
    bottom:max(182px,calc(env(safe-area-inset-bottom) + 172px));
    font-size:9px;
    max-width:52vw;
    text-align:center;
    padding:7px 9px;
  }
  .hint kbd{display:none}

  .toast{
    top:max(54px,calc(env(safe-area-inset-top) + 49px));
    max-width:80vw;
    text-align:center;
    font-size:9px;
    padding:8px 11px;
  }

  .dialog{
    left:50%;
    bottom:max(8px,env(safe-area-inset-bottom));
    width:min(70%,760px);
    min-height:104px;
    padding:12px;
    margin-left:0;
  }
  .portrait{flex:0 0 58px;height:58px;font-size:25px}
  .dialogBody{padding:0 9px}
  .dialogBody p{font-size:12px;line-height:1.35;margin:5px 0 10px}
  .dialogBody>span{display:none}
  .dialogChoices button{min-height:38px;font-size:10px}

  .panelWindow,.obsWindow,.broadcastWindow{
    width:min(94vw,1000px);
    height:min(90dvh,620px);
  }
  .panelContent{
    -webkit-overflow-scrolling:touch;
    padding-bottom:80px;
  }
  .phoneShell{
    width:min(92vw,430px);
    height:min(88dvh,700px);
  }

  .start-screen,.screen{
    padding-top:env(safe-area-inset-top);
    padding-bottom:env(safe-area-inset-bottom);
  }
  .titleCard{
    max-height:94dvh;
    overflow:auto;
    padding:18px 25px;
  }
  .officialGameLogo{
    width:min(250px,38vw);
    max-height:125px;
  }
  .titleCard h1{
    font-size:clamp(30px,7vw,54px);
    margin-top:5px;
  }
  .titleCard p{font-size:12px;margin:10px 0 14px}
  .startButtons button{
    min-height:42px;
    padding:10px 17px;
    font-size:10px;
  }
  .controlsLine{display:none}
  .version{font-size:7px;right:8px;bottom:5px}

  .nameModal{
    width:min(88vw,560px);
    padding:20px;
  }
  .nameModal h2{font-size:20px}
  .nameModal input{font-size:18px;min-height:46px}
}

/* LANDSCAPE PHONE: intended gameplay layout */
@media (pointer:coarse) and (orientation:landscape), (max-height:560px) and (orientation:landscape){
  #app{width:100vw;height:100dvh;overflow:hidden}
  #game{
    width:100vw;
    height:100dvh;
    max-width:none;
    max-height:none;
    object-fit:contain;
  }
  .mobileDpad{width:136px;height:136px}
  .mobileActions{width:176px;height:136px}
  .mobileAction.main{width:74px;height:74px}
  .mobileAction.secondary{width:58px;height:58px}
  .mobileModeLabel{bottom:151px}
  .hint{bottom:148px}
  .dialog{
    width:min(66%,720px);
    left:50%;
    bottom:8px;
  }
}

/* Portrait remains usable for menus; gameplay prompts rotation. */
@media (pointer:coarse) and (orientation:portrait){
  #app{
    width:100vw;
    height:100dvh;
    align-items:start;
  }
  #game{
    width:100vw;
    height:56.25vw;
    max-width:100vw;
    max-height:none;
    margin-top:12vh;
  }
  .mobileDpad{
    width:146px;height:146px;
    bottom:max(22px,env(safe-area-inset-bottom));
  }
  .mobileActions{
    bottom:max(26px,env(safe-area-inset-bottom));
  }
  .phoneShell{
    width:96vw;
    height:88dvh;
  }
}

@media (min-width:901px) and (pointer:fine){
  .mobileControls{display:none!important}
}
