/* Kanto Online — tema Pokémon (vermelho Poké Bola, azul e amarelo), pensado primeiro para celular. */
:root{
  --red:#f2711c;--red-dark:#b34a0a;--navy:#10306e;--navy-2:#08183d;--blue:#2a8bff;--yellow:#ffcb05;
  --cream:#fff8e1;--white:#fff;--ink:#1d2c5e;--muted:#c8d3f0;--ok:#3fbf6f;
  --radius:14px;--shadow:0 10px 30px rgba(0,0,0,.35);
  --safe-l:env(safe-area-inset-left,0px);--safe-r:env(safe-area-inset-right,0px);--safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* iPhone: nada de seleção de texto, lupa ou menu "Copiar" ao segurar os botões. */
html,body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
input,textarea,select{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
body{
  margin:0;min-height:100dvh;color:var(--white);font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:
    radial-gradient(circle at 50% 50%,transparent 0 9px,rgba(255,255,255,.05) 9px 11px,transparent 11px) 0 0/56px 56px,
    radial-gradient(ellipse at 50% -10%,rgba(255,150,40,.28),transparent 55%),linear-gradient(180deg,var(--navy) 0%,var(--navy-2) 100%) fixed;
  display:flex;justify-content:center;align-items:flex-start;
  padding:calc(10px + var(--safe-t)) calc(10px + var(--safe-r)) calc(10px + var(--safe-b)) calc(10px + var(--safe-l));
  touch-action:manipulation;overscroll-behavior:none;
}
button{font:inherit;font-weight:700;color:var(--ink);background:var(--white);border:2px solid var(--navy);border-radius:999px;padding:9px 16px;cursor:pointer;touch-action:manipulation;transition:transform .08s ease,background .15s}
button:active{transform:translateY(1px) scale(.98)}
button:hover{background:#eef3ff}
button:focus-visible{outline:3px solid var(--yellow);outline-offset:2px}
button:disabled{opacity:.5;cursor:default;transform:none}
button.primary,#auth-submit{background:var(--red);border-color:var(--red-dark);color:#fff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.2)}
button.primary:hover,#auth-submit:hover{background:#f04a22}
button.ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.6);padding:6px 12px;font-size:13px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);font-size:12px;font-weight:600;white-space:nowrap}
.chip.money{background:var(--yellow);color:var(--navy);border-color:#c79a00}

/* Poké Bola em CSS */
.pokeball{--s:64px;width:var(--s);height:var(--s);border-radius:50%;flex:none;position:relative;border:calc(var(--s)*.07) solid #111;
  background:linear-gradient(180deg,var(--red) 0 46%,#111 46% 54%,#fff 54% 100%);box-shadow:0 4px 12px rgba(0,0,0,.35)}
.pokeball::after{content:"";position:absolute;inset:50% auto auto 50%;width:28%;height:28%;transform:translate(-50%,-50%);border-radius:50%;background:#fff;border:calc(var(--s)*.06) solid #111}
.pokeball.small{--s:28px}

/* ------------------------------------------------------------ Login */
.auth-shell{width:min(100%,980px);display:grid;grid-template-columns:1.1fr 1fr;gap:40px;align-items:center;padding:24px 0}
.brand{display:flex;align-items:center;gap:16px}
.logo-img{display:block;width:min(100%,440px);height:auto;filter:drop-shadow(0 8px 18px rgba(0,0,0,.45))}
.logo{font-weight:900;font-size:clamp(34px,6vw,54px);line-height:.95;letter-spacing:1px;color:var(--yellow);
  -webkit-text-stroke:3px var(--blue);paint-order:stroke fill;text-shadow:0 4px 0 var(--navy-2);text-transform:uppercase}
.auth-intro h1{font-size:clamp(24px,3.6vw,34px);line-height:1.2;margin:22px 0 8px}
.auth-intro p{font-size:16px;line-height:1.55;color:var(--muted);max-width:420px;margin:6px 0}
.auth-map{height:220px;max-width:400px;margin:22px 0 10px;background:url('../mapas/pallet-town-1.png') center/cover;image-rendering:pixelated;border:4px solid #fff;border-radius:var(--radius);box-shadow:var(--shadow),0 0 0 4px var(--red)}
.auth-note{font-size:13px!important}
.auth-panel{background:var(--cream);color:var(--ink);padding:26px;border-radius:20px;border:4px solid var(--blue);box-shadow:var(--shadow),inset 0 0 0 3px #fff}
.auth-tabs{display:flex;gap:8px;margin-bottom:20px;background:#e8ecf7;padding:5px;border-radius:999px}
.auth-tabs button{flex:1;border:0;background:transparent;color:var(--ink)}
.auth-tabs [aria-selected="true"]{background:var(--red);color:#fff;box-shadow:0 2px 0 var(--red-dark)}
#account-form{display:grid;gap:8px}
#account-form>label{margin-top:8px;font-size:14px;font-weight:700}
#account-form>input{width:100%;padding:13px 14px;font:inherit;font-size:16px;background:#fff;border:2px solid #b7c3e3;border-radius:12px;color:var(--ink)}
#account-form>input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(42,117,187,.25)}
#account-form small{font-size:12px;color:#5b6890}
#signup-fields{border:0;padding:0;margin:16px 0 6px}
#signup-fields legend{font-weight:800;margin-bottom:12px}
.gender-options{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:8px}
.gender-card{display:grid;justify-items:center;gap:8px;border:3px solid #c9d3ee;border-radius:14px;padding:12px;cursor:pointer;font-size:14px;background:#fff}
.gender-card:has(input:checked){border-color:var(--red);background:#fff1ec}
.gender-card input{accent-color:var(--red)}
.trainer-preview{width:48px;height:72px;background-image:url('../assets/personagens-2.png');background-size:144px 1152px;image-rendering:pixelated;background-position:-48px 0}
.female-preview{background-position:-48px -576px}
#auth-submit{margin-top:16px;padding:14px;font-size:16px}
#auth-message{min-height:40px;font-size:13px;line-height:1.5;color:var(--red-dark)}

/* ------------------------------------------------------------ Jogo */
main#game-screen{width:min(100%,900px);display:flex;flex-direction:column;gap:10px}
.topbar{display:flex;align-items:center;gap:8px;padding:8px 10px;background:var(--red);border-radius:var(--radius);box-shadow:inset 0 -4px 0 var(--red-dark),var(--shadow);flex-wrap:wrap}
.topbar .trainer{display:flex;flex-direction:column;line-height:1.1;margin-right:auto;min-width:0}
.topbar #account-name{font-size:16px;font-weight:900;letter-spacing:.5px;overflow:hidden;text-overflow:ellipsis}
.topbar #account-character{font-size:11px;opacity:.85}
.hud{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 2px}
.hud h1{font-size:18px;margin:0 auto 0 0;color:var(--yellow);text-transform:uppercase;letter-spacing:1px;-webkit-text-stroke:1px var(--navy-2)}
.party-line{font-size:13px;color:var(--muted)}

.console{background:linear-gradient(180deg,#d9dbe6,#a9adc2);border-radius:22px 22px 44px 22px;padding:12px;box-shadow:var(--shadow),inset 0 2px 0 #fff,inset 0 -4px 0 #8a8ea6}
.screen{background:#2c2f3d;border-radius:12px;padding:10px;box-shadow:inset 0 0 0 3px #1a1c26}
.stage{position:relative;width:100%;aspect-ratio:768/640;overflow:hidden;background:#91d3aa;border-radius:4px;margin-inline:auto}
.stage img{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}.stage canvas{position:absolute;inset:0;width:100%;height:100%;image-rendering:auto}
.stage img{display:none}

.controls{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:14px 6px 4px}
.controls button{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.dpad{--k:50px;display:grid;grid-template-columns:repeat(3,var(--k));grid-template-rows:repeat(3,var(--k));margin:0}
.dpad button,.dpad .center{border:0;border-radius:6px;background:#2a2c38;box-shadow:inset 0 -4px 0 #15161d,0 2px 0 rgba(255,255,255,.4);padding:0;position:relative}
.dpad .center{border-radius:0;grid-row:2;grid-column:2;box-shadow:none}
.dpad .up{grid-row:1;grid-column:2;border-radius:8px 8px 0 0}.dpad .down{grid-row:3;grid-column:2;border-radius:0 0 8px 8px}
.dpad .left{grid-row:2;grid-column:1;border-radius:8px 0 0 8px}.dpad .right{grid-row:2;grid-column:3;border-radius:0 8px 8px 0}
.dpad button::after{content:"";position:absolute;inset:50% auto auto 50%;border:8px solid transparent;transform:translate(-50%,-50%)}
.dpad .up::after{border-bottom-color:#8a8ea6;margin-top:-4px}.dpad .down::after{border-top-color:#8a8ea6;margin-top:4px}
.dpad .left::after{border-right-color:#8a8ea6;margin-left:-4px}.dpad .right::after{border-left-color:#8a8ea6;margin-left:4px}
.dpad button:active,.dpad button.is-held{background:#1b1c25;box-shadow:inset 0 2px 0 #0e0f14}
.menu-buttons{display:flex;gap:10px;justify-content:center;align-self:end;padding-bottom:6px}
.pill{background:#7b7f96;color:#fff;border:0;border-radius:999px;padding:7px 14px;font-size:12px;letter-spacing:1px;text-transform:uppercase;box-shadow:inset 0 -3px 0 #5d6178}
.pill:hover{background:#8b8fa6}
.ab{display:flex;gap:14px;align-items:center;transform:rotate(-18deg)}
.round{width:62px;height:62px;border-radius:50%;padding:0;border:0;background:radial-gradient(circle at 35% 30%,#ff6a4a,var(--red) 55%,var(--red-dark));color:#fff;font-size:20px;font-weight:900;box-shadow:0 4px 0 #6d1606,inset 0 -3px 0 rgba(0,0,0,.2)}
.round span{display:inline-block;transform:rotate(18deg)}
.round.b{width:52px;height:52px;margin-top:26px;font-size:17px}
.round:active,.round[aria-pressed="true"]{transform:translateY(3px);box-shadow:0 1px 0 #6d1606}
.round:hover{background:radial-gradient(circle at 35% 30%,#ff7d60,var(--red) 55%,var(--red-dark))}

.toolbar{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.toolbar button{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.35);font-size:13px;padding:8px 14px}
.footer{display:flex;gap:6px 14px;flex-wrap:wrap;justify-content:space-between;font-size:12px;color:var(--muted)}
.footer #status{color:#fff;font-weight:700}

/* ------------------------------------------------------------ Diálogos */
dialog{max-height:calc(100dvh - 24px);overscroll-behavior:contain}
dialog::backdrop{background:rgba(10,16,40,.75)}
.library-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.library-head h2{margin:0}
#service-dialog{width:min(94vw,640px)}
#look-dialog{width:min(94vw,560px)}
.look-body{display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap;margin-top:12px}
#look-preview{width:144px;height:180px;image-rendering:pixelated;background:#7fa77f;border-radius:10px;border:3px solid #3d4363}
#look-parts{flex:1;min-width:220px;display:grid;gap:10px}
.look-row strong{display:block;font-size:13px;margin-bottom:4px}
.look-swatches{display:flex;flex-wrap:wrap;gap:6px}
.look-swatch{width:28px;height:28px;padding:0;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px #0006}
.look-swatch[aria-pressed="true"]{border-color:#ffcb05;box-shadow:0 0 0 2px #1a1d2c}
.look-actions{display:flex;justify-content:flex-end;margin-top:12px}
#service-content p{line-height:1.5}
#service-message{min-height:24px;margin-top:14px}
.bag-list{display:grid;gap:8px}
.bag-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #d5dbe8}
.starter-choices,.shop-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.shop-tabs [aria-pressed="true"]{background:var(--yellow);border-color:#c79a00}
.shop-fields{display:grid;grid-template-columns:1fr 120px;gap:14px;margin:16px 0}
.shop-fields label{display:grid;gap:6px;font-size:14px}
.shop-fields input{font:inherit;font-size:16px;width:100%;padding:10px;border:2px solid #b7c3e3;border-radius:10px}
.shop-total{display:block;margin:16px 0}

/* Mapa de Kanto */
.town-map-dialog{width:min(96vw,860px);padding:16px}
.town-map-dialog .library-head h2{font-family:system-ui,sans-serif;font-weight:900;color:var(--red);text-transform:uppercase;letter-spacing:1px}
.map-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:14px;margin-top:12px}
.map-frame{background:var(--navy);padding:8px;border-radius:12px;box-shadow:inset 0 0 0 3px var(--blue)}
#town-map{display:block;width:100%;height:auto;aspect-ratio:408/400;border-radius:6px;cursor:crosshair;touch-action:manipulation}
.map-side{display:flex;flex-direction:column;gap:8px;min-height:0}
.dest-select{display:grid;gap:4px;font-size:13px;font-weight:700}
.dest-select select{font-size:16px;padding:8px;border-radius:10px}
.dest-caption{margin:0;font-size:13px;color:#5b6890}
.dest-list{overflow:auto;max-height:300px;display:grid;gap:10px;padding-right:4px}
.dest-group{display:flex;flex-wrap:wrap;gap:6px}
.dest-group h3{width:100%;margin:2px 0 0;font-size:12px;letter-spacing:1px;text-transform:uppercase;color:#5b6890}
.dest{font-size:13px;padding:6px 10px;border-radius:999px;border:2px solid #c9d3ee;background:#fff;color:var(--ink)}
.dest.is-city{border-color:#f3b3a3}
.dest.is-selected{background:var(--yellow);border-color:#c79a00}
.dest.is-here::after{content:" ●";color:var(--red)}
.dest.is-locked{opacity:.45}
#travel{width:100%;padding:13px;font-size:15px;margin-top:auto}

/* ------------------------------------------------------------ Responsivo */
@media (min-width:760px){
  body{align-items:center}
  .stage{width:min(100%,calc((100dvh - 330px)*1.2))}
}
@media (max-width:760px){
  .auth-shell{grid-template-columns:1fr;gap:18px;padding:6px 0;max-width:460px}
  .auth-map,.auth-note{display:none}
  .auth-intro h1{font-size:24px;margin-top:14px}
  .auth-panel{padding:18px}
  .pokeball{--s:48px}
  .map-layout{grid-template-columns:1fr}
  .dest-list{max-height:180px}
  .footer .keys{display:none}
}
@media (max-width:420px){
  .dpad{--k:44px}
  .round{width:56px;height:56px}.round.b{width:46px;height:46px}
  .controls{gap:6px}
  .topbar #online-count{display:none}
}
/* Celular deitado: direcional à esquerda, tela no meio, A/B à direita. */
@media (orientation:landscape) and (max-height:520px){
  body{padding:calc(4px + var(--safe-t)) calc(6px + var(--safe-r)) calc(4px + var(--safe-b)) calc(6px + var(--safe-l))}
  main#game-screen{width:100%;gap:4px}
  .hud,.footer,.toolbar{display:none}
  .topbar{padding:4px 8px}
  .console{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"pad screen ab";align-items:center;border-radius:18px;padding:8px;gap:8px}
  .screen{grid-area:screen;padding:6px}
  .stage{width:auto;height:calc(100dvh - 92px);aspect-ratio:768/640}
  .controls{display:contents}
  .dpad{grid-area:pad}
  .ab{grid-area:ab;flex-direction:column-reverse;transform:none;gap:10px}
  .round span{transform:none}.round.b{margin-top:0}
  .menu-buttons{position:fixed;top:calc(6px + var(--safe-t));left:50%;transform:translateX(-50%);padding:0}
}
@media (prefers-reduced-motion:reduce){button{transition:none}}
/* Sobrepõe regras antigas do firered-ui.css no login */
.auth-panel .auth-tabs button{background:transparent;color:var(--ink);border:0;border-radius:999px}
.auth-panel .auth-tabs [aria-selected="true"]{background:var(--red);color:#fff}
.auth-panel button{border-radius:999px}
.auth-panel input#auth-username,.auth-panel input#auth-password{background:#fff;color:var(--ink);border-radius:12px}
.auth-panel #auth-message{color:var(--red-dark)}
.auth-panel small{color:#5b6890!important}
.gender-card{background-color:#fff}
/* Ajustes de encaixe */
@media (min-width:760px){.stage{width:min(100%,calc((100dvh - 420px)*1.2))}}
.town-map-dialog{width:calc(100vw - 16px);max-width:860px;margin:auto}
@media (max-width:520px){
  .town-map-dialog{padding:10px}
  .controls{grid-template-columns:auto 1fr auto;grid-template-areas:"pad . ab" "menu menu menu";row-gap:6px}
  .dpad{grid-area:pad;--k:44px}
  .ab{grid-area:ab;transform:rotate(-15deg);gap:8px;margin-right:4px}
  .round{width:56px;height:56px}.round.b{width:46px;height:46px;margin-top:22px}
  .round span{transform:rotate(15deg)}
  .menu-buttons{grid-area:menu;padding:0}
}

/* ---------- Menus FireRed (canvas 240x160) ---------- */
.fr-menu-dialog{padding:8px;border:0;border-radius:14px;background:linear-gradient(#2b2f45,#1a1d2c);box-shadow:0 14px 44px #000b,inset 0 0 0 3px #3d4363;width:min(96vw,720px,calc((100dvh - 60px) * 1.5));max-width:none;max-height:none;overflow:hidden;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.fr-menu-canvas{display:block;width:100%;height:auto;aspect-ratio:3/2;image-rendering:auto;border-radius:6px;background:#000;outline:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
.menu-pad{display:none;align-items:center;justify-content:space-between;gap:12px;padding:10px 6px 2px}
.menu-dpad{--k:42px;display:grid;grid-template-columns:repeat(3,var(--k));grid-template-rows:repeat(3,var(--k))}
.menu-dpad button{border:0;padding:0;background:#3a3e55;box-shadow:inset 0 -4px 0 #20233a;position:relative;touch-action:none;-webkit-tap-highlight-color:transparent}
.menu-dpad .mp-up{grid-area:1/2;border-radius:8px 8px 0 0}.menu-dpad .mp-down{grid-area:3/2;border-radius:0 0 8px 8px}
.menu-dpad .mp-left{grid-area:2/1;border-radius:8px 0 0 8px}.menu-dpad .mp-right{grid-area:2/3;border-radius:0 8px 8px 0}
.menu-dpad button::after{content:"";position:absolute;inset:50% auto auto 50%;border:7px solid transparent;transform:translate(-50%,-50%)}
.menu-dpad .mp-up::after{border-bottom-color:#b8bcd8;margin-top:-4px}.menu-dpad .mp-down::after{border-top-color:#b8bcd8;margin-top:4px}
.menu-dpad .mp-left::after{border-right-color:#b8bcd8;margin-left:-4px}.menu-dpad .mp-right::after{border-left-color:#b8bcd8;margin-left:4px}
.menu-ab{display:flex;gap:14px;align-items:center}
.menu-ab button{width:54px;height:54px;border-radius:50%;border:0;padding:0;font:900 18px system-ui,sans-serif;color:#fff;background:radial-gradient(circle at 35% 30%,#ff6a4a,#e3350d 55%,#9e1f05);box-shadow:0 4px 0 #6d1606;touch-action:none;-webkit-tap-highlight-color:transparent}
.menu-ab .mp-b{width:46px;height:46px;margin-top:22px;background:radial-gradient(circle at 35% 30%,#6c8ee0,#2a75bb 55%,#1d2c5e);box-shadow:0 4px 0 #101a3a}
.menu-pad button.is-held,.menu-pad button:active{transform:translateY(2px);filter:brightness(.85)}
@media (pointer:coarse),(max-width:760px){.menu-pad{display:flex}.fr-menu-dialog{width:min(96vw,720px,calc((100dvh - 190px) * 1.5))}}
@media (pointer:coarse) and (orientation:landscape) and (max-height:520px){
  .fr-menu-dialog{grid-template-columns:auto auto auto;align-items:center;gap:10px;width:auto}
  .fr-menu-canvas{width:min(calc((100dvh - 28px) * 1.5),calc(100vw - 250px))}
  .fr-menu-dialog[open]{display:grid}
  .fr-menu-canvas{grid-column:2;grid-row:1}
  .menu-pad{display:contents}
  .menu-dpad{grid-column:1;grid-row:1}.menu-ab{grid-column:3;grid-row:1;flex-direction:column-reverse}
  .menu-ab .mp-b{margin-top:0}
}

/* Ícones de item do FireRed (assets/menu/items.png, 24×24) */
.item-icon{display:inline-block;width:24px;height:24px;margin:0 8px -6px 0;background:url(../assets/menu/items.png?v=1) no-repeat;image-rendering:pixelated;transform:scale(1.5);transform-origin:left bottom;margin-right:20px}
.shop-desc{display:flex;align-items:center;gap:4px}

/* Hall da Fama */
.hall-team{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.hall-team .ui-mon{width:64px;height:64px;image-rendering:pixelated;object-fit:contain}
.hall-entry strong{display:block}

/* ---- Tela inicial Poké Horizon ---- */
body:has(#auth-screen:not([hidden])){background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 260' preserveAspectRatio='none'%3E%3Cpath fill='%23071a44' d='M0 260V150l90-70 70 50 120-110 110 120 90-60 130 90 120-130 100 110 80-50 150 100 140-80v240z'/%3E%3Cpath fill='%23040f2c' d='M0 260v-70l110-40 90 40 140-70 120 80 150-50 130 60 150-80 110 60 100-30 100 50v100z'/%3E%3C/svg%3E") bottom/100% 34vh no-repeat fixed,radial-gradient(ellipse 70% 45% at 50% 78%,rgba(255,170,60,.65),rgba(255,110,30,.25) 45%,transparent 70%) fixed,linear-gradient(180deg,#0b2a66 0%,#16408c 45%,#2b6fc7 72%,#f29a45 100%) fixed;align-items:center}
.auth-shell{width:min(100%,460px);grid-template-columns:1fr;gap:6px;justify-items:center;text-align:center;padding:18px 0 40px}
.auth-intro{display:flex;flex-direction:column;align-items:center}
.auth-intro .logo-img{width:min(88vw,430px,48vh);margin-bottom:2px}
.auth-intro h1{font-size:clamp(17px,3.4vw,21px);font-weight:700;margin:4px 0 2px;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.45)}
.auth-intro p{display:none}
.auth-intro .auth-map{display:none}
.auth-panel{width:100%;text-align:left;margin-top:12px;border:0;border-radius:22px;box-shadow:0 18px 44px rgba(3,12,40,.55),0 0 0 3px rgba(255,255,255,.85),0 0 0 6px var(--red);padding:22px}
@media(max-width:820px){.auth-shell{max-width:420px}.auth-intro h1{margin-top:0}}

/* ---- Painel desktop (modelo Poké Horizon) ---- */
.dash-only{display:none}
@media (min-width:1000px) and (min-height:620px){
  body:has(#game-screen:not([hidden])){background:radial-gradient(ellipse 80% 50% at 50% -10%,rgba(42,139,255,.16),transparent 60%),#050d1b;align-items:flex-start;padding:12px 18px}
  main#game-screen{width:min(100%,1480px);display:grid;grid-template-columns:240px minmax(0,1fr) 270px;grid-template-areas:"top top top" "team stage side" "team ctrl side" "tool tool tool" "foot foot foot";gap:12px 16px;align-items:start}
  main#game-screen .topbar,main#game-screen .hud{display:none}
  .dash-top{grid-area:top;display:flex;align-items:center;gap:18px}
  .dash-logo{height:74px;width:auto;margin:-6px 0 -10px;filter:drop-shadow(0 6px 14px rgba(0,0,0,.5))}
  .dash-nav{display:flex;gap:4px;margin:0 auto}
  .dash-nav button{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:104px;padding:12px 10px 10px;border-radius:12px;border:1px solid transparent;background:transparent;color:#aebdd9;font-size:12px;font-weight:700;letter-spacing:.6px;box-shadow:none}
  .dash-nav button svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .dash-nav button:hover{background:rgba(42,139,255,.12);color:#fff}
  .dash-nav button.is-on{background:linear-gradient(180deg,rgba(42,139,255,.3),rgba(42,139,255,.12));border-color:#3d8cff;color:#fff;box-shadow:0 0 18px rgba(42,139,255,.35)}
  .dash-profile{position:relative}
  #dash-profile-btn{display:flex;align-items:center;gap:12px;padding:8px 14px 8px 10px;border-radius:14px;border:1px solid rgba(110,150,230,.3);background:rgba(12,28,56,.85);color:#fff;text-align:left;min-width:250px}
  #dash-profile-btn svg{width:18px;height:18px;margin-left:auto;fill:none;stroke:#aebdd9;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  #dash-avatar{width:36px;height:54px;image-rendering:pixelated;margin:-6px 0}
  .dash-who{display:flex;flex-direction:column;line-height:1.25}.dash-who strong{font-size:16px}
  #dash-conn{display:flex;align-items:center;gap:6px;font-size:13px;color:#ffb35c}#dash-conn i{width:9px;height:9px;border-radius:50%;background:currentColor}
  #dash-conn.on{color:#3ddc84}#dash-conn em{font-style:normal;font-weight:700}
  .dash-money{margin-left:8px;padding:3px 9px;border-radius:999px;background:var(--yellow);color:#10306e;font-size:12px;font-weight:800}
  .dash-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;display:grid;min-width:100%;padding:6px;border-radius:12px;background:#0c1c38;border:1px solid rgba(110,150,230,.35);box-shadow:0 14px 30px rgba(0,0,0,.5)}
  .dash-menu button{background:transparent;border:0;border-radius:8px;color:#fff;text-align:left;padding:10px 12px;font-size:14px}.dash-menu button:hover{background:rgba(42,139,255,.2)}
  .dash-team,.dash-card{display:block;background:rgba(10,24,50,.88);border:1px solid rgba(80,140,255,.25);border-radius:14px;padding:14px;box-shadow:0 8px 24px rgba(0,0,0,.35)}
  .dash-team{grid-area:team}.dash-side{grid-area:side;display:grid;gap:12px}
  .dash-team h2,.dash-card h2{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:14px;letter-spacing:.8px;color:#e8f0ff}
  .dash-team h2 svg,.dash-card h2 svg{width:18px;height:18px;fill:none;stroke:#3d9cff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  #dash-party{list-style:none;margin:0;padding:0;display:grid;gap:4px}
  #dash-party li{display:grid;grid-template-columns:52px 1fr;gap:10px;align-items:center;padding:6px 4px;border-bottom:1px solid rgba(255,255,255,.06)}
  #dash-party li:last-child{border:0}#dash-party img{width:52px;height:52px;object-fit:contain;image-rendering:pixelated;border-radius:8px;background:rgba(255,255,255,.05)}
  #dash-party li>div{display:grid;gap:2px;font-size:13px}#dash-party strong{font-size:15px}#dash-party span{color:#aebdd9;font-size:12px}
  #dash-party em{font-style:normal;text-align:right;font-weight:700;font-size:13px}
  #dash-party li.fainted{opacity:.55}#dash-party li.empty{display:block;color:#aebdd9;font-size:13px;line-height:1.5}
  .hp{height:8px;border-radius:999px;background:#17294d;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}.hp i{display:block;height:100%;border-radius:inherit;background:#3ddc84}
  .hp.mid i{background:#ffcb05}.hp.low i{background:#ff5148}
  .minimap{position:relative;display:block;width:100%;padding:0;border:2px solid rgba(80,140,255,.4);border-radius:10px;overflow:hidden;background:#0b2a66;aspect-ratio:408/400;cursor:pointer;box-shadow:none}
  .minimap img{display:block;width:100%;height:100%;object-fit:cover}
  .minimap i{position:absolute;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:#ff3b30;border:2px solid #fff;box-shadow:0 0 0 3px rgba(255,59,48,.45),0 0 12px #ff3b30;animation:dashping 1.6s ease-out infinite}
  @keyframes dashping{50%{box-shadow:0 0 0 7px rgba(255,59,48,.15),0 0 12px #ff3b30}}
  .dash-place{display:flex;align-items:center;gap:8px;margin:10px 0 0;font-weight:700}.dash-place svg{width:18px;height:18px;fill:none;stroke:#3ddc84;stroke-width:2}
  #dash-mission{margin:0;line-height:1.55;color:#dbe6ff;font-size:14px}
  #dash-goals{list-style:none;margin:0;padding:0;display:grid;gap:10px;font-size:14px}
  #dash-goals li{display:flex;align-items:center;gap:10px}#dash-goals li::before{content:"";flex:none;width:18px;height:18px;border-radius:5px;border:2px solid #4b6aa6}
  #dash-goals li.done{color:#8ea3c9;text-decoration:line-through}#dash-goals li.done::before{background:#3ddc84 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23062' stroke-width='4'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/80% no-repeat;border-color:#3ddc84}
  main#game-screen .console{display:contents}
  .screen{grid-area:stage;justify-self:center;width:min(100%,calc((100dvh - 400px)*1.2 + 24px));background:#06101f;border-radius:16px;padding:12px;box-shadow:0 0 0 2px #2a6fd0,0 0 34px rgba(42,139,255,.4),inset 0 0 0 3px #0b2142}
  .stage{border-radius:8px;width:100%}
  .controls{grid-area:ctrl;justify-self:center;align-self:start;width:min(100%,max(620px,calc((100dvh - 400px)*1.2 + 24px)));grid-template-columns:auto minmax(0,1fr) auto;gap:18px;padding:2px 0 0;align-items:center}
  .controls .menu-buttons{display:none}
  .dash-hint{display:grid;gap:10px;justify-items:center}
  .dash-hint p{margin:0;width:100%;padding:12px 14px;text-align:center;line-height:1.6;font-size:13px;color:#dbe6ff;border:1px solid rgba(80,140,255,.3);border-radius:12px;background:rgba(10,24,50,.8)}
  .dash-hint b{color:#5db0ff}
  .dash-keys{display:none!important;gap:16px;flex-wrap:wrap;justify-content:center;font-size:13px;color:#cfdcf5}.dash-keys span{display:grid;justify-items:center;gap:6px}
  .dash-keys .kk{display:flex;gap:3px}.dash-keys kbd{display:inline-block;margin:0 1px;min-width:24px;padding:3px 7px;border-radius:6px;border:1px solid #4b6aa6;background:#0c1c38;font:700 12px system-ui;color:#fff}.dash-keys em{font-style:normal}
  .dpad{--k:42px}
  .dpad button,.dpad .center{background:linear-gradient(180deg,#143a73,#0c2552);box-shadow:inset 0 0 0 2px #2f7fe8,0 4px 10px rgba(0,0,0,.4);border-radius:12px}
  .dpad .center{background:transparent;box-shadow:none}.dpad button::after{border-width:10px}
  .dpad .up::after{border-bottom-color:#fff}.dpad .down::after{border-top-color:#fff}.dpad .left::after{border-right-color:#fff}.dpad .right::after{border-left-color:#fff}
  .dpad button:active,.dpad button.is-held{background:#2a6fd0}
  .ab{transform:none;gap:30px;align-items:flex-start;padding-bottom:20px}.round span{transform:none}
  .round,.round.b{position:relative;width:56px;height:56px;margin:0;font-size:25px;box-shadow:0 0 0 4px rgba(255,255,255,.16),0 8px 18px rgba(0,0,0,.5),inset 0 -5px 0 rgba(0,0,0,.25)}
  .round.b{background:radial-gradient(circle at 35% 28%,#ff7468,#d4161f 60%,#8c0c14)}
  .round.a{background:radial-gradient(circle at 35% 28%,#5db0ff,#1565e0 60%,#0b3a94)}
  .round.b::after,.round.a::after{position:absolute;left:50%;top:calc(100% + 14px);transform:translateX(-50%);white-space:nowrap;font-size:11px;font-weight:800;letter-spacing:.6px;color:#dbe6ff}
  .round.b::after{content:"CORRER"}.round.a::after{content:"INTERAGIR"}
  .toolbar{grid-area:tool;margin-top:2px}.footer{grid-area:foot}.footer .keys{display:none}
}
@media (min-width:1000px) and (min-height:620px) and (max-height:860px){.dash-card:nth-child(3){display:none}.minimap{aspect-ratio:408/250}.dash-logo{height:62px}}
@media (min-width:1000px) and (min-height:620px) and (max-height:860px){.screen{width:min(100%,calc((100dvh - 352px)*1.2 + 24px))}.controls{width:min(100%,max(620px,calc((100dvh - 352px)*1.2 + 24px)))}}
@media (min-width:1000px) and (min-height:620px){
  #dash-party li[data-id]{cursor:pointer;border-radius:10px;transition:background .15s}#dash-party li[data-id]:hover{background:rgba(42,139,255,.12)}
  #dash-party li.following{background:rgba(42,139,255,.18);box-shadow:inset 0 0 0 1px #3d8cff}
  #dash-party small{margin-left:4px;padding:1px 6px;border-radius:999px;background:#3d8cff;color:#fff;font-size:9px;font-weight:800;letter-spacing:.5px;vertical-align:middle}
  .dash-follow{width:100%;margin:-2px 0 10px;padding:6px 10px;border-radius:8px;border:1px solid rgba(110,150,230,.35);background:rgba(12,28,56,.8);color:#cfdcf5;font-size:12px}
}
.google-or{margin:10px 0 6px;text-align:center;font-size:12px;opacity:.7}#google-box{display:flex;flex-direction:column;align-items:center;min-height:50px}#google-box[hidden]{display:none}
#lang-switch{position:fixed;top:4px;right:10px;z-index:60;display:flex;gap:2px;padding:2px;border-radius:8px;background:rgba(10,20,50,.72);border:1px solid rgba(255,255,255,.18);backdrop-filter:blur(4px)}
#lang-switch button{min-width:34px;height:20px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:#cfe0ff;font:700 11px/20px system-ui,sans-serif;letter-spacing:.06em;cursor:pointer}
#lang-switch button[aria-pressed="true"]{background:#f2d78e;color:#1b2a4a}
#lang-switch button:focus-visible{outline:2px solid #fff;outline-offset:1px}
@media(max-width:820px){:lang(en) .round.b::after{content:"RUN"}:lang(en) .round.a::after{content:"INTERACT"}}
:lang(en) .round.b::after{content:"RUN"}:lang(en) .round.a::after{content:"INTERACT"}
