:root{--gold:#f4c76b;--violet:#8b6cff;--cyan:#6fd6ff;--ink:#0a0718;--panel:rgba(16,11,36,.82);--line:rgba(244,199,107,.35);--text:#ece8fa;--mute:#a59fc4}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overflow:hidden;background:var(--ink);color:var(--text);font-family:Nunito,system-ui,sans-serif;user-select:none;-webkit-user-select:none;touch-action:none;overscroll-behavior:none}
canvas#cv{position:fixed;left:0;top:0;display:block;transform:translateZ(0)}
.hidden{display:none!important}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}
h1,h2,h3{font-family:Cinzel,Georgia,serif;letter-spacing:.06em}

/* Telas */
.screen{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(10px,3vh,28px);padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));z-index:30;overflow:auto}
.screen.dim{background:rgba(5,3,14,.82)}
.title{text-align:center}
.title h1{font-size:clamp(64px,17vh,150px);font-weight:900;line-height:.95;letter-spacing:.2em;padding-left:.2em;background:linear-gradient(180deg,#fff6d8 10%,var(--gold) 45%,#a8691c 95%);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 0 28px rgba(244,199,107,.45))}
.title p{font-family:Cinzel,serif;font-size:clamp(13px,2.6vh,22px);letter-spacing:.42em;color:#d9cffa;text-transform:uppercase;margin-top:.4em;text-shadow:0 0 18px rgba(139,108,255,.9)}
.menu{display:flex;flex-direction:column;gap:clamp(6px,1.4vh,12px);width:min(320px,80vw)}
.foot{color:var(--mute);font-size:12px;text-align:center;max-width:90vw}
.btn{position:relative;padding:clamp(8px,1.7vh,13px) 22px;border:1px solid var(--line);border-radius:10px;background:linear-gradient(180deg,rgba(40,28,84,.85),rgba(18,12,42,.9));font-weight:700;font-size:clamp(14px,2.2vh,17px);letter-spacing:.05em;color:var(--text);transition:transform .12s,box-shadow .2s,border-color .2s;box-shadow:0 4px 18px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.08)}
.btn:hover,.btn:focus-visible{border-color:var(--gold);box-shadow:0 0 22px rgba(244,199,107,.35),inset 0 1px 0 rgba(255,255,255,.12);transform:translateY(-1px);outline:0}
.btn:active{transform:translateY(1px) scale(.98)}
.btn.gold{background:linear-gradient(180deg,#f8d98f,#c98f2c);color:#0c1633;border-color:#ffe9b3}
.btn.ghost{background:none;border-color:rgba(255,255,255,.18);box-shadow:none;color:var(--mute)}
.btn.danger{border-color:rgba(255,93,108,.5);color:#ffb3bb}
.btn.sm{padding:8px 14px;font-size:14px}
.btn.sel{border-color:var(--gold);box-shadow:0 0 18px rgba(244,199,107,.4);color:var(--gold)}
.panel{width:min(440px,94vw);max-height:96vh;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:clamp(16px,3.5vh,28px);border:1px solid var(--line);border-radius:18px;background:rgba(16,11,36,.94);box-shadow:0 20px 60px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.07);text-align:center}
.panel.wide{width:min(860px,96vw)}
.panel h2{color:var(--gold);font-size:clamp(18px,3.6vh,26px)}
.sub{color:var(--mute);font-size:13px}
.status{color:var(--cyan);font-size:14px;font-weight:700}
.err{color:#ff8f9c;font-size:13px;min-height:1em}
.or{color:var(--mute);font-size:12px;margin:2px 0}
.row{display:flex;gap:8px;justify-content:center}
.row .btn{flex:1}
input#coCode{flex:1.2;min-width:0;text-align:center;font:800 22px Nunito,sans-serif;letter-spacing:.3em;text-transform:uppercase;color:var(--gold);background:rgba(0,0,0,.4);border:1px solid var(--line);border-radius:10px;padding:8px;outline:0;user-select:text;-webkit-user-select:text}
.code{font:900 clamp(34px,8vh,54px) Cinzel,serif;letter-spacing:.3em;padding-left:.3em;color:var(--gold);text-shadow:0 0 24px rgba(244,199,107,.6);user-select:text;-webkit-user-select:text}
.opt{display:flex;align-items:center;justify-content:space-between;gap:14px;font-weight:700;text-align:left;font-size:15px}
.opt input[type=range]{width:46%;accent-color:var(--gold)}
.opt input[type=checkbox]{width:22px;height:22px;accent-color:var(--gold)}
.opt select{background:#1a1238;color:var(--text);border:1px solid var(--line);border-radius:8px;padding:6px;font:inherit}
#charCards{display:flex;gap:14px;justify-content:center}
.card{flex:1;max-width:360px;padding:12px;border:1px solid rgba(255,255,255,.15);border-radius:14px;background:rgba(0,0,0,.3);cursor:pointer;transition:.2s;text-align:left;display:flex;gap:10px;align-items:center}
.card:hover{border-color:var(--c);box-shadow:0 0 30px color-mix(in srgb,var(--c) 40%,transparent);transform:translateY(-3px)}
.card canvas{width:96px;height:96px;flex:none;background:rgba(0,0,0,.3);border-radius:10px}
.card h3{color:var(--c);font-size:20px}
.card em{font-style:normal;color:var(--mute);font-size:12px;letter-spacing:.1em;text-transform:uppercase}
.card p{font-size:13px;margin-top:4px;color:#d6d0ee}
.card ul{list-style:none;font-size:12px;color:var(--mute);margin-top:4px}
.help{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;text-align:left;font-size:13.5px;line-height:1.55}
.help h3{color:var(--cyan);font-size:15px;margin-bottom:4px}
.help p{margin-bottom:5px;color:#d6d0ee}
kbd{display:inline-block;min-width:22px;text-align:center;padding:1px 6px;margin:0 2px;border:1px solid var(--line);border-bottom-width:2px;border-radius:5px;background:rgba(0,0,0,.4);font:700 12px Nunito,sans-serif;color:var(--gold)}
.end h1{font-size:64px;color:var(--gold);letter-spacing:.2em}

/* HUD */
#hud{position:fixed;inset:0;pointer-events:none;z-index:10}
#hud button,#actions{pointer-events:auto}
#hurt{position:absolute;inset:0;box-shadow:inset 0 0 120px 30px rgba(255,40,60,.55);opacity:0;transition:opacity .35s;will-change:opacity}
#hurt.on{opacity:1;transition:none}
#party{position:absolute;left:max(10px,env(safe-area-inset-left));top:max(8px,env(safe-area-inset-top));display:flex;flex-direction:column;gap:6px}
.pc{display:flex;align-items:center;gap:8px;padding:5px 10px 5px 5px;border-radius:26px 12px 12px 26px;background:rgba(10,7,24,.7);border:1px solid rgba(255,255,255,.1);min-width:178px;opacity:.82;transform-origin:left;transition:.2s}
.pc.me{opacity:1;border-color:var(--c);box-shadow:0 0 16px color-mix(in srgb,var(--c) 30%,transparent)}
.pc.down{filter:grayscale(1);opacity:.7}
.pc .av{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font:900 16px Cinzel,serif;color:#120a24;background:radial-gradient(circle at 35% 30%,#fff,var(--c) 60%)}
.pc .inf{flex:1}
.pc b{font-size:12px;letter-spacing:.06em;display:flex;justify-content:space-between}
.pc b span{color:var(--mute);font-weight:600}
.bar{height:8px;border-radius:5px;background:rgba(0,0,0,.6);overflow:hidden;margin-top:3px;border:1px solid rgba(255,255,255,.08)}
.bar i{display:block;height:100%;width:100%;border-radius:4px;background:linear-gradient(90deg,#ff5d6c,#ff9a7a);transform-origin:0 50%;transition:transform .15s;will-change:transform}
.bar.mp{height:5px}.bar.mp i{background:linear-gradient(90deg,#4a7dff,#6fd6ff)}
.bar.xp{height:4px;width:74px}.bar.xp i{background:var(--gold)}
#topright{position:absolute;right:max(10px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));display:flex;align-items:center;gap:10px}
#lvl{font-size:12px;color:var(--gold);text-align:right;text-shadow:0 1px 3px #000}
#room{font:800 12px Nunito;color:var(--cyan);padding:4px 8px;border:1px solid rgba(111,214,255,.4);border-radius:8px;background:rgba(10,7,24,.7)}
#btnPause{width:40px;height:40px;border-radius:50%;background:rgba(10,7,24,.7);border:1px solid var(--line);font-size:12px;color:var(--gold)}
#bossbar{position:absolute;left:50%;top:max(10px,env(safe-area-inset-top));transform:translateX(-50%);width:min(46vw,460px);text-align:center}
#bossbar span{font:700 clamp(12px,2.4vh,16px) Cinzel,serif;letter-spacing:.14em;color:#ffd9e2;text-shadow:0 0 12px #ff3d6e,0 1px 2px #000}
#bossbar .bar{height:10px;border-color:rgba(255,93,143,.5)}
#bossbar .bar i{background:linear-gradient(90deg,#8f1238,#ff5d8f)}
#banner{position:absolute;left:0;right:0;top:24%;text-align:center;opacity:0;transform:scale(.96);transition:opacity .8s,transform 1.6s;will-change:opacity,transform}
#banner.on{opacity:1;transform:scale(1)}
#banner small{font:600 clamp(11px,2vh,15px) Cinzel,serif;letter-spacing:.5em;color:var(--mute);text-transform:uppercase}
#banner h2{font-size:clamp(26px,7vh,58px);color:var(--gold);text-shadow:0 0 30px rgba(244,199,107,.6),0 2px 4px #000}
#banner.boss h2{color:#ff7fa3;text-shadow:0 0 30px rgba(255,61,110,.8),0 2px 4px #000}
#toast{position:absolute;left:50%;top:16%;transform:translateX(-50%);max-width:86vw;padding:8px 18px;border-radius:20px;background:rgba(10,7,24,.82);border:1px solid var(--line);font-weight:700;font-size:clamp(12px,2.2vh,15px);text-align:center;opacity:0;transition:opacity .4s;will-change:opacity}
#toast.on{opacity:1}
#saved{position:absolute;left:max(12px,env(safe-area-inset-left));bottom:max(10px,env(safe-area-inset-bottom));font-size:12px;font-weight:700;color:var(--gold);opacity:0;transition:opacity .5s;text-shadow:0 1px 3px #000}
body.touch #saved{left:50%;transform:translateX(-50%)}
#saved.on{opacity:1}
#prompt{position:absolute;left:50%;bottom:18%;transform:translateX(-50%);padding:6px 14px;border-radius:10px;background:rgba(10,7,24,.82);border:1px solid var(--line);font-weight:700;font-size:14px;white-space:nowrap}
#joy{position:absolute;width:120px;height:120px;margin:-60px 0 0 -60px;border-radius:50%;border:2px solid rgba(255,255,255,.22);background:rgba(255,255,255,.05)}
#joy i{position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px;border-radius:50%;background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.7),rgba(139,108,255,.6))}
#actions{position:absolute;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,auto);gap:8px;align-items:end;justify-items:center}
.ab{--s:54px;position:relative;width:var(--s);height:var(--s);border-radius:50%;border:2px solid var(--c,var(--line));background:radial-gradient(circle at 35% 30%,rgba(60,44,120,.95),rgba(14,9,34,.95));display:grid;place-items:center;box-shadow:0 4px 12px rgba(0,0,0,.5);color:var(--c,var(--gold));touch-action:none}
.ab svg{width:54%;height:54%}
.ab .cd{position:absolute;inset:0;border-radius:50%;overflow:hidden;pointer-events:none}.ab .cd i{position:absolute;inset:0;background:rgba(0,0,0,.72);transform-origin:50% 100%;transform:scaleY(0);will-change:transform}
.ab kbd{position:absolute;right:-2px;bottom:-2px;font-size:10px;min-width:16px;padding:0 4px;background:#0a0718}
.ab.lock{filter:grayscale(1);opacity:.4}
.ab.nomp{border-color:#44506e;color:#6d7896}
.ab.on{background:radial-gradient(circle at 35% 30%,#f8d98f,#a8691c);color:#0c1633}
.ab.big{--s:74px;grid-column:3/5;grid-row:2/4}
.ab.util{--s:44px}
.ab:active{transform:scale(.93)}
body:not(.touch) .ab.touchonly{display:none}
body.touch .ab kbd{display:none}
body:not(.touch) #actions{right:50%;transform:translateX(50%);grid-template-columns:repeat(8,auto);align-items:center}
body:not(.touch) .ab{--s:50px}
body:not(.touch) .ab.k1{order:1}body:not(.touch) .ab.k2{order:2}body:not(.touch) .ab.k3{order:3}body:not(.touch) .ab.k4{order:3}body:not(.touch) .ab.k5{order:3}body:not(.touch) .ab.util{order:5}


#signBox{position:fixed;left:50%;bottom:9%;transform:translateX(-50%);width:min(560px,90vw);padding:16px 20px;border-radius:14px;z-index:20;background:linear-gradient(180deg,rgba(46,40,58,.96),rgba(26,22,36,.96));border:1px solid var(--line);box-shadow:0 12px 40px rgba(0,0,0,.6);text-align:center}
#signBox p{font:600 clamp(14px,2.6vh,18px)/1.5 Cinzel,serif;color:#f1e7cf}
#signBox small{display:block;margin-top:8px;color:var(--mute);font-size:11px}

/* Cutscene */
#cut{position:fixed;inset:0;z-index:40;background:#000}
#cutbg{position:absolute;inset:0;width:100%;height:100%}
.lb{position:absolute;left:0;right:0;height:9vh;background:#000}
.lb.top{top:0}.lb.bot{bottom:0}
#cutSkip{position:absolute;right:16px;top:calc(9vh + 10px);padding:6px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.25);color:var(--mute);font-size:13px;background:rgba(0,0,0,.4)}
#cutbox{position:absolute;left:50%;bottom:calc(9vh + 14px);transform:translateX(-50%);width:min(820px,94vw);min-height:104px;display:flex;gap:14px;align-items:center;padding:14px 20px;border-radius:16px;background:rgba(8,5,20,.84);border:1px solid var(--line);cursor:pointer}
#cutPortrait{width:84px;height:84px;flex:none;border-radius:50%;background:radial-gradient(circle,rgba(139,108,255,.25),rgba(0,0,0,.5));border:1px solid var(--line)}
#cutbox .txt{flex:1;text-align:left}
#cutWho{display:block;font:700 15px Cinzel,serif;letter-spacing:.14em;margin-bottom:4px}
#cutText{font-size:clamp(14px,2.7vh,19px);line-height:1.5;min-height:3em}
#cutbox.narr #cutText{font-family:Cinzel,serif;text-align:center;font-style:italic;color:#e6def8}
#cutNext{align-self:flex-end;color:var(--gold);animation:bob 1s infinite}
@keyframes bob{50%{transform:translateY(4px)}}

#fade{position:fixed;inset:0;background:#000;opacity:0;pointer-events:none;transition:opacity .45s;z-index:60}
#fade.on{opacity:1}
#rotate{display:none;position:fixed;inset:0;z-index:80;background:rgba(5,3,14,.94);place-items:center;text-align:center;font-size:54px;color:var(--gold)}
#rotate p{font-size:15px;color:var(--text);margin-top:8px}
@media (orientation:portrait) and (pointer:coarse){#rotate{display:grid}}
@media (max-height:430px){.title h1{font-size:54px}.pc{min-width:150px;transform:scale(.88)}.ab{--s:48px}.ab.big{--s:64px}.card ul{display:none}}
@media (max-width:640px){#charCards{flex-direction:column;align-items:center}}

/* ───── Reforma: pixel art, novo layout de toque, gamepad, escolha de final ───── */
:root{--ui:1}
canvas#cv,#cutbg,#cutPortrait,.card canvas,.pc .av{image-rendering:-webkit-optimize-contrast;image-rendering:-moz-crisp-edges;image-rendering:crisp-edges;image-rendering:pixelated;-ms-interpolation-mode:nearest-neighbor}
.pc img.av{width:38px;height:38px;border-radius:8px;border:2px solid var(--c);background:#0c0818;object-fit:cover}
#cutPortrait{border-radius:10px;border:2px solid var(--line);background:#0c0818}
#frags{font:800 12px Nunito;color:var(--gold);text-shadow:0 1px 3px #000}
.field{width:100%;margin:6px 0 4px;text-align:center;font:700 14px Nunito,sans-serif;color:var(--text);background:rgba(0,0,0,.4);border:1px solid var(--line);border-radius:10px;padding:9px;outline:0;user-select:text;-webkit-user-select:text}
#coopChoose,#coopHost,#coopGuest,#choiceList{display:flex;flex-direction:column;gap:10px}
#choiceList .btn{display:flex;flex-direction:column;gap:3px;text-align:center}
#choiceList .btn small{font-weight:600;font-size:12px;opacity:.8;letter-spacing:0}
.btn.locked,.btn:disabled{opacity:.5;cursor:not-allowed;transform:none!important;box-shadow:none!important}
#endList{list-style:none;display:flex;gap:10px;justify-content:center;flex-wrap:wrap;font:700 15px Cinzel,serif;color:var(--mute)}
#endList li{padding:6px 14px;border:1px solid rgba(255,255,255,.15);border-radius:10px}
#endList li.got{color:var(--gold);border-color:var(--line)}
body.pad .btn:focus,body.pad .card:focus,body.pad input:focus,body.pad select:focus{outline:3px solid var(--gold);outline-offset:2px}
.card{outline:0}
.ab.on{background:radial-gradient(circle at 35% 30%,#f8d98f,#a8691c);color:#0c1633}
/* botões de toque em arco, no canto */
body.touch #actions{display:block;width:calc(236px*var(--ui));height:calc(206px*var(--ui));right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));transform:none}
body.touch .ab{position:absolute;--s:calc(58px*var(--ui))}
body.touch .ab.big{--s:calc(88px*var(--ui));right:0;bottom:0}
body.touch .ab.k1{right:calc(102px*var(--ui));bottom:calc(2px*var(--ui))}
body.touch .ab.k2{right:calc(84px*var(--ui));bottom:calc(76px*var(--ui))}
body.touch .ab.k3{right:calc(8px*var(--ui));bottom:calc(104px*var(--ui))}
body.touch .ab.u-int{--s:calc(50px*var(--ui));right:calc(176px*var(--ui));bottom:calc(30px*var(--ui))}
body.touch .ab.u-swap{--s:calc(44px*var(--ui));right:calc(156px*var(--ui));bottom:calc(122px*var(--ui))}
body.touch .ab.u-stay{--s:calc(44px*var(--ui));right:calc(84px*var(--ui));bottom:calc(156px*var(--ui))}
body.touch.lefty #actions{right:auto;left:max(14px,env(safe-area-inset-left));transform:scaleX(-1)}
body.touch.lefty .ab{transform:scaleX(-1)}
body.touch #prompt{bottom:auto;top:26%}
@media (max-height:430px){body.touch .ab{--s:calc(52px*var(--ui))}body.touch .ab.big{--s:calc(80px*var(--ui))}}

#fps{position:absolute;left:50%;top:max(4px,env(safe-area-inset-top));transform:translateX(-50%);font:800 11px Nunito,monospace;color:#9dffb8;background:rgba(0,0,0,.55);padding:2px 8px;border-radius:8px;pointer-events:none;white-space:nowrap}

/* ───── Mundo aberto: painel de personagem, minimapa, lobby, pausa global, 4 jogadores ───── */
#gold{font:800 12px Nunito;color:#ffe28a;text-shadow:0 1px 3px #000;white-space:nowrap}
#btnBag,#btnMap{width:40px;height:40px;border-radius:50%;background:rgba(10,7,24,.7);border:1px solid var(--line);color:var(--gold);display:grid;place-items:center;pointer-events:auto}
#btnBag svg,#btnMap svg{width:55%;height:55%}
#mini{position:absolute;right:max(10px,env(safe-area-inset-right));top:calc(max(8px,env(safe-area-inset-top)) + 50px);width:128px;height:80px;border:2px solid rgba(244,199,107,.55);border-radius:6px;background:#000;opacity:.88;pointer-events:auto;image-rendering:pixelated}
#loot{position:absolute;left:50%;top:26%;transform:translateX(-50%);text-align:center;font:800 13px Nunito,sans-serif;text-shadow:0 1px 3px #000,0 0 8px #000;pointer-events:none}
#loot div{margin-top:2px;animation:lootin .25s ease-out}
@keyframes lootin{from{opacity:0;transform:translateY(8px)}}
.pc{min-width:150px;padding:4px 8px 4px 4px;gap:6px}
.pc .av{width:30px!important;height:30px!important}
.pc b{font-size:11px}.pc b em{font-style:normal}
.pc .bar{height:6px}.pc .bar.mp{height:4px}
@media (max-height:430px){.pc{min-width:128px;transform:scale(.86)}#mini{width:96px;height:60px;top:calc(max(8px,env(safe-area-inset-top)) + 46px)}}
.namerow{align-items:center;margin-top:6px}.namerow .field{margin:0;flex:2}
.card.sel{border-color:var(--c);box-shadow:0 0 26px color-mix(in srgb,var(--c) 45%,transparent);transform:translateY(-2px)}
#charCards{flex-wrap:wrap}
.card{min-width:200px;max-width:none}
.lrow{padding:6px 10px;margin:4px 0;border:1px solid var(--c);border-radius:8px;background:rgba(0,0,0,.3);text-align:left;font-size:14px}
.lrow b{color:var(--c);margin-right:6px}
#pauseOther{position:fixed;inset:0;z-index:35;display:grid;place-items:center;background:rgba(5,3,14,.72);text-align:center;font:700 clamp(18px,4vh,28px) Cinzel,serif;color:var(--gold);pointer-events:auto}
#pauseOther b{color:#fff}#pauseOther small{display:block;margin-top:8px;font:600 14px Nunito,sans-serif;color:var(--mute)}
#panel,#bigmap{position:fixed;inset:0;z-index:32;display:grid;place-items:center;background:rgba(5,3,14,.72);padding:max(8px,env(safe-area-inset-top)) 8px 8px}
.pbox{width:min(1000px,98vw);max-height:94vh;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;background:rgba(14,10,32,.97);box-shadow:0 20px 60px rgba(0,0,0,.6);overflow:hidden;text-align:left}
.phead{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line)}
#ptabs{display:flex;gap:6px;flex-wrap:wrap}
.tab{padding:7px 14px;border-radius:9px;border:1px solid rgba(255,255,255,.15);font-weight:800;font-size:14px;color:var(--mute)}
.tab.on{border-color:var(--gold);color:var(--gold);background:rgba(244,199,107,.1)}
#pbody{overflow:auto;padding:10px;touch-action:pan-y;-webkit-overflow-scrolling:touch;user-select:none;-webkit-user-select:none}
.cols{display:grid;grid-template-columns:minmax(200px,1fr) minmax(210px,1fr) minmax(250px,1.3fr);gap:12px}
.cols.one{grid-template-columns:1fr}
.col h3{color:var(--gold);font-size:16px;margin-bottom:6px}.col h3 small{color:var(--mute);font:600 12px Nunito;letter-spacing:0;margin-left:6px}
.col h4{color:var(--cyan);font:800 13px Nunito;margin:10px 0 4px}
.mut{color:var(--mute);font-size:12px;margin:6px 0}
.xpbar{height:6px;border-radius:4px;background:rgba(0,0,0,.5);overflow:hidden;margin-bottom:6px}.xpbar i{display:block;height:100%;background:var(--gold)}
.wallet{display:flex;gap:10px;flex-wrap:wrap;font:800 13px Nunito;color:#ffe28a;margin-bottom:6px}
.pots{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.stats .sr,.idet .sr{display:flex;justify-content:space-between;gap:8px;font-size:13px;padding:2px 0;border-bottom:1px solid rgba(255,255,255,.05)}
.sr span{color:var(--mute)}.sr b{color:#fff}.sr em{font-style:normal;font-size:11px;margin-left:4px}
.up{color:#7dff9d}.dn{color:#ff8a8a}
.eqs{display:grid;grid-template-columns:62px 40px 1fr;align-items:center;gap:6px;margin-bottom:5px;font-size:13px}.eqs span{color:var(--mute);font-size:11px}.eqs b{font-size:12px;line-height:1.2}
.grid{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;margin-bottom:8px}
.cell{position:relative;aspect-ratio:1;border:2px solid var(--c,rgba(255,255,255,.14));border-radius:8px;background:rgba(0,0,0,.35);color:var(--c,#667);display:grid;place-items:center;padding:0;min-width:34px}
.cell svg{width:58%;height:58%}.cell small{position:absolute;right:2px;bottom:0;font:800 10px Nunito;color:#fff}.cell i{position:absolute;left:3px;top:0;font:800 9px Nunito;color:#9dffb8;font-style:normal}
.cell.sel{box-shadow:0 0 12px var(--c);background:rgba(255,255,255,.08)}.cell.void{border-style:dashed;opacity:.35}.cell.empty{opacity:.5}
.eqc{width:40px;min-width:40px}
.idet{border:1px solid var(--c);border-radius:10px;padding:8px 10px;background:rgba(0,0,0,.3)}.idet h4{color:var(--c);font:800 15px Nunito;margin:0}.idet>small{display:block;color:var(--mute);margin-bottom:4px;font-size:11px}
.ibtn{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.srow{display:flex;align-items:center;gap:10px;padding:7px 8px;margin-bottom:5px;border:1px solid var(--c,rgba(255,255,255,.12));border-radius:10px;background:rgba(0,0,0,.28)}
.srow>svg{width:26px;height:26px;flex:none;color:var(--c,var(--cyan))}
.si{flex:1;min-width:0}.si b{display:block;font-size:14px}.si small{display:block;color:var(--mute);font-size:11.5px;line-height:1.35}.si em{font-style:normal;color:var(--mute);font-size:11px}
.rew{color:#ffe28a!important}
.stars{color:var(--gold);font-size:15px;letter-spacing:2px}.stars span{font-size:11px;color:var(--mute);letter-spacing:0;margin-left:6px}
.qbar{position:relative;height:12px;margin:4px 0;border-radius:6px;background:rgba(0,0,0,.5);overflow:hidden}.qbar i{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,#3a9a6a,#9dffb8)}.qbar span{position:relative;font:800 10px/12px Nunito;display:block;text-align:center}
.btn:disabled{opacity:.45;cursor:not-allowed}
#bigmap .pbox{padding:10px;align-items:center;gap:8px}#bigcv{max-width:100%;max-height:calc(94vh - 60px);image-rendering:pixelated;border:2px solid var(--line);border-radius:6px;background:#000}
@media (max-width:760px){.cols{grid-template-columns:1fr}}
@media (max-height:430px){.pbox{max-height:98vh}.cols{gap:8px}.tab{padding:5px 10px;font-size:13px}.grid{grid-template-columns:repeat(9,1fr)}}
/* botões de toque com poções */
body.touch #actions{width:calc(262px*var(--ui));height:calc(232px*var(--ui))}
body.touch .ab.u-int{right:calc(176px*var(--ui));bottom:calc(30px*var(--ui))}
body.touch .ab.u-hp{--s:calc(42px*var(--ui));right:calc(196px*var(--ui));bottom:calc(92px*var(--ui))}
body.touch .ab.u-mp{--s:calc(42px*var(--ui));right:calc(150px*var(--ui));bottom:calc(134px*var(--ui))}
body.touch .ab.u-swap{--s:calc(44px*var(--ui));right:calc(96px*var(--ui));bottom:calc(158px*var(--ui))}
body.touch .ab.u-stay{--s:calc(44px*var(--ui));right:calc(42px*var(--ui));bottom:calc(172px*var(--ui))}
.ab.u-hp,.ab.u-mp{color:#ff7a8a}.ab.u-mp{color:#7ab4ff}
.ab b{position:absolute;left:0;right:0;bottom:1px;text-align:center;font:800 11px Nunito;color:#fff;text-shadow:0 1px 2px #000}
body:not(.touch) .ab.u-hp{order:4}body:not(.touch) .ab.u-mp{order:4}
body.touch.lefty .ab b{transform:scaleX(-1)}

canvas#cv{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M3 3L28 12 17 16 13 28z' fill='%23f4c76b' stroke='%23120a1e' stroke-width='2.2' stroke-linejoin='round'/%3E%3Cpath d='M6 6l15 6-7 2.800-2.800 7z' fill='%23ff5d6c'/%3E%3C/svg%3E") 3 3,crosshair}
#txt{position:fixed;left:0;top:0;z-index:4;pointer-events:none}

.ic{image-rendering:pixelated;image-rendering:crisp-edges;width:78%;height:78%;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))}
.srow>img.ic{width:38px;height:38px;flex:none}
.ihead{display:flex;align-items:center;gap:8px}.ihead .ic{width:44px;height:44px;flex:none}
.cell .ic{width:80%;height:80%}

.bmbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:center;padding:2px 4px}
#bmHint{color:var(--mute);font-size:12px;flex:1 1 220px;text-align:center}
#bigcv{cursor:crosshair;image-rendering:auto!important;max-height:none!important;max-width:100%;height:auto;box-sizing:content-box}
#mini{image-rendering:auto!important}

/* 6 habilidades: layout de toque ampliado */
body.touch #actions{width:calc(300px*var(--ui));height:calc(270px*var(--ui))}
body.touch .ab.k4{right:calc(4px*var(--ui));bottom:calc(176px*var(--ui))}
body.touch .ab.k5{right:calc(80px*var(--ui));bottom:calc(150px*var(--ui))}
body.touch .ab.u-swap{right:calc(170px*var(--ui));bottom:calc(184px*var(--ui))}
body.touch .ab.u-stay{right:calc(222px*var(--ui));bottom:calc(140px*var(--ui))}

/* ═════ Tema "dark fantasy" (painéis, loja, forja, missões e HUD) ═════ */
:root{--pb:#0f131d;--pb2:#101622;--pb3:#080b11;--pl:#222c3d;--pl2:#2a3447;--amb:#f59e0b;--amb2:#fcd34d}
#panel,#bigmap{background:rgba(3,5,10,.82)}
.pbox{width:min(1180px,99vw);border:4px solid var(--pl2);border-radius:3px;background:var(--pb);box-shadow:0 0 50px rgba(0,0,0,.9);position:relative}
.pbox::before,.pbox::after{content:"";position:absolute;width:12px;height:12px;border:4px solid var(--amb);z-index:3;pointer-events:none}
.pbox::before{left:0;top:0;border-right:0;border-bottom:0}.pbox::after{right:0;bottom:0;border-left:0;border-top:0}
#panel .pbox>div:first-child,.phead{background:#141b27;border-bottom:4px solid var(--pl2)}
.tab{border:2px solid #1e2736;border-radius:0;background:#0b0e14;color:#94a3b8;font-size:12px;letter-spacing:.08em;text-transform:uppercase;padding:6px 14px}
.tab:hover{border-color:#64748b;color:#e2e8f0}
.tab.on{background:rgba(217,119,6,.3);color:#fcd34d;border-color:var(--amb);box-shadow:inset 0 0 10px rgba(245,158,11,.3)}
#pbody{background:#0a0d14;padding:12px}
#panel .btn,.pbtn{border-radius:0}
.cell{border-radius:0;background:var(--pb3);border:2px solid var(--c,#1e2736);box-shadow:none;image-rendering:pixelated}
.cell.sel{outline:2px solid var(--amb2);box-shadow:0 0 14px rgba(245,158,11,.55);transform:scale(1.04);z-index:2}
.cell.void{border:2px dashed #192230;background:rgba(8,11,17,.5);opacity:1}
.cell small{right:auto;left:auto;top:1px;right:3px;bottom:auto;color:#fcd34d;text-shadow:0 1px 2px #000}
.cell i{left:2px;top:2px;background:var(--amb);color:#0b0e14;border:1px solid var(--amb2);padding:0 3px;line-height:11px;font:900 9px Nunito}
.cell .ic{image-rendering:pixelated}
.srow{border-radius:0;background:var(--pb2);border:2px solid var(--c,var(--pl))}
.col h3{color:#fbbf24;letter-spacing:.06em;text-transform:uppercase;font-size:14px}
.idet{border-radius:0}
.xpbar{height:5px;border-radius:0;background:var(--pb3);border:1px solid #1e2736}.xpbar i{background:var(--amb)}
/* mochila em 3 colunas */
.inv{display:grid;grid-template-columns:minmax(210px,4fr) minmax(250px,5fr) minmax(200px,3fr);gap:12px;align-items:start}
.icol{display:flex;flex-direction:column;gap:10px;min-width:0}
.ibox{background:var(--pb2);border:2px solid var(--pl);padding:10px}
.ibox.row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;flex-wrap:wrap}
.ibox.center{text-align:center;min-height:120px;display:grid;place-items:center}
.ihd{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-bottom:8px;margin-bottom:6px;border-bottom:2px solid #1e2736}
.ihd h3{color:#fbbf24;font:900 15px/1.1 "Courier New",ui-monospace,monospace;letter-spacing:.08em}.ihd p{color:#94a3b8;font:700 10px "Courier New",monospace;margin-top:2px}
.lvb{color:#fcd34d;background:rgba(69,26,3,.8);border:1px solid #d97706;padding:2px 8px;font:800 11px "Courier New",monospace;white-space:nowrap}
.pdoll{position:relative;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 10px;margin:8px 0;background:#07090f;border:2px solid #18202e;min-height:178px}
.sil{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:70px;height:112px;border:2px dashed #475569;opacity:.22;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;pointer-events:none}
.sil b{width:28px;height:28px;border:2px solid #64748b;border-radius:50%}.sil u{width:44px;height:56px;border:2px solid #64748b}
.pcol{display:flex;flex-direction:column;gap:10px;z-index:1}
.cell.pd{width:50px;height:50px;aspect-ratio:auto;min-width:0}
.cell.pd.empty{border:2px dashed #1e2736;color:#475569}.cell.pd.empty span{font:800 8px "Courier New",monospace;text-transform:uppercase}
.bh{display:flex;justify-content:space-between;align-items:center;gap:6px;font:800 10px "Courier New",monospace;color:#fbbf24;letter-spacing:.06em;margin-bottom:6px}.bh em{color:#94a3b8;font-style:normal;font-weight:600}
.belt{border-top:2px solid #1e2736;padding-top:8px}
.bg2{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.pot{display:flex;align-items:center;gap:6px;background:var(--pb3);border:2px solid #1e2736;padding:5px;text-align:left}
.pot svg{width:30px;height:30px;padding:4px;flex:none;border:1px solid}.pot.hp svg{color:#ef4444;background:#450a0a;border-color:#dc2626}.pot.mp svg{color:#60a5fa;background:#0c1b3d;border-color:#2563eb}
.pot div{flex:1;min-width:0}.pot b{display:block;font:800 11px Nunito;color:#e2e8f0;white-space:nowrap}.pot small{font:600 10px "Courier New",monospace}.pot.hp small{color:#f87171}.pot.mp small{color:#38bdf8}
.pot kbd{font:800 10px Nunito;background:#1a2332;color:#fbbf24;border:1px solid var(--pl2);padding:0 4px}
.pot:hover{border-color:#64748b}
.sbar{margin-bottom:6px}.sbar>div{display:flex;justify-content:space-between;font:800 10px "Courier New",monospace;color:#cbd5e1;margin-bottom:2px}
.sbar i{display:block;height:9px;background:var(--pb3);border:1px solid #1e2736;padding:1px}.sbar u{display:block;height:100%;width:100%}
.sgrid{display:grid;grid-template-columns:1fr 1fr;gap:3px 12px;border-top:1px solid #1e2736;padding-top:8px;margin-top:6px}
.sgrid>div{display:flex;justify-content:space-between;font-size:11px}.sgrid span{color:#94a3b8}.sgrid b{color:#e2e8f0}.am{color:#fcd34d!important}.cy{color:#22d3ee}.pu{color:#c084fc}
.bagh{display:flex;align-items:center;gap:8px}.bagh b{font:900 12px "Courier New",monospace;letter-spacing:.08em;color:#e2e8f0}.cnt{background:var(--pb3);color:#fbbf24;border:1px solid var(--pl);padding:1px 8px;font:800 12px "Courier New",monospace}
.wal{display:flex;gap:10px;align-items:center;font:800 12px "Courier New",monospace}
.wal span{display:inline-flex;align-items:center;gap:4px;line-height:14px}
.wal i{display:inline-block;width:14px;height:14px;line-height:14px;text-align:center;font:normal 13px/14px "Segoe UI Symbol","DejaVu Sans",sans-serif;font-style:normal}
.ftabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}
.ftab{padding:5px 2px;font:800 10px "Courier New",monospace;text-transform:uppercase;border:1px solid #1c2533;background:var(--pb3);color:#94a3b8}
.ftab.on{background:rgba(217,119,6,.3);color:#fcd34d;border-color:var(--amb)}
.inv .grid{grid-template-columns:repeat(6,1fr);gap:7px;margin:0}
.hint{color:#64748b;font:600 11px "Courier New",monospace;text-align:center}
.insp{border-color:var(--c)}
.irar{display:flex;align-items:center;gap:10px;padding:8px;background:rgba(0,0,0,.25);border:2px solid var(--c);margin-bottom:10px}
.iic{width:44px;height:44px;background:#07090e;border:1px solid #334155;display:grid;place-items:center;flex:none}.iic .ic{width:36px;height:36px}.iic svg{width:28px;height:28px;color:var(--c)}
.irar h4{color:var(--c);font:900 12px/1.2 "Courier New",monospace;text-transform:uppercase;margin:0}.irar small{color:#94a3b8;font:700 10px "Courier New",monospace}
.sbox{background:var(--pb3);border:2px solid #1c2533;padding:8px;margin-bottom:10px}.sbox.cmp{background:#0b1019;border-color:rgba(120,53,15,.7)}
.sbox .sr{display:flex;justify-content:space-between;font-size:12px;padding:1px 0;border:0}.sbox .sr span{color:#94a3b8}.sbox .sr b{color:#e2e8f0}.sbox .sr b.up{color:#34d399}.sbox .sr b.dn{color:#fb7185}
.ibtn2{display:flex;flex-direction:column;gap:6px;border-top:2px solid #1c2533;padding-top:8px}
.pbtn{padding:8px 6px;font:900 11px "Courier New",monospace;letter-spacing:.06em;text-transform:uppercase;border:2px solid #2a3447;background:#141c2b;color:#cbd5e1}
.pbtn:hover:not(:disabled){background:#1d293d}.pbtn.gold{background:#d97706;color:#0b0e14;border-color:var(--amb2)}.pbtn.gold:hover:not(:disabled){background:#f59e0b}
.pbtn.warn{background:#4c0519;color:#fda4af;border-color:#e11d48}.pbtn:disabled{opacity:.45;cursor:not-allowed}
.pbtn2{display:flex;gap:6px}.pbtn2 .pbtn{flex:1}.pbtn2 .pbtn.trash{flex:none;padding:8px 12px}.pbtn.trash:hover{background:#4c0519;border-color:#e11d48}
@media (max-width:860px){.inv{grid-template-columns:1fr}.cell.pd{width:46px;height:46px}}
@media (max-height:430px) and (min-width:861px){.inv{gap:8px}.pdoll{min-height:150px}.cell.pd{width:44px;height:44px}.inv .grid{gap:4px}.ibox{padding:7px}}
/* HUD no mesmo tema */
.pc{border-radius:3px!important;border:2px solid var(--pl2)!important;background:rgba(15,19,29,.92)!important}
.pc.me{border-color:var(--amb)!important}
.btn{border-radius:2px}

/* voz */
#btnMic{width:44px;height:44px;border-radius:50%;border:2px solid var(--pl2);background:rgba(15,19,29,.92);font-size:20px;pointer-events:auto}
#btnMic.on{border-color:#34d399;box-shadow:0 0 12px rgba(52,211,153,.6);background:rgba(6,78,59,.9)}
.opt span{color:var(--gold);font-weight:800;margin-left:6px}

#updBtn{position:fixed;left:50%;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:70;min-height:40px;max-width:92vw;padding:8px 16px;border:2px solid var(--amb2);border-radius:2px;background:#d97706;color:#0b0e14;font:800 13px Nunito,sans-serif}
/* ═════ Materiais (mochila e loja) ═════ */
.mchips{display:flex;flex-wrap:wrap;gap:4px}
.mchip{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border:1px solid var(--c,#334155);background:var(--pb3);font:800 11px Nunito,sans-serif;color:#e2e8f0;white-space:nowrap}
.mchip::before{content:"";width:8px;height:8px;flex:none;background:var(--c,#94a3b8)}
.mchip b{color:#fcd34d}
.srow>.mdot{width:26px;height:26px;flex:none;background:var(--c,#94a3b8);border:2px solid rgba(255,255,255,.25)}

/* ═════ Responsivo: celulares (paisagem baixa e retrato estreito) ═════ */
/* base: telas rolam por dentro sem cortar o topo; unidades dvh; áreas seguras */
.screen{justify-content:flex-start;touch-action:pan-y;overscroll-behavior:contain}
.screen>:first-child{margin-top:auto}.screen>:last-child{margin-bottom:auto}
.panel{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);touch-action:pan-y;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;flex:none}
.panel>*{flex:none}
.screen{overflow-x:hidden}.screen>*{max-width:100%}
.title,.menu,.foot{flex:none}
#panel,#bigmap{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
.pbox{width:min(1180px,100%);max-height:94vh;max-height:calc(100dvh - 16px)}
#pbody{flex:1 1 auto;min-height:0;overscroll-behavior:contain}
#tstats{display:contents}
#cutSkip{right:max(16px,env(safe-area-inset-right))}
#bossbar span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.namerow .back{flex:0 0 auto}
.card{min-width:0;flex:1 1 200px}

/* botões de toque: um único fator de escala (--u = opção do jogador × ajuste da tela) */
body.touch #actions{--u:calc(var(--ui)*var(--us,1));width:calc(276px*var(--u));height:calc(240px*var(--u))}
body.touch .ab{--s:calc(58px*var(--u))}
body.touch .ab.big{--s:calc(88px*var(--u))}
body.touch .ab.k1{right:calc(102px*var(--u));bottom:calc(2px*var(--u))}
body.touch .ab.k2{right:calc(84px*var(--u));bottom:calc(76px*var(--u))}
body.touch .ab.k3{right:calc(8px*var(--u));bottom:calc(104px*var(--u))}
body.touch .ab.k4{right:calc(4px*var(--u));bottom:calc(176px*var(--u))}
body.touch .ab.k5{right:calc(80px*var(--u));bottom:calc(150px*var(--u))}
body.touch .ab.util{--s:calc(46px*var(--u))}
body.touch .ab.u-int{--s:calc(50px*var(--u));right:calc(176px*var(--u));bottom:calc(30px*var(--u))}
body.touch .ab.u-hp{right:calc(196px*var(--u));bottom:calc(92px*var(--u))}
body.touch .ab.u-mp{right:calc(150px*var(--u));bottom:calc(134px*var(--u))}
body.touch .ab.u-swap{right:calc(176px*var(--u));bottom:calc(182px*var(--u))}
body.touch .ab.u-stay{right:calc(226px*var(--u));bottom:calc(136px*var(--u))}
@media (max-height:430px){body.touch .ab{--s:calc(52px*var(--u))}body.touch .ab.big{--s:calc(80px*var(--u))}body.touch .ab.util{--s:calc(48px*var(--u))}body.touch .ab.u-int{--s:calc(50px*var(--u))}}
@media (max-height:359px){:root{--us:.86}}
@media (max-height:329px){:root{--us:.78}}
/* desempenho no toque: sem sombras/filtros nos elementos sempre visíveis do HUD */
body.touch .ab{box-shadow:none}
body.touch .ab.lock{filter:none;opacity:.38;border-color:#44506e;color:#6d7896}
body.touch .pc{transition:none}
body.touch .pc.me,body.touch #btnMic.on{box-shadow:none}
body.touch .pc.down{filter:none;opacity:.5}
body.touch #hurt{box-shadow:none;background:radial-gradient(ellipse at center,rgba(255,40,60,0) 55%,rgba(255,40,60,.5))}
body.touch .hint{display:none}

/* qualquer celular: alvos de toque ≥ 40px e fontes ≥ 11px */
@media (max-height:500px),(max-width:640px){
.btn,.tab,.pbtn,.ftab,#cutSkip{min-height:40px}
.btn.sm{padding:6px 12px}
.opt{min-height:40px;font-size:14px}
.opt select{max-width:58%;min-height:36px}
.foot,.sub,.or{font-size:12px}
.cell small,.cell i,.ihd p,.bh,.pot small,.pot kbd,.sbar>div,.irar small,.qbar span,.ftab,.hint{font-size:11px}
.cell i{line-height:12px}
.qbar{height:14px}.qbar span{line-height:14px}
#btnBag,#btnMap,#btnPause,#btnMic{width:42px;height:42px}
#topright{gap:6px}
.card:hover{transform:none}
.card ul{display:none}
.panel>.back,.panel>.namerow{position:sticky;bottom:0;z-index:2;background:#120c28}
.panel>.namerow{padding-top:6px;margin-top:0}
#bmHint{display:none}
}

/* paisagem baixa (celular deitado: 300–500px de altura) */
@media (max-height:500px) and (orientation:landscape){
.screen{gap:8px;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
.title h1{font-size:clamp(38px,15vh,54px)}.title p{font-size:12px;letter-spacing:.3em}
.menu{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:min(580px,92vw)}
#mContinue{grid-column:1/-1}
.panel{padding:10px 14px;gap:8px;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
.panel h2{font-size:18px}
/* criação de personagem: 4 cartões compactos lado a lado */
#charSub{display:none}
#charCards{flex-direction:row;flex-wrap:nowrap;gap:8px}
.card{flex:1 1 0;flex-direction:column;align-items:center;text-align:center;padding:8px 6px;gap:4px}
.card canvas{width:clamp(44px,16vh,72px);height:clamp(44px,16vh,72px)}
.card em{display:block;font-size:11px;letter-spacing:.02em;line-height:1.25}
.card h3{font-size:16px}
.card p{font-size:12px;line-height:1.3;margin-top:2px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
/* opções e pausa em duas colunas */
#scrOpts .panel{width:min(780px,96vw);display:grid;grid-template-columns:1fr 1fr;gap:4px 22px;align-items:center}
#scrOpts .panel h2,#scrOpts .panel>.back{grid-column:1/-1}
#scrPause .panel{width:min(580px,94vw);display:grid;grid-template-columns:1fr 1fr;gap:8px}
#scrPause .panel h2,#scrPause .panel .sub{grid-column:1/-1}
#coopChoose,#coopHost,#coopGuest,#choiceList{gap:6px}
.code{font-size:30px}
#lobbyList{display:grid;grid-template-columns:1fr 1fr;gap:4px}.lrow{margin:0}
.help{gap:6px 14px;font-size:12.5px;line-height:1.4}
.end h1{font-size:34px}
#cutbox{min-height:76px;padding:8px 14px;gap:10px;bottom:calc(9vh + 6px)}
#cutPortrait{width:60px;height:60px}
#cutText{font-size:14px;line-height:1.4;min-height:2.8em}
#signBox{bottom:6%;padding:10px 14px}
#pauseOther{font-size:18px}
/* painel ocupa a tela; abas numa linha só */
#panel .pbox{height:100%;max-height:none}
.phead{padding:4px 8px}
#ptabs{flex-wrap:nowrap;overflow-x:auto;touch-action:pan-x;min-width:0;scrollbar-width:none}
.tab{flex:none;padding:4px 10px;white-space:nowrap}
#pbody{padding:8px;display:flex;flex-direction:column}
#pbody>*{flex:none}
.srow{padding:5px 8px;margin-bottom:4px}
/* HUD */
#tstats{display:flex;flex-direction:column;align-items:flex-end;gap:1px}
#frags,#gold,#lvl{font-size:11px;line-height:1.2}
#lvl{display:flex;align-items:center;gap:4px}.bar.xp{width:44px;margin-top:0}
#bossbar{left:calc(max(10px,env(safe-area-inset-left)) + 126px);right:calc(max(10px,env(safe-area-inset-right)) + 236px);width:auto;transform:none}
#hud:has(#btnMic:not(.hidden)) #bossbar,#hud:has(#room:not(.hidden)) #bossbar{right:calc(max(10px,env(safe-area-inset-right)) + 348px)}
#mini{width:88px;height:55px;top:calc(max(8px,env(safe-area-inset-top)) + 50px)}
body.touch.lefty #party{display:grid;grid-template-columns:auto auto;gap:2px 0}
body.touch.lefty #bossbar{left:calc(max(10px,env(safe-area-inset-left)) + 240px)}
#toast{top:20%}
}
@media (max-height:329px){#mini{width:72px;height:45px}}

/* mochila: 3 colunas compactas, cada uma rola por dentro */
@media (max-height:500px) and (min-width:560px) and (orientation:landscape){
#pbody>.inv{flex:1 1 0;min-height:0}
.inv{grid-template-columns:minmax(0,3.3fr) minmax(0,5fr) minmax(0,3.2fr);grid-template-rows:minmax(0,1fr);gap:8px;align-items:stretch}
.icol{overflow-x:hidden;overflow-y:auto;min-height:0;gap:6px;touch-action:pan-y;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scrollbar-width:thin}
.icol>*{flex:none}
.ibox{padding:6px}.ibox.row{padding:5px 8px}.ibox.center{min-height:80px}
.ihd{padding-bottom:5px;margin-bottom:5px}.ihd h3{font-size:13px}
.pdoll{flex-direction:column;justify-content:center;min-height:0;padding:6px;margin:6px 0;gap:6px}
.pcol{flex-direction:row;gap:6px}.sil{display:none}
.cell.pd{width:46px;height:46px}
.cell.pd.empty span{font:800 10px Nunito,sans-serif;text-transform:none;letter-spacing:-.03em}
.belt{padding-top:6px}.bg2{grid-template-columns:1fr;gap:4px}.pot{padding:4px;min-height:40px}.pot svg{width:26px;height:26px;padding:3px}.pot kbd{display:none}
.sgrid{grid-template-columns:1fr}
.inv .grid{gap:4px}.cell{min-width:0}
.irar{padding:6px;margin-bottom:6px;gap:8px}.sbox{padding:6px;margin-bottom:6px}
.pbtn{padding:4px 6px}
}
@media (max-height:500px) and (max-width:680px) and (orientation:landscape){.cell.pd{width:40px;height:40px}.cell.pd.empty span{font-size:9px}.bg2{grid-template-columns:1fr}}

/* retrato estreito (web no celular em pé / janelas estreitas) */
@media (max-width:640px) and (orientation:portrait){
.panel{padding:14px 12px}
#charCards{flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:8px}
.card{flex:none;padding:8px 10px}.card canvas{width:64px;height:64px}
.card em{font-size:11px;letter-spacing:.04em}.card h3{font-size:17px}
.namerow{flex-wrap:wrap}.namerow .field{flex:1 1 100%;order:-1}
.cell.pd{width:48px;height:48px}.cell.pd.empty span{font-size:9px}
.pdoll{min-height:170px}
#ptabs{flex-wrap:nowrap;overflow-x:auto;touch-action:pan-x;min-width:0;scrollbar-width:none}.tab{flex:none;padding:6px 10px}
.srow{flex-wrap:wrap}.srow .btn{margin-left:auto}
#topright{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 150px)}
#bossbar{top:calc(max(8px,env(safe-area-inset-top)) + 150px);width:72vw}
#cutbox{padding:10px 12px;gap:10px}#cutPortrait{width:60px;height:60px}
.lb{height:6vh}
}

/* mundos salvos */
#svList{display:flex;flex-direction:column;gap:6px;margin:8px 0;max-height:52vh;overflow:auto}
.svrow{display:flex;align-items:center;gap:6px;padding:8px 10px;border:2px solid var(--pl2,#162550);background:rgba(0,0,0,.25)}
.svrow .svi{flex:1;min-width:0;text-align:left}.svrow .svi b{display:block}.svrow .svi small{opacity:.8;font-size:12px}
.svrow.dis{opacity:.55}.card.dis{opacity:.35;filter:grayscale(1);pointer-events:auto}

/* posição ajustável do grupo de botões e destaque do analógico de habilidade */
body.touch #actions{margin-right:var(--ax,0px);margin-bottom:var(--ay,0px)}
body.touch.lefty #actions{margin-right:0;margin-left:var(--ax,0px)}
.ab.aiming{outline:3px solid #fff;box-shadow:0 0 0 6px rgba(255,255,255,.18)}

/* ═════ Tema rústico (madeira, ferro, latão e pergaminho; cores sólidas, sem brilhos) ═════ */
:root{--gold:#f2c96b;--violet:#9b6a2f;--cyan:#e0b25a;--ink:#070d1e;--panel:#0f1b3c;--line:#8a6a3a;--text:#f1e4c3;--mute:#a9b6d8;
  --pb:#0c1735;--pb2:#101c3e;--pb3:#091024;--pl:#1d3064;--pl2:#1d3578;--amb:#c8963e;--amb2:#f2c96b;
  --wood:#142450;--wood2:#1c316a;--woodd:#0b142d;--iron:#3d3833;--brass:#b9862f;--parch:#16244a;--parchd:#2c3f75;--inkd:#0e1b3d}
html,body{font-family:"Alegreya Sans",Nunito,system-ui,sans-serif}
h1,h2,h3,.btn,.tab{font-family:Cinzel,Georgia,serif}
h1,h2{color:var(--gold);text-shadow:0 3px 0 #0b142d,0 0 0 #000}
.title h1{color:#f2c96b;text-shadow:0 4px 0 #1d3578,0 7px 0 #0b142d}
.title p{color:#16244a;text-shadow:0 2px 0 #0b142d}
/* painéis: tábuas de madeira com moldura de ferro e cravos */
.panel,.pbox,#cutbox,.choice,.endbox{background:var(--wood) repeating-linear-gradient(0deg,#142450 0 38px,#101e45 38px 40px);border:4px solid var(--woodd);border-radius:4px;
  box-shadow:inset 0 0 0 2px #203879,inset 0 0 0 5px #0e1a3c,0 8px 0 rgba(0,0,0,.45);backdrop-filter:none;-webkit-backdrop-filter:none}
.pbox::before,.pbox::after{border-color:var(--brass)}
.panel{position:relative}
.panel::before,.panel::after{content:"";position:absolute;width:10px;height:10px;border-radius:50%;background:#c8963e;box-shadow:inset -2px -2px 0 #1d367c;top:8px;left:8px}
.panel::after{left:auto;right:8px}
.sub,.mut,.hint{color:var(--mute)}
/* botões: madeira entalhada com borda escura e chanfro */
.btn{background:#1d3578;color:#f1e4c3;border:2px solid #0b142d;border-radius:3px;box-shadow:inset 0 2px 0 #8a6038,inset 0 -3px 0 #0e1b3d,0 2px 0 #070d1e;text-shadow:0 1px 0 #0b142d;letter-spacing:.04em}
.btn:hover:not(:disabled){background:#1d367c}
.btn:active:not(:disabled){box-shadow:inset 0 3px 0 #0e1b3d;transform:translateY(1px)}
.btn.gold{background:#b9862f;color:#0c1735;text-shadow:0 1px 0 #f2c96b;box-shadow:inset 0 2px 0 #f2c96b,inset 0 -3px 0 #1d367c,0 2px 0 #070d1e}
.btn.gold:hover:not(:disabled){background:#cf9a3a}
.btn.danger{background:#8e2b20;box-shadow:inset 0 2px 0 #c0503f,inset 0 -3px 0 #4a120c,0 2px 0 #070d1e}
.btn.ghost{background:#101c3e;box-shadow:inset 0 0 0 1px #203879}
.field,input.field,#coCode,select{background:var(--parch);color:var(--inkd);border:2px solid #0b142d;border-radius:2px;box-shadow:inset 0 2px 0 #2c3f75}
.code{color:var(--gold);text-shadow:0 3px 0 #0b142d}
/* abas */
.tab{background:#101c3e;color:#a9b6d8;border:2px solid #0b142d;box-shadow:inset 0 2px 0 #1c316a}
.tab.on{background:#b9862f;color:#0c1735;border-color:#0b142d;box-shadow:inset 0 2px 0 #f2c96b}
#panel .pbox>div:first-child,.phead{background:#0e1a3c;border-bottom:4px solid #0b142d}
#pbody{background:#0c1735}
/* caixas internas: couro escuro */
.ibox,.sbox,.srow,.svrow{background:#101c3e;border:2px solid #0b142d;box-shadow:inset 0 0 0 1px #1d3578}
.sbox.cmp{background:#0f1b3c;box-shadow:inset 0 0 0 1px #8e2b20}
.pdoll{background:#0a1228;border-color:#0b142d}
.cell{background:#0a1228}
.cell.void{background:#0c152f;border-color:#142450}
.ftab{background:#0a1228;border-color:#142450;color:#a9b6d8}.ftab.on{background:#b9862f;color:#0c1735;border-color:#0b142d}
.pbtn{background:#1d3578;border-color:#0b142d;color:#f1e4c3;box-shadow:inset 0 2px 0 #8a6038}
.pbtn.gold{background:#b9862f;color:#0c1735;border-color:#0b142d}
.lvb,.cnt{background:#0b142d;border-color:#8a6a3a;color:#f2c96b}
.ihd h3,.bh,.col h3{color:#f2c96b}
/* cartas de classe: pergaminho */
.card{background:var(--parch);color:var(--inkd);border:3px solid #1d3578;border-radius:3px;box-shadow:inset 0 0 0 2px #2c3f75,0 3px 0 #0b142d}
.card h3{color:#1d367b}.card em,.card p,.card li{color:#182752}
.card.sel{border-color:#b9862f;box-shadow:inset 0 0 0 2px #b9862f,0 0 0 3px #0b142d,0 3px 0 #0b142d;transform:none}
.card canvas{background:#2c3f75;border:2px solid #1d3578}
/* HUD */
.pc{background:#101c3e!important;border:2px solid #0b142d!important;box-shadow:inset 0 0 0 1px #203879!important;border-radius:3px!important}
.pc.me{box-shadow:inset 0 0 0 2px #c8963e!important}
#topright>button,#btnMic{background:#142450;border:2px solid #0b142d;box-shadow:inset 0 0 0 2px #203879;color:#f2c96b;border-radius:4px}
.ab{background:#101c3e;border:3px solid #8a6a3a;box-shadow:inset 0 0 0 2px #0b142d,0 3px 0 rgba(0,0,0,.5);color:#f2c96b}
.ab.big{border-color:#c8963e}
.ab kbd{background:#0b142d;color:#f2c96b;border:1px solid #8a6a3a}
#toast,#banner{text-shadow:0 2px 0 #0b142d}
#toast{background:#101c3e;border:2px solid #0b142d;box-shadow:inset 0 0 0 1px #8a6a3a;color:#f1e4c3}
#bossbar span{color:#f2c96b;text-shadow:0 2px 0 #0b142d}
#mini{border:3px solid #0b142d;box-shadow:inset 0 0 0 1px #8a6a3a,0 0 0 2px #1d3578;border-radius:3px}
.svrow .svi b{color:#f2c96b}

/* sem seleção (grifo) de texto em lugar nenhum, só nos campos de digitação */
*{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea{-webkit-user-select:text;user-select:text}
::selection{background:transparent}
#room{pointer-events:auto;cursor:pointer}
.copycode{margin:2px auto 8px;display:block}

/* ── Forja, encaixes, materiais e loja em duas colunas (Passo 1+2) */
.mchip{border-color:var(--t,var(--c,#334155))}
.mchip b{margin-left:2px}.mchip em{font-style:normal;color:#a9b6d8;font-weight:600;margin-left:4px}
.mchip.lack{border-color:#e11d48;color:#fda4af}.mchip.lack b{color:#fb7185}
.mchip.gold::before{display:none}.mchip.gold{color:#fcd34d}
button.mchip{cursor:pointer;min-height:28px}button.mchip:hover:not(:disabled){filter:brightness(1.25)}button.mchip:disabled{opacity:.4;cursor:not-allowed}
.mchip.pick.on{box-shadow:0 0 0 2px var(--c) inset;background:#13234f}
.mgrp{margin-bottom:6px}.mgrp>small{display:block;font:800 10px "Courier New",monospace;letter-spacing:.06em;text-transform:uppercase;color:#a9b6d8;margin-bottom:3px}
.fxl{display:flex;gap:6px;align-items:flex-start;font-size:12px;line-height:1.3;padding:2px 0}
.fxl i{width:9px;height:9px;flex:none;margin-top:3px;background:var(--c);box-shadow:0 0 0 1px var(--t,#000)}
.fxl b{color:var(--c)}.fxl span{color:#e7d9b8}
.fxs{font-size:11px;color:#a9b6d8;padding:0 0 3px}
.sbox.fx{border-color:#1d3578}.sbox.asc{box-shadow:inset 0 0 0 1px var(--c)}
.mut.sm{font-size:11px;margin:4px 0;line-height:1.35}
.bh2{display:block;font:800 10px "Courier New",monospace;color:#a9b6d8;margin:6px 0 3px;text-transform:uppercase}
.pbtn.wide{width:100%;margin-top:6px}
.upbar{display:grid;grid-template-columns:repeat(10,1fr);gap:3px;margin:-4px 0 10px}
.upbar i{height:6px;background:#091024;border:1px solid #1d3064}.upbar i.on{background:#f2c96b}.upbar i.on.risk{background:#ff8a3c}
.sks{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.sk{border:1px solid #1d3064;background:#091024;padding:4px 6px;min-width:0}
.sk span{display:block;font:800 9px "Courier New",monospace;color:#a9b6d8;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sk b{display:block;font-size:11.5px;color:#f1e4c3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sk b em{color:#7d8bb0;font-style:normal;font-weight:600}
.sk.on{border-color:var(--c);box-shadow:inset 3px 0 0 var(--c)}
.inv.fg{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
.inv.fg h3{color:#f2c96b;font-size:14px;letter-spacing:.06em;text-transform:uppercase;margin-bottom:6px}.inv.fg h3 small{color:#a9b6d8;font:600 12px Nunito;letter-spacing:0;margin-left:6px;text-transform:none}
.inv.fg h4{color:#e0b25a;font:800 13px Nunito;margin:10px 0 4px}.inv.fg h4 small{color:#a9b6d8;font-weight:600;font-size:11px}
.flist{display:flex;flex-direction:column;gap:4px}
.frow{display:flex;align-items:center;gap:8px;text-align:left;padding:4px 6px;background:#091024;border:2px solid #0b142d;box-shadow:inset 0 0 0 1px #1d3064;color:#f1e4c3;min-height:40px;cursor:pointer}
.frow:hover{background:#111e42}.frow.sel{box-shadow:inset 0 0 0 2px var(--c);background:#13234f}
.frow>img.ic,.frow>svg{width:30px;height:30px;flex:none}
.frow span{min-width:0;flex:1}.frow b{display:block;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.frow small{display:block;font-size:10.5px;color:#a9b6d8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmpl{margin-top:2px}.cmpl .up,.cmpl .dn{white-space:nowrap;font-weight:700}.cmpl .up{color:#7dff9d}.cmpl .dn{color:#ff8a8a}
@media (max-width:860px){.inv.fg{grid-template-columns:1fr}}
@media (max-height:500px) and (min-width:560px) and (orientation:landscape){
.inv.fg{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
.frow{min-height:34px;padding:3px 5px}.frow>img.ic,.frow>svg{width:24px;height:24px}
.sks{grid-template-columns:1fr}.fxl{font-size:11px}.upbar{margin:-2px 0 6px}
}
/* ── Pets de combate (Passo 3): cartão no HUD e aba Pets */
.pc.pet{min-width:128px;transform:scale(.9);transform-origin:left top;margin-top:-2px;opacity:1;box-shadow:inset 0 0 0 1px var(--rc,#e0a43c)!important}
.pc.pet canvas.av{width:30px;height:30px;border-radius:3px;border:2px solid var(--rc,#e0a43c);background:#0c0818;flex:none}
.pc.pet .bar.hp i{background:linear-gradient(90deg,#3fbf6a,#7dff9d)}
.pc.pet .bar.rs{height:4px}.pc.pet .bar.rs i{background:var(--rc,#e0a43c)}
.pc.pet.down{filter:grayscale(.8);opacity:.75}
.pc.pet b{gap:6px}.pc.pet b em{white-space:nowrap}.pc.pet b span{white-space:nowrap;font-size:10px}
.inv.pets .icol{gap:8px}
.petc{box-shadow:inset 3px 0 0 #1d3064}.petc.on{box-shadow:inset 3px 0 0 var(--c),inset 0 0 0 1px var(--c)}
.petc .phd{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.pspr{width:48px;height:48px;flex:none;background-size:400% 400%;background-position:0 0;background-repeat:no-repeat;image-rendering:pixelated;image-rendering:crisp-edges;background-color:#091024;border:2px solid var(--c);filter:drop-shadow(0 0 3px var(--c))}
.pspr.st1{border-color:#9dffb8}.pspr.st2{border-color:#7cc8ff}.pspr.st3{border-color:#ffd24a;box-shadow:0 0 8px #ffd24a}
.petc .pin{flex:1;min-width:0}.petc .pin b{display:block;color:#f1e4c3;font-size:13.5px}.petc .pin b em{color:var(--c);font-style:normal;font-size:12px;margin-left:4px}
.petc .pin small{display:block;color:#a9b6d8;font-size:11px;line-height:1.3}
.evo.s1{color:#9dffb8}.evo.s2{color:#7cc8ff}.evo.s3{color:#ffd24a}
.pbar{position:relative;height:14px;background:#091024;border:1px solid #1d3064;margin:3px 0;overflow:hidden}
.pbar i{position:absolute;left:0;top:0;bottom:0;background:#8a6038}
.pbar span{position:relative;display:block;font:800 10px/12px "Courier New",monospace;color:#f1e4c3;padding-left:5px;text-shadow:0 1px 0 #000;white-space:nowrap;overflow:hidden}
.pbar.xp i{background:#b9862f}.pbar.sy i{background:#5aa0d8}.pbar.hp i{background:#3fa060}.pbar.rs i{background:var(--c)}
.psk{border-top:1px dashed #1d3064;margin-top:4px;padding-top:4px}.psk b{color:var(--c)!important}.psk.lk b{color:#7d8bb0!important}
.pren{display:flex;gap:6px;margin-top:6px}.pren input{flex:1;min-width:0;background:#091024;border:2px solid #1d3064;color:#f1e4c3;padding:4px 6px;font:700 12px Nunito}
.sbox.egg{box-shadow:inset 3px 0 0 var(--c)}
@media (max-height:500px) and (min-width:560px) and (orientation:landscape){.pspr{width:36px;height:36px}.pbar{height:12px}.pbar span{font-size:9px;line-height:10px}.pc.pet{transform:scale(.8)}}
/* 1.13: Grande Especial (7º botão), escolha do ajudante e seis classes na criação */
body:not(.touch) #actions{grid-template-columns:repeat(9,auto)}
body:not(.touch) .ab.k6{order:3}
.ab.ult{box-shadow:0 0 0 2px var(--c),0 0 14px var(--c)}.ab.ult.lock{box-shadow:none;filter:grayscale(1)}
body.touch .ab.k6{right:calc(150px*var(--u));bottom:calc(232px*var(--u))}
.srow.ult{box-shadow:inset 3px 0 0 #ffd24a}.srow.ult.lk b{color:#7d8bb0}
.comprow{justify-content:center;align-items:center;gap:10px;margin-top:8px}.comprow label{font-weight:700;color:var(--mute)}.comprow select{max-width:260px}
.compsel{margin-bottom:8px}.cpick{display:flex;flex-wrap:wrap;gap:6px}.cpick .btn{display:flex;align-items:center;gap:6px;flex-direction:row}.cpick img{width:22px;height:22px;image-rendering:pixelated}.cpick small{opacity:.75;font-size:10px}
#charCards .card{flex:1 1 300px;max-width:420px}
#charCards .card ul{columns:2;column-gap:10px}
/* ═════ Tema azul real (azul bem escuro + dourado) — v1.14 ═════ */
:root{--inkd:#f1e4c3;--line:#b8913f;--iron:#2a3352;--violet:#5b7cff;--cyan:#f2c96b}
.field,input.field,#coCode,select{box-shadow:inset 0 2px 0 rgba(242,201,107,.18)}
.card{box-shadow:inset 0 0 0 2px rgba(242,201,107,.25),0 3px 0 #070c1c}
.btn.hold{overflow:hidden;isolation:isolate}
.btn.hold::before{content:"";position:absolute;inset:0;z-index:-1;background:rgba(255,255,255,.35);transform:scaleX(0);transform-origin:left}
.btn.hold.holding::before{transform:scaleX(1);transition:transform 1.2s linear}
.srow .btn+.btn{margin-left:4px}
#dlg{z-index:60}
.dlgbox{max-width:420px}
.dlgbox .row{flex-wrap:wrap}
/* avisos sem sobreposição: itens coletados à esquerda; aviso desce enquanto o nome da região aparece */
#loot{left:max(14px,env(safe-area-inset-left));top:34%;transform:none;text-align:left}
#hud.bnr #toast{top:calc(24% + clamp(70px,13vh,120px))}
#toast{transition:opacity .4s,top .3s}
body.touch .kbonly,body.pad .kbonly{display:none}
#prompt{pointer-events:auto;cursor:pointer}
#prompt:hover{border-color:var(--gold)}
/* ═════ Etapa 2: status, mochila dupla, companheiro ═════ */
.inv.stat{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1.1fr)}
.cinfo{display:flex;gap:14px;align-items:flex-start}
.cinfo .cport{flex:none;width:clamp(96px,22vw,168px);aspect-ratio:1;border:3px solid var(--c,#b8913f);background:#0a1228;display:grid;place-items:center;box-shadow:0 4px 0 #070c1c}
.cinfo .cport img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.cinfo .ctext{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;text-align:left}
.cinfo .ctext h3 small{display:block;font-size:13px;color:var(--mute);letter-spacing:.04em}
.cinfo .crole{color:var(--c,#f2c96b);font-weight:700}
.cinfo .cact{color:#9dffb8;font-weight:700}
.cinfo.mini{margin:8px 0}.cinfo.mini .cport{width:72px}
.csk{padding:4px 0;border-bottom:1px solid rgba(184,145,63,.25)}.csk b{display:block;color:#f2c96b}.csk small{color:var(--mute)}
.clist .cpi{display:flex;align-items:center;gap:8px;width:100%;margin-bottom:6px;padding:6px 8px;background:#101c3e;border:2px solid #2c3f75;color:var(--text);text-align:left;cursor:pointer}
.clist .cpi img{width:36px;height:36px;image-rendering:pixelated;border:2px solid var(--c)}
.clist .cpi span{flex:1;display:flex;flex-direction:column}.clist .cpi small{color:var(--mute);font-size:12px}
.clist .cpi em{font-style:normal;font-size:11px;color:#0b142d;background:#f2c96b;padding:1px 6px}
.clist .cpi.on,.clist .cpi:hover{border-color:#f2c96b;background:#1c316a}
.cbag{margin-top:8px}.cbag .bagh{display:flex;justify-content:space-between;margin-bottom:6px}
[data-drop].dropOn{outline:3px dashed #f2c96b;outline-offset:2px}
.cell.dragSrc{opacity:.35}
.dragGhost{position:fixed!important;z-index:200;pointer-events:none;opacity:.9;transform:scale(1.1);box-shadow:0 8px 18px rgba(0,0,0,.6)}
@media (max-width:760px){.inv.stat{grid-template-columns:1fr}.cinfo{flex-direction:column;align-items:center}.cinfo .ctext{width:100%}}
.optpanel{width:min(560px,96vw)}
.otabs{display:flex;gap:4px;flex-wrap:wrap;justify-content:center}
.otabs .tab{flex:1;min-width:90px;padding:8px 6px;background:#101c3e;border:2px solid #2c3f75;color:var(--text);font:700 14px Cinzel,Georgia,serif;cursor:pointer}
.otabs .tab.on{background:#f2c96b;border-color:#f2c96b;color:#0b142d}
.osec{display:flex;flex-direction:column;gap:10px;text-align:left}
.osub{color:var(--gold);font-size:15px;margin-top:6px;border-bottom:1px solid rgba(184,145,63,.35);padding-bottom:3px}
.opt.col{flex-direction:column;align-items:stretch;gap:6px}
.segHidden{display:none!important}
.seg{display:flex;flex-wrap:wrap;gap:4px}
.seg .btn{flex:1 1 auto;min-width:0}
.keylist{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:4px 12px}
.krow{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px}
.krow .btn{min-width:86px}
body.touch #scrOpts [data-os="ctrl"] .keylist,body.touch #scrOpts [data-os="ctrl"] #keyReset{display:none}
.comprow{flex-wrap:wrap}.comprow .seg{flex:1 1 100%}
/* ═════ Etapa 3: mapa grande com zoom ═════ */
.bmwrap{position:relative;line-height:0}
#bigcv{touch-action:none;cursor:grab;max-width:none!important}
#bigcv:active{cursor:grabbing}
.bmzoom{position:absolute;right:8px;top:8px;display:flex;flex-direction:column;gap:6px;line-height:1}
.bmzoom .btn{width:44px;height:44px;padding:0;font-size:22px;display:grid;place-items:center;background:#101c3e;border:2px solid #b8913f;color:#f2c96b}
#bigmap .pbox{max-width:100%}
@media (max-height:480px){ #bmHint{display:none} .bmzoom .btn{width:40px;height:40px} }
/* ═════ Etapa 5: cavernas sem fim ═════ */
#caveInfo{position:absolute;left:50%;top:calc(max(8px,env(safe-area-inset-top)) + 4px);transform:translateX(-50%);padding:4px 12px;background:#101c3e;border:2px solid #0b142d;box-shadow:inset 0 0 0 1px #b8913f;color:#f2c96b;font:700 13px "Alegreya Sans",sans-serif;white-space:nowrap;pointer-events:none}
/* ═════ 1.23: nada em cima do herói. Nome da região no alto, aviso de interação embaixo no centro, mensagens no meio do caminho ═════ */
#banner{top:calc(max(8px,env(safe-area-inset-top)) + 2%)}
#banner h2{font-size:clamp(20px,6vh,52px)}
#banner small{font-size:clamp(10px,1.7vh,14px)}
#toast{top:22%}
#hud.bnr #toast{top:calc(4% + clamp(48px,11vh,100px))}
#prompt{top:auto;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 14%);max-width:min(560px,60vw);white-space:normal;text-align:center}
body.touch #prompt{top:auto;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 6%)}
/* ═════ 1.24: textos legíveis (dourado/claro sobre azul), painéis lisos, enciclopédia e etiquetas ═════ */
.title p{color:#e8d6a6;text-shadow:0 2px 0 #070c1c}
.card h3{color:#f2c96b}
.card em,.card p,.card li{color:#e8d6a6}
.card ul{color:#c8d0e8}
.panel,.pbox,#cutbox,.choice,.endbox{background-image:none!important}
#wikiOv .wkNav .tab{white-space:normal;overflow-wrap:anywhere;line-height:1.15;height:auto}
.wkSplit{flex-direction:row!important}
.wkSplit .wkGrid{flex:1 1 55%}
.wkD{position:sticky!important;top:0;width:min(320px,45%)!important;flex:none}
@media (max-width:640px),(max-height:430px){ .wkGrid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))} .wkD{font-size:13px;padding:6px 8px} }
body.touch .kbh{display:none!important}
/* ═════ 1.24: Opções com abas na vertical (conteúdo ao lado); edição de teclas em janela própria; margem da tela ═════ */
:root{--edge:0px;--edgeY:0px}
#hud{inset:var(--edgeY) var(--edge)}
.screen{padding-left:calc(max(16px,env(safe-area-inset-left)) + var(--edge));padding-right:calc(max(16px,env(safe-area-inset-right)) + var(--edge))}
#panel{padding-left:var(--edge);padding-right:var(--edge)}
.optpanel{width:min(760px,96vw);display:grid;grid-template-columns:minmax(120px,170px) 1fr;grid-template-rows:auto 1fr auto;gap:10px 14px;max-height:94vh;overflow:hidden}
.optpanel>h2{grid-column:1/-1}
.optpanel .otabs{grid-column:1;grid-row:2;flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;align-self:start}
.optpanel .otabs .tab{flex:none;width:100%;min-width:0;text-align:left;padding:10px 12px}
.optpanel .osec{grid-column:2;grid-row:2;overflow-y:auto;max-height:calc(94vh - 150px);padding-right:4px}
.optpanel>.back{grid-column:1/-1}
.opt{border:0!important;background:none!important}
.keyedbox{width:min(640px,96vw);max-height:94vh;display:flex;flex-direction:column}
.keyedlist{overflow-y:auto;max-height:calc(94vh - 190px);text-align:left}
#keyEd{z-index:55}
@media (max-width:520px){ .optpanel{grid-template-columns:1fr} .optpanel .otabs{grid-column:1;grid-row:2;flex-direction:row;flex-wrap:wrap} .optpanel .osec{grid-column:1;grid-row:3} }
/* 1.24: caixa de texto das tabuletas acima da barra de habilidades (não cobre os botões) */
#signBox{bottom:calc(max(10px,env(safe-area-inset-bottom)) + clamp(86px,19%,170px))!important;max-width:min(560px,calc(100vw - 2 * (var(--edge) + 150px)))}
body.touch #signBox{bottom:calc(max(10px,env(safe-area-inset-bottom)) + 22%)!important;max-width:min(520px,60vw)}
/* ═════ 1.24: janelas com tamanho fixo (as abas não mudam o tamanho) e mapa sem corte ═════ */
#panel .pbox{width:min(1180px,calc(100vw - 16px - 2 * var(--edge)))!important;height:min(820px,calc(100dvh - 16px))!important;max-height:none!important}
.optpanel{width:min(760px,96vw)!important;height:min(560px,calc(100dvh - 24px))!important;max-height:none!important;grid-template-rows:auto 1fr auto}
.optpanel .osec{max-height:none!important;min-height:0;align-self:stretch}
#bigmap .pbox{width:auto!important;max-width:100%;overflow:visible}
#bigcv{box-sizing:border-box!important;max-width:100%!important}
/* ═════ 1.24: estilo cinematográfico (camada por cima do jogo, composta pela placa de vídeo) ═════ */
#cinefx{position:fixed;inset:0;pointer-events:none}
#cinefx i{position:absolute;inset:0}
#cinefx .gd{background:linear-gradient(180deg,rgba(30,60,110,.6),rgba(60,60,70,.25) 55%,rgba(140,80,40,.5));mix-blend-mode:soft-light}
#cinefx .vg{background:radial-gradient(ellipse at center,rgba(0,0,0,0) 42%,rgba(4,4,12,.34) 68%,rgba(2,2,8,.8) 100%)}
#cinefx .gr{inset:-128px;opacity:.05;mix-blend-mode:overlay;animation:cineGr .5s steps(5) infinite}
@keyframes cineGr{0%{transform:translate(0,0)}20%{transform:translate(-37px,61px)}40%{transform:translate(83px,-22px)}60%{transform:translate(-91px,-77px)}80%{transform:translate(45px,99px)}100%{transform:translate(0,0)}}
@media (prefers-reduced-motion:reduce){#cinefx .gr{animation:none}}
/* 1.24: opções por aparelho (mob = celular/tablet, exe = app do PC) */
body:not(.mob) .mobonly{display:none!important}
body.mob .pconly{display:none!important}
body:not(.exe) .exeonly{display:none!important}
/* ═════ 1.24: tela inicial nova (título dourado em relevo, botões azul-marinho com borda dourada e pontas de losango) ═════ */
#scrMenu .title h1{font-family:Cinzel,Georgia,serif!important;font-weight:900;letter-spacing:.04em;padding-left:0;line-height:1;
  background:linear-gradient(180deg,#fff7c9 0%,#ffd46a 38%,#c98a22 52%,#ffe08a 70%,#b8741c 100%)!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important;
  -webkit-text-stroke:2px #4a2a06;text-shadow:none!important;filter:drop-shadow(0 4px 0 #2a1604) drop-shadow(0 0 22px rgba(255,190,80,.45))}
#scrMenu .title p{font-family:Cinzel,Georgia,serif!important;font-weight:800;letter-spacing:.06em!important;color:#f5c75a!important;text-transform:uppercase;
  text-shadow:0 2px 0 #3a2206,0 0 12px rgba(255,180,60,.35)!important;-webkit-text-stroke:.6px #3a2206}
#scrMenu .menu .btn{position:relative;font-family:Cinzel,Georgia,serif;font-weight:800;letter-spacing:.04em;color:#f6e7bd!important;
  background:linear-gradient(180deg,#24467e 0%,#16305f 55%,#0f2247 100%)!important;border:2px solid #c9a24a!important;border-radius:4px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 3px 0 #0a1530,0 0 0 1px #3b2a0c!important;text-shadow:0 2px 0 #0a1530;overflow:visible}
#scrMenu .menu .btn::before,#scrMenu .menu .btn::after{content:"";position:absolute;top:50%;width:12px;height:12px;background:linear-gradient(135deg,#ffe08a,#b8741c);border:2px solid #3b2a0c;transform:translateY(-50%) rotate(45deg);box-shadow:0 0 6px rgba(120,190,255,.5)}
#scrMenu .menu .btn::before{left:-9px}#scrMenu .menu .btn::after{right:-9px}
#scrMenu .menu .btn:hover{filter:brightness(1.15);border-color:#ffd877!important}
#scrMenu .menu .btn.gold{color:#2a1604!important;background:linear-gradient(180deg,#ffe9a0 0%,#f2bf4e 50%,#c98a22 100%)!important;border-color:#7a4d10!important;text-shadow:0 1px 0 rgba(255,240,190,.6);box-shadow:inset 0 1px 0 #fff4c8,0 3px 0 #5a3208,0 0 18px rgba(255,190,80,.4)!important}
#scrMenu .foot{color:#d8cdf2!important;text-shadow:0 2px 0 #000}
.optpanel .osec>*{flex-shrink:0}
/* ═════ 19/11: moldura de aço com gemas em todas as janelas (arte das Opções), placa do título, abas com ícones ═════ */
:root{--fr:30px;--navy:#182a58;--navy2:#13234a;--nline:#2b4580;--steel:#8e9bb8;--parch:#f1e4c3}
.panel,#panel .pbox,#bigmap .pbox{border:var(--fr) solid transparent!important;border-image:url(assets/ui/frame.png) 54 fill / var(--fr) stretch!important;border-radius:0!important;background:none!important;box-shadow:0 12px 34px rgba(0,0,0,.6)!important;image-rendering:pixelated;padding:4px 8px!important;outline:0!important}
.panel>*{image-rendering:auto}
.panel>h2,#scrSaves h2#svTitle{align-self:center;width:fit-content;max-width:92%;margin:0 auto 4px!important;padding:6px 18px!important;min-height:46px;display:flex;align-items:center;justify-content:center;text-align:center;
  border:solid transparent;border-width:0 34px;border-image:url(assets/ui/plaque.png) 0 48 fill / 0 34px stretch;image-rendering:pixelated;
  font:900 clamp(17px,3.4vh,26px) Cinzel,Georgia,serif!important;letter-spacing:.07em;text-transform:uppercase;color:#f5c75a!important;text-shadow:0 2px 0 #2a1604,0 0 10px rgba(255,190,80,.3)}
.panel .sub{color:#c9d3ee}
.panel .btn:not(.gold):not(.danger):not(.layb){background:linear-gradient(180deg,#24467e,#16305f 60%,#0f2247)!important;border:2px solid var(--steel)!important;border-radius:2px!important;color:var(--parch)!important;font-family:Cinzel,Georgia,serif;font-weight:700;letter-spacing:.03em;box-shadow:inset 0 0 0 1px #0b142d,0 2px 0 #070c1c!important}
.panel .btn.sel{border-color:#f2c96b!important;color:#f5c75a!important;box-shadow:inset 0 0 0 1px #0b142d,0 0 10px rgba(242,201,107,.45)!important}
.panel .btn.gold{font-family:Cinzel,Georgia,serif;font-weight:900;border:2px solid #7a4d10!important;border-radius:2px!important;color:#2a1604!important;background:linear-gradient(180deg,#ffe9a0,#f2bf4e 50%,#c98a22)!important;box-shadow:inset 0 1px 0 #fff4c8,0 3px 0 #5a3208!important}
.panel .btn.danger{background:linear-gradient(180deg,#b23a35,#8a1f22)!important;border:2px solid #e8a0a0!important;border-radius:2px!important;color:#fff1e6!important;font-family:Cinzel,Georgia,serif;font-weight:700}
.panel .field,.panel select.field{background:#0e1c40!important;border:2px solid var(--steel)!important;border-radius:2px!important;color:var(--parch)!important}
/* Opções: abas com ícone à esquerda, conteúdo em caixa mais escura, X vermelho no canto */
.optpanel{position:relative;grid-template-rows:auto 1fr!important}
.optpanel .otabs .tab{display:flex;align-items:center;gap:10px;background:linear-gradient(180deg,#1c3166,#142650)!important;border:2px solid #2e4a8a!important;border-radius:2px;box-shadow:inset 0 0 0 1px #0b142d;color:var(--parch)!important;font:700 15px Cinzel,Georgia,serif!important;text-transform:uppercase;letter-spacing:.04em;padding:10px 10px!important}
.optpanel .otabs .tab i{font-style:normal;font-size:1.35em;line-height:1;width:1.4em;text-align:center;filter:drop-shadow(0 2px 0 #0b142d)}
.optpanel .otabs .tab.on{background:linear-gradient(180deg,#fbe08c,#e9b443)!important;border-color:#fff1b8!important;color:#2a1604!important;box-shadow:inset 0 0 0 1px #8a5a12,0 0 10px rgba(242,201,107,.4)}
.optpanel .osec{background:var(--navy2);border:2px solid var(--nline);box-shadow:inset 0 0 0 1px #0b142d;padding:10px 12px!important;gap:8px!important}
.optpanel .opt{color:var(--parch);font:700 15px "Alegreya Sans",sans-serif}
.optpanel .opt small.sub{font-weight:500;font-size:13px;color:#9fb0d8}
.optpanel>.xclose{position:absolute;top:2px;right:2px;width:40px;height:40px;min-height:0!important;padding:0!important;font-size:0!important;z-index:3;
  background:linear-gradient(180deg,#e2463f,#a8221f)!important;border:3px solid #d9dde4!important;outline:2px solid #0b0f1c;border-radius:2px!important;box-shadow:0 2px 0 #070c1c!important}
.optpanel>.xclose::after{content:"✕";font:900 22px/1 sans-serif;color:#fff;text-shadow:0 2px 0 #5a0d0b}
.optpanel>h2{grid-column:1/-1}
.seg .btn{position:relative;font:700 13px Cinzel,Georgia,serif!important;text-transform:uppercase;padding:7px 18px!important;background:#142650!important}
.seg .btn.sel::before,.seg .btn.sel::after{position:absolute;top:50%;transform:translateY(-50%);color:#f5c75a;font:400 18px Georgia,serif}
.seg .btn.sel::before{content:"[";left:5px}.seg .btn.sel::after{content:"]";right:5px}
.tog{display:inline-flex;gap:6px;flex:none}
.tog b{width:30px;height:30px;display:grid;place-items:center;border:2px solid;font:900 18px/1 sans-serif;cursor:pointer;opacity:.35;transition:opacity .15s}
.tog .no{border-color:#3fbf5a;color:#5fe07a;background:#123a22}.tog .yes{border-color:#f2c96b;color:#f5c75a;background:#3a2c10}
.tog .on{opacity:1;box-shadow:0 0 8px currentColor,inset 0 0 0 1px #0b142d}
#scrOpts input[type=range],#scrSaves input[type=range]{-webkit-appearance:none;appearance:none;height:14px;background:linear-gradient(180deg,#2a1d12,#3d2a1a);border:2px solid var(--steel);border-radius:8px;outline:0}
#scrOpts input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:24px;height:24px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff3c4,#f2c96b 50%,#b8741c);border:2px solid #3b2a0c;cursor:pointer}
#scrOpts input[type=range]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff3c4,#f2c96b 50%,#b8741c);border:2px solid #3b2a0c}
/* Criação de personagem (arte enviada): prévia com pedestal, informações, doca de rostos */
.charpanel{width:min(920px,97vw)!important;position:relative}
.charpanel>.chback{position:absolute;left:2px;top:2px;width:auto!important;padding:6px 14px!important;z-index:3}
.charpanel>#charSub{margin-top:-2px}
.chmain{display:grid;grid-template-columns:minmax(210px,.85fr) 1.15fr;gap:12px;align-items:stretch}
.chleft{display:flex;flex-direction:column;gap:8px;min-width:0}
.chprev{position:relative;aspect-ratio:1.35;border:3px solid #c9a24a;outline:2px solid #0b142d;background:radial-gradient(ellipse at 50% 80%,rgba(80,220,255,.28),transparent 45%),linear-gradient(180deg,#14275a,#0b1734);display:grid;place-items:end center;overflow:hidden}
.chprev::before{content:"";position:absolute;inset:4px;border:2px solid rgba(201,162,74,.35);pointer-events:none}
.chprev::after{content:"";position:absolute;left:22%;right:22%;bottom:9%;height:16%;border-radius:50%;background:radial-gradient(ellipse at center,#bff6ff 0,#4fd6ff 30%,#2a6f9a 52%,#3a4660 62%,#1b2236 74%);box-shadow:0 0 26px rgba(79,214,255,.6)}
.chprev canvas{position:relative;z-index:1;width:auto;height:72%;aspect-ratio:1;margin-bottom:12%;image-rendering:pixelated}
.chname{display:flex;gap:6px}.chname .field{flex:1;min-width:0}.chname .btn{flex:none;width:44px;padding:0!important}
.chleft .comprow{display:flex;flex-direction:column;align-items:stretch;gap:4px;margin:0}.chleft .comprow label{color:var(--parch);font-weight:700;font-size:14px;text-align:left}
.cmpw{display:flex;gap:6px}.cmpw select{flex:1;min-width:0}.cmpw b{flex:1;display:grid;place-items:center;background:#0e1c40;border:2px solid var(--nline);color:#f5c75a;font:700 14px Cinzel,Georgia,serif;text-transform:uppercase}
.chinfo{background:var(--navy2);border:2px solid var(--nline);box-shadow:inset 0 0 0 1px #0b142d;padding:12px;text-align:center;display:flex;flex-direction:column;gap:8px;min-width:0}
.chinfo h3{font:900 clamp(24px,4.4vh,36px) Cinzel,Georgia,serif;color:#f5c75a;text-shadow:0 2px 0 #2a1604;letter-spacing:.05em;text-transform:uppercase}
.badges{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.badges span{padding:3px 12px;border-radius:14px;border:2px solid;font:700 12px Cinzel,Georgia,serif;text-transform:uppercase;color:#fff}
.badges .bt{background:linear-gradient(180deg,#7a3fc8,#4e2290);border-color:#c9a6ff}.badges .br{background:linear-gradient(180deg,#b8323c,#7d1a22);border-color:#ff9aa2}
.chinfo .cdesc{color:var(--parch);font-size:15px}
.chinfo h4{font:700 14px Cinzel,Georgia,serif;color:#f2c96b;letter-spacing:.08em;text-transform:uppercase;margin-top:2px}
.sks{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.sks button{width:50px;height:50px;padding:8px;background:linear-gradient(180deg,#1c3166,#0e1c40);border:2px solid var(--steel);color:var(--c,#f2c96b);cursor:pointer;box-shadow:inset 0 0 0 1px #0b142d;display:grid;place-items:center}
.sks button svg{width:100%;height:100%;filter:drop-shadow(0 0 4px currentColor)}
.sks button.on{border-color:#f2c96b;box-shadow:0 0 10px rgba(242,201,107,.6)}
.sks button.lk{color:#c9d3ee;background:#3a3020;padding:2px;display:flex;flex-direction:column;justify-content:center}.sks button.lk small{font-size:10px}
.chinfo .skd{min-height:2.6em;color:#c9d3ee;font-size:13px}.chinfo .skd b{color:#f5c75a}
.chdock{display:flex;align-items:flex-end;gap:12px;margin-top:4px}
.dockw{flex:1;min-width:0;text-align:left}.dockw small{color:var(--parch);font-weight:700}
#charCards{display:flex!important;flex-wrap:wrap;gap:8px;justify-content:flex-start!important;margin-top:4px}
#charCards .card{flex:none!important;width:64px;height:64px;min-width:0!important;max-width:none!important;padding:0!important;border:3px solid var(--steel)!important;border-radius:0!important;background:#0e1c40!important;box-shadow:inset 0 0 0 1px #0b142d!important;transform:none!important;display:block}
#charCards .card img{width:100%;height:100%;display:block;image-rendering:pixelated}
#charCards .card.sel{border-color:#f2c96b!important;box-shadow:0 0 12px rgba(242,201,107,.7)!important}
#charCards .card.dis{opacity:.35;filter:grayscale(1)}
#charOk{min-width:190px;font-size:20px!important;padding:12px 20px!important}
@media (max-width:640px){.chmain{grid-template-columns:1fr}}
/* Dificuldade na criação do mundo */
#svDiffRow{color:var(--parch);font-weight:700;text-align:left}
/* Editor da posição dos botões (celular) */
#layEd{position:fixed;inset:0;z-index:90;background:#05070f url(assets/ui/lay_bg.jpg) center/cover no-repeat;touch-action:none;user-select:none;-webkit-user-select:none}
#layEd .laybar{position:absolute;top:max(6px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:center;max-width:calc(100vw - 20px);background:rgba(11,20,45,.9);border:2px solid var(--steel);padding:4px 8px;color:var(--parch);font:700 12px "Alegreya Sans",sans-serif;z-index:2}
#layEd .laybar .btn{min-height:30px!important;padding:4px 10px!important;font-size:12px!important;border-radius:2px}
#layBtns .layb{position:absolute!important;right:auto!important;bottom:auto!important;transform:none!important;cursor:grab;touch-action:none;outline:2px dashed rgba(242,201,107,.65);outline-offset:2px}
#layBtns .layb.drag{outline-color:#fff;filter:brightness(1.25);z-index:3}
body.touch.custlay #actions{transform:none!important}
body.touch.custlay #actions .ab.lay{position:fixed!important;left:calc(var(--lx) * 100% - var(--s) / 2)!important;top:calc(var(--ly) * 100% - var(--s) / 2)!important;right:auto!important;bottom:auto!important;transform:none!important;margin:0!important}
/* Celular: tudo mais compacto (botões menores e não esticados) */
body.mob{--fr:20px}
body.mob .panel>h2{min-height:34px;font-size:15px!important;border-width:0 24px;border-image-width:0 24px;padding:4px 12px!important}
body.mob .btn{min-height:30px!important;padding:5px 12px!important;font-size:13px!important}
body.mob .btn.sm{min-height:28px!important;padding:4px 10px!important;font-size:12px!important}
body.mob .panel .btn{align-self:center;width:auto}
body.mob .panel .seg .btn,body.mob .namerow .btn,body.mob .row .btn{align-self:auto}
body.mob .seg .btn{font-size:11px!important;padding:5px 14px!important;min-height:28px!important}
body.mob #scrMenu .menu{width:auto!important;grid-template-columns:repeat(2,minmax(140px,190px))!important;gap:8px 20px!important;justify-content:center}
body.mob #scrMenu .menu .btn{font-size:12px!important;min-height:32px!important;padding:5px 10px!important}
body.mob .optpanel{width:min(720px,98vw)!important;height:calc(100dvh - 12px)!important;grid-template-columns:minmax(110px,140px) 1fr;gap:6px 8px}
body.mob .optpanel .otabs .tab{font-size:12px!important;padding:6px 6px!important;gap:6px;min-height:0!important}
body.mob .optpanel .osec{padding:6px 8px!important;gap:5px!important}
body.mob .optpanel .opt{font-size:13px;min-height:30px}
body.mob .optpanel>.xclose{width:32px;height:32px}
body.mob .tog b{width:26px;height:26px;font-size:15px}
body.mob #scrPause .panel{display:grid;grid-template-columns:1fr 1fr;gap:6px;width:min(420px,94vw)}
body.mob #scrPause .panel>h2,body.mob #scrPause .panel>.sub{grid-column:1/-1}
body.mob #scrPause .panel .btn{width:100%}
body.mob .chprev{aspect-ratio:1.8}
body.mob .chinfo{padding:6px;gap:4px}.body.mob .chinfo .cdesc{font-size:13px}
body.mob .sks button{width:38px;height:38px;padding:5px}
body.mob #charCards .card{width:44px;height:44px}
body.mob #charOk{min-width:120px;font-size:15px!important;padding:6px 14px!important}
@media (max-height:500px){body.mob .chmain{grid-template-columns:minmax(170px,.8fr) 1.2fr}body.mob .chinfo .cdesc{font-size:12px}body.mob .chinfo h3{font-size:20px}}
.panel::before,.panel::after{display:none!important}
.optpanel>.xclose{align-self:start!important;justify-self:end!important;grid-row:1!important;grid-column:2!important}
body.mob .optpanel>.xclose{font-size:0!important;width:32px;height:32px;min-height:0!important;padding:0!important}
:root{--fr:38px}body.mob{--fr:22px}
.charpanel>.chback,.optpanel>.xclose{bottom:auto!important;background-clip:padding-box}
#scrOpts .optpanel{grid-template-columns:minmax(120px,190px) 1fr!important;align-items:stretch!important}
body.mob #scrOpts .optpanel{grid-template-columns:minmax(104px,132px) 1fr!important}
/* criação de personagem compacta no celular: prévia baixa, nome e ajudante lado a lado */
body.mob .charpanel{gap:6px!important}
body.mob .charpanel>#charSub{display:none}
body.mob .chmain{grid-template-columns:minmax(200px,.9fr) 1.1fr!important;gap:8px}
body.mob .chleft{gap:5px}
body.mob .chprev{aspect-ratio:2.2}
body.mob .chname .field,body.mob .cmpw select,body.mob .cmpw b{min-height:30px!important;height:30px;padding:2px 8px!important;font-size:13px!important}
body.mob .chname .btn{width:34px!important;min-height:30px!important}
body.mob .chleft .comprow label{font-size:12px}
body.mob .chinfo h3{font-size:20px}
body.mob .badges span{font-size:10px;padding:2px 8px}
body.mob .chinfo .cdesc{font-size:12px}
body.mob .chdock{margin-top:0;gap:8px}
body.mob .charpanel>.chback{padding:3px 10px!important;font-size:12px!important;min-height:26px!important}
.cmpw b[hidden]{display:none!important}
.panel>.namerow,.panel>.back{background:none!important}
body.mob .chprev{aspect-ratio:3}
body.mob .chleft .comprow label{display:none}
body.mob .chinfo .skd{min-height:0;font-size:12px}
body.mob .sks{gap:5px}

/* 19/11: Rádio Elo */
#radCred{z-index:56}
#radList .krow{padding:5px 0;border-bottom:1px solid rgba(142,155,184,.25);text-align:left}
#radList .krow small{font-size:12px;word-break:break-all}
.radrow{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.radrow #radioNow{color:#f5c75a;font-weight:700}
.radrow span{display:flex;gap:6px}

/* 19/11: ✗ vermelho e ✓ verde */
.tog .no{border-color:#e0484a!important;color:#ff6b6b!important;background:#3a1214!important}
.tog .yes{border-color:#3fbf5a!important;color:#5fe07a!important;background:#123a22!important}
/* botão discreto da Rádio (pular faixa) */
#btnRadio{width:28px!important;height:28px!important;min-height:0!important;padding:0!important;font-size:12px!important;line-height:1;opacity:.5;border-radius:50%!important;background:rgba(10,7,24,.45)!important;border:1px solid rgba(242,201,107,.35)!important;box-shadow:none!important;color:#f2c96b;cursor:pointer;transition:opacity .2s}
#btnRadio:hover,#btnRadio:active{opacity:1}
/* editor de botões: tamanho e opacidade de cada um */
body.touch.custlay #actions .ab.lay{transform:scale(var(--bs,1))!important;opacity:var(--bo,1)}
#layBtns .layb{transform:scale(var(--bs,1))!important;opacity:var(--bo,1)}
#layBtns .layb.on{outline:3px solid #f2c96b;outline-offset:3px}
#layOpt{position:absolute;left:50%;top:calc(max(6px,env(safe-area-inset-top)) + 46px);transform:translateX(-50%);z-index:4;display:flex;gap:14px;align-items:center;flex-wrap:wrap;justify-content:center;max-width:calc(100vw - 20px);background:rgba(11,20,45,.92);border:2px solid #f2c96b;padding:5px 10px;color:#f1e4c3;font:700 12px "Alegreya Sans",sans-serif}
#layOpt b{color:#f5c75a}
#layOpt label{display:flex;align-items:center;gap:6px}
#layOpt input{width:110px}
#layOpt span{min-width:34px;text-align:right}
#layOpt{position:static!important;transform:none!important;flex-basis:100%;border:0!important;border-top:1px solid rgba(242,201,107,.4)!important;padding:4px 0 0!important;background:none!important}
#layOpt.hidden{display:none!important}
#btnRadio svg{display:block;margin:auto}

/* 19/11: lista de músicas da Rádio (botão compacto ao lado do pular) */
#btnRList{width:28px!important;height:28px!important;min-height:0!important;padding:0!important;line-height:1;opacity:.5;border-radius:50%!important;background:rgba(10,7,24,.45)!important;border:1px solid rgba(242,201,107,.35)!important;box-shadow:none!important;color:#f2c96b;cursor:pointer;transition:opacity .2s}
#btnRList:hover,#btnRList:active{opacity:1}#btnRList svg{display:block;margin:auto}
#rList{position:fixed;z-index:40;right:max(10px,env(safe-area-inset-right));top:calc(max(8px,env(safe-area-inset-top)) + 52px);width:min(300px,78vw);max-height:min(60vh,420px);display:flex;flex-direction:column;background:rgba(11,20,45,.95);border:2px solid #8e9bb8;box-shadow:0 8px 24px rgba(0,0,0,.5);color:#f1e4c3}
#rList.hidden{display:none}
#rList .rlh{padding:6px 10px;border-bottom:1px solid rgba(142,155,184,.35)}#rList .rlh b{color:#f5c75a;font:700 14px Cinzel,Georgia,serif;display:block}#rList .rlh small{color:#9fb0d8;font-size:11px}
#rListI{overflow-y:auto;overscroll-behavior:contain}
#rListI button{display:flex;flex-direction:column;align-items:flex-start;width:100%;text-align:left;padding:6px 10px;background:none;border:0;border-bottom:1px solid rgba(142,155,184,.15);color:#f1e4c3;cursor:pointer;font:600 13px "Alegreya Sans",sans-serif}
#rListI button small{color:#9fb0d8;font-size:11px}
#rListI button:hover{background:rgba(242,201,107,.1)}
#rListI button.on{background:rgba(242,201,107,.18);box-shadow:inset 3px 0 0 #f2c96b}#rListI button.on span{color:#f5c75a}
/* ═════ 19/11: menos espaço dentro das janelas (a moldura encosta no conteúdo), sem cantos dourados duplicados ═════ */
.panel,#panel .pbox,#bigmap .pbox{border-width:calc(var(--fr) * .45)!important}
.panel{padding:6px 10px!important}
#panel .pbox,#bigmap .pbox{padding:0!important}
#panel .pbox::before,#panel .pbox::after,#bigmap .pbox::before,#bigmap .pbox::after{display:none!important}
/* notas de atualização (e qualquer pergaminho): texto claro sobre fundo azul escuro, como a Enciclopédia */
.eloScroll{background:#0a1430!important;color:#f1e4c3!important;box-shadow:inset 0 0 0 2px #2b4580!important}
.eloScroll p,.eloScroll li{color:#f1e4c3}
/* ═════ 19/11: barras de rolagem no tema do jogo (trilho azul-escuro, alça dourada) ═════ */
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:#0b142d;box-shadow:inset 1px 0 0 #2b4580}
::-webkit-scrollbar-thumb{background:linear-gradient(90deg,#ffe08a,#c98a22);border:2px solid #0b142d;border-radius:0}
::-webkit-scrollbar-thumb:hover{background:linear-gradient(90deg,#fff1b8,#e9b443)}
::-webkit-scrollbar-button{display:none;width:0;height:0}
::-webkit-scrollbar-corner{background:#0b142d}
@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:#e0b04a #0b142d}}
body.mob ::-webkit-scrollbar{width:6px;height:6px}

/* ═════ 19/11: dourado no lugar do prateado ═════ */
:root{--steel:#c9a24a}
.optpanel>.xclose{border-color:#ffe08a!important;outline-color:#2a1604!important}
.seg .btn{border-color:#a8822e!important}
#layEd .laybar,#rList{border-color:#c9a24a!important}
/* ═════ 19/11: placa do título montada na borda de cima (como na Pausa) ═════ */
.pwrap{position:relative;display:flex;flex-direction:column;align-items:center;max-width:100%;padding-top:23px;flex:none}
.pwrap>h2{position:absolute!important;top:0;left:50%;transform:translateX(-50%);z-index:6;margin:0!important;white-space:nowrap;max-width:94vw;overflow:hidden;
  min-height:46px;display:flex;align-items:center;justify-content:center;padding:6px 18px!important;
  border:solid transparent;border-width:0 34px;border-image:url(assets/ui/plaque.png) 0 48 fill / 0 34px stretch;image-rendering:pixelated;
  font:900 clamp(17px,3.4vh,26px) Cinzel,Georgia,serif!important;letter-spacing:.07em;text-transform:uppercase;color:#f5c75a!important;text-shadow:0 2px 0 #2a1604,0 0 10px rgba(255,190,80,.3);filter:drop-shadow(0 3px 0 rgba(0,0,0,.45))}
.panel.haspl{padding-top:24px!important}
.pwrap>.panel{max-height:calc(100dvh - 48px)!important}
.pwrap>.optpanel{height:min(560px,calc(100dvh - 48px))!important}
.optpanel.haspl{grid-template-rows:1fr!important}
.optpanel.haspl .otabs,.optpanel.haspl .osec{grid-row:1!important}
.charpanel.haspl>.chback{top:6px}
body.mob .pwrap{padding-top:17px}
body.mob .pwrap>h2{min-height:34px;font-size:15px!important;border-width:0 24px;border-image-width:0 24px;padding:4px 12px!important}
body.mob .panel.haspl{padding-top:18px!important}
body.mob .pwrap>.panel{max-height:calc(100dvh - 26px)!important}
body.mob .pwrap>.optpanel{height:calc(100dvh - 26px)!important}

/* botões de canto (X das Opções, Voltar da criação) montados na borda de cima, como a placa */
.pwrap>.xclose{position:absolute!important;top:4px!important;right:-4px!important;left:auto!important;bottom:auto!important;width:40px;height:40px;min-height:0!important;padding:0!important;font-size:0!important;z-index:7;
  background:linear-gradient(180deg,#e2463f,#a8221f)!important;border:3px solid #ffe08a!important;outline:2px solid #2a1604;border-radius:2px!important;box-shadow:0 2px 0 #070c1c!important}
.pwrap>.xclose::after{content:"✕";font:900 22px/1 sans-serif;color:#fff;text-shadow:0 2px 0 #5a0d0b}
.pwrap>.chback{position:absolute!important;top:6px!important;left:-4px!important;bottom:auto!important;z-index:7;padding:6px 14px!important;background:linear-gradient(180deg,#24467e,#16305f 60%,#0f2247)!important;border:2px solid #c9a24a!important;border-radius:2px!important;color:#f1e4c3!important;font-family:Cinzel,Georgia,serif;font-weight:700}
body.mob .pwrap>.xclose{width:32px;height:32px;top:1px!important}
body.mob .pwrap>.chback{top:2px!important;padding:3px 10px!important;font-size:12px!important;min-height:26px!important}
/* 19/11: placa do título centrada na linha dourada da moldura (a linha fica 4,5 px-arte para dentro da borda: --fr × 0,25) */
.pwrap>h2{top:calc(var(--fr) * .25)!important}
body.mob #scrSaves .pwrap>h2#svTitle{min-height:34px!important;font-size:15px!important;border-width:0 24px;border-image-width:0 24px;padding:4px 12px!important}

/* 21/11: ícones coloridos no HUD (mochila, mapa, pausa) */
#btnBag img,#btnMap img,#btnPause img{width:82%;height:82%;object-fit:contain;display:block;margin:auto;image-rendering:auto;filter:drop-shadow(0 2px 0 rgba(0,0,0,.35));pointer-events:none}
#btnBag,#btnMap,#btnPause{display:grid!important;place-items:center;padding:0!important;font-size:0!important}

/* 24/11: ícones pixel-art das habilidades/poções + barra do PC numa fileira só, em quadros dourados */
.pxi{--pz:2;display:block;width:calc(18px*var(--pz));height:calc(18px*var(--pz));background:url(assets/ui/abicons.png?v=3) no-repeat;background-size:calc(864px*var(--pz)) calc(18px*var(--pz));background-position:calc(var(--ix)*-18px*var(--pz)) 0;image-rendering:pixelated;pointer-events:none;filter:drop-shadow(0 2px 0 rgba(0,0,0,.45))}
.ab.lock .pxi{filter:grayscale(1) brightness(.7)}
.ab.nomp .pxi{filter:grayscale(.75) brightness(.75)}
body.touch .ab .pxi{--pz:2}
body.touch .ab.util .pxi{--pz:1.5}
body.touch .ab.big .pxi{--pz:3}
body:not(.touch) #actions{display:flex;flex-wrap:nowrap;align-items:flex-end;gap:5px;bottom:max(10px,env(safe-area-inset-bottom))}
body:not(.touch) .ab,body:not(.touch) .ab.util{--s:52px;border-radius:4px!important;border:2px solid #c9a24a!important;outline:2px solid #1a0f04;
  background:linear-gradient(180deg,#1b2c58 0%,#111d3e 55%,#0b1430 100%)!important;box-shadow:inset 0 0 0 2px #070c1c,inset 0 3px 0 2px rgba(255,255,255,.07),0 3px 0 rgba(0,0,0,.55)!important}
body:not(.touch) .ab .cd{border-radius:2px;inset:2px}
body:not(.touch) .ab.u-hp{margin-left:14px}
body:not(.touch) .ab.u-int{margin-left:14px}
body:not(.touch) .ab kbd{right:-5px;bottom:-6px;font:700 10px/1 Nunito,sans-serif;padding:2px 4px;min-width:14px;background:#1a0f04!important;color:#ffe08a!important;border:1px solid #c9a24a!important;border-radius:2px}
body:not(.touch) .ab b{left:4px;right:auto;bottom:2px;font:800 12px/1 Nunito,sans-serif}
body:not(.touch) .ab.lock{opacity:1;filter:none;background:linear-gradient(180deg,#141d36,#0a1124)!important;border-color:#7a6436!important}
body:not(.touch) .ab.lock .pxi{opacity:.35}
body:not(.touch) .ab.lock kbd{color:#b9b4a6!important}
body:not(.touch) .ab.ult{border-color:#ffe08a!important;box-shadow:inset 0 0 0 2px #070c1c,0 0 10px rgba(255,224,138,.45),0 3px 0 rgba(0,0,0,.55)!important}
body:not(.touch) .ab.ult.lock{box-shadow:inset 0 0 0 2px #070c1c,0 3px 0 rgba(0,0,0,.55)!important}
body:not(.touch) .ab.on{background:linear-gradient(180deg,#f8d98f,#a8691c)!important}
body:not(.touch) .ab:hover:not(.lock){border-color:#ffe9a8!important}

/* 24/11: X de fechar em cima da linha dourada, dentro do canto (não sai mais para fora da moldura) */
.pwrap>.xclose{top:calc(var(--fr) * .25 + 3px)!important;right:calc(var(--fr) * .45 + 10px)!important}
body.mob .pwrap>.xclose{top:calc(var(--fr) * .25 + 1px)!important;right:calc(var(--fr) * .45 + 6px)!important}

/* 24/11: Conta, perfil e amigos */
.accChip{position:absolute;top:max(14px,env(safe-area-inset-top));left:max(14px,env(safe-area-inset-left));display:flex;align-items:center;gap:10px;padding:6px 14px 6px 6px;min-height:0;cursor:pointer;
  background:linear-gradient(180deg,#1b2c58,#0b1430);border:2px solid #c9a24a;outline:2px solid #1a0f04;border-radius:4px;color:#f1e4c3;text-align:left;box-shadow:inset 0 0 0 2px #070c1c,0 3px 0 rgba(0,0,0,.5)}
.accChip:hover{border-color:#ffe08a}
.accChip img{width:38px;height:38px;image-rendering:pixelated;border-radius:3px;background:#0b1430}
.accChip b{display:block;font:700 14px/1.2 Cinzel,serif;color:#fff3d6}
.accChip small{display:block;font:600 12px/1.2 "Alegreya Sans",sans-serif;color:#b9aed6}
.accChip:not(:has(img:not([hidden]))){padding-left:14px}
body.mob .accChip{transform:scale(.85);transform-origin:top left}
.accpanel{width:min(560px,94vw)!important;max-height:calc(100dvh - 40px);overflow:auto}
.accTabs{display:flex;gap:8px;justify-content:center;margin:4px 0 12px;flex-wrap:wrap}
.accIntro{font-size:14px;margin:0 0 8px}
.accForm{display:flex;flex-direction:column;gap:6px}
.accL{font:700 13px/1.2 Cinzel,serif;color:#f2c96b;margin-top:6px;text-align:left}
.accL small{font:500 12px "Alegreya Sans",sans-serif;color:#b9aed6}
.accpanel .field{width:100%}
.accpanel .row{display:flex;gap:8px;align-items:center}
.accpanel .row .field{flex:1}
.accpanel textarea.field{resize:none;font:500 15px "Alegreya Sans",sans-serif}
.accMsg{min-height:20px;font:600 14px "Alegreya Sans",sans-serif;color:#7ff09a;text-align:center}
.accMsg.bad{color:#ff8a8f}
.accSmall{font-size:12.5px;color:#b9aed6;text-align:center;margin:10px 0 0}
.accSmall a{color:#f2c96b}
.avPick{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.avb{width:52px;height:52px;padding:3px;min-height:0;border:2px solid #44506e;border-radius:4px;background:#0b1430;cursor:pointer}
.avb img{width:100%;height:100%;image-rendering:pixelated}
.avb.on{border-color:#ffe08a;box-shadow:0 0 10px rgba(255,224,138,.5)}
.accHead{display:flex;gap:12px;align-items:center;background:rgba(0,0,0,.25);border:1px solid rgba(201,162,74,.35);border-radius:4px;padding:8px 10px;margin-bottom:6px;text-align:left}
.accHead img{width:56px;height:56px;image-rendering:pixelated;border:2px solid #c9a24a;border-radius:3px;background:#0b1430}
.accHead b{display:block;font:700 18px Cinzel,serif;color:#fff3d6}
.accHead small{display:block;font:600 13px "Alegreya Sans",sans-serif;color:#b9aed6}
.accHead .cloud{color:#7cd6ff}
.accH{font:700 13px Cinzel,serif;color:#f2c96b;margin:12px 0 4px;text-align:left}
.frow{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:4px;background:rgba(0,0,0,.22);margin:4px 0;text-align:left}
.frow img{width:34px;height:34px;image-rendering:pixelated;opacity:.6}
.frow.on img{opacity:1}
.frow .fn b{display:block;font:700 14px Cinzel,serif;color:#fff3d6}
.frow .fn small{font:600 12px "Alegreya Sans",sans-serif;color:#8a80a8}
.frow.on .fn small{color:#7ff09a}
.frow .sp{flex:1}
.frow .btn.sm{padding:6px 10px;min-height:0;font-size:12px}
.accRows{display:flex;flex-direction:column;gap:8px;text-align:left}
.accRows>div{background:rgba(0,0,0,.22);border-radius:4px;padding:8px 10px;display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
.accRows b{font:700 13px Cinzel,serif;color:#f2c96b;min-width:110px}
.accRows span{color:#e6defa;font-size:14px}
.accRows .col{display:flex;flex-direction:column;gap:6px;flex:1;min-width:200px}
.accBtns{justify-content:center;flex-wrap:wrap;margin:10px 0 6px}
.gBtn{display:flex;justify-content:center;min-height:44px}
.btn.busy{opacity:.6;pointer-events:none}
#accBody .or{margin:8px 0}

/* 25/11: conta com tamanho fixo (todas as abas iguais), tela de entrada, mais rostos, Google, Online e rank */
.accpanel{height:min(690px,calc(100dvh - 40px));width:min(580px,94vw)!important}
#accBody{display:flex;flex-direction:column;gap:6px;flex:1;min-height:0}
.accTabs{flex-wrap:nowrap}
.accTabs .btn{flex:1 1 0;max-width:160px;min-width:0;padding-left:6px;padding-right:6px}
.avPick{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:5px;max-height:156px;overflow-y:auto;padding:4px;background:rgba(0,0,0,.2);border-radius:4px}
.avb{width:auto;height:auto;aspect-ratio:1;padding:2px}
.accBtns{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0 6px}
.accBtns .btn{width:100%;min-height:52px;font-size:14px;padding:8px 10px;white-space:normal;line-height:1.15}
#aDel{align-self:center}
.accRows b{min-width:96px}
.gFake{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:44px;border:1px solid #dadce0;border-radius:4px;background:#fff;color:#3c4043;font:600 15px "Alegreya Sans",Roboto,Arial,sans-serif;cursor:pointer}
.gFake:hover{background:#f3f6fc}.gFake[hidden]{display:none}
.accRows #gGo{margin-left:auto}
.accGuest{margin-top:auto;padding-top:12px;border-top:1px solid rgba(201,162,74,.3);display:flex;flex-direction:column;align-items:center;gap:6px}
.accGuest .btn{width:min(320px,100%)}
.accGuest small{font:500 12.5px "Alegreya Sans",sans-serif;color:#b9aed6;text-align:center}
.accWait{margin:auto}
.accHello{display:flex;flex-direction:column;align-items:center;gap:4px;margin:auto 0 14px}
.accHello img{width:112px;height:112px;image-rendering:pixelated;border:3px solid #c9a24a;border-radius:4px;background:#0b1430;box-shadow:0 0 24px rgba(242,201,107,.35);margin-bottom:8px}
.accHello small{font:600 14px "Alegreya Sans",sans-serif;color:#b9aed6}
.accHello b{font:700 28px Cinzel,serif;color:#fff3d6}
.accHello span{font:600 14px "Alegreya Sans",sans-serif;color:#7cd6ff}
.accPlay,#aSwitch{width:min(320px,100%);align-self:center}
#aSwitch{margin-bottom:auto}
#scrAcc.gate{background:radial-gradient(ellipse at center,rgba(20,14,44,.55),rgba(5,3,14,.92))}
/* Online */
.onpanel{width:min(760px,95vw)!important;height:min(600px,calc(100dvh - 40px))}
#onBody{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px}
.onGrid{display:grid;grid-template-columns:1fr 1.25fr;gap:12px;text-align:left}
.onCard{background:rgba(0,0,0,.25);border:1px solid rgba(201,162,74,.35);border-radius:6px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.onCard h3{margin:0;font:700 18px Cinzel,serif;color:#f2c96b}
.onCard p{margin:0;font:500 14px/1.35 "Alegreya Sans",sans-serif;color:#d8d0ee}
.onCard>.btn.gold{margin-top:6px}
.onGrid{align-items:start}
.onCard .tag{font:800 11px "Alegreya Sans",sans-serif;background:#c0392b;color:#fff;border-radius:3px;padding:1px 6px;vertical-align:middle}
.onLock{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font:600 14px "Alegreya Sans",sans-serif;color:#ffcf8a}
.srvList{display:flex;flex-direction:column;gap:6px}
.srow{display:flex;align-items:center;gap:10px;background:rgba(0,0,0,.25);border-radius:4px;padding:6px 8px}
.srow b{font:700 14px Cinzel,serif;color:#fff3d6;min-width:92px}
.srow small{font:700 13px "Alegreya Sans",sans-serif;color:#b9aed6;min-width:40px;text-align:right}
.srow .btn{min-width:78px;padding:6px 10px;min-height:0}
.sbar{flex:1;height:8px;background:#0b1430;border-radius:4px;overflow:hidden;border:1px solid #2b3a66}
.sbar i{display:block;height:100%;background:linear-gradient(90deg,#4bd37b,#f2c96b)}
.onRankB{align-self:flex-start}
.onTop{display:flex;align-items:center;gap:12px}.onTop h3{margin:0;font:700 18px Cinzel,serif;color:#f2c96b}
.onMine{margin:0;font:600 15px "Alegreya Sans",sans-serif;color:#7cd6ff}
.rankList{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:4px;text-align:left}
.rrow{display:flex;align-items:center;gap:10px;background:rgba(0,0,0,.22);border-radius:4px;padding:4px 10px}
.rrow .pos{width:28px;font:800 16px Cinzel,serif;color:#b9aed6;text-align:center}
.rrow img{width:32px;height:32px;image-rendering:pixelated}
.rrow b{font:700 14px Cinzel,serif;color:#fff3d6;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rrow small{font:600 12.5px "Alegreya Sans",sans-serif;color:#b9aed6}
.rrow .lv{font:800 14px "Alegreya Sans",sans-serif;color:#f2c96b;min-width:52px;text-align:right}
.rrow.p1 .pos{color:#ffd700}.rrow.p2 .pos{color:#d8d8e8}.rrow.p3 .pos{color:#e09a5a}
.rrow.me{box-shadow:inset 0 0 0 2px #7cd6ff}
.coNewRow{display:flex;gap:8px}.coNewRow .field{flex:1;min-width:0}.coNewRow .btn{flex:none}
@media (max-width:640px){.onGrid{grid-template-columns:1fr}.onpanel{height:calc(100dvh - 24px)}.accBtns .btn{font-size:13px}.coNewRow{flex-direction:column}}
/* ícone da Enciclopédia ao lado das Notas */
#btnWiki{position:relative;width:44px;height:44px;display:grid;place-items:center;background:none;border:0;cursor:pointer;transform:rotate(6deg);transition:transform .15s;filter:drop-shadow(0 3px 3px rgba(0,0,0,.5));padding:0;min-height:0}
#btnWiki:hover,#btnWiki:focus-visible{transform:rotate(0) scale(1.08);outline:0}
/* HUD com muitos jogadores (servidor oficial): lista compacta, mostra 5 */
#party.many{gap:3px}#party.many .pc:nth-child(n+6){display:none}#party.many .pc{transform:scale(.85);transform-origin:top left;margin-bottom:-8px}
.chname[hidden],.comprow[hidden],.gBtn[hidden],.copycode[hidden],.xclose[hidden]{display:none!important}
body.mob .pwrap>.xclose,body.mob .optpanel>.xclose{font-size:0!important}
/* 25/11: menores e "esqueci minha senha" */
.accKid{background:rgba(124,214,255,.1);border:1px solid rgba(124,214,255,.4);border-radius:4px;padding:8px 10px;text-align:left}
.accKid p{margin:0;font:600 13.5px/1.35 "Alegreya Sans",sans-serif;color:#bfe9ff}
.accKid label{display:flex;gap:8px;align-items:flex-start;margin-top:8px;font:600 13.5px/1.3 "Alegreya Sans",sans-serif;color:#fff3d6;cursor:pointer}
.accKid input{width:18px;height:18px;flex:none;margin-top:1px}
.accKid[hidden],.accKid label[hidden]{display:none!important}
.accLink{background:none;border:0;color:#f2c96b;font:600 14px "Alegreya Sans",sans-serif;text-decoration:underline;cursor:pointer;padding:4px;min-height:0;align-self:center}
.accCode{letter-spacing:8px;font-size:22px!important;text-align:center}
/* 25/11 (3): Online e Perfil no estilo das referências */
.pxs{image-rendering:pixelated;flex:none;display:block}
.onCard .onHead{display:flex;align-items:center;justify-content:space-between;gap:8px}
.onCard .tag{background:#2a9d55;color:#fff;font:800 12px "Alegreya Sans",sans-serif;padding:2px 8px;border-radius:4px;margin-left:4px}
.onRef{width:40px;height:40px;min-height:0!important;padding:0!important;display:grid;place-items:center;background:linear-gradient(#ffd98a,#e0a83a)!important;border:2px solid #7a4a10!important;border-radius:6px}
.onBig{display:flex;align-items:center;justify-content:center;gap:14px;min-height:72px;font-size:clamp(20px,2.6vw,28px)!important;margin-top:6px!important}
.onBig .pxs{width:44px;height:44px}
.onOr{display:flex;align-items:center;gap:10px;color:#b9aed6;font:600 14px "Alegreya Sans",sans-serif}
.onOr::before,.onOr::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,rgba(201,162,74,.55),transparent)}
.onJoin{display:flex;gap:8px}.onJoin .field{flex:1;min-width:0;text-transform:uppercase;letter-spacing:1px}.onJoin .field::placeholder{text-transform:none;letter-spacing:0}.onJoin .btn{flex:none;padding:8px 16px}
.onErr{margin:0;min-height:0;color:#ff8a8f;font:600 13px "Alegreya Sans",sans-serif}.onErr:empty{display:none}
.onFeat{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;border-top:1px solid rgba(201,162,74,.3);padding-top:10px;margin-top:4px}
.onFeat>div{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.onFeat small{font:600 13.5px "Alegreya Sans",sans-serif;color:#e6defa}
.ofaces{display:flex;height:30px}.ofaces img{width:26px;height:26px;image-rendering:pixelated;border-radius:50%;border:2px solid #0b1430;margin-left:-8px;background:#2a2238}.ofaces img:first-child{margin-left:0}
.hy{color:#f2c96b}.ho{color:#ff9a4a}.hb{color:#7cd6ff}
.srow{display:grid!important;grid-template-columns:auto 1fr auto;align-items:center;gap:10px}
.smid{display:flex;flex-direction:column;gap:3px;min-width:0}
.stop{display:flex;align-items:center;gap:6px;font:700 13px "Alegreya Sans",sans-serif}
.sig{display:inline-flex;align-items:flex-end;gap:1px;height:12px}.sig i{width:3px;background:#4bd37b}.sig i:nth-child(1){height:4px}.sig i:nth-child(2){height:6px}.sig i:nth-child(3){height:9px}.sig i:nth-child(4){height:12px}
.ms{color:#7ff09a}.cnt{margin-left:auto;color:#fff3d6}
.smine img{width:18px;height:18px;image-rendering:pixelated;display:block}
.smineT{font:600 11px "Alegreya Sans",sans-serif;color:#f2c96b;text-align:center}
.sbar{height:9px}.sbar.g i{background:linear-gradient(90deg,#2a9d55,#4bd37b)}.sbar.y i{background:linear-gradient(90deg,#d6b02a,#ffe14a)}.sbar.o i{background:linear-gradient(90deg,#d65a2a,#ff8a3a)}
.onRankB{align-self:center!important;display:flex;align-items:center;gap:8px;padding:8px 18px}
.onLock .pxs{display:inline-block;vertical-align:middle}
/* perfil */
.lvTag{font:800 11px "Alegreya Sans",sans-serif;background:#2a9d55;color:#fff;border-radius:4px;padding:1px 6px;vertical-align:middle;margin-left:6px;letter-spacing:0}
#accTab{display:flex;flex-direction:column;gap:10px}
.pfCard{display:flex;gap:16px;align-items:center;background:rgba(0,0,0,.25);border:1px solid rgba(201,162,74,.35);border-radius:6px;padding:14px}
.pfFrame{position:relative;flex:none;padding:6px;background:linear-gradient(#ffe08a,#b8862e);border:2px solid #4a2a08;box-shadow:0 0 0 2px #f2c96b inset,0 4px 0 #2a1604}
.pfFrame img{display:block;width:104px;height:104px;image-rendering:pixelated;background:#0b1430;border:2px solid #4a2a08}
.pfLv{position:absolute;left:50%;top:-12px;transform:translateX(-50%);white-space:nowrap;font:700 12px Cinzel,serif;color:#fff3d6;background:#3a2410;border:2px solid #c9a24a;padding:1px 8px;border-radius:3px}
.pfInfo{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px;text-align:left}
.pfInfo>b{font:700 26px Cinzel,serif;color:#fff3d6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pfInfo>small{font:500 13.5px "Alegreya Sans",sans-serif;color:#b9aed6}
.pfBar{display:flex;align-items:center;gap:8px}.pfBar em{font:800 14px "Alegreya Sans",sans-serif;font-style:normal;width:24px;color:#4bd37b}.pfBar.fr em{color:#7cd6ff}
.pfBar span{flex:1;height:14px;background:#0b1430;border:2px solid #c9a24a;border-radius:3px;overflow:hidden}.pfBar i{display:block;height:100%}
.pfBar.xp i{background:linear-gradient(#7ff09a,#2a9d55)}.pfBar.fr i{background:linear-gradient(#bfefff,#2fa8d6)}
.pfWorld{display:flex;gap:14px;align-items:center;background:rgba(0,0,0,.25);border:2px solid #c9a24a;border-radius:4px;padding:10px;text-align:left}
.pfWorld img{width:118px;height:86px;object-fit:cover;border:2px solid #4a2a08;border-radius:3px;flex:none}
.pfWorld h4{margin:0 0 4px;font:700 18px Cinzel,serif;color:#f2c96b}
.pfWorld span{display:block;font:600 15px "Alegreya Sans",sans-serif;color:#e6defa}
.pfWorld .cloud{color:#7cd6ff;font:600 13.5px "Alegreya Sans",sans-serif}
.pfTro{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;background:rgba(0,0,0,.25);border-radius:4px;padding:10px 6px}
.pfTro>div{display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center}
.pfTro b{font:700 14px "Alegreya Sans",sans-serif;color:#fff3d6}.pfTro small{font:600 11.5px "Alegreya Sans",sans-serif;color:#7ff09a}
.pfTro .lock b{color:#8a80a8}.pfTro .lock small{color:#8a80a8}
.pfH{margin:4px 0 0;font:700 17px Cinzel,serif;color:#f2c96b;text-align:center}
.pfStats{display:flex;flex-direction:column;gap:4px;background:rgba(0,0,0,.25);border-radius:4px;padding:6px}
.pfStats>div{display:flex;align-items:center;gap:10px;padding:5px 8px;border-bottom:1px solid rgba(201,162,74,.15)}.pfStats>div:last-child{border:0}
.pfStats span{flex:1;font:600 16px "Alegreya Sans",sans-serif;color:#e6defa;text-align:left}.pfStats b{font:800 16px "Alegreya Sans",sans-serif;color:#f2c96b}
#aEditBox{display:flex;flex-direction:column;gap:6px}#aEditBox[hidden]{display:none}
/* amigos */
.plus{font-size:16px;margin-right:2px}
.frEmpty{background:rgba(0,0,0,.25);border-radius:4px;padding:18px 10px;display:flex;flex-direction:column;align-items:center;gap:8px}
.frEmpty p{margin:0;font:600 14px "Alegreya Sans",sans-serif;color:#d8d0ee}
.frArt{position:relative;display:flex;align-items:flex-end;gap:2px}.frArt img{width:44px;height:44px;image-rendering:pixelated}
.frQ{position:absolute;left:34px;top:-22px}
.frNone{margin:0!important}
@media (max-width:640px){.pfFrame img{width:76px;height:76px}.pfInfo>b{font-size:20px}.pfWorld img{width:84px;height:64px}.onBig{min-height:56px}}
.onBig span{white-space:nowrap;font-size:clamp(18px,2.2vw,26px)}
.onRef{background:#2a1a3e!important;border-color:#c9a24a!important}
.frArt img{width:56px;height:56px;border-radius:4px}.frQ{left:42px;top:-30px}.frQ .pxs{width:32px;height:32px}
#accTab .accMsg:empty{display:none}
/* molduras do perfil */
.pfr{position:relative;display:inline-block;width:var(--s);height:var(--s);flex:none}
.pfr>img{position:absolute;left:12.5%;top:12.5%;width:75%;height:75%;image-rendering:pixelated;background:#0b1430;object-fit:cover}
.pfr>.frm{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}
.pc .avw{position:relative;flex:none;display:block;width:44px;height:44px}
.pc .avw img.av{position:absolute;left:5px;top:5px;width:34px!important;height:34px!important;border:0!important;border-radius:0!important}
.pc .avw .frm{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}
/* lista de jogadores (TAB) */
#plist{position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:rgba(5,3,14,.55)}
#plist[hidden]{display:none!important}
.plp{width:min(720px,94vw);max-height:calc(100dvh - 40px);display:flex;flex-direction:column;background:#16204a;border:3px solid #c9a24a;box-shadow:0 0 0 2px #2a1604,0 12px 40px rgba(0,0,0,.6);border-radius:4px;padding:10px 12px;gap:8px}
.plh{display:flex;align-items:center;gap:10px}.plh b{font:700 17px Cinzel,serif;color:#f2c96b}.plh>span{font:700 13px "Alegreya Sans",sans-serif;color:#b9aed6;margin-right:auto}
.plh .btn{padding:4px 10px;min-height:0;font-size:12px}
.plx{width:30px;height:30px;border:2px solid #ffe08a;background:#c0392b;color:#fff;font:900 15px sans-serif;border-radius:3px;cursor:pointer}
.plb{display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:0;overflow:auto}
.plrows{display:flex;flex-direction:column;gap:4px}
.plr{display:flex;align-items:center;gap:10px;background:rgba(0,0,0,.25);border:1px solid transparent;border-radius:4px;padding:4px 8px;cursor:pointer;color:inherit;text-align:left;font:inherit}
.plr:hover:not(.me),.plr.on{border-color:#c9a24a;background:rgba(201,162,74,.12)}.plr.me{cursor:default;opacity:.9}
.pln{flex:1;min-width:0}.pln b{display:block;font:700 14px "Alegreya Sans",sans-serif;color:#fff3d6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pln b i{color:#7cd6ff;font-style:normal;font-weight:600}
.pln small{font:600 12px "Alegreya Sans",sans-serif;color:#b9aed6}
.plside{background:rgba(0,0,0,.2);border-radius:4px;padding:10px;display:flex;flex-direction:column;gap:8px}
.plcard{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}.plcard b{font:700 16px Cinzel,serif;color:#fff3d6}.plcard small{font:600 12px "Alegreya Sans",sans-serif;color:#b9aed6}.plcard p{margin:0;font:500 13px "Alegreya Sans",sans-serif;color:#d8d0ee}
.placts{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}.placts .btn{min-height:0;padding:6px 10px;font-size:12px}
.plok{font:700 12.5px "Alegreya Sans",sans-serif;color:#7ff09a;align-self:center}
.plhint{margin:0;font:500 12.5px "Alegreya Sans",sans-serif;color:#8a80a8;text-align:center}
.plrep{display:flex;flex-direction:column;gap:4px;text-align:left;font:600 13px "Alegreya Sans",sans-serif;color:#e6defa}.plrep b{color:#ff8a8f}.plrep label{display:flex;gap:6px;align-items:center;cursor:pointer}
.plf{font:500 11.5px "Alegreya Sans",sans-serif;color:#8a80a8;text-align:center}
@media (max-width:640px){.plb{grid-template-columns:1fr}}
.ico{display:block;flex:none;image-rendering:pixelated}
.itm{background-image:url(assets/ui/items.png);background-repeat:no-repeat}
/* 25/11 (4): perfil — cabeçalho igual em todas as abas, letras menores */
.accpanel #accBody{position:relative;gap:8px}
.pfCard{padding:10px 12px;gap:14px}
.pfPic{position:relative;flex:none;padding-top:6px}
.pfPic .pfLv{top:-4px;font-size:11px;z-index:2}
.pfPen{position:absolute;right:-6px;bottom:-4px;width:28px;height:28px;display:grid;place-items:center;background:linear-gradient(#ffe08a,#d69a1a);border:2px solid #2a1604;border-radius:50%;cursor:pointer;padding:0;z-index:3;box-shadow:0 2px 0 #2a1604}
.pfPen:hover{transform:scale(1.08)}
.pfInfo{gap:6px}
.pfInfo>b{font-size:19px!important;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pfBio{font-size:12.5px!important;color:#b9aed6}
.pfBar span{position:relative;height:16px}.pfBar u{position:absolute;inset:0;display:grid;place-items:center;text-decoration:none;font:700 11px "Alegreya Sans",sans-serif;color:#fff;text-shadow:0 1px 0 #000,0 0 3px #000}
.pfBar em{font-size:12px;width:20px;display:grid;place-items:center}
.pfInfo .cloud{font:600 12px "Alegreya Sans",sans-serif;color:#7cd6ff}
.pfWorld{padding:8px;gap:12px}.pfWorld img{width:96px;height:64px}.pfWorld h4{font-size:15px}.pfWorld span{font-size:13px}.pfWorld span b{color:#fff3d6}
.pfTro{padding:8px 4px}.pfTro b{font-size:12.5px}.pfTro small{font-size:11px}
.pfFrames{display:flex;align-items:center;gap:10px;width:100%;background:rgba(0,0,0,.25);border:1px solid rgba(201,162,74,.45);border-radius:4px;padding:6px 10px;cursor:pointer;color:inherit;text-align:left;font:inherit}
.pfFrames:hover{border-color:#ffe08a}.pfFrames span{flex:1}.pfFrames b{display:block;font:700 13.5px Cinzel,serif;color:#f2c96b}.pfFrames small{font:600 12px "Alegreya Sans",sans-serif;color:#b9aed6}.pfFrames em{font:700 22px sans-serif;color:#f2c96b;font-style:normal}
.pfH{font-size:14px}
.pfStats>div{padding:4px 8px;gap:10px}.pfStats span{font-size:13.5px}.pfStats b{font-size:13.5px}
.accTabs .btn{font-size:12.5px!important;min-height:34px!important;padding-top:4px!important;padding-bottom:4px!important}
.accpanel .accL{font-size:12px}.accpanel .field{font-size:14px}.accRows b{font-size:12px}.accRows span{font-size:13px}
.accBtns .btn{min-height:42px;font-size:13px}
.frow .fn b{font-size:13px}.accH{font-size:13px}
/* editor de perfil (por cima do painel) */
.pfEd{position:absolute;inset:0;z-index:5;background:rgba(10,8,26,.82);display:flex;align-items:flex-start;justify-content:center;padding:4px 0}
.pfEdIn{width:100%;background:#16204a;border:2px solid #c9a24a;border-radius:4px;padding:10px;display:flex;flex-direction:column;gap:8px;max-height:100%;overflow:auto}
.pfEdH{display:flex;align-items:center;justify-content:space-between}.pfEdH b{font:700 16px Cinzel,serif;color:#f2c96b}
.pfEdPrev{display:flex;align-items:center;gap:12px;text-align:left}.pfEdPrev b{display:block;font:700 16px Cinzel,serif;color:#fff3d6}.pfEdPrev small{font:600 12.5px "Alegreya Sans",sans-serif;color:#b9aed6}
.pfEdB{min-height:160px}
.frGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));gap:6px;max-height:210px;overflow:auto;padding:2px}
.frT{position:relative;background:rgba(0,0,0,.25);border:2px solid transparent;border-radius:4px;padding:2px;cursor:pointer;display:grid;place-items:center}
.frT.on{border-color:#ffe08a;box-shadow:0 0 8px rgba(255,224,138,.5)}.frT.off .pfr{filter:grayscale(1) brightness(.45)}
.frL{position:absolute;right:3px;bottom:3px}
.frHow{margin:6px 0 0;font:600 12.5px "Alegreya Sans",sans-serif;color:#d8d0ee;text-align:center}.frHow b{color:#f2c96b}
.pfEdBtns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pfEdB .avPick{max-height:210px}
/* 25/11 (4): Opções e Novo Jogo */
.otabs .tab i{display:grid;place-items:center;width:26px;font-style:normal}
.opt .oico{display:inline-grid;place-items:center;width:24px;margin-right:8px;vertical-align:middle}
label.opt:has(.oico){display:flex;align-items:center}
.radrow{border-bottom:1px solid rgba(201,162,74,.35);padding-bottom:10px;margin-bottom:4px}
.seg .sgi{display:flex;align-items:center;justify-content:center;gap:10px;min-height:58px!important;font-size:13px!important;padding:6px 10px!important;text-align:left;line-height:1.1}
.seg .sgi .ico{flex:none}
.seg .sgi.v0{border-color:#4bd37b!important}.seg .sgi.v2{border-color:#e0503a!important}
.seg .sgi.sel.v0{background:linear-gradient(#2a6a44,#1a4a2e)!important;color:#eaffef!important;box-shadow:0 0 10px rgba(75,211,123,.45)}
.seg .sgi.sel.v1{box-shadow:0 0 10px rgba(255,224,138,.5)}
.seg .sgi.sel.v2{background:linear-gradient(#7a2418,#4a140e)!important;color:#ffe6e0!important;box-shadow:0 0 10px rgba(224,80,58,.5)}
.icoSS{position:relative;display:block}.icoSS .itm{position:absolute}.icoSS .itm:first-child{left:0;top:0}.icoSS .itm:last-child{right:-4px;bottom:-2px}
#svNew{display:flex;align-items:center;justify-content:center;gap:10px}
#svName{background:#0e1428!important;border:3px solid #5c6378!important;box-shadow:inset 0 2px 0 #000,0 0 0 1px #1a1020}
#scrSaves .pwrap{display:flex;flex-direction:column;align-items:center}
.pwrap>.outback{position:static!important;width:min(460px,80vw)!important;margin-top:14px;align-self:center;font-size:15px!important}
.pfFrames>span:not(.pfr){flex:1}.pfFrames>.pfr{flex:none!important}
label.opt:has(.oico){justify-content:flex-start;gap:0}label.opt:has(.oico) input[type=range]{margin-left:auto}label.opt:has(.oico)>span:not(.oico){margin-left:auto;margin-right:10px}
.plr.away{opacity:.75}.plr.away small{color:#7cd6ff}
.pwrap>.xclose{top:calc(var(--fr) * .25 - 8px)!important;right:calc(var(--fr) * .45 + 13px)!important}body.mob .pwrap>.xclose{top:calc(var(--fr) * .25 - 5px)!important;right:calc(var(--fr) * .45 + 9px)!important}
/* 25/11 (5): perfil sem rolagem — janela mais larga, aba Perfil em 2 colunas; editor ao lado da janela; cadastro em 2 colunas */
.accpanel{width:min(820px,96vw)!important;height:min(620px,calc(100dvh - 48px))!important}
.pfCols{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:start}
.pfColA,.pfColB{display:flex;flex-direction:column;gap:8px;min-width:0}
.pfColB .pfH{margin:0 0 2px}
.pfStats>div{padding:6px 8px}
.regGrid{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px;align-items:start}.regGrid .rc{display:flex;flex-direction:column;gap:6px}
.regGrid .avPick{max-height:124px}
#scrAcc.editing{flex-direction:row;justify-content:center;align-items:center;gap:14px}
.pfEd{position:static;flex:none;width:360px;height:min(620px,calc(100dvh - 48px));margin-top:23px;border:var(--fr) solid transparent;border-image:url(assets/ui/frame.png) 54 fill / var(--fr) stretch;image-rendering:pixelated;background:none;padding:2px 4px;display:flex;box-shadow:0 12px 34px rgba(0,0,0,.6);align-items:stretch}
.pfEd .pfEdIn{background:none;border:0;padding:4px;overflow:auto}
.pfEd .frGrid{grid-template-columns:repeat(4,1fr);max-height:none}
.pfEd .pfEdB .avPick{max-height:none}
@media (max-width:1240px){#scrAcc.editing{flex-direction:column}.pfEd{position:fixed;z-index:40;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;width:min(420px,94vw);height:min(600px,calc(100dvh - 24px))}}
@media (max-width:700px){.pfCols,.regGrid{grid-template-columns:1fr}}
.accpanel .field{min-height:34px!important;height:34px;padding-top:4px!important;padding-bottom:4px!important}
.accpanel textarea.field{height:auto}
.accpanel .accL{margin-top:2px}
.accForm{gap:4px}
.accForm>.btn.gold,#aGo{min-height:42px!important;font-size:16px!important}
.regGrid .avPick{max-height:196px}
.gFake{min-height:38px}
#accBody .or{margin:2px 0}
.accGuest{padding-top:8px}.accGuest .btn{min-height:38px!important}
.accSmall{margin-top:4px!important}
/* aba Conta em 2 colunas */
.accRows{display:grid!important;grid-template-columns:1fr 1fr;gap:8px}
.accRows>div:has(#aNew){grid-column:2;grid-row:1 / span 4;align-content:flex-start}
.accRows>div:has(#aNew) .col{min-width:0}
@media (max-width:700px){.accRows{grid-template-columns:1fr}.accRows>div:has(#aNew){grid-column:auto;grid-row:auto}}
.accpanel{height:min(656px,calc(100dvh - 48px))!important}.pfEd{height:min(656px,calc(100dvh - 48px))}
.accGuest{flex-direction:row!important;justify-content:center;gap:12px!important;padding-top:6px!important}.accGuest .btn{width:auto!important;padding:4px 18px!important}.accGuest small{max-width:330px;text-align:left!important}
/* 25/11 (6): editor de perfil no padrão das janelas (placa de título, X e moldura); botões menores e mais organizados */
#scrAcc.editing{flex-direction:row!important;align-items:center!important;justify-content:center;gap:18px}
.edwrap{flex:none}
.edwrap>.pfEdPanel{width:340px!important;height:min(610px,calc(100dvh - 48px))!important;display:flex!important;flex-direction:column;padding:4px 6px!important}
.pfEdPanel .pfEdIn{display:flex;flex-direction:column;gap:8px;height:100%;min-height:0;background:none!important;border:0!important;padding:14px 4px 2px!important;overflow:hidden;max-height:none}
.pfEdPanel .pfEdPrev{gap:10px}.pfEdPanel .pfEdPrev b{font-size:15px}
.pfEdPanel .pfEdB{flex:1;min-height:0;overflow:auto;padding-right:2px}
.pfEdPanel .frGrid{grid-template-columns:repeat(4,1fr);max-height:none}
.pfEdPanel .avPick{max-height:none;grid-template-columns:repeat(auto-fill,minmax(46px,1fr))}
.pfEdPanel .pfEdBtns{grid-template-columns:1fr 1fr;gap:8px}
.pfEdPanel .pfEdBtns .btn{min-height:34px!important;font-size:13px!important;padding:4px 10px!important}
.bioF{background:#0e1630!important;color:#fff3d6!important;border:2px solid #c9a24a!important;resize:none;height:auto!important;min-height:96px;text-align:left!important;font:500 14px "Alegreya Sans",sans-serif!important;padding:8px!important}
@media (max-width:1240px){#scrAcc.editing{flex-direction:column!important}.edwrap{position:fixed;z-index:40;left:50%;top:50%;transform:translate(-50%,-50%)}}
.accpanel{height:min(610px,calc(100dvh - 48px))!important}
.accpanel .btn:not(.accTabs .btn):not(#aGo):not(.avb){min-height:32px!important;font-size:12.5px!important;padding:5px 14px!important;line-height:1.15}
.accBtns{display:flex!important;justify-content:center;flex-wrap:wrap;gap:10px!important;margin:10px 0 4px!important}
.accBtns .btn{width:auto!important;min-width:170px}
#aDel{margin-top:2px}
.accRows>div{padding:6px 10px!important;min-height:40px}
.accRows .col{gap:6px!important}
.accRows .col .btn{align-self:stretch}
.accTabs{margin:2px 0 8px!important}
.frow .btn.sm{min-height:28px!important}
#aGo{min-height:38px!important;font-size:15px!important}
.edwrap>h2{font-size:17px!important;padding-left:18px!important;padding-right:18px!important}
#scrAcc.editing>.pwrap{align-self:center!important;margin-top:0!important;margin-bottom:0!important}
.regGrid .avPick{max-height:172px}
.regGrid .avPick{max-height:160px}
.gFake{min-height:34px!important}.accTabs{margin:0 0 6px!important}.accpanel .accSmall{margin-top:2px!important;line-height:1.2}#accBody .or{margin:0!important;line-height:1.1}
/* 25/11 (7): X de fechar EM CIMA do canto da moldura (cobre a pedra do canto), igual ao modelo do usuário — vale para todas as janelas */
.pwrap>.xclose{right:calc(var(--fr) * .3 - 20px)!important;top:calc(var(--fr) * .26 + 10px)!important;z-index:9!important}
body.mob .pwrap>.xclose{right:calc(var(--fr) * .3 - 16px)!important;top:calc(var(--fr) * .26 + 8px)!important}
/* telas de entrada compactas */
.accpanel.acc-small{width:min(440px,94vw)!important;height:auto!important}
.accpanel.acc-reg{width:min(760px,96vw)!important;height:auto!important}
.accpanel.acc-small .accGuest,.accpanel.acc-reg .accGuest{flex-direction:column!important;gap:4px!important;margin-top:8px}
.accpanel.acc-small .accGuest small{text-align:center!important}
.accpanel.acc-small .accIntro{font-size:13px}
.accWho{margin:0;font:600 13px "Alegreya Sans",sans-serif;color:#b9aed6;text-align:center}.accWho b{color:#fff3d6}
.accpanel.acc-small .accHello img{width:88px;height:88px}.accpanel.acc-small .accHello b{font-size:22px}
/* dono/moderador: nome em vermelho */
.stf,b.stf,.accChip b.stf{color:#ff4a4a!important;text-shadow:0 0 6px rgba(255,60,60,.45)}
.stfTag{display:inline-block;font:800 10.5px "Alegreya Sans",sans-serif;letter-spacing:.5px;text-transform:uppercase;background:#b81f1f;color:#fff;border:1px solid #ff8a8a;border-radius:3px;padding:1px 6px;margin-left:6px;vertical-align:middle}
.pwrap>.xclose{display:grid!important;place-items:center!important}.pwrap>.xclose::after{position:static!important;margin:0!important;transform:none!important;line-height:1!important}body.mob .pwrap>.xclose::after{font-size:18px!important}
.pwrap>.xclose::before{display:none!important;content:none!important}.pwrap>.xclose{padding:0!important;text-indent:0!important;letter-spacing:0!important}
body .pwrap>.btn.xclose,body.mob .pwrap>.btn.xclose,body.touch .pwrap>.btn.xclose{padding:0!important;min-width:0!important}
/* 25/11: antes do lançamento (contagem) e presente de lançamento */
.soon{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:6px 0}
.soon>small{font:700 13px "Alegreya Sans",sans-serif;color:#b9aed6;letter-spacing:2px;text-transform:uppercase}
.soonD{font:900 30px Cinzel,serif;color:#f2c96b;text-shadow:0 3px 0 #2a1604}
.cd{display:flex;gap:8px}.cd div{background:#0e1630;border:2px solid #c9a24a;border-radius:4px;min-width:64px;padding:6px 4px}.cd b{display:block;font:900 26px Cinzel,serif;color:#fff3d6}.cd span{font:700 11px "Alegreya Sans",sans-serif;color:#b9aed6}
.soonGift{display:flex;gap:12px;align-items:center;text-align:left;background:rgba(0,0,0,.25);border:1px dashed #c9a24a;border-radius:4px;padding:8px 12px;margin-top:4px}
.soonGift p{margin:0;font:500 13px/1.35 "Alegreya Sans",sans-serif;color:#d8d0ee}.soonGift p b:first-child{display:block;font:700 14px Cinzel,serif;color:#f2c96b;margin-bottom:2px}
.pfr.sk::after{content:"?";position:absolute;inset:0;display:grid;place-items:center;font:900 calc(var(--s) * .42) Cinzel,serif;color:#f2c96b;text-shadow:0 2px 0 #000;z-index:2}
.pfr.sk>img{filter:brightness(.25) grayscale(1)}
.giftOv{position:fixed;inset:0;z-index:80;display:grid;place-items:center;background:rgba(5,3,14,.78)}
.giftBox{width:min(420px,92vw);background:#16204a;border:3px solid #c9a24a;box-shadow:0 0 0 3px #2a1604,0 0 60px rgba(242,201,107,.35);border-radius:4px;padding:18px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.giftBox h3{margin:0;font:900 20px Cinzel,serif;color:#f2c96b}.giftBox p{margin:0;font:500 14px "Alegreya Sans",sans-serif;color:#e6defa}
.giftPx{background:none;border:0;cursor:pointer;padding:0;animation:giftBob 1.4s ease-in-out infinite}
.giftPx .pxs{width:150px;height:auto;filter:drop-shadow(0 0 16px rgba(242,201,107,.55))}
.giftBox.opening .giftPx{animation:giftShake .15s linear infinite}
@keyframes giftBob{50%{transform:translateY(-8px)}}@keyframes giftShake{25%{transform:rotate(-6deg)}75%{transform:rotate(6deg)}}
.giftRay{position:relative;padding:16px;background:radial-gradient(circle,rgba(255,226,140,.55),transparent 65%);animation:giftIn .7s ease-out}
@keyframes giftIn{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
.giftBtns{display:flex;gap:10px}.giftBtns .btn{min-width:120px}
.pwrap>.xclose[hidden],.pwrap>.btn.xclose[hidden]{display:none!important}
.accpanel.acc-soon{width:min(600px,94vw)!important;height:auto!important}
/* 25/11 (2ª versão): chat global no canto inferior esquerdo + janela de amigos (js/chat.js) */
#btnChat{position:relative;width:40px;height:40px;display:grid;place-items:center;padding:0;pointer-events:auto;cursor:pointer}
#btnChat svg{width:70%;height:auto;image-rendering:pixelated;pointer-events:none}
#btnChat>i{position:absolute;top:-6px;right:-6px;min-width:17px;height:17px;padding:0 3px;background:#c0392b;border:1px solid #4a0d08;color:#fff;font:900 11px/15px Nunito,sans-serif;font-style:normal;text-align:center}
#btnChat.new{animation:chPulse 1.2s ease-in-out infinite}@keyframes chPulse{50%{filter:brightness(1.4)}}
body.touch #btnChat{width:42px;height:42px}
#gchat{position:fixed;z-index:16;left:max(10px,env(safe-area-inset-left));bottom:calc(max(10px,env(safe-area-inset-bottom)) + 12px);width:min(380px,46vw);display:flex;flex-direction:column;gap:4px;pointer-events:none}
#gchat[hidden]{display:none!important}
.gcl{display:flex;flex-direction:column;gap:2px;max-height:170px;overflow:hidden;padding:4px 6px}
#gchat.open .gcl{max-height:min(260px,40vh);overflow-y:auto;pointer-events:auto;background:rgba(6,10,26,.42);border:1px solid rgba(201,162,74,.35)}
.gm{margin:0;font:600 13.5px/1.3 "Alegreya Sans",sans-serif;color:#fff;word-wrap:break-word;text-shadow:1px 1px 0 #0b0e17,-1px -1px 0 #0b0e17,1px -1px 0 #0b0e17,-1px 1px 0 #0b0e17}
.gm b{color:#f2c96b;cursor:pointer}.gm.me b{color:#7cd6ff;cursor:default}.gm b.stf{color:#ff6b6b}
.gcf{display:flex;gap:6px;pointer-events:auto;margin:0}.gcf[hidden]{display:none}
.gcf input{flex:1;min-width:0;padding:7px 9px;font:600 14px "Alegreya Sans",sans-serif;color:#fff;background:rgba(6,10,26,.55);border:2px solid rgba(201,162,74,.55);outline:0}
.gcb{pointer-events:auto;align-self:flex-start;position:relative;width:40px;height:40px;display:grid;place-items:center;cursor:pointer;background:rgba(6,10,26,.45);border:2px solid rgba(201,162,74,.6);image-rendering:pixelated}
.gcb:hover{background:rgba(6,10,26,.7)}.gcb i{position:absolute;top:-4px;right:-4px;width:12px;height:12px;background:#4bd37b;border:2px solid #0e2a14;font-size:0}
body.touch #gchat{bottom:calc(max(10px,env(safe-area-inset-bottom)) + 170px);width:min(300px,52vw)}
@media (max-height:500px){#gchat,body.touch #gchat{bottom:calc(max(6px,env(safe-area-inset-bottom)) + 96px)}.gcl{max-height:96px}.gm{font-size:12px}}
#hud:not(.hidden)~#gchat{}
#chatBox{position:fixed;z-index:58;right:max(10px,env(safe-area-inset-right));top:calc(max(8px,env(safe-area-inset-top)) + 58px);width:min(380px,calc(100vw - 20px));max-height:min(540px,calc(100dvh - 80px));display:flex}
#chatBox[hidden]{display:none!important}
.chp{flex:1;display:flex;flex-direction:column;min-height:0;background:rgba(14,22,52,.94);border:3px solid #c9a24a;box-shadow:0 0 0 2px #2a1604,0 10px 30px rgba(0,0,0,.55);padding:8px 10px;gap:8px}
.chh{display:flex;align-items:center;justify-content:space-between}.chtt{display:flex;align-items:center;gap:8px;font:700 16px Cinzel,Georgia,serif;color:#f2c96b;text-shadow:1px 1px 0 #2a1604}
.chh .plx{width:28px;height:28px}
.chb{display:flex;flex-direction:column;gap:6px;min-height:0;flex:1;overflow-y:auto}
.chsub{margin:2px 0 0;font:700 12px Cinzel,serif;color:#b9aed6;letter-spacing:.04em}
.chc{display:flex;flex-direction:column;gap:5px}
.chr{display:flex;align-items:center;gap:8px;padding:5px 6px;cursor:pointer;background:rgba(4,8,24,.5);border:1px solid #2c3f75}
.chr:hover{background:rgba(40,60,140,.35)}.chr.off{opacity:.72}
.chface{position:relative;flex:none}.chface .dot{position:absolute;right:-2px;bottom:-2px;width:10px;height:10px;background:#5c6378;border:2px solid #0b0e17}.chface .dot.on{background:#4bd37b}
.chav0{display:grid;place-items:center;width:36px;height:36px;background:#2a3245;color:#f2c96b;font:800 16px Cinzel,serif;border:2px solid #c9a24a}
.chnm{flex:1;min-width:0;display:flex;flex-direction:column}.chnm b{font:700 15px "Alegreya Sans",sans-serif;color:#fff2cf;text-shadow:1px 1px 0 #000}.chnm b.stf{color:#ff6b6b}.chnm small{font:600 12px "Alegreya Sans",sans-serif;color:#9aa6d0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chun{font-style:normal;min-width:18px;height:18px;padding:0 4px;background:#c0392b;color:#fff;font:900 11px/18px Nunito,sans-serif;text-align:center}
.chbt{display:flex;gap:4px;flex:none}.chbt .btn,.chth .btn{padding:4px 9px!important;min-height:0!important;font-size:12px!important}
.chth{display:flex;align-items:center;gap:8px}.chth b{display:block;font:700 15px Cinzel,serif;color:#f2c96b}.chth small{font:600 12px "Alegreya Sans",sans-serif;color:#9aa6d0}.chth small.on{color:#4bd37b}
.chl{flex:1;min-height:180px;max-height:330px;overflow-y:auto;padding:6px 8px;background:rgba(0,0,0,.3);border:1px solid #2c3f75;user-select:text;-webkit-user-select:text}
.chm{margin:0 0 4px;font:500 14px/1.3 "Alegreya Sans",sans-serif;color:#f1e4c3;word-wrap:break-word}.chm em{font-style:normal;font-size:11px;color:#7a84a0}.chm b{color:#f2c96b}.chm.me b{color:#7cd6ff}.chm i{font-size:11px;color:#9aa6d0}
.chempty{margin:auto;padding:10px;text-align:center;font:500 13px "Alegreya Sans",sans-serif;color:#8a80a8}
.chf{display:flex;gap:6px;align-items:center;margin:0}.chf .field{margin:0;text-align:left;padding:7px 9px;font-size:14px}.chf .btn{flex:none}
.chcen{display:flex;justify-content:center;padding:6px}
.dot{display:inline-block}
