@font-face{font-family:Fredoka;src:url('assets/fredoka.ttf') format('truetype');font-style:normal;font-weight:300 700;font-display:swap}
:root{color-scheme:light;--ink:#2b3a67;--dim:#53658f;--pink:#ff6b9d;--yel:#ffd23f;--grn:#3ddc84;--blu:#4da6ff;--red:#ff5d5d;--text:var(--ink);--muted:var(--dim);--gold:#956000;--green:#249b61;--border:#dbe7ff;font:500 15px/1.4 Fredoka,system-ui,sans-serif}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{margin:0;color:var(--ink);background:#69c6a0}

button,a,select{font:inherit}
button,a{touch-action:manipulation}
button{--button:var(--blu);--shadow:#2a7acc;min-height:44px;border:0;border-radius:14px;background:var(--button);box-shadow:0 4px 0 var(--shadow);color:var(--ink);padding:9px 15px;font-weight:650;cursor:pointer;transition:transform .12s,box-shadow .12s}
button:hover:not(:disabled){transform:translateY(-2px)}
button:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 var(--shadow)}
button:disabled{opacity:.45;cursor:default}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid var(--ink);outline-offset:4px}
.primary{--button:var(--pink);--shadow:#c9406f}
a{color:var(--ink);text-decoration:none}
a:hover{text-decoration:underline}
main,.layout,.play{width:100%;height:100%;margin:0;min-width:0}
header{position:absolute;z-index:4;top:max(12px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));display:flex;align-items:center;gap:14px;pointer-events:none}header>*{pointer-events:auto}
.brand{font-size:30px;line-height:1.1;font-weight:700;letter-spacing:.3px;color:#fff;text-shadow:0 2px 0 var(--pink),0 4px 0 #2b3a6755;white-space:nowrap}
.brand:hover{text-decoration:none}
.brand span{color:#fff35c;text-shadow:0 3px 0 #eea819,0 6px 0 #2b3a6726}
.tag{background:#fff;border-radius:99px;padding:5px 12px;box-shadow:0 3px 0 #2b3a6717;font-size:13px;font-weight:600}
.header-actions{margin-left:auto;display:flex;align-items:center;gap:13px}
.header-actions button,.header-actions>a{min-height:38px;padding:7px 14px;border-radius:99px;background:#fff;box-shadow:0 4px 0 #2b3a671f;font-size:14px;font-weight:600}
.header-actions>a{display:grid;place-items:center}


.hud{position:absolute;z-index:4;top:72px;left:max(16px,env(safe-area-inset-left));width:min(366px,calc(100% - 32px));display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 10px;padding:10px 12px;border:2px solid #fff;border-radius:18px;background:#fffffff2;box-shadow:0 4px 0 #17342626}
.hud-symbols{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.hud-icon{width:20px;height:20px;flex:none;vertical-align:middle;shape-rendering:crispEdges}
.hud-heading{display:flex;width:100%;justify-content:space-between;align-items:center;gap:12px}
.hud-location{min-width:0;display:grid;gap:3px}
.hud #place{font-size:15px;font-weight:650;overflow-wrap:anywhere}
#clock{display:grid;gap:1px;text-align:right;flex:none;font-variant-numeric:tabular-nums}
#day{font-size:12px;color:var(--dim)}#clock strong{display:flex;gap:6px;align-items:center;justify-content:flex-end;line-height:1.2}

.hud strong{font-size:19px;font-weight:650}
#party{display:flex;gap:5px}
.party-slot{position:relative;min-height:44px;width:44px;padding:0;border:2px solid #dbe7ff;border-radius:12px;background:#f4f8ff;box-shadow:none;flex-shrink:0}
.party-slot.first{border-color:var(--pink);background:color-mix(in srgb,var(--tc) 20%,#fff)}
.party-slot .portrait{width:36px;height:36px;background-size:108px auto;background-position:0 calc(var(--row)*-36px)}
.mini-hp{position:absolute;bottom:2px;left:5px;right:5px;height:3px;border-radius:3px;background:#dbe7ff;overflow:hidden}
.mini-hp i{display:block;height:100%;background:#23995d}
.fainted .portrait{filter:grayscale(1);opacity:.5}

.viewport{position:relative;width:100%;height:100dvh;min-height:0;background:#69c6a0;overflow:hidden;isolation:isolate}
canvas{display:block;width:100%;height:100%;image-rendering:pixelated;touch-action:none}
.location{display:none}
.map-label{position:absolute;bottom:10px;left:14px;padding:4px 9px;border-radius:8px;background:#ffffffe8;color:var(--ink);font-size:11px;pointer-events:none}
.message{position:absolute;top:76px;left:50%;transform:translateX(-50%);width:max-content;max-width:min(420px,calc(100% - 32px));padding:8px 13px;border:2px solid var(--yel);border-radius:13px;background:#fff;box-shadow:0 3px 0 #a57c2644;font-size:13px;text-align:center;opacity:0;transition:opacity .2s;pointer-events:none;z-index:5}
.message.show{opacity:1}
.viewport:has(.message.show) .location{visibility:hidden}
.viewport[data-mode=battle] .message{display:none}
.battle-banner{position:absolute;top:72px;right:16px;max-width:260px;padding:8px 12px;background:#fff4ed;border:2px solid #ff9d88;border-radius:13px;box-shadow:0 3px 0 #cb6a4540;font-size:13px}
.battle-banner strong{display:block;color:#b33c47}
.viewport:has(.battle-banner:not([hidden])) .location{display:none}
.context{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:2;width:min(620px,calc(100% - 28px));display:flex;gap:12px;justify-content:space-between;align-items:center;padding:12px 14px;border:2px solid #fff;border-radius:18px;background:linear-gradient(90deg,#fff,#f3f8ff);box-shadow:0 4px 0 #2b3a6740,0 8px 20px #2b3a6720}
.context>div:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}
.context small,.goal>small{font-size:11px;color:#ad315d;letter-spacing:1px;font-weight:650}
.context strong{font-size:18px;line-height:1.25;font-weight:650}
.context span{font-size:13px;color:var(--dim)}
.actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}
.actions button{white-space:nowrap;font-size:14px}
.actions button small{display:block;margin-top:2px;font-size:11px;letter-spacing:0;color:var(--ink);font-weight:400}
.actions kbd{font:inherit;font-weight:700}
.dialog-keys{display:block;margin-top:18px;color:var(--dim);font-size:12px}
.touch-controls{position:absolute;bottom:14px;left:14px;z-index:3}
.touch-hint{display:none}
.viewport:not([data-mode=walk]) .map-label{display:none}
.viewport:is([data-mode=battle],[data-mode=capture],[data-mode=end]) .touch-controls{display:none}
.dpad{display:grid;grid-template-columns:repeat(3,44px);gap:5px}
.dpad button{width:44px;height:44px;padding:0;user-select:none}
.dpad [data-dir=up]{grid-column:2}
.dpad [data-dir=left]{grid-column:1}
.dpad [data-dir=down]{grid-column:2}
.dpad [data-dir=right]{grid-column:3}
kbd{font:500 11px Fredoka,system-ui,sans-serif;margin-left:8px;padding:2px 5px;border:1px solid #2b3a6755;border-radius:4px}
h2{font-size:19px;font-weight:650;margin:0}
.section-title{display:flex;align-items:center;justify-content:space-between}
.section-title>small{padding:3px 9px;border-radius:99px;background:#fff;font-size:13px;font-weight:600}
.hint{font-size:12px;color:var(--dim);margin:5px 0 10px}
.pokemon{--tc:#9db7e8;display:flex;align-items:center;gap:8px;background:linear-gradient(135deg,color-mix(in srgb,var(--tc) 20%,#fff),#fff 72%);border:3px solid var(--tc);border-radius:18px;padding:10px 8px;margin:10px 0;box-shadow:0 4px 0 color-mix(in srgb,var(--tc) 65%,#60749a)}
.pokemon img{width:60px;height:60px;image-rendering:pixelated;flex-shrink:0}
.pokemon .info{flex:1;min-width:0}
.pokemon strong{font-size:16px;font-weight:650}
.pokemon small{display:block;font-size:12px;color:var(--dim)}
.pokemon .hp{height:7px;border-radius:6px;background:#e0e9f5;overflow:hidden;margin:7px 0 4px}
.pokemon .hp i{display:block;height:100%;border-radius:6px;background:#23995d;transition:width .2s}
.pokemon .reorder{--button:#edf4ff;--shadow:#b8ccec;min-height:36px;font-size:15px;padding:3px 9px}
.pokemon.fainted{filter:grayscale(.8);opacity:.65}
.notes{padding:15px 16px;background:#ffffffe8;border:2px solid #fff;border-radius:20px;box-shadow:0 4px 0 #98badb55}
.notes h2{font-size:17px}
footer{display:flex;justify-content:space-between;gap:6px;color:var(--dim);font-size:11px}
dialog{width:min(560px,calc(100vw - 28px));max-height:90dvh;padding:26px;color:var(--ink);border:3px solid #fff;border-radius:26px;background:linear-gradient(#fff,#f2f8ff);box-shadow:0 8px 0 #5e83b366,0 20px 70px #2b3a6733}
dialog::backdrop{background:#2b3a678c}
dialog h2{font-size:28px;line-height:1.15;margin:0 0 9px}
dialog p{font-size:15px;color:var(--dim)}
dialog .close{float:right;min-width:36px;min-height:36px;padding:0;background:#e6efff;box-shadow:none;font-size:25px}
dialog:has(#center-heal)>form{position:sticky;top:0;float:right;z-index:2}
dialog .choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:24px 0 7px}
.starter{--tc:#9db7e8;--shadow:color-mix(in srgb,var(--tc) 75%,#465c79);display:flex;flex-direction:column;align-items:center;gap:5px;padding:15px 4px;border:3px solid var(--tc);background:linear-gradient(color-mix(in srgb,var(--tc) 20%,#fff),#fff 85%);font-size:15px}
.starter small{font-size:12px;font-weight:400;color:var(--dim)}
.starter img{width:80px;height:80px;image-rendering:pixelated}
dialog .plan{display:flex;align-items:center;gap:10px;margin:12px 0;padding:10px 0;border-bottom:1px solid #dbe7ff}
dialog .plan img{width:48px;height:48px;image-rendering:pixelated}
dialog .plan label{flex:1;font-size:14px}
select{min-height:44px;padding:7px;background:#fff;border:2px solid #b7cdf1;border-radius:12px;color:var(--ink);max-width:100%}
dialog .bottom{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:20px}
dialog .bottom small{font-size:13px;color:var(--dim)}
.result{border-left:4px solid var(--yel);padding:5px 15px;margin:18px 0}
.result strong{display:block}
.result-top{display:flex;align-items:center;gap:18px}
.result-top p{margin:0}
.result-trainer{width:48px;height:96px;flex-shrink:0;background-image:url('assets/people.png');background-size:480px auto;background-position:0 calc(var(--person)*-96px);image-rendering:pixelated}
.result-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:22px 0}
.result-stats>div{display:flex;flex-direction:column;padding:12px 6px;text-align:center;background:#eaf3ff;border-radius:14px}
.result-stats b{font-size:23px}.result-stats span{font-size:12px;color:var(--dim)}
.result-team{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.result-team>div{display:flex;flex-direction:column;align-items:center;min-width:76px}.result-team strong{font-size:12px}.result-team small{font-size:11px;color:var(--dim)}
.save-error{color:#ad315d;font-weight:600}
body:has(dialog[open]){overflow:hidden}
body:has(dialog[open] .starter) .layout{visibility:hidden}
.portrait{display:inline-block;flex-shrink:0;width:56px;height:56px;background-image:url('assets/pokemon.png');background-size:168px auto;background-position:0 calc(var(--row)*-56px);background-repeat:no-repeat;image-rendering:pixelated;filter:drop-shadow(0 3px 1px #2b3a671c)}
.starter .portrait{width:80px;height:80px;background-size:240px auto;background-position:0 calc(var(--row)*-80px)}
@media(min-width:1000px){.touch-controls{display:none}}
@media(max-width:999px){.context{bottom:116px;flex-direction:column;align-items:flex-start}.context .actions{width:100%}.context .actions button{flex:1}.viewport:is([data-mode=battle],[data-mode=capture],[data-mode=end]) .context{bottom:14px}.map-label{left:auto;right:10px;max-width:calc(100% - 175px)}.desktop-hint{display:none}.touch-hint{display:inline}}
@media(max-width:760px){header{top:max(10px,env(safe-area-inset-top));left:12px;right:12px;gap:8px}.brand{font-size:25px}.header-actions{gap:7px}.header-actions button,.header-actions>a{min-height:40px;font-size:12px;padding:7px 10px}.hud{top:64px;left:12px;width:calc(100% - 24px);padding:8px 10px;gap:6px}.hud strong{font-size:17px}.hud #place{font-size:14px}#party{gap:4px}.context{padding:10px 12px;gap:8px}.context strong{font-size:17px}.context span{font-size:12px}.actions button{font-size:14px;padding:8px 13px}.message{top:190px;font-size:13px}.battle-banner{display:none}.pokemon{margin:0;flex-direction:row}.pokemon .info{width:100%}.notes{padding:14px}dialog{padding:20px}dialog .plan{flex-wrap:wrap}dialog .plan select{width:100%}dialog .bottom{flex-wrap:wrap}}
@media(max-width:360px){.brand{font-size:21px}.header-actions{gap:5px}.header-actions button,.header-actions>a{padding:7px 8px;font-size:11px}.hud{left:8px;width:calc(100% - 16px);padding:7px}.hud strong{font-size:16px}#party{gap:3px}.party-slot{width:42px;min-height:42px}.starter .portrait{width:64px;height:64px;background-size:192px auto;background-position:0 calc(var(--row)*-64px)}.starter{font-size:13px}dialog .choices{gap:8px}dialog{padding:17px}}
@media(max-height:500px) and (orientation:landscape){header{top:8px;left:10px;right:10px}.brand{font-size:24px}.header-actions button,.header-actions>a{min-height:36px;font-size:12px;padding:6px 10px}.hud{top:52px;left:10px;width:270px;padding:5px 8px;gap:4px 7px}.hud #place{font-size:12px}#clock{gap:0}#day{font-size:11px}.hud-icon{width:18px;height:18px}.hud strong{font-size:15px}.party-slot{min-height:34px;width:34px;border-radius:8px}.party-slot .portrait{width:28px;height:28px;background-size:84px auto;background-position:0 calc(var(--row)*-28px)}#party{gap:4px}.context{left:auto;right:12px;bottom:12px;transform:none;width:min(470px,calc(100% - 180px));flex-direction:row;align-items:center;padding:8px 10px}.context #context-kind,.context #context-desc{display:none}.context strong{font-size:15px}.context .actions{width:auto;flex-shrink:0}.context .actions button{font-size:13px;padding:6px 10px}.touch-controls{left:10px;bottom:12px}.message{top:54px;left:auto;right:12px;transform:none;max-width:44%}.battle-banner{display:none}}

.viewport[data-mode=battle] .hud,.viewport[data-mode=battle] .battle-banner{display:none}
.battle-controls{--turn:#3276af;--turn-soft:#edf6ff;position:absolute;z-index:3;top:64px;left:50%;bottom:auto;transform:translateX(-50%);width:min(420px,calc(100% - 24px));padding:9px;display:grid;gap:6px;border:3px solid var(--turn);border-radius:18px;background:#f8fbfffa;box-shadow:0 5px 0 #17342635,0 10px 24px #17342626}
.battle-controls[data-turn=enemy]{--turn:#c65754;--turn-soft:#fff0eb}.battle-controls[data-turn=won]{--turn:#26915a;--turn-soft:#e6faed}.battle-controls[data-turn=lost]{--turn:#9b586f;--turn-soft:#ffedf2}
.turn-heading{display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:46px;padding:4px 8px;border-radius:9px;background:var(--turn-soft);border-left:4px solid var(--turn)}.turn-heading strong{font-size:14px;color:var(--turn)}.turn-heading span{min-height:18px;line-height:18px;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.order-heading strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.order-heading small{font-size:10px;color:var(--dim);white-space:nowrap}
.move-orders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.move-order{min-width:0;min-height:44px;padding:5px 7px;text-align:left;border:2px solid color-mix(in srgb,var(--tc) 70%,#fff);border-radius:10px;background:color-mix(in srgb,var(--tc) 17%,#fff);box-shadow:0 2px 0 color-mix(in srgb,var(--tc) 60%,#8f9bb3)}.move-order strong{display:flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.move-order small{display:block;font-size:10px;color:var(--dim);white-space:nowrap}.move-order kbd{font-size:10px;margin:0;padding:0 4px;flex-shrink:0}.move-order.queued{border-color:var(--pink);box-shadow:0 2px 0 #c9406f,inset 0 0 0 1px var(--pink)}
.dodge{width:100%;display:block;min-height:67px;padding:7px 9px;border:2px solid #bacce9;background:#eef4ff;box-shadow:none;transform:none!important;text-align:left;touch-action:manipulation}.dodge:disabled{opacity:1}.dodge-heading{display:flex;align-items:center;justify-content:space-between;gap:6px}.dodge-heading strong{font-size:13px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dodge-heading kbd{font-size:10px;flex-shrink:0}.dodge>small{display:block;margin-top:4px;font-size:10px;color:var(--dim)}
.timing-track{position:relative;display:block;height:13px;margin:7px 0 2px;border-radius:5px;border:1px solid #d08b9a;background:#f4c9d4}.timing-good,.timing-perfect{position:absolute;top:0;bottom:0}.timing-good{left:var(--goodStart);width:calc(var(--goodEnd) - var(--goodStart));background:#60d59a}.timing-perfect{left:var(--perfectStart);width:calc(var(--perfectEnd) - var(--perfectStart));background:var(--yel);box-shadow:inset 1px 0 #9b7b20,inset -1px 0 #9b7b20}#timing-cursor{position:absolute;width:4px;top:-5px;bottom:-5px;margin-left:-2px;background:var(--ink);border:1px solid #fff;border-radius:2px;box-shadow:0 1px 2px #0004;pointer-events:none}
.dodge[data-active=false] .timing-track{opacity:.25}.dodge[data-active=true]{border-color:#ef9b80;background:#fff7ef}.dodge[data-result=good]{border-color:#28975e;background:#e8faed}.dodge[data-result=perfect]{border-color:#d4a300;background:#fff5c9;box-shadow:0 0 0 2px #ffd23f66}.dodge[data-result=miss]{border-color:#c34966;background:#ffedf1}
@media(max-width:360px){.turn-heading span{font-size:12px}.dodge-heading strong{font-size:12px}.move-order{padding:5px}.move-order strong{font-size:11px}}
@media(max-height:500px) and (orientation:landscape){.viewport[data-mode=battle] .brand{visibility:hidden}.battle-controls{width:min(760px,calc(100% - 84px));padding:6px;gap:4px;border-radius:12px}.turn-heading{min-height:24px;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px;padding:2px 5px}.turn-heading strong{font-size:11px;white-space:nowrap}.turn-heading span{font-size:11px}.order-heading small{display:none}.move-orders{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.move-order{min-height:44px;padding:3px 5px;border-radius:8px}.move-order strong{font-size:11px;gap:3px}.move-order small{font-size:9px}.move-order kbd{font-size:9px;padding:0 3px}.dodge{min-height:44px;padding:4px 6px;border-radius:8px}.dodge-heading strong{font-size:11px}.dodge-heading kbd{font-size:9px}.dodge>small{display:none}.timing-track{height:10px;margin:5px 0 0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}button:hover:not(:disabled){transform:none}}

.auth label{display:grid;gap:4px;margin:12px 0;font-weight:600}
.auth input{min-height:44px;padding:8px 10px;border:2px solid #b7cdf1;border-radius:12px;font:inherit;color:var(--ink)}
.error{color:#c0392b;min-height:1.2em;margin:4px 0}
.dex{display:flex;flex-wrap:wrap;gap:4px}
.dex .portrait{width:40px;height:40px;background-size:120px auto;background-position:0 calc(var(--row)*-40px);filter:none}
.dex .unknown{filter:brightness(0) opacity(.18)}
.shop-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.shop-row button{min-height:36px;padding:6px 11px;font-size:13px}
.shop-row button[aria-pressed=true]{--button:var(--yel);--shadow:#c9a227}
.chip{padding:6px 11px;border-radius:99px;background:#e6efff;font-size:13px;font-weight:600}
dialog h4{margin:12px 0 6px;font-size:14px}
.title{font-size:13px;font-weight:600;color:#ad315d}
.board{padding-left:24px}
.board li{padding:7px 10px;margin:5px 0;border-left:6px solid var(--frame);background:#f4f8ff;border-radius:10px}
.board span{display:block;font-size:13px;color:var(--dim)}
.day select{margin-left:6px}
.link{min-height:0;padding:0;background:none;box-shadow:none;font-weight:700;text-decoration:underline;color:var(--ink)}
.region li{margin:5px 0}.region .here{font-weight:700;color:#ad315d}.region .here::after{content:' ← tu jesteś'}
@media(max-width:520px){header .brand{display:none}}

/* ===== menu główne: pokeball + ranking (prototyp B) ===== */
.mv{position:fixed;inset:0;overflow:hidden;z-index:5;--s:min(64vh,540px,max(260px,calc(100vw - 480px)));background:radial-gradient(ellipse at 35% 55%,#fff0 30%,#2b3a6733 100%),linear-gradient(90deg,#fff3 0,#fff0 45%,#2b3a6722)}
.mv>*{position:absolute}
.mv-rays{left:50%;top:50%;width:200vmax;height:200vmax;margin:-100vmax 0 0 -100vmax;background:repeating-conic-gradient(#fff6 0 8deg,#fff0 8deg 16deg);animation:mvspin 120s linear infinite}
@keyframes mvspin{to{transform:rotate(360deg)}}@keyframes mvslide{to{background-position:200px 200px}}@keyframes mvbob{50%{transform:translateY(-12px)}}
.mv-pat{inset:-200px;opacity:.22;transform:rotate(-10deg);animation:mvslide 60s linear infinite;background-size:200px 200px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg%3E%3Ccircle cx='50' cy='50' r='24' fill='%23fff' stroke='%23ff6b8a' stroke-width='3'/%3E%3Cpath d='M26 50a24 24 0 0 1 48 0z' fill='%23ff6b8a'/%3E%3Cpath d='M26 50h48' stroke='%23ff6b8a' stroke-width='4'/%3E%3Ccircle cx='50' cy='50' r='7' fill='%23fff' stroke='%23ff6b8a' stroke-width='3'/%3E%3C/g%3E%3Cg transform='translate(100 100)'%3E%3Ccircle cx='50' cy='50' r='24' fill='%23fff' stroke='%234da6ff' stroke-width='3'/%3E%3Cpath d='M26 50a24 24 0 0 1 48 0z' fill='%234da6ff'/%3E%3Cpath d='M26 50h48' stroke='%234da6ff' stroke-width='4'/%3E%3Ccircle cx='50' cy='50' r='7' fill='%23fff' stroke='%234da6ff' stroke-width='3'/%3E%3C/g%3E%3Cg transform='translate(100 0) scale(.6)'%3E%3Ccircle cx='50' cy='50' r='24' fill='%23fff' stroke='%23ffb020' stroke-width='3'/%3E%3Cpath d='M26 50a24 24 0 0 1 48 0z' fill='%23ffb020'/%3E%3C/g%3E%3Cg transform='translate(0 100) scale(.6)'%3E%3Ccircle cx='50' cy='50' r='24' fill='%23fff' stroke='%233ddc84' stroke-width='3'/%3E%3Cpath d='M26 50a24 24 0 0 1 48 0z' fill='%233ddc84'/%3E%3C/g%3E%3C/svg%3E")}
.mv-logo{left:34px;top:12px;font-size:clamp(60px,12.5vh,108px);letter-spacing:-3px;transform:rotate(-3deg);z-index:3;font-weight:700;line-height:1;color:#fff;text-shadow:0 3px 0 #ff9ec0,0 6px 0 #ff6b9d,0 9px 0 #d63a78,0 14px 14px #2b3a6755,0 0 30px #fff8}
.mv-logo b{color:#fff35c;text-shadow:0 3px 0 #ffc21f,0 6px 0 #ff9a00,0 9px 0 #d97200,0 14px 14px #2b3a6755,0 0 30px #fff8}
.mv-ball{--r:calc(var(--s)/13);width:var(--s);height:var(--s);font-size:var(--r);left:7vw;top:calc(50% + 36px - var(--s)/2);animation:mvwob 5s ease-in-out infinite;transform-origin:50% 100%}
@keyframes mvwob{0%,80%,100%{transform:rotate(0)}84%{transform:rotate(-5deg)}88%{transform:rotate(5deg)}92%{transform:rotate(-3deg)}96%{transform:rotate(2deg)}}
.mv-ball::before{content:"";position:absolute;inset:-.3em;border-radius:50%;background:#2b3a67;box-shadow:0 .6em .8em #2b3a6745}
.mv-half{position:absolute;left:0;width:100%;height:50%;border:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font:inherit;font-weight:700;transition:transform .2s;color:#fff;overflow:hidden;cursor:pointer}
.mv-up{top:0;border-radius:var(--s) var(--s) 0 0;padding-bottom:1.3em;background:linear-gradient(#ff9a8a,#ff3d52);box-shadow:inset 0 .12em 0 #fff7,inset 0 -.2em 0 #0002}
.mv-lo{bottom:0;border-radius:0 0 var(--s) var(--s);padding-top:1.3em;background:linear-gradient(#fff,#d9e6ff);color:#2b50d0;box-shadow:inset 0 -.2em 0 #0001}
.mv-up:hover{transform:translateY(-.3em)}.mv-lo:hover{transform:translateY(.3em)}
.mv-half::before{content:"";position:absolute;left:-10%;top:-30%;width:120%;height:60%;border-radius:50%;background:linear-gradient(#fff5,#fff0);pointer-events:none}.mv-lo::before{display:none}
.mv-half em{font-style:normal;font-size:1.6em;animation:mvbob 3s ease-in-out infinite}.mv-half b{font-size:1.2em;text-shadow:0 .08em 0 #0002}.mv-lo b{text-shadow:none}.mv-half span{font-size:.38em;opacity:.9;font-weight:600}
.mv-core{position:absolute;left:50%;top:50%;width:26%;height:26%;margin:-13%;border-radius:50%;background:radial-gradient(#fff 40%,#e3ecff);border:.35em solid #2b3a67;display:grid;place-items:center;z-index:2;animation:mvpulse 1.6s ease-in-out infinite;pointer-events:none}
@keyframes mvpulse{50%{box-shadow:0 0 0 .3em #fff8,0 0 0 .6em #fff4}}
.mv-pills{display:flex;gap:10px;left:34px;bottom:22px;flex-wrap:wrap;max-width:60vw}
.mv-pill{padding:10px 20px;border:0;border-radius:30px;background:#fff;font:inherit;font-weight:700;color:var(--ink);box-shadow:0 4px 0 #0002;cursor:pointer}.mv-pill:hover{transform:translateY(-2px)}.mv-pill.go{background:var(--pink);color:#fff;box-shadow:0 4px 0 #c9406f}
.mv-top{right:0;top:12px;background:#fff;border-radius:40px 0 0 40px;padding:8px 20px 8px 8px;display:flex;gap:10px;align-items:center;box-shadow:0 5px 0 #0002;z-index:3;cursor:pointer}
.mv-av{width:48px;height:48px;border-radius:50%;background:linear-gradient(#ffe27a,#ffb020);display:grid;place-items:center;font-size:26px}
.mv-av{overflow:hidden}.mv-av img{width:56px;margin-top:6px;image-rendering:pixelated}.mv-top b{font-size:17px}.mv-top small{display:block;color:var(--dim);font-weight:400}
.mv-chip{background:#fff3c4;border-radius:14px;padding:5px 12px;font-weight:700;font-size:14px;box-shadow:0 3px 0 #f0cf62}
.mv-panel{right:18px;top:calc(50% + 36px - var(--s)/2);height:var(--s);width:370px;display:flex;flex-direction:column;background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 8px 0 #0002,0 18px 30px #2b3a6726}
.mv-hd{background:linear-gradient(#ffd45a,#ff9a1f);padding:12px 14px 14px 18px;color:#fff;text-shadow:0 2px 0 #0003;box-shadow:inset 0 -5px 0 #0001;display:flex;align-items:center;justify-content:space-between}
.mv-hd button{font:inherit;font-weight:700;font-size:13px;border:0;border-radius:20px;padding:6px 12px;background:#fff;color:#d97200;cursor:pointer;box-shadow:0 3px 0 #0002}
.mv-rt{font-size:22px;font-weight:700}
.mv-tabs{display:flex;gap:6px;padding:10px 12px 0}.mv-tabs button{flex:1;text-align:center;padding:6px;border-radius:20px;background:#eef3ff;font-size:14px;font-weight:700;color:var(--dim);box-shadow:none;cursor:pointer}.mv-tabs button[aria-pressed=true]{background:#ffd45a;color:var(--ink);box-shadow:0 3px 0 #e0a010}
.mv-rb{padding:10px 12px;display:grid;gap:7px;flex:1;align-content:start;overflow:auto}
.mv-r{width:100%;min-height:44px;border:0;box-shadow:none;text-align:left;display:flex;gap:10px;align-items:center;padding:8px 12px;border-radius:14px;background:#f1f5ff;font-weight:700;cursor:pointer}.mv-r:hover{filter:brightness(.97)}.mv-r.you{outline:2px solid #ffc21f}.mv-r{min-width:0}.mv-r b{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mv-r .uteam{display:flex;flex:none;flex-wrap:nowrap}.mv-r em{flex:none}
.mv-gap{text-align:center;color:var(--dim);line-height:.5}.mv-empty{text-align:center;color:var(--dim);padding:30px 10px;font-weight:600}.mv-empty small{display:block;margin-top:6px;font-weight:400}
.mv-r:nth-child(1){background:#fff1b8}.mv-r:nth-child(2){background:#e9eef7}.mv-r:nth-child(3){background:#ffe4d1}
.mv-r i{font-style:normal;flex:none;width:26px;height:26px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:13px}.mv-r em{margin-left:auto;font-style:normal;color:#3a7de0}
.mv-cb{margin:0 12px 14px;flex:none;display:flex;gap:12px;align-items:center;padding:10px 12px;border-radius:16px;background:linear-gradient(135deg,#c9f7d9,#bfe3ff);box-shadow:0 4px 0 #9ccfe8}
.mv-cb .ic{font-size:30px;width:52px;height:52px;border-radius:14px;background:#fff;display:grid;place-items:center}
.mv-cb b{display:block}.mv-cb small{display:block;color:#4a6a8a;font-weight:600}
@media(max-width:700px){ /* telefon: menu w jednej kolumnie, przewijane */
  .mv{display:flex;flex-direction:column;align-items:center;gap:22px;overflow:auto;padding:12px 16px 28px;--s:min(76vw,330px)}
  .mv>*{position:relative;flex:none}.mv-rays,.mv-pat{position:fixed}
  .mv-top{order:-1;align-self:flex-end;margin-right:-16px}
  .mv-logo{left:auto;top:auto;font-size:clamp(42px,13vw,64px);margin-bottom:-6px}
  .mv-ball{left:auto;top:auto;margin:.3em 0}
  .mv-pills{left:auto;bottom:auto;max-width:none;justify-content:center}
  .mv-panel{right:auto;top:auto;height:auto;min-height:330px;width:100%;max-width:420px}}

.mv{z-index:20;background:radial-gradient(ellipse at 50% 50%,#14203d55 0,#14203da6 100%);backdrop-filter:blur(1.5px) saturate(.75)}
.mv-top{border:0;font:inherit;color:var(--ink);text-align:left;min-height:0}
.mv-top .result-trainer{display:block;width:24px;height:48px;margin:0;background-size:240px auto;background-position:0 calc(var(--person)*-48px)}
a.mv-pill{display:inline-block;text-decoration:none}
.mv-r .portrait{width:28px;height:28px;background-size:84px auto;background-position:0 calc(var(--row)*-28px);filter:none}
.mv-cb{border:0;font:inherit;text-align:left}
body.menu-open header,body.menu-open .hud,body.menu-open .context,body.menu-open .map-label,body.menu-open .touch-controls,body.menu-open #location,body.menu-open #battle-banner,body.menu-open #message{display:none!important}
.bars div{display:grid;grid-template-columns:130px 1fr 36px;gap:8px;align-items:center;margin:5px 0;font-size:14px}.bars i{display:block;height:12px;border-radius:6px;background:linear-gradient(90deg,var(--pink),var(--yel))}.bars b{text-align:right}
.setr{display:grid;grid-template-columns:90px 1fr;align-items:center;gap:10px;margin:12px 0;font-weight:600}.setr input{accent-color:var(--pink)}

.cere{text-align:center}.cere h2{margin-top:6px}.cere button{margin-top:10px;min-width:160px}
.badge{width:120px;height:120px;margin:6px auto 14px;border-radius:50%;background:conic-gradient(from 20deg,#fff,var(--tc,#ffd23f),#fff8,var(--tc,#ffd23f),#fff);box-shadow:0 6px 0 #2b3a6733,0 0 0 6px #fff,0 0 30px var(--tc,#ffd23f);display:grid;place-items:center;animation:bspin 1.2s cubic-bezier(.2,1.4,.4,1) both}
.badge span{width:52px;height:52px;border-radius:50%;background:radial-gradient(#fff,var(--tc,#ffd23f));box-shadow:inset 0 -4px 0 #0002}
.badge.gold{--tc:#ffc21f}
@keyframes bspin{from{transform:scale(.2) rotate(-200deg);opacity:0}to{transform:none;opacity:1}}
.evo{position:relative;width:112px;height:112px;margin:10px auto}.evo>span{position:absolute;inset:0}.evo .portrait{width:112px;height:112px;background-size:336px auto;background-position:0 calc(var(--row)*-112px)}
.evo .from{animation:evofrom 2.2s steps(1) both}.evo .to{animation:evoto 2.2s steps(1) both}
.evo .portrait{animation:evoflash 2.2s ease-in both}
@keyframes evofrom{0%,30%,45%,60%,70%,80%,88%{opacity:1}35%,50%,65%,75%,84%,92%,100%{opacity:0}}
@keyframes evoto{0%,30%,45%,60%,70%,80%,88%{opacity:0}35%,50%,65%,75%,84%,92%,100%{opacity:1}}
@keyframes evoflash{0%{filter:none}20%,90%{filter:brightness(0) invert(1)}100%{filter:none}}
.caught .portrait{width:112px;height:112px;background-size:336px auto;background-position:0 calc(var(--row)*-112px);animation:bspin .8s cubic-bezier(.2,1.4,.4,1) both}
.confetti{position:fixed;inset:0;pointer-events:none;z-index:2147483647;overflow:hidden}.confetti i{position:absolute;top:-12px;width:8px;height:12px;border-radius:2px;animation:conf 2.2s ease-in forwards}
@keyframes conf{to{transform:translate(var(--x),105vh) rotate(720deg)}}

.boot{position:fixed;inset:0;z-index:30;display:grid;place-content:center;justify-items:center;gap:22px;background:radial-gradient(#2b3a67,#14203d);color:#fff;font-weight:600;transition:opacity .4s}
.boot .mv-logo{position:static;transform:rotate(-3deg)}.boot.done{opacity:0;pointer-events:none}
.boot-ball{width:56px;height:56px;border-radius:50%;background:linear-gradient(#ff5d6c 0 46%,#2b3a67 46% 54%,#fff 54%);box-shadow:0 0 0 4px #2b3a67;animation:mvwob 1s ease-in-out infinite;transform-origin:50% 100%}
.cere .result-trainer{display:block;margin:0 auto 6px}
.portrait.shiny{filter:hue-rotate(150deg) saturate(1.35) drop-shadow(0 0 4px #ffe14d)}
dialog:has(.kanto-map){width:min(780px,calc(100vw - 28px))}.kanto-map{display:block;width:100%;height:auto;font-family:Fredoka,sans-serif}.kanto-map text{fill:#284b43;font-size:15px;font-weight:600;paint-order:stroke;stroke:#e3efbe;stroke-width:4px;stroke-linejoin:round}.kanto-map .detail{font-size:12px;font-weight:400}.kanto-map .roads path{fill:none;stroke:#f7e9af;stroke-width:10px;stroke-linejoin:round}.kanto-map .roads .locked{stroke:#8b9d96;stroke-dasharray:9 7}.kanto-map .roads text{font-size:11px}.kanto-map circle{fill:#fff5ca;stroke:#758780;stroke-width:4px}.kanto-map .done circle{fill:#86d4a4;stroke:#31835b}.kanto-map .here circle{fill:#fa91b2;stroke:#9d3860}.kanto-links{columns:2;font-size:.85rem;padding-left:20px}.kanto-links li{break-inside:avoid;margin:5px 0}@media(max-width:500px){.kanto-links{columns:1}}
dialog:has(.kanto-map) h2{padding-right:48px}

/* Team reader: a quiet screen inside a Pokédex-like shell. */
.pokemon{padding:3px 8px 3px 3px;border-width:2px;border-color:#d7e4df;box-shadow:0 2px 0 #c4d6ce;background:#fff}
.pokemon-open{display:flex;align-items:center;gap:8px;flex:1;min-width:0;background:none;box-shadow:none;text-align:left;padding:7px 3px;border-radius:12px}
.pokemon-open>.info{display:block}.pokemon .hp{display:block}.pokemon-open>span:last-child{font-size:23px;color:#77938c}.pokemon.fainted{filter:none;opacity:1}
dialog:has(.team-device){width:min(900px,calc(100vw - 32px));padding:0;border:3px solid #ba4358;border-top-width:6px;border-radius:22px;background:#e8efed;max-height:92dvh;overflow:hidden;box-shadow:0 7px 0 #8e3249,0 22px 70px #16372c55}
dialog:has(.team-device)>form{position:absolute;right:13px;top:13px;z-index:2}
dialog:has(.team-device) .close{border:1px solid #963a4c;background:#fff5f3;color:#773347;min-width:40px;min-height:40px;border-radius:11px}
.team-device{--dex-ink:#28483f;--dex-dim:#5c726a;color:var(--dex-ink)}
.dex-device-heading{display:flex;align-items:center;gap:13px;background:#d9586b;color:#fff9ef;padding:17px 70px 17px 20px;border-bottom:3px solid #b64458}
.dex-device-heading h2{font-size:21px;margin:0;padding:0!important;display:flex;align-items:baseline;gap:9px}.dex-device-heading h2 small{font-size:13px;color:#ffe8dc;font-weight:500}
.dex-device-light{width:30px;height:30px;flex:none;border:4px solid #fff8ed;border-radius:50%;background:radial-gradient(circle at 35% 30%,#c3efff 0 20%,#61bfdb 22% 60%,#3690ad 65%);box-shadow:0 2px 0 #96394a}
.dex-ready{margin-left:auto;font-size:12px;color:#fff1e8}
.dex-workspace{display:grid;grid-template-columns:230px minmax(0,1fr);max-height:calc(92dvh - 82px)}
.dex-roster{padding:14px 12px;background:#e4ede8;border-right:1px solid #b9ccc2;overflow:auto;display:flex;flex-direction:column;gap:8px}
.dex-unit{display:flex;position:relative;align-items:center;gap:6px;min-height:70px;flex:none;width:100%;min-width:0;text-align:left;background:#f3f8f4;box-shadow:0 2px 0 #b9cdc0;border:2px solid transparent;border-radius:13px;padding:6px 7px;color:var(--dex-ink)}
.dex-unit.selected{border-color:#385d50;background:#fffdf5;box-shadow:inset 4px 0 var(--tc),0 2px 0 #385d50}
.dex-unit:hover:not(:disabled){transform:none;background:#fffdf5}.dex-unit .portrait{width:44px;height:44px;background-size:132px auto;background-position:0 calc(var(--row)*-44px)}
.dex-slot{font-size:10px;align-self:flex-start;color:#748c7b;font-variant-numeric:tabular-nums}.dex-unit-info{flex:1;min-width:0}.dex-unit-info strong{display:block;font-size:14px;overflow-wrap:anywhere;line-height:1.15}.dex-unit-info small{display:block;font-size:11px;margin:3px 0;color:var(--dex-dim)}
.dex-lead-mark{color:#c24b65;font-size:12px}.dex-empty{display:flex;align-items:center;min-height:58px;border:1px dashed #afc4b5;border-radius:12px;padding:7px 9px;color:#829988;font-size:10px}.dex-empty i{width:24px;height:24px;border:2px solid #bbcdc1;border-radius:50%;margin:auto;position:relative}.dex-empty i:before{content:'';position:absolute;left:0;right:0;top:9px;border-top:2px solid #bbcdc1}.dex-empty i:after{content:'';position:absolute;width:8px;height:8px;border:2px solid #bbcdc1;background:#e4ede8;border-radius:50%;top:6px;left:6px}
.dex-sheet{background:#fcfdf7;padding:20px 24px;overflow:auto;overscroll-behavior:contain;min-width:0}
.dex-identity{display:flex;align-items:center;gap:23px;margin-bottom:16px}.dex-display{position:relative;flex:none;display:grid;place-items:center;width:140px;height:132px;border:2px solid #adbfad;border-radius:14px;background:linear-gradient(#e4efdbcc,#cddcbe99),repeating-linear-gradient(0deg,transparent 0 3px,#678c5620 3px 4px);box-shadow:inset 0 3px 0 #a7bca749}
.dex-display:after{content:'';position:absolute;width:64px;height:19px;background:#486e3e14;border-radius:50%;bottom:20px}.dex-display .portrait{z-index:1;width:112px;height:112px;background-size:336px auto;background-position:0 calc(var(--row)*-112px);filter:drop-shadow(0 5px 1px #365d3320)}.dex-display .portrait.shiny{filter:hue-rotate(150deg) saturate(1.35) drop-shadow(0 3px 2px #dbb62c)}
.dex-display>span:last-child{position:absolute;left:8px;top:5px;font-size:10px;letter-spacing:1px;color:#5b7659}.dex-name{min-width:0;flex:1}.dex-name-line{display:flex;align-items:center;gap:8px}.dex-name h3{font-size:29px;line-height:1.08;margin:0 0 5px;overflow-wrap:anywhere;font-weight:650}.dex-level{font-size:14px;font-weight:600;color:var(--dex-dim)}.dex-shiny{color:#a77508;font-size:23px}.dex-types{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
.dex-type{display:inline-block;font-size:11px;font-weight:600;background:color-mix(in srgb,var(--type) 30%,#fff);border:1px solid color-mix(in srgb,var(--type) 70%,#6d7865);border-radius:6px;padding:2px 7px;color:#243d35;white-space:nowrap}
.dex-vitals{display:grid;grid-template-columns:1.3fr 1fr;gap:24px;margin:12px 0}.dex-meter-label{display:flex;align-items:baseline;justify-content:space-between;gap:6px;font-size:12px;margin-bottom:5px}.dex-meter-label strong{font-size:15px;font-variant-numeric:tabular-nums}.dex-meter-label small{font-size:11px;color:var(--dex-dim);font-weight:500}
.dex-hp,.dex-energy{display:block;height:6px;background:#dce6d9;border-radius:4px;overflow:hidden}.dex-hp i,.dex-energy i{display:block;height:100%;background:#43996a;border-radius:4px}.dex-hp.mid i{background:#b28b25}.dex-hp.low i{background:#c65b59}.dex-energy i{background:#d5ae41}.dex-roster .dex-hp{height:4px;margin-top:5px}
.dex-xp{margin:16px 0 20px}.dex-xp>div{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--dex-dim);margin-bottom:5px}.dex-xp small{font-size:11px}.dex-xp>span{display:block;height:3px;background:#dfe7e6;border-radius:3px;overflow:hidden}.dex-xp i{display:block;height:100%;background:#6a9eb3}
.dex-section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.dex-section-heading h4{margin:0;font-size:14px}.dex-section-heading>small{font-size:11px;color:var(--dex-dim)}.dex-move-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start}.dex-move{min-width:0;background:#fff;border:1px solid #cfdbce;border-left:4px solid var(--type);border-radius:10px;overflow:hidden}
.dex-move summary{list-style:none;display:flex;align-items:center;gap:7px;min-height:65px;padding:9px 10px;cursor:pointer}.dex-move summary::-webkit-details-marker{display:none}.dex-move-name{flex:1;min-width:0;font-size:13px;font-weight:600;overflow-wrap:anywhere}.dex-move-name small{display:block;font-size:10px;font-weight:400;color:var(--dex-dim);margin-top:3px}.dex-move-power{text-align:center;flex:none;min-width:24px}.dex-move-power b{font-size:16px;font-weight:600}.dex-move-power small{display:block;font-size:9px;color:var(--dex-dim)}.dex-move[open]{border-color:#91aa98}.dex-move summary:after{content:'+';font-size:14px;color:#65806e;align-self:flex-start}.dex-move[open] summary:after{content:'−'}
.dex-move-info{padding:0 10px 10px;border-top:1px solid #ecf0e8}.dex-move-info dl{display:flex;flex-wrap:wrap;gap:9px;margin:8px 0 0}.dex-move-info dt{font-size:10px;color:var(--dex-dim)}.dex-move-info dd{font-size:12px;font-weight:600;margin:0}.dex-move-info p{font-size:12px;margin:8px 0 0;color:var(--dex-dim)}
.dex-moves{margin-bottom:17px}.dex-disclosure{border-top:1px solid #dce5d8;padding:0}.dex-disclosure>summary{min-height:44px;display:flex;align-items:center;gap:9px;font-size:13px;font-weight:500;cursor:pointer;list-style:none}.dex-disclosure>summary::-webkit-details-marker{display:none}.dex-disclosure>summary:after{content:'+';margin-left:auto;font-size:17px;color:#6b8475}.dex-disclosure[open]>summary:after{content:'−'}.dex-disclosure>summary small{font-size:11px;color:var(--dex-dim)}
.dex-stats{padding:3px 0 15px}.dex-stats>div{display:grid;grid-template-columns:85px 1fr 38px;align-items:center;gap:10px;margin:8px 0;font-size:12px}.dex-stats i{height:5px;background:#e5ebdf;border-radius:3px;overflow:hidden}.dex-stats em{display:block;height:100%;background:#80a68b;border-radius:3px}.dex-stats b{text-align:right;font-weight:500}
.dex-matchups{padding:0 0 14px}.dex-matchup h4{font-size:11px;margin:9px 0 6px;color:var(--dex-dim);font-weight:500}.dex-matchup>div{display:flex;flex-wrap:wrap;gap:6px}.dex-match-chip{display:flex;align-items:center;gap:4px}.dex-match-chip b{font-size:10px;font-weight:500}.dex-evolution{display:flex;align-items:center;gap:12px;padding:3px 0 12px}.dex-evolution strong{display:block;font-size:14px}.dex-evolution small{display:block;color:var(--dex-dim);font-size:12px}.dex-muted{font-size:12px;color:var(--dex-dim)}
.dex-lead-action{margin-top:10px;font-size:11px;min-height:44px;padding:8px 12px;background:#386c57;box-shadow:0 2px 0 #234c3c;color:#fff9e8;border-radius:9px}.dex-alert{font-size:12px!important;padding:9px 12px;background:#fff0dc;border:1px solid #e3c299;border-radius:8px;color:#81512d!important;margin:0 0 14px}
@media(max-width:760px){header{flex-wrap:wrap}.header-actions{gap:5px}.header-actions button{padding:7px 9px}.brand{font-size:23px}}
@media(max-width:600px){header .brand{display:none}header .header-actions{margin-left:auto;gap:5px}header .header-actions button{font-size:11px;padding:7px 9px}dialog:has(.team-device){width:calc(100vw - 16px);max-height:94dvh;border-radius:17px}.dex-device-heading{padding:13px 62px 13px 13px;gap:9px}.dex-device-heading h2{font-size:18px}.dex-device-light{width:25px;height:25px;border-width:3px}.dex-ready{font-size:10px}.dex-workspace{display:flex;flex-direction:column;max-height:calc(94dvh - 71px)}.dex-roster{flex:none;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));padding:9px;gap:5px;border-right:0;border-bottom:1px solid #b9ccc2;overflow:visible}.dex-unit{min-height:60px;display:flex;justify-content:center;padding:3px;box-shadow:none;position:relative}.dex-unit .portrait{width:36px;height:36px;background-size:108px auto;background-position:0 calc(var(--row)*-36px)}.dex-unit-info{position:absolute;bottom:2px;left:3px;right:3px}.dex-unit-info strong,.dex-unit-info small,.dex-slot{display:none}.dex-lead-mark{position:absolute;top:0;right:2px;font-size:9px}.dex-roster .dex-hp{height:3px;margin:0}.dex-empty{min-height:60px;padding:2px}.dex-empty>span{display:none}.dex-empty i{width:20px;height:20px}.dex-empty i:before{top:7px}.dex-empty i:after{left:4px;top:4px}.dex-sheet{padding:17px;min-height:0}.dex-identity{gap:16px;margin-bottom:13px}.dex-display{width:108px;height:104px}.dex-display .portrait{width:96px;height:96px;background-size:288px auto;background-position:0 calc(var(--row)*-96px)}.dex-name h3{font-size:24px}.dex-vitals{gap:18px}.dex-move summary{padding:9px 7px;gap:5px}.dex-move-name{font-size:12px}.dex-move-name small{font-size:9px}.dex-move-power b{font-size:14px}.dex-move-power{min-width:20px}.dex-move summary:after{font-size:12px}.dex-xp{margin:13px 0 17px}}
@media(max-width:380px){.dex-device-heading h2 small{font-size:11px}.dex-ready{display:none}.dex-sheet{padding:14px}.dex-name h3{font-size:21px}.dex-identity{gap:12px}.dex-type{font-size:10px;padding:2px 5px}.dex-move-grid{grid-template-columns:1fr}.dex-move summary{min-height:53px}.dex-move-name small{font-size:10px}}

/* Current location: portraits only; names and rarity appear on hover, focus or tap. */
dialog:has(.location-menu){width:min(560px,calc(100vw - 24px))}
.location-menu h2{margin-bottom:4px}.location-menu>.hint{margin-top:0}
.location-pokemon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:8px;padding:8px 0 34px}
.location-pokemon{position:relative;display:grid;place-items:center;min-width:0;min-height:56px;padding:0;border-radius:12px;background:#eef5ff;box-shadow:none}
.location-pokemon .portrait{width:48px;height:48px;background-size:144px auto;background-position:0 calc(var(--row)*-48px)}
.location-tooltip{display:none;position:absolute;z-index:2;top:100%;left:0;width:100%;padding:5px 2px;border-radius:6px;background:var(--ink);color:#fff;font-size:10px;line-height:1.2;overflow-wrap:anywhere;pointer-events:none}
.location-tooltip small{display:block;font-size:9px;font-weight:400;margin-top:3px}
.location-pokemon:hover,.location-pokemon:focus{z-index:3}.location-pokemon:hover .location-tooltip,.location-pokemon:focus .location-tooltip{display:block}
@media(max-width:380px){header .header-actions{gap:4px}header .header-actions button{font-size:10px;padding:7px 6px}}

.location-menu [data-rarity="0"]{--rarity:#94a3b0}.location-menu [data-rarity="1"]{--rarity:#45945e}.location-menu [data-rarity="2"]{--rarity:#3984d7}.location-menu [data-rarity="3"]{--rarity:#a15acb}.location-menu [data-rarity="4"]{--rarity:#d4991b}
.location-pokemon[data-rarity]{border:2px solid var(--rarity);background:color-mix(in srgb,var(--rarity) 9%,white)}
.location-rarities{display:flex;flex-wrap:wrap;gap:5px 13px;margin:16px 0;font-size:11px;color:var(--dim)}.location-rarities>span{display:flex;align-items:center;gap:5px}.location-rarities i{width:10px;height:10px;border:2px solid var(--rarity);border-radius:3px}
.location-weather{margin-top:14px;border-top:1px solid var(--border);padding-top:12px}.location-weather h3{display:flex;align-items:center;gap:8px;font-size:14px;margin:0 0 5px}.location-weather h3 small{font-size:10px;background:#dcefe6;color:#276d49;padding:2px 7px;border-radius:8px}.location-weather .location-pokemon-grid{grid-template-columns:repeat(auto-fill,56px);padding-bottom:22px}.location-weather.current h3{color:#276d49}
/* Object actions use world coordinates; these rules also cover narrow and landscape screens. */
.viewport .context.at-object{bottom:auto;right:auto;transform:none;width:min(300px,calc(100% - 16px));max-height:calc(100% - 16px);overflow:auto;flex-direction:column;align-items:stretch;padding:10px 12px;gap:8px;border-radius:14px}
.viewport .context.at-object strong{font-size:16px}
#wild-tooltip{position:absolute;z-index:12;width:max-content;max-width:min(280px,calc(100% - 16px));padding:10px 13px;border:2px solid #c1d5cc;border-radius:12px;background:#fffffff5;color:var(--ink);box-shadow:0 4px 14px #254d432b;pointer-events:none;line-height:1.4}
#wild-tooltip[hidden]{display:none}
#wild-tooltip strong,#wild-tooltip span,#wild-tooltip small{display:block}
#wild-tooltip strong{font-size:16px}#wild-tooltip span{font-size:12px;margin-top:3px}#wild-tooltip small{font-size:11px;margin-top:4px;color:#536b65}
.map-approach-label{font-size:11px;font-weight:600;fill:#536e5c;paint-order:stroke;stroke:#f3efcf;stroke-width:3px}
.viewport .context.at-object #context-kind{display:block;font-size:10px}
.viewport .context.at-object #context-desc{display:block;font-size:12px}
.viewport .context.at-object .actions{width:100%}
.viewport .context.at-object .actions button{width:100%;white-space:normal}

/* Reaction follows the fighter; the command panel appears only during selection. */
.viewport>.dodge{position:absolute;z-index:4;width:min(180px,calc(100% - 16px));min-height:56px;padding:6px 8px;border-radius:10px;box-shadow:0 3px 8px #17342640}
.viewport>.dodge .dodge-heading strong{font-size:11px}.viewport>.dodge .dodge-heading kbd{font-size:9px}.viewport>.dodge .timing-track{height:12px;margin-top:7px}
.choice-clock{font-size:11px;color:var(--dim)}
.battle-team{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:34dvh;overflow:auto;grid-auto-rows:max-content;align-content:start}.battle-member{display:flex;align-items:center;gap:6px;min-width:0;min-height:64px;padding:5px;text-align:left}.battle-member-info{flex:1;min-width:0}.battle-member .portrait,.battle-member>img{width:40px;height:40px;flex-shrink:0;image-rendering:pixelated}.battle-member .portrait{background-size:120px auto;background-position:0 calc(var(--row)*-40px)}.battle-member .dex-hp{margin:4px 0}.battle-member strong,.battle-member small{display:block;overflow-wrap:anywhere}.battle-member strong{font-size:12px;line-height:1.2}.battle-member small{font-size:11px;line-height:1.25}#battle-switch{min-height:44px;font-size:12px}
@media(max-height:500px) and (orientation:landscape){.viewport>.dodge{width:170px;min-height:52px}.choice-clock{font-size:10px}}

@media(max-height:500px) and (orientation:landscape){.battle-controls .move-orders{grid-template-columns:repeat(2,minmax(0,1fr))}.battle-controls .turn-heading{flex-direction:column;align-items:flex-start;gap:0}.battle-controls .choice-clock{line-height:1.3}}
/* Move selection uses the same flowing dialog on desktop and phones. */
.move-manager{min-width:0}.move-manager h3{margin:18px 0 10px}.move-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px}.move-list button{text-align:left;min-height:52px;white-space:normal;overflow-wrap:anywhere}.move-list small,.move-active small{display:block;font-size:12px;line-height:1.6;font-weight:400;opacity:.85}.move-active{padding-left:24px;display:grid;gap:10px}.move-manager .bottom{padding:12px 0;margin-bottom:0}.dex-moves>button{margin-top:12px;min-height:44px}.move-manager button:focus-visible{outline:3px solid #3689af;outline-offset:2px}

/* Region preview: readable map labels keep their size on narrow screens. */
dialog:has(.region-map){width:min(940px,calc(100vw - 24px));padding:0;background:#f8f7ec;border:3px solid #fff9e7;border-radius:22px;color:#34544d}
dialog:has(.region-map)>form{position:absolute;right:17px;top:17px;z-index:2}
dialog:has(.region-map) .close{background:#fffdf3;border-color:#77958b;color:#34544d}
dialog:has(.region-map) .dialog-keys{display:block;padding:0 22px 14px;color:#6c8177}
.region-map-heading{padding:20px 76px 16px 23px;background:#fffdf5;border-bottom:1px solid #d7dfc9}
.region-map-heading>small{font-size:11px;letter-spacing:2px;font-weight:600;color:#7d9383}
.region-map-heading h2{font-size:29px;margin:4px 0 7px;color:#34544d}
.region-map-heading p{margin:0;font-size:13px;color:#668175;display:flex;align-items:center;gap:8px}
.map-location-dot{width:8px;height:8px;flex:none;background:#d56c7e;border-radius:50%}
.region-map-frame{overflow:auto;max-height:60dvh;scrollbar-color:#93b3a4 #e2e9d4;outline-offset:-3px;background:#86bbc9;overscroll-behavior:contain;scrollbar-width:thin}
.region-map-frame:focus-visible{outline:3px solid #be6a79}
.region-map-frame .region-atlas{width:100%;min-width:0;max-width:none;max-height:60dvh;border-radius:0}
.region-atlas text{font-family:Fredoka,sans-serif;stroke:none;fill:#36594d;font-size:14px;font-weight:500}
.region-atlas .map-road-edge{stroke:#929977;stroke-width:10;opacity:.6;fill:none;stroke-linecap:round}
.region-atlas .map-road{stroke:#f8edc9;stroke-width:7;fill:none;stroke-linecap:round}
.region-atlas .is-known .map-road{stroke:#e1b05e}
.region-atlas .is-locked .map-road-edge{display:none}
.region-atlas .is-locked .map-road{stroke:#768f83;stroke-width:5;stroke-dasharray:5 7}
.region-atlas .map-route-number rect{fill:#fbf7e4;stroke:#b1b59b;stroke-width:1.3}
.region-atlas .map-route-number text{font-size:11px;font-weight:600;fill:#576c59}
.region-atlas .is-known .map-route-number rect{fill:#f7e5ad;stroke:#c49b52}
.region-atlas .is-locked .map-route-number rect{fill:#d8e0ca;stroke:#8b9e8b}
.region-atlas .map-pallet-road{stroke:#f8edc9;stroke-width:6;stroke-linecap:round;fill:none}
.region-atlas .map-city>ellipse{fill:#7f9e74;opacity:.35}
.region-atlas .map-city-label rect{fill:#fffbee;stroke:#b4bda1;stroke-width:1.3}
.region-atlas .map-city-label text{font-size:14px;font-weight:600;fill:#34544b}
.region-atlas .is-done .map-city-label rect{fill:#e0efd2;stroke:#6e9c78}
.region-atlas .is-here .map-city-label rect{fill:#fff1ed;stroke:#c77986;stroke-width:2}
.region-atlas .map-player path{fill:#ce6579;stroke:#fff8e8;stroke-width:2.5}
.region-atlas .map-player circle{fill:#fff9eb;stroke:none}
.region-atlas .map-compass path{fill:#577d79;stroke:#f5edca;stroke-width:1.5}
.region-atlas .map-compass text{font-size:12px;fill:#466a66;letter-spacing:1px}
.region-atlas .map-sea-label{font-size:10px;letter-spacing:3px;fill:#426f7a;opacity:.8}
.map-legend{display:flex;flex-wrap:wrap;gap:10px 20px;padding:14px 22px;font-size:12px;border-bottom:1px solid #dce2d0;background:#fffdf4}
.map-legend>span{display:flex;align-items:center;gap:7px;white-space:nowrap}
.map-legend i{display:inline-block;flex:none;font-style:normal}
.legend-here{width:10px;height:10px;border-radius:50%;background:#ce6579}
.legend-known{width:22px;border-top:4px solid #d6aa5e;border-radius:2px}
.legend-locked{width:22px;border-top:3px dashed #768f83}
.legend-badge{color:#4f8b69;font-size:16px;line-height:12px}
.map-pan-hint{display:none}
.map-directory{margin:0 22px;border-bottom:1px solid #dce2d0;padding:13px 0;font-size:14px}
.map-directory:last-child{border:0;margin-bottom:10px}
.map-directory summary{cursor:pointer;font-weight:600}
.region-map .kanto-links{columns:2;list-style:none;padding:0;font-size:13px}
.region-map .kanto-links li{display:flex;flex-direction:column;gap:2px;margin:0 0 12px}
.region-map .kanto-links li span{font-size:12px;color:#718575}
@media(max-width:720px),(max-height:540px){dialog:has(.region-map){max-height:94dvh}.region-map-frame{max-height:49dvh}.region-map-frame .region-atlas{min-width:660px;max-height:none}.region-map-heading{padding:17px 64px 13px 17px}.region-map-heading h2{font-size:25px}.region-map-heading p{font-size:12px}.map-pan-hint{display:block;margin:0;padding:9px 16px;background:#edf1df;font-size:11px;color:#627b6c}.map-legend{padding:12px 16px;gap:10px 16px;font-size:11px}.map-directory{margin:0 16px}.region-map .kanto-links{columns:1}dialog:has(.region-map) .dialog-keys{padding-left:16px}.region-map-heading>small{font-size:9px}}

/* Backpack and gym presentation share the existing dialog and focus navigation. */
.pack,.gym-reward{width:min(740px,calc(100vw - 88px));max-width:100%;color:#31475f}
.pack-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.pack-heading h2{margin:4px 0 14px}.pack-wallet{display:flex;align-items:center;gap:7px;font-size:24px;font-weight:650}.pack-wallet small{font-size:13px;font-weight:400}.pack-icon{width:48px;height:48px;flex:none;vertical-align:middle}.pack-wallet .pack-icon{width:30px;height:30px}.pack>p>.pack-icon{width:28px;height:28px}
.pack-tabs{display:flex;gap:8px;padding:8px 0 18px;border-bottom:2px solid #e5eaf0;margin-bottom:18px}.pack-tabs button{flex:1;min-height:44px}.pack-tabs [aria-pressed=true]{background:#375d7d;color:white;box-shadow:0 3px 0 #24435e}
.pack-grid,.reward-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.pack-card{padding:18px 14px;background:#f5f8fb;border:2px solid #e0e8ed;border-radius:15px;display:flex;align-items:flex-start;flex-direction:column;min-width:0}.pack-card h3{font-size:17px;margin:12px 0 8px;overflow-wrap:anywhere}.pack-card h3 span{white-space:nowrap;color:#486d8e}.pack-card p{font-size:13px;line-height:1.5;margin:0 0 14px}.pack-card>button{margin-top:auto;width:100%;min-height:44px}.pack-card>.hint{margin-top:10px}.pack-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin-top:20px;padding-top:14px;border-top:2px solid #e0e8ed;font-size:12px}.pack-empty{padding:35px 16px;text-align:center;line-height:1.8;color:#647a8b}.item-detail>.pack-icon{width:64px;height:64px;display:block;margin-bottom:12px}.pack-targets{display:grid;gap:8px;margin:16px 0}.pack-targets button{display:flex;align-items:center;gap:10px;min-height:64px;text-align:left}.pack-targets [aria-pressed=true]{outline:3px solid #4b91bc}.pack-targets button span:not(.portrait){flex:1}
.badge-case{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:7px;padding:14px;background:#e6edf1;border:2px solid #d3dfe6;border-radius:16px;margin:14px 0}.badge-case button{position:relative;min-width:0;padding:5px;display:grid;place-items:center;border-radius:9px;box-shadow:none;background:#fff9e9;min-height:48px}.gym-badge{width:48px;height:48px;max-width:100%;flex:none;filter:drop-shadow(0 2px 0 #25344822)}.badge-case .missing{filter:grayscale(1);opacity:.35}.badge-case i{position:absolute;right:1px;top:1px;width:10px;height:10px;border-radius:50%;background:#e96286;border:2px solid #fff}.badge-case .gym-badge{width:100%;height:auto}.cere>.gym-badge{width:120px;height:120px;margin:15px auto}
.gym-reward{text-align:center}.reward-hero{display:flex;justify-content:center;align-items:center;gap:25px;margin:18px auto}.reward-hero>.gym-badge{width:116px;height:116px}.reward-gains{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;font-size:13px}.reward-gains b{padding:7px 10px;border-radius:8px;background:#edf5f8}.reward-options{text-align:left;margin-top:18px}.reward-compatible{display:flex;flex-wrap:wrap;margin-bottom:12px;gap:6px}.reward-compatible>span{display:flex;align-items:center;flex-direction:column;font-size:11px}.reward-compatible .portrait{width:48px;height:48px;background-size:144px auto;background-position:0 calc(var(--row)*-48px)}.reward-received{margin:22px 0;padding:18px;background:#edf7f1;border:2px solid #d0e9d9;border-radius:14px}.reward-costume{display:flex;text-align:left;align-items:center;gap:15px;background:#fff6d7;padding:8px 16px;margin-top:18px;border-radius:14px}.reward-costume>span:not(.result-trainer){flex:1}.reward-costume small{display:block;font-size:12px;margin-top:5px}.outfit-rewards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:24px}.outfit-rewards article{display:flex;align-items:center;text-align:center;flex-direction:column;gap:8px;padding:12px 8px;background:#f5f8fb;border:2px solid #e0e8ed;border-radius:12px;font-size:14px}.outfit-rewards small{font-size:12px}.outfit-rewards button{min-height:44px;width:100%}.gym-preview{display:flex;align-items:center;gap:15px;text-align:left;padding:15px;margin-top:18px;background:#edf5f8;border-radius:12px}.gym-preview p{margin:5px 0}.gym-preview small{font-size:12px}.gym-preview>.gym-badge{width:64px;height:64px}
.reward-entrance .reward-hero>.gym-badge{animation:badge-arrive 2.3s cubic-bezier(.2,.7,.2,1) both}.reward-skip{font-size:13px;color:#637888}.reward-entrance .badge-case .earned{animation:badge-slot 2.3s ease-out}.gym-reward .bottom{justify-content:center}.pack button:focus-visible,.gym-reward button:focus-visible{outline:3px solid #2685bb;outline-offset:3px}
@keyframes badge-arrive{0%{transform:translateY(-30px) scale(.35);opacity:0}35%{transform:translateY(0) scale(1.12);opacity:1}55%,100%{transform:scale(1);opacity:1}}@keyframes badge-slot{0%,55%{background:#e6edf1}100%{background:#fff9e9}}
#nearby-players{position:absolute;inset:0;pointer-events:none;z-index:3}#nearby-players button{position:absolute;pointer-events:auto;transform:translate(-50%,-100%);font-size:11px;min-height:26px;padding:3px 7px;border:1px solid #fff;box-shadow:0 2px 0 #263d5326;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;background:#edfaff;color:#254b63}#nearby-players button::before{content:'●';color:#2d9c86;margin-right:4px}.nearby-summary{display:flex;align-items:center;gap:20px}
@media(max-width:1000px){.header-actions{gap:5px}.header-actions button{padding:7px 9px}}
@media(max-width:600px){.pack,.gym-reward{width:calc(100vw - 66px)}.pack-grid,.reward-options{grid-template-columns:1fr}.pack-card{display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:12px;padding:14px}.pack-card>.pack-icon{grid-row:1/3}.pack-card h3{margin:0 0 8px}.pack-card p,.pack-card>.hint,.pack-card>.reward-compatible{grid-column:2}.pack-card>button{grid-column:1/-1;margin-top:12px}.pack-card>.hint+h3{grid-column:2}.pack-card>.hint{margin:0 0 5px}.pack-wallet{font-size:20px}.pack-wallet small{display:none}.badge-case{gap:4px;padding:9px}.badge-case button{padding:2px;min-height:30px}.outfit-rewards{grid-template-columns:1fr}.outfit-rewards article{display:grid;grid-template-columns:48px 1fr;column-gap:15px;text-align:left;align-items:center}.outfit-rewards .result-trainer{grid-row:1/4}.outfit-rewards button{grid-column:2}.reward-hero>.gym-badge{width:96px;height:96px}.reward-costume{gap:8px;padding:8px}.reward-costume b{font-size:14px}.reward-gains{font-size:12px}.header-actions{flex-wrap:wrap;justify-content:flex-end;gap:4px;max-width:75%}.header-actions button{padding:5px 8px;font-size:11px;min-height:32px}.brand{font-size:20px}.hud{top:92px}.message{top:220px}}
@media(max-height:500px) and (orientation:landscape){.pack,.gym-reward{width:min(740px,calc(100vw - 90px))}.reward-hero{margin:8px}.reward-hero>.gym-badge{width:70px;height:70px}.hud{top:54px}.header-actions{flex-wrap:nowrap;max-width:none}.brand{font-size:22px}}
@media(prefers-reduced-motion:reduce){.reward-entrance .reward-hero>.gym-badge,.reward-entrance .badge-case .earned{animation:none}.reward-hero{transition:opacity .1s}}

#nearby-players button::before{color:var(--peer-color,#2d9c86)}

dialog:has(.pack,.gym-reward){width:min(800px,calc(100vw - 28px))}.pack,.gym-reward{width:100%}.reward-options .pack-card{padding:16px}.reward-compatible .portrait{width:40px;height:40px;background-size:120px auto;background-position:0 calc(var(--row)*-40px)}.reward-hero{margin:10px auto}.reward-hero>.gym-badge{width:96px;height:96px}
@media(max-width:600px){dialog:has(.pack,.gym-reward){width:calc(100vw - 28px)}.pack,.gym-reward{width:100%}}

/* The clock and threat stay together; the party has its own dock. */
.hud-goal,.raid-status{width:100%;min-height:36px;padding:5px 9px;text-align:left;box-shadow:none;font-size:12px;border-radius:9px;line-height:1.35}
.hud-goal{background:#edf4ef;color:#355a49;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.raid-status{background:#f1ede5;color:#66533c;border:1px solid #d8c8ae}
.raid-status[data-stage="1"]{background:#fff3ce;border-color:#c69836;color:#6c4b10}
.raid-status[data-stage="2"],.raid-status[data-stage="3"],.raid-status[data-stage="4"]{background:#ffebe7;border-color:#bf5547;color:#8d302c;font-weight:650}
.party-dock{position:absolute;z-index:4;right:max(16px,env(safe-area-inset-right));bottom:max(42px,env(safe-area-inset-bottom));padding:8px;border:2px solid #fff;border-radius:16px;background:#fffffff2;box-shadow:0 4px 0 #17342626;max-width:calc(100% - 24px)}
.party-dock summary{min-height:44px;cursor:pointer;align-content:center;font-size:13px;font-weight:600}
.party-dock:not([open]) #party{display:none}
.party-dock #party{max-width:100%;overflow-x:auto;padding:2px}
.save-status{position:absolute;z-index:4;right:max(12px,env(safe-area-inset-right));bottom:max(7px,env(safe-area-inset-bottom));font-size:10px;padding:2px 6px;background:#ffffffe8;border-radius:5px;color:#47604d;max-width:45%;text-align:right}
.save-status.save-error{color:#a72e40;font-size:12px;font-weight:650}
.raid-dialog>.result-trainer{display:block;margin:0 auto 12px}.raid-dialog>small{display:block;color:#9a3834;font-weight:600}.raid-dialog h2{padding-right:32px}
.raid-stakes{padding:10px 12px;border-left:3px solid #b95447;background:#fff0e7;border-radius:7px}
.location-goal{padding:12px;margin:12px 0;background:#edf4ef;border-radius:12px}.location-goal h3{margin:5px 0}.location-goal p{margin:0;font-size:14px}
.event-history{margin-top:18px;border-top:1px solid #ccd8d0;padding-top:12px}.event-history summary{min-height:44px;align-content:center;cursor:pointer}.event-history ol{padding-left:20px;font-size:13px}.event-history li{margin:8px 0}
.viewport:is([data-mode=battle],[data-mode=capture],[data-mode=end]) .party-dock,.viewport:is([data-mode=battle],[data-mode=capture]) .speech-box{display:none}
body.menu-open :is(.party-dock,.speech-box,.save-status){display:none!important}
@media(min-width:601px){.party-dock summary{display:none}}
@media(max-width:600px){
 header .header-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:none;gap:4px}
 header .header-actions button{font-size:11px;min-height:32px;padding:5px 4px}
 .hud{top:92px}.hud-goal,.raid-status{min-height:32px}
 .party-dock{right:12px;bottom:max(96px,calc(env(safe-area-inset-bottom) + 86px));padding:4px 8px}
 .party-dock[open]{bottom:max(150px,calc(env(safe-area-inset-bottom) + 140px))}.party-dock[open] summary{margin-bottom:4px}.party-dock .party-slot{min-height:40px;width:40px}.party-dock .portrait{width:32px;height:32px;background-size:96px auto;background-position:0 calc(var(--row)*-32px)}
 .map-label{bottom:27px}.message{top:auto;bottom:50px}
}
@media(max-height:500px) and (orientation:landscape){.party-dock{top:56px;right:12px;bottom:auto}.save-status{bottom:4px}.map-label{bottom:25px}}

.raid-scene{position:absolute;z-index:6;bottom:max(34px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(440px,calc(100% - 24px));padding:14px 18px;border:2px solid #bc5554;border-radius:16px;background:#fff7ef;box-shadow:0 5px 0 #54252844}
.raid-scene strong{font-size:12px;color:#a73337;letter-spacing:1px}.raid-scene p{margin:7px 0 10px;font-size:17px;line-height:1.35}.raid-scene button{min-height:44px;padding:6px 12px;font-size:12px;background:#f1dfcf;box-shadow:none}
.viewport[data-raid] :is(.context,.party-dock,.touch-controls,.map-label,.speech-box){visibility:hidden}
.viewport[data-raid] .hud{visibility:hidden}
.viewport[data-raid] header{opacity:.35;pointer-events:none}
@media(max-width:600px){.raid-scene{bottom:max(24px,env(safe-area-inset-bottom));padding:12px}.raid-scene p{font-size:15px}}
@media(max-height:500px) and (orientation:landscape){.raid-scene{left:auto;right:12px;bottom:12px;transform:none;width:min(340px,45%);padding:9px 12px}.raid-scene p{font-size:14px}}

/* Dialogue stays inside the world; the speaker remains above the frame. */
.speech-box{position:absolute;z-index:12;bottom:14px;left:14px;right:14px;padding:12px 18px;background:#f8faf3;color:#263b50;border:6px double #304962;border-radius:2px;box-shadow:0 3px 0 #182d3d55;font-size:16px;line-height:1.5}
.speech-box strong{font-size:14px;color:#304962}.speech-box p{margin:5px 0 10px;max-width:76ch}.speech-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}.speech-actions button{min-height:44px;padding:7px 12px;background:#e4eceb;color:#263b50;border:1px solid #80949d;border-radius:2px;box-shadow:none;font-size:13px}.speech-actions button:focus-visible{outline:3px solid #304962;outline-offset:2px}
.viewport[data-talking] :is(.context,.touch-controls,.map-label,.party-dock,.message,.save-status){visibility:hidden}
@media(max-width:600px){.speech-box{bottom:8px;left:8px;right:8px;padding:9px 11px;font-size:14px}.speech-box strong{font-size:12px}.speech-actions{gap:5px}.speech-actions button{padding:6px 8px}}
@media(max-height:500px) and (orientation:landscape){.speech-box{left:12%;right:12%;bottom:6px;padding:6px 12px;font-size:13px}.speech-box p{margin:2px 0 4px}.speech-actions button{min-height:38px;padding:4px 9px}}

.speech-actions .speech-primary{background:#237b57;color:#fff;border-color:#185b40;box-shadow:0 2px 0 #185b40}.speech-actions .speech-primary:hover{background:#1b6849}
#dodge-help{display:block;font-size:11px;color:inherit;margin-top:3px}
@media(max-height:500px) and (orientation:landscape){.viewport[data-talking] :is(header,.hud){visibility:hidden}}
dialog:has(.pc-device){width:min(1080px,calc(100vw - 24px));padding:0;background:#e6eff0;border:4px solid #345665;border-radius:12px;color:#254552}dialog:has(.pc-device)>form{position:absolute;right:12px;top:12px;z-index:2}.pc-heading{display:flex;align-items:center;gap:12px;padding:20px 66px 20px 22px;background:#284956;color:#fff}.pc-heading h2{margin:0;flex:1;font-size:26px}.pc-heading h2 small{display:block;font-size:12px;font-weight:500;color:#bad6da}.pc-heading>b{font-size:12px}.pc-workspace{display:grid;grid-template-columns:180px minmax(0,1fr) 210px;gap:16px;padding:18px}.pc-workspace h3{margin:0 0 12px;font-size:16px}.pc-workspace h3 small{font-size:12px;color:#577482}.pc-team-grid{display:grid;gap:7px}.pc-mon{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;padding:5px 4px;border:2px solid transparent;background:#fff;border-radius:7px;color:#254552;min-height:82px;box-shadow:0 2px 0 #c1d2d5}.pc-mon strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;max-width:100%}.pc-mon small{font-size:10px;color:#54747b}.pc-mon .portrait{width:48px;height:48px;background-size:144px auto;background-position:0 calc(var(--row)*-48px)}.pc-mon img{width:48px;height:48px;image-rendering:pixelated}.pc-mon .dex-hp{width:80%;height:4px;margin:4px 0 0}.pc-mon.chosen{border-color:#268dd2;background:#dff1ff}.pc-mon.swap-target{border-color:#ba760c;background:#fff1c7}.pc-mon:focus-visible{outline:3px solid #146eae;outline-offset:2px}.pc-slot{position:absolute;top:3px;left:5px;font-size:9px;color:#78949c}.pc-team .pc-mon{display:grid;grid-template-columns:50px 1fr;text-align:left;min-height:64px;padding:4px 8px}.pc-team .pc-mon>.portrait,.pc-team .pc-mon>img{grid-row:1/4}.pc-team .pc-mon .dex-hp{width:100%;margin:0}.pc-box{background:#b9d7d2;border-radius:9px;padding:12px;position:relative}.pc-box-heading{display:flex;align-items:center;justify-content:space-between;gap:6px}.pc-box-heading button{padding:5px 8px;min-height:34px}.pc-box-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.pc-empty{min-height:82px;border:1px dashed #8dafac;border-radius:7px;background:#ffffff26;color:#5b777b;display:grid;place-items:center;font-size:11px}.pc-team .pc-empty{min-height:40px}.pc-empty-note{position:absolute;top:40%;left:10%;right:10%;text-align:center;padding:14px;background:#e8f5ed;pointer-events:none}.pc-inspect{align-self:start;background:#f7fbfc;border-radius:9px;padding:15px;display:flex;flex-direction:column;gap:10px}.pc-inspect h3{margin:0;font-size:20px}.pc-inspect p{font-size:13px;margin:0;line-height:1.6}.pc-preview{display:grid;place-items:center;min-height:110px;background:repeating-linear-gradient(0deg,#e3f0f2 0 2px,#d9e9ec 2px 4px);border:3px inset #b8d4da;border-radius:6px}.pc-preview .portrait{width:96px;height:96px;background-size:288px auto;background-position:0 calc(var(--row)*-96px)}.pc-preview img{width:96px;height:96px;image-rendering:pixelated}.pc-moves{display:grid;gap:4px}.pc-moves span{font-size:12px;padding:5px 8px;background:#e3edef;border-radius:3px}.pc-store{background:#315e89;color:#fff}.pc-inspect button{width:100%;font-size:13px;min-height:44px}.pc-inspect small{font-size:11px;color:#5f757a}.pc-inspect .pc-fainted{color:#a03d4b}.pc-instruction{color:#8b5b0c}.pc-device~.dialog-keys{padding:0 18px 12px;display:block}
@media(max-width:850px){.pc-workspace{grid-template-columns:minmax(0,1fr) 190px;gap:12px;padding:12px}.pc-team{grid-column:1/-1}.pc-team-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}.pc-team .pc-mon{display:flex;text-align:center;padding:5px 2px}.pc-team .pc-mon .dex-hp{width:80%}.pc-team .pc-empty{min-height:85px}.pc-box-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.pc-mon strong{font-size:10px}}
@media(max-width:560px){.pc-heading{padding:14px 48px 14px 12px;gap:7px}.pc-heading h2{font-size:21px}.pc-heading>b{font-size:10px}.pc-workspace{display:flex;flex-direction:column;padding:9px;gap:10px}.pc-team-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.pc-team .pc-mon{min-height:76px}.pc-team .pc-empty{min-height:76px}.pc-box{padding:9px}.pc-box-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.pc-box .pc-mon strong{display:none}.pc-box .pc-mon{min-height:72px;padding:3px 0}.pc-box .pc-empty{min-height:72px}.pc-box .pc-mon small{font-size:8px}.pc-inspect{display:grid;grid-template-columns:90px 1fr;gap:8px;padding:12px}.pc-preview{grid-row:1/4;min-height:90px}.pc-preview .portrait{width:80px;height:80px;background-size:240px auto;background-position:0 calc(var(--row)*-80px)}.pc-inspect h3{font-size:18px}.pc-moves,.pc-inspect button,.pc-inspect>small,.pc-instruction{grid-column:1/-1}.pc-moves{grid-template-columns:1fr 1fr}.pc-inspect .dex-type{font-size:10px}.pc-mon .portrait{width:40px;height:40px;background-size:120px auto;background-position:0 calc(var(--row)*-40px)}}
@media(max-width:560px){.pc-team-grid{grid-template-columns:repeat(6,minmax(58px,1fr));overflow-x:auto;padding-bottom:4px}.pc-box-grid{max-height:230px;overflow-y:auto;padding:2px;scrollbar-width:thin}.pc-inspect{grid-template-columns:68px 1fr}.pc-preview{min-height:68px}.pc-preview .portrait{width:64px;height:64px;background-size:192px auto;background-position:0 calc(var(--row)*-64px)}.pc-inspect .pc-moves{display:none}}
.pc-inspect .primary{background:#237b57;color:white;border-color:#185b40;box-shadow:0 3px 0 #185b40}.pc-inspect .primary:disabled{background:#c2d5cd;color:#5c766c;box-shadow:none}
.time-cost{position:relative;display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;width:34px;height:34px;margin:0 3px;cursor:help;flex:none;color:#23485d;line-height:1}.time-dial{position:relative;display:block;width:28px;height:28px;border:2px solid #345b70;border-radius:50%;background:conic-gradient(from var(--clock-start),#60b8df 0deg var(--clock-span),#f3f7f4 var(--clock-span) 360deg);box-shadow:0 1px 0 #ffffff80,inset 0 0 0 1px #ffffff80}.time-dial svg{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:#345b70;stroke-width:1.3}.time-dial i{position:absolute;left:calc(50% - 1px);bottom:50%;width:2px;background:#23485d;border-radius:1px;transform-origin:50% 100%}.time-hour{height:6px;transform:rotate(var(--clock-hour))}.time-minute{height:9px;transform:rotate(var(--clock-minute))}.time-dial:after{content:'';position:absolute;left:calc(50% - 2px);top:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:#23485d}.time-cost.time-danger .time-dial{border-color:#9c3e42;background:conic-gradient(from var(--clock-start),#ee9e86 0deg var(--clock-span),#fff5e9 var(--clock-span) 360deg)}.time-tip{display:none;position:absolute;z-index:50;right:0;bottom:calc(100% + 7px);width:max-content;max-width:min(260px,75vw);padding:8px 10px;border-radius:5px;background:#243e50;color:#fff;font:500 12px/1.4 Fredoka,system-ui,sans-serif;white-space:normal;text-align:left;box-shadow:0 3px 10px #172b3a40;pointer-events:none}.time-cost:hover .time-tip,.time-cost:focus-visible .time-tip,.time-cost[data-open] .time-tip{display:block}.time-cost:focus-visible{outline:2px solid #2b82b4;outline-offset:2px;border-radius:50%}.time-warning{font-size:11px;font-weight:500;color:#a13e35}.speech-primary .time-warning{color:#fff1b8}.speech-actions button:has(.time-cost){display:inline-flex;align-items:center;gap:5px;padding-top:3px;padding-bottom:3px}.speech-actions .time-cost{margin:0}.actions button small:has(.time-cost){display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap}.pack-card>small:has(.time-cost){display:flex;justify-content:center;align-items:center}.pack .hint:has(.time-cost){min-height:34px}
.speech-actions{align-items:center}#speech-time{display:inline-flex;align-items:center;max-width:100%;gap:5px}#speech-time[hidden]{display:none}#speech-time .time-warning{max-width:190px;color:#a13e35}.action-option{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px;flex:1}.action-option>.time-warning{grid-column:1/-1}.context .action-option .time-cost{font-size:12px}.viewport .context.at-object .action-option{width:100%}
.fxs{display:flex;flex-wrap:wrap;gap:3px;margin-top:3px}.fxc{display:inline-flex;align-items:center;gap:3px;padding:1px 6px 1px 3px;border-radius:999px;font-size:10px;font-weight:600;line-height:1.5;white-space:normal;background:#eef2ea;color:#2b3a2b;border:1px solid #cfd8c8}.fxc b{font-size:12px;line-height:1}
.fxc.up{background:#e3f6dc;border-color:#9bd48a;color:#1f5a14}.fxc.down{background:#fde7e3;border-color:#eba39a;color:#7d241a}.fxc.status{background:#f2e8fb;border-color:#c9a8e8;color:#5b2a85}.fxc.heal{background:#dff7ea;border-color:#8fd4af;color:#14603a}
.move-order .fxs{pointer-events:none}.move-order .fxc{font-size:9px;padding:0 5px 0 2px}.move-order .fxc b{font-size:10px}
.fxl{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:5px}.fxl li{display:flex;gap:7px;align-items:flex-start;font-size:12px;line-height:1.35;padding:5px 8px;border-radius:9px;background:#f3f6f0}.fxl li b{font-size:16px;line-height:1.2}.fxl li.up{background:#e8f7e2}.fxl li.down{background:#fdeeea}.fxl li.status{background:#f5edfc}.fxl li.heal{background:#e4f8ee}

/* Move identity: type colour + physical/special/status icon. */
.mv-tag{display:inline-block;font-size:11px;font-weight:600;line-height:1.4;padding:1px 7px;margin-right:6px;border-radius:6px;background:color-mix(in srgb,var(--type) 55%,#fff);border:1px solid color-mix(in srgb,var(--type) 80%,#444);color:#1d2b26}
.mv-cat{display:inline-block;font-size:11px;font-weight:500;white-space:nowrap}
.move-list button[style*="--type"],.move-active li[style*="--type"]{border-left:6px solid var(--type);background-image:linear-gradient(90deg,color-mix(in srgb,var(--type) 18%,transparent),transparent 45%)}
.move-active li[style*="--type"]{list-style:none;padding:6px 8px;border-radius:8px;margin-left:-24px}

.actions[data-tint="1"] button{--button:var(--kc);--shadow:color-mix(in srgb,var(--kc) 65%,#000)}

.map-poi path{fill:#fff3c4;stroke:#8c6b60;stroke-width:2}.map-poi.is-known path{fill:#ffd45a}
.journal{display:grid;gap:8px}.journal h2{margin:0}.j-tabs{padding:0 0 4px}.j-body{display:grid;gap:8px}.j-body h3{margin:6px 0 0;font-size:15px}
.j-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border:2px solid #dbe7ff;border-radius:14px;background:#fff}.j-card h3{margin:0 0 2px;font-size:15px}.j-card small{display:block;color:var(--dim);font-size:12px}
.j-card.on{border-color:var(--blu);background:#f3f9ff}.j-card.off{opacity:.55}.j-card button{flex:none}.j-quiet{--button:#e6efff;--shadow:#b7cdf1}
.j-bar{display:block;height:7px;margin:6px 0 2px;border-radius:5px;background:#dfe7f5;overflow:hidden}.j-bar i{display:block;height:100%;background:var(--grn)}
.j-say{margin:0;padding:11px 13px;border-left:4px solid var(--yel);border-radius:8px;background:#fff9e6}.j-steps{margin:4px 0;padding-left:22px;color:var(--dim);font-size:13px}.j-steps .ok{color:var(--green);text-decoration:line-through}.j-steps .now{color:var(--ink);font-weight:700}
.journal-track{background:#eef6ff;color:#1c4f8f;border:1px solid #bcd7f7}
.j-card>div{flex:1;min-width:0}
.dex-meta{display:block;margin:2px 0 4px;font-size:11px;color:var(--dex-dim,#5f7a74)}.nat-up{color:#1f9d5b}.nat-down{color:#d6455d}
.shop-deal{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:99px;background:#ffd23f;color:#5a3b00;font-size:11px;font-weight:700}.shop-old{text-decoration:line-through;opacity:.6;margin-right:4px}
.acct-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0}.acct-tiles div{padding:9px 6px;border-radius:12px;background:#eef4ff;text-align:center}.acct-tiles b{display:block;font-size:20px}.acct-tiles small{font-size:11px;color:var(--dim)}
/* Rozmowa: sam mały, półprzezroczysty przycisk zamiast karty z opisem. */
.viewport .context.at-object.talk{width:auto;padding:0;gap:0;border:0;background:none;box-shadow:none;overflow:visible}
.context.talk>div:first-child{display:none}
.viewport .context.at-object.talk .actions{width:auto}
.viewport .context.at-object.talk .actions button{width:auto;min-height:34px;padding:5px 14px;border:1px solid #ffffff55;border-radius:999px;background:#1b2a3acc;color:#fff;box-shadow:none;font-size:13px;opacity:.82}
.viewport .context.at-object.talk .actions button:hover,.viewport .context.at-object.talk .actions button:focus-visible{opacity:1}
/* Górny pasek: same ikony w kolorach (skrót klawiszowy w podpowiedzi), mały HUD. */
.header-actions{gap:8px}
.header-actions button.hb{width:40px;height:40px;min-height:40px;padding:0;display:grid;place-items:center;border:2px solid #fff;border-radius:50%;background:var(--hc);color:#fff;box-shadow:0 3px 0 #17342630;position:relative}
.hb svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hb:hover:not(:disabled){filter:brightness(1.08)}.hb:disabled{opacity:.5}
#pack-open{--hc:#e9863a}#team-open{--hc:#e5484d}#map-open{--hc:#34a56f}#location-open{--hc:#3b82f6}#journal-open{--hc:#8b5cf6}#account-open{--hc:#12a0b5}#menu-open{--hc:#5d6d84}
.hb.news::after{content:"";position:absolute;top:-2px;right:-2px;width:11px;height:11px;border-radius:50%;background:#ffd23f;border:2px solid #fff}
@media(max-width:760px){.header-actions{gap:5px}.header-actions button.hb{width:36px;height:36px;min-height:36px}.hb svg{width:20px;height:20px}}
.viewport .hud{width:auto;max-width:min(250px,calc(100% - 24px));padding:5px 9px;gap:3px 8px;border-width:1px;border-radius:12px;background:#ffffffc9;box-shadow:none;justify-content:flex-start}
.viewport .hud-heading{gap:10px}.viewport .hud #place{font-size:13px}
.viewport #clock{display:flex;align-items:center;gap:5px}.viewport #clock strong{font-size:13px}.viewport #day{font-size:11px}.viewport .hud .hud-icon{width:14px;height:14px}
.viewport .hud .hud-goal,.viewport .hud .raid-status{width:auto;max-width:100%;min-height:22px;padding:2px 8px;font-size:11px;border-radius:999px}
@media(max-width:760px){header .header-actions{display:flex;flex-wrap:nowrap;justify-content:flex-end;width:auto;max-width:none;gap:4px}.header-actions button.hb{width:32px;height:32px;min-height:32px}.hb svg{width:18px;height:18px}header .brand{font-size:19px}}
.quests{display:grid;gap:8px;margin:14px 0 4px}
dialog .quests button{display:grid;grid-template-columns:1fr auto;gap:2px 12px;align-items:center;width:100%;min-height:0;padding:11px 14px;text-align:left;color:var(--ink);background:#fff;border:2px solid var(--border);border-radius:16px;box-shadow:0 3px 0 #dbe7ff}
dialog .quests button:hover,dialog .quests button:focus-visible{border-color:var(--blu)}
dialog .quests b{font-size:16px}
dialog .quests small{grid-column:1;font-size:13px;color:var(--dim)}
dialog .quests em{grid-row:1/3;grid-column:2;font-style:normal;font-size:12px;padding:3px 10px;border-radius:99px;color:#fff;background:var(--blu)}
dialog .quests .active em{background:var(--gold)}
dialog .quests .done{opacity:.6}dialog .quests .done em{background:var(--green)}

.map-poi-link{fill:none;stroke:#8c6b60;stroke-width:2;stroke-dasharray:4 4}.map-landmark text{font:700 10px system-ui,sans-serif;fill:#3b2f2a;paint-order:stroke;stroke:#fff8e0;stroke-width:3px}.map-landmark path{stroke-linejoin:round}
.map-landmark .map-hit{fill:transparent;stroke:none}.map-landmark text{opacity:0;pointer-events:none;transition:opacity .12s}.map-landmark:hover text,.map-landmark:focus text{opacity:1}.map-landmark:hover{cursor:help}
.acct-tiles{grid-template-columns:repeat(4,1fr)}.acct-tiles b{color:var(--ink)}
.acct-tabs{display:flex;gap:6px;margin:14px 0 4px;padding:5px;border-radius:16px;background:#e6efff}
.acct-tabs button{flex:1;min-height:38px;padding:6px 8px;font-size:14px;background:transparent;box-shadow:none;color:var(--dim)}
.acct-tabs button[aria-selected=true]{background:#fff;color:var(--ink);box-shadow:0 2px 0 #b8ccec}
.acct-pane{min-height:260px}.acct-pane h4{margin:14px 0 6px}
.dex-head{display:flex;align-items:center;gap:12px;margin:10px 0 8px;font-size:14px}.dex-bar{flex:1;height:8px;border-radius:99px;background:#dbe7ff;overflow:hidden}.dex-bar i{display:block;height:100%;background:var(--grn)}
.cos-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
.cos{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-height:54px;padding:8px 11px;text-align:left;background:#fff;color:var(--ink);border:2px solid var(--border);box-shadow:0 3px 0 #dbe7ff;position:relative}
.cos b{font-size:14px}.cos small{font-size:12px;font-weight:500;color:var(--dim)}
.cos[aria-pressed=true]{background:#fff6cc;border-color:var(--yel);box-shadow:0 3px 0 #c9a227}
.cos.locked{background:#f2f6fc;box-shadow:none}.cos.ghost{justify-content:center;align-items:center;background:transparent;border-style:dashed;box-shadow:none}
.cos .sw{position:absolute;right:10px;top:10px;width:14px;height:14px;border-radius:50%}
@media(max-width:420px){.acct-tiles{grid-template-columns:repeat(2,1fr)}}
