/*
 * HUD única (cidade e Hunt) e janelas por cima do mapa.
 *
 * Código de cores (o mesmo em toda a interface):
 *   verde   --c-team   Time e Pokémon        âmbar  --c-item  Itens, Mochila e Mart
 *   vermelho --c-dex   Pokédex e o selvagem  azul   --c-auto  Automação (Auto-Helper)
 *   dourado --c-money  Dinheiro              laranja --c-hunt Hunts e combate
 *   HP: verde/amarelo/vermelho · XP: azul claro
 * Um painel ou janela recebe a cor do assunto por data-tone="team|item|dex|auto|hunt|money|center".
 * A barra de golpes fica em skill-bar.css.
 */
:root {
  --c-team: #5fd38a;
  --c-item: #f0a541;
  --c-dex: #f0605a;
  --c-auto: #57a9ff;
  --c-money: #f5c84c;
  --c-hunt: #ff8f4a;
  --c-center: #ff7fa8;
  --c-boss: #b98cff;
  --c-neutral: #9fb0bf;

  --hud-bg: rgba(13, 19, 27, .84);
  --hud-bg2: rgba(28, 38, 50, .9);
  --hud-raise: rgba(255, 255, 255, .05);
  --hud-hover: rgba(255, 255, 255, .09);
  --hud-line: rgba(130, 155, 178, .22);
  --hud-r: 12px;
  --slot: 76px;
}

/* ---------- grade da HUD */
.ghud {
  position: absolute; inset: 0; pointer-events: none; padding: 10px;
  display: grid; gap: 10px;
  grid-template-columns: minmax(0, 252px) minmax(0, 1fr) minmax(0, 252px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top top top" "left mid right" "log bar res";
  font-variant-numeric: tabular-nums;
}
.ghud > * { min-width: 0; min-height: 0; }
.ghud .hpanel, .ghud .menubar, .ghud .buffbar, .ghud .skillbar, .ghud .hud-log2, .ghud .hud-wild2 { pointer-events: auto; }
.g-top { grid-area: top; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.g-left { grid-area: left; overflow: auto; scrollbar-width: thin; }
.g-mid { grid-area: mid; display: flex; justify-content: center; align-items: flex-start; }
.g-right { grid-area: right; overflow: auto; scrollbar-width: thin; display: grid; gap: 10px; align-content: start; }
.g-log { grid-area: log; display: flex; align-items: flex-end; }
.g-bar { grid-area: bar; display: flex; justify-content: center; align-items: flex-end; }
.g-res { grid-area: res; display: flex; align-items: flex-end; justify-content: flex-end; }
.hud-left { display: grid; gap: 10px; align-content: start; }

/* ---------- painel base: faixa colorida no topo = assunto do painel */
.hpanel { --tone: var(--c-neutral); position: relative; background: var(--hud-bg); border: 1px solid var(--hud-line); border-radius: var(--hud-r);
  backdrop-filter: blur(4px); box-shadow: 0 4px 16px rgba(0,0,0,.35); width: 100%; overflow: hidden; }
.hpanel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--tone); opacity: .9; }
.hp-head { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 7px; width: 100%; padding: 8px 10px 6px; cursor: pointer;
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tone); }
.hp-head:hover { background: var(--hud-raise); }
.hp-head:focus-visible { outline: 2px solid var(--tone); outline-offset: -2px; }
.hp-title { flex: 1; }
.hp-arrow { color: var(--muted); font-size: 11px; width: 10px; text-align: center; }
.hp-extra { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 12px; }
.hp-body { padding: 0 8px 8px; display: grid; gap: 4px; }
.hpanel.closed .hp-body { display: none; }
.hpanel.closed .hp-head { padding-bottom: 8px; }
.empty-note { margin: 2px 4px 4px; }
.ico { display: inline-grid; place-items: center; line-height: 0; }

/* link discreto dentro de painéis ("Gerenciar time →") */
.hlink { all: unset; box-sizing: border-box; cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--tone, var(--accent)); padding: 3px 4px; border-radius: 6px; justify-self: end; }
.hlink:hover, .hlink:focus-visible { background: var(--hud-hover); text-decoration: underline; }

/* ---------- cartão do jogador */
.player-card { --tone: var(--c-money); padding: 10px 10px 8px; display: grid; gap: 8px; }
.pc-row { display: flex; align-items: center; gap: 9px; }
.pc-avatar { width: 46px; height: 46px; border-radius: 10px; background: radial-gradient(circle at 50% 70%, rgba(255,255,255,.12), rgba(0,0,0,.35)); border: 1px solid var(--hud-line); display: grid; place-items: center; flex: none; }
.avatar-canvas { image-rendering: pixelated; }
.pc-info { min-width: 0; display: grid; }
.pc-name { font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-place { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.pc-place::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--place-dot, var(--c-team)); flex: none; }
.ghud-hunt .pc-place::before { --place-dot: var(--c-hunt); }
.pc-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
/* nível do treinador: rótulo, barra de XP e porcentagem */
.pc-trainer { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: help; }
.pc-tlv { font-weight: 800; white-space: nowrap; color: var(--c-money); }
.pc-txp { flex: 1; height: 6px; border-radius: 3px; background: rgba(0,0,0,.4); border: 1px solid var(--hud-line); overflow: hidden; min-width: 30px; }
.pc-txp-fill { display: block; height: 100%; background: linear-gradient(90deg, #c99a2e, var(--c-money)); transition: width .4s; }
.pc-txp-text { font-size: 11px; opacity: .75; min-width: 28px; text-align: right; }

/* chip clicável com cor do assunto (dinheiro, Pokédex, itens…) */
.chip { all: unset; box-sizing: border-box; --tone: var(--c-neutral); display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; cursor: pointer;
  background: color-mix(in srgb, var(--tone) 12%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent); font-size: 12.5px; min-width: 0; }
.chip:hover, .chip:focus-visible { background: color-mix(in srgb, var(--tone) 22%, transparent); border-color: var(--tone); }
.chip strong { color: var(--tone); font-weight: 800; }
.chip .chip-sub { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.static { cursor: default; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); flex: none; }

/* ---------- Time */
.hp-team { --tone: var(--c-team); }
.tm { all: unset; box-sizing: border-box; position: relative; display: flex; gap: 7px; align-items: center; padding: 5px 7px 5px 4px; border-radius: 9px; background: var(--hud-raise); border: 1px solid transparent; cursor: pointer; width: 100%; }
.tm:hover, .tm:focus-visible { border-color: color-mix(in srgb, var(--c-team) 55%, transparent); background: var(--hud-hover); }
.tm.active { border-color: color-mix(in srgb, var(--c-team) 70%, transparent); background: color-mix(in srgb, var(--c-team) 10%, transparent); }
.tm.active::before { content: ''; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-team); }
.tm.fainted { opacity: .55; }
.tm.fainted .tm-icon img { filter: grayscale(1); }
.tm-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border-radius: 8px; background: rgba(0,0,0,.22); }
.tm-icon img { image-rendering: pixelated; }
.tm-info { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 12px; }
.tm-name { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.tm-n { overflow: hidden; text-overflow: ellipsis; font-weight: 700; font-size: 12.5px; }
.tm-lv { color: var(--muted); font-size: 11px; }
.tm-badges { margin-left: auto; display: flex; gap: 3px; flex: none; }
.tm-sub { display: flex; justify-content: space-between; font-size: 10.5px; line-height: 1; color: var(--muted); max-height: 0; overflow: hidden; transition: max-height .15s; }
.tm:hover .tm-sub, .tm:focus-visible .tm-sub, .tm.low .tm-sub { max-height: 14px; }
.tm .track { display: block; height: 6px; margin: 0; }
.tm .track.xp { height: 3px; opacity: .85; }
.tm .fill { display: block; }
/* na Hunt: botão Lutar ao lado de quem pode entrar na luta */
.tm-wrap { display: flex; align-items: center; gap: 4px; }
.tm-wrap > .tm { flex: 1; min-width: 0; }
.tm-swap { flex: none; padding: 4px 7px; font-size: 11px; }
.tm-swap.waiting { opacity: .7; }

/* selos pequenos: ATIVO, status, shiny */
.pill { display: inline-flex; align-items: center; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; padding: 1px 5px; border-radius: 999px; line-height: 1.35; text-transform: uppercase; white-space: nowrap; }
.pill.active { background: var(--c-team); color: #0b1a10; }
.pill.fainted { background: #5a2226; color: #ffb3ad; }
.pill.shiny { background: rgba(245,200,76,.18); color: var(--c-money); }
/* classe do Pokémon (mesmas cores da luta de chefe: boss-fight-hud.css → .bfh-kit) */
.class-pill { background: #5b6a74; color: #fff; cursor: help; }
.class-pill.tank { background: #3550c8; } .class-pill.melee { background: #a45c0c; }
.class-pill.ranged { background: #6a3fb8; } .class-pill.support { background: #1f8a4c; }
.pill.st-poison, .pill.st-badPoison { background: #6b3d86; color: #f1d4ff; }
.pill.st-burn { background: #8a3a1a; color: #ffd2b8; }
.pill.st-paralysis { background: #7c6a12; color: #fff3b0; }
.pill.st-sleep { background: #3d4757; color: #d7e1ee; }
.pill.st-freeze { background: #1d5d7a; color: #cff2ff; }
.pill.st-confusion, .pill.st-leech-seed, .pill.st-trap { background: #3d4a3a; color: #dcefd2; }
/* compatibilidade: .tag ainda é usado em telas antigas */
.tag { margin-left: 4px; font-size: 10px; background: #5b3c74; padding: 0 5px; border-radius: 999px; }

/* ---------- Missões */
.hp-quests { --tone: #c9b27a; }

/* ---------- menu do topo */
.menubar { display: flex; align-items: stretch; gap: 2px; padding: 4px; background: var(--hud-bg); border: 1px solid var(--hud-line); border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.35); max-width: 100%; backdrop-filter: blur(4px); }
.mb-sep { width: 1px; margin: 8px 3px; background: var(--hud-line); flex: none; }
.mb { all: unset; --tone: var(--c-neutral); position: relative; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 64px; padding: 5px 6px 6px; border-radius: 10px; cursor: pointer; color: #dfe7ee; font-size: 11px; font-weight: 600; }
.mb::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: 2px; height: 2px; border-radius: 2px; background: var(--tone); opacity: .45; transition: opacity .15s, left .15s, right .15s; }
.mb:hover:not(:disabled), .mb:focus-visible { background: var(--hud-hover); }
.mb:hover::after, .mb:focus-visible::after { opacity: 1; left: 18%; right: 18%; }
.mb:focus-visible { outline: 2px solid var(--tone); outline-offset: -2px; }
.mb:disabled { opacity: .5; cursor: default; }
.mb.open { background: color-mix(in srgb, var(--tone) 18%, transparent); color: #fff; }
.mb.open::after { opacity: 1; left: 12%; right: 12%; height: 3px; }
.mb.accent .mb-label { color: var(--tone); }
.mb.attention { box-shadow: inset 0 0 0 1px var(--tone); animation: mb-blink 1.2s ease-in-out infinite alternate; }
@keyframes mb-blink { to { background: color-mix(in srgb, var(--tone) 20%, transparent); } }
.mb.blocked .mb-ico { filter: grayscale(1) opacity(.6); }
.mb-ico { height: 30px; display: grid; place-items: center; }
.mb-ico img, .mb-ico svg { image-rendering: pixelated; }
.mb-team img { width: 30px; height: 30px; }
.mb-label { white-space: nowrap; }
.mb-key { position: absolute; top: 2px; right: 4px; font-size: 9px; font-weight: 700; color: var(--muted); opacity: .7; }
.mb-badge { position: absolute; top: 2px; left: 50%; margin-left: 8px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--c-dex); color: #fff; font-size: 9.5px; font-weight: 800; display: grid; place-items: center; }
.mb-badge[hidden] { display: none; }

/* ---------- buffs ativos (logo abaixo do menu): ícone + tempo que falta; nos últimos 5 min o tempo fica vermelho */
.buffbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 100%; }
.buffbar[hidden] { display: none; }
.bf { all: unset; box-sizing: border-box; --tone: var(--c-neutral); display: flex; align-items: center; gap: 4px; padding: 2px 7px 2px 3px; border-radius: 9px; cursor: pointer;
  background: var(--hud-bg); border: 1px solid var(--hud-line); box-shadow: 0 2px 8px rgba(0,0,0,.3); font-size: 11.5px; font-weight: 800; }
.bf:hover, .bf:focus-visible { border-color: var(--tone); }
.bf-ico { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--tone) 30%, transparent); }
.bf-ico img, .bf-ico svg { width: 20px; height: 20px; image-rendering: pixelated; }
.bf-ico-mon { display: contents; }
.bf-time { min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.bf.ending .bf-time { color: var(--c-dex); animation: bf-blink 1s steps(2, end) infinite; }
@keyframes bf-blink { 50% { opacity: .55; } }

/* ---------- botões e interruptores da HUD */
.hbtn { all: unset; box-sizing: border-box; --tone: var(--accent); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border-radius: 9px; background: var(--hud-bg2); border: 1px solid var(--hud-line); cursor: pointer; font-size: 12.5px; font-weight: 700; }
.hbtn:hover, .hbtn:focus-visible { border-color: var(--tone); color: #fff; }
.hbtn.wide { width: 100%; margin-top: 2px; }
.tg { display: flex; align-items: center; gap: 8px; margin: 0; padding: 3px 2px; cursor: pointer; font-size: 13px; }
.tg input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tg-ui { width: 30px; height: 16px; border-radius: 9px; background: #3a4652; position: relative; flex: none; transition: background .15s; }
.tg-ui::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #c9d3dc; transition: transform .15s; }
.tg input:checked + .tg-ui { background: var(--c-auto); }
.tg input:checked + .tg-ui::after { transform: translateX(14px); background: #fff; }
.tg input:focus-visible + .tg-ui { outline: 2px solid var(--c-auto); outline-offset: 1px; }
.tg-label { flex: 1; }
.input.num.tiny { width: 48px; padding: 2px 4px; font-size: 12px; }

/* ---------- Auto-Helper rápido */
.hp-auto { --tone: var(--c-auto); }
.ar { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 8px; }
.ar:hover { background: var(--hud-raise); }
.ar .tg { padding: 0; flex: none; }
.ar-text { all: unset; box-sizing: border-box; flex: 1; min-width: 0; display: grid; cursor: pointer; }
.ar-text:focus-visible { outline: 2px solid var(--c-auto); border-radius: 4px; }
.ar-name { font-size: 12.5px; font-weight: 600; }
.ar.off .ar-name { color: var(--muted); }
.ar-sum { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-sum img { width: 16px; height: 16px; }
.ar-sum .warn-txt { color: var(--hp-low); font-weight: 700; }

/* ---------- Itens (âmbar) e números da sessão */
.hp-res { --tone: var(--c-item); }
.res-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; }
.res-chip { all: unset; box-sizing: border-box; position: relative; display: flex; align-items: center; justify-content: center; gap: 1px; padding: 2px 4px 2px 0; border-radius: 8px; background: var(--hud-raise); font-size: 12px; font-weight: 700; border: 1px solid transparent; cursor: pointer; }
.res-chip:hover, .res-chip:focus-visible { border-color: color-mix(in srgb, var(--c-item) 60%, transparent); background: var(--hud-hover); }
.res-chip.sel { border-color: color-mix(in srgb, var(--c-auto) 70%, transparent); }
.res-chip.sel::after { content: ''; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--c-auto); }
.res-chip.zero { opacity: .5; }
.res-chip.zero span { color: var(--hp-low); }
.res-counters { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 6px; margin-top: 4px; }
.res-caption { grid-column: 1 / -1; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--hud-line); padding-top: 6px; }
.stat { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 2px 7px; border-radius: 7px; background: var(--hud-raise); border-left: 3px solid var(--tone, var(--c-neutral)); }
.stat span { font-size: 10.5px; color: var(--muted); }
.stat strong { font-size: 13px; color: var(--tone, #fff); }
.g-res .hpanel { width: 252px; }

/* ---------- registro */
.hud-log2 { width: 100%; max-height: 100%; overflow: hidden; background: var(--hud-bg); border: 1px solid var(--hud-line); border-radius: var(--hud-r); padding: 7px 10px; font-size: 12px; line-height: 1.4; backdrop-filter: blur(4px); }
.hud-log2:empty { display: none; }
.hud-log2 > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 9px; position: relative; }
.hud-log2 > div::before { content: ''; position: absolute; left: 0; top: .55em; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }
.hud-log2 > div:not(:last-child) { opacity: .72; }
.hud-log2 .good { color: var(--good); } .hud-log2 .bad { color: var(--bad); } .hud-log2 .rare { color: var(--c-money); font-weight: 700; }
.hud-log2 .foe { color: #ffb4a0; } .hud-log2 .hint { color: #cfd8e0; }
.hud-log2 > div.hint { white-space: normal; }

/* ---------- selvagem (Hunt) */
.hud-wild2 { --tone: var(--c-dex); width: min(360px, 100%); background: linear-gradient(180deg, rgba(58, 18, 18, .88), rgba(30, 12, 12, .86)); border: 1px solid color-mix(in srgb, var(--c-dex) 55%, transparent); border-radius: var(--hud-r); padding: 8px 11px 9px; font-size: 12.5px; display: grid; gap: 5px; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.hud-wild2[hidden] { display: none; }
.w-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.w-name { all: unset; cursor: pointer; font-weight: 800; font-size: 14px; border-bottom: 1px dashed rgba(255,255,255,.35); }
.w-name:hover, .w-name:focus-visible { color: #fff; border-bottom-color: #fff; }
.w-reg { margin-left: auto; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.w-reg.yes { color: var(--c-team); } .w-reg.no { color: #ffd48a; }
.w-hp { display: flex; align-items: center; gap: 8px; }
.w-hp .track { flex: 1; height: 8px; margin: 0; }
.w-hp span { font-size: 11px; color: #f2d7d2; min-width: 34px; text-align: right; }
.w-catch { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #f2d7d2; padding: 2px 4px; margin: 0 -4px; border-radius: 6px; }
.w-catch:hover, .w-catch:focus-visible { background: rgba(255,255,255,.08); }
.w-catch img { width: 18px; height: 18px; }
.w-catch b.hi { color: var(--c-team); } .w-catch b.mid { color: var(--hp-mid); } .w-catch b.lo { color: var(--hp-low); }

/* ---------- janelas (painéis sobrepostos) */
/* começa abaixo do menu do topo: o menu continua visível e clicável com uma janela aberta */
.modal-bg { position: fixed; inset: 70px 0 0 0; background: rgba(4, 8, 12, .25); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-bg.stacked { background: rgba(4, 8, 12, .4); }
.modal.win { position: relative; background: #111821; border: 1px solid var(--hud-line); border-radius: 16px; padding: 0; width: min(720px, 100%); max-height: min(88vh, 100%); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 14px 48px rgba(0,0,0,.6); }
.modal.win::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tone); }
.modal.win.wide { width: min(1000px, 100%); }
.win-head { display: flex; align-items: center; gap: 10px; padding: 13px 12px 10px 18px; border-bottom: 1px solid var(--hud-line); }
.win-head h2 { margin: 0; flex: 1; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.win-head h2::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--tone); flex: none; }
.win-back { all: unset; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); padding: 5px 8px; border-radius: 8px; }
.win-back:hover, .win-back:focus-visible { background: var(--hud-hover); color: var(--text); }
.win-x { all: unset; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 18px; color: var(--muted); }
.win-x:hover, .win-x:focus-visible { background: var(--hud-hover); color: var(--text); }
.win-body { padding: 14px 18px; overflow: auto; }
.win .actions { margin: 0; padding: 10px 18px; border-top: 1px solid var(--hud-line); }
.win .panel-free { max-width: none; }
.win .btn.primary { background: var(--tone); border-color: var(--tone); color: #10141a; }
.win[data-tone="center"] .btn.primary, .win[data-tone="dex"] .btn.primary { color: #fff; }

/* abas (segmentos) */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: rgba(0,0,0,.28); border: 1px solid var(--hud-line); border-radius: 10px; flex-wrap: wrap; }
.seg button { all: unset; cursor: pointer; padding: 5px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg button:hover, .seg button:focus-visible { color: var(--text); background: var(--hud-hover); }
.seg button.on { background: var(--tone, var(--accent)); color: #10141a; }
.seg button .n { opacity: .7; font-weight: 500; margin-left: 3px; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.money-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: rgba(245,200,76,.12); color: var(--c-money); font-weight: 800; border: 1px solid rgba(245,200,76,.3); }
.section-title { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tone, var(--muted)); margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--hud-line); }
.section-title:first-child { margin-top: 0; }

/* tipo clicável (abre a Pokédex filtrada) */
button.type { border: 0; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
button.type:hover, button.type:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 1px; }

/* link de texto */
.alink { all: unset; cursor: pointer; color: var(--tone, var(--accent)); font-weight: 600; border-bottom: 1px dashed currentColor; }
.alink:hover, .alink:focus-visible { color: #fff; }
.linkbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.lbtn { all: unset; box-sizing: border-box; --tone: var(--c-neutral); display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 700;
  background: color-mix(in srgb, var(--tone) 12%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); color: var(--text); }
.lbtn:hover:not([disabled]), .lbtn:focus-visible { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 22%, transparent); }
.lbtn[disabled] { opacity: .45; cursor: not-allowed; }
.lbtn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }

/* ---------- ficha do Pokémon */
.mon-sheet { display: grid; gap: 4px; grid-template-columns: minmax(0, 1fr); }
.ms-hero { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 12px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--type1, #888) 22%, transparent), color-mix(in srgb, var(--type2, var(--type1, #888)) 10%, transparent)); border: 1px solid var(--hud-line); }
.ms-art { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(circle at 50% 65%, rgba(255,255,255,.14), rgba(0,0,0,.25)); }
.ms-art img { image-rendering: pixelated; }
.ms-main { display: grid; gap: 5px; min-width: 0; }
.ms-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ms-title strong { font-size: 20px; }
.ms-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ms-meta b { color: var(--text); font-weight: 600; }
.ms-bars { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 8px; align-items: center; font-size: 11.5px; max-width: 360px; }
.ms-bars .track { margin: 0; height: 8px; }
.ms-bars .muted { white-space: nowrap; }
.ms-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }

.statbars { display: grid; gap: 4px; }
.sbar { display: grid; grid-template-columns: 92px 34px 1fr 54px; gap: 8px; align-items: center; font-size: 12px; }
.sbar-label { color: var(--muted); }
.sbar-val { font-weight: 800; text-align: right; }
.sbar-track { height: 8px; border-radius: 4px; background: rgba(0,0,0,.4); overflow: hidden; }
.sbar-fill { height: 100%; border-radius: 4px; background: var(--sc, #9aa); }
.sbar-iv { font-size: 11px; text-align: right; white-space: nowrap; }
.sbar.up .sbar-label::after { content: ' ▲'; color: #6fd66f; }
.sbar.down .sbar-label::after { content: ' ▼'; color: #ff7b72; }
.sbar.up .sbar-val { color: #8fe08f; } .sbar.down .sbar-val { color: #ff9a92; }
.sbar[data-stat="hp"] { --sc: #69d36b; } .sbar[data-stat="atk"] { --sc: #f5ac3c; } .sbar[data-stat="def"] { --sc: #f0d24c; }
.sbar[data-stat="spa"] { --sc: #5fa8ff; } .sbar[data-stat="spd"] { --sc: #7ad08f; } .sbar[data-stat="spe"] { --sc: #ff6f9c; }
.statbars-foot { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.move-cards { display: grid; gap: 6px; }
.mcard { display: grid; gap: 2px; padding: 7px 10px; border-radius: 10px; background: var(--hud-raise); border-left: 4px solid var(--mt, #888); }
.mcard-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mcard-head strong { font-size: 13.5px; }
.mcard-meta { display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.mcard-meta b { color: var(--text); }
.mcard-eff { font-size: 11.5px; color: var(--muted); }

.nick-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hud-line); }
.nick-row .input { width: 160px; }

/* listas de Pokémon na ficha da Pokédex e telas de time */
.owned { display: flex; gap: 6px; flex-wrap: wrap; }
.owned-mon { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 9px; background: color-mix(in srgb, var(--c-team) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c-team) 35%, transparent); font-size: 12.5px; }
.owned-mon:hover, .owned-mon:focus-visible { border-color: var(--c-team); }

/* cartão de Pokémon (equipe, caixa, Mart) */
.mon-card { display: flex; gap: 10px; align-items: center; background: var(--hud-raise); border: 1px solid var(--hud-line); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; }
.mon-card.active { border-color: color-mix(in srgb, var(--c-team) 70%, transparent); background: color-mix(in srgb, var(--c-team) 8%, transparent); }
.mon-card .mc-open { all: unset; cursor: pointer; border-radius: 10px; display: grid; place-items: center; width: 52px; height: 52px; background: rgba(0,0,0,.22); flex: none; }
.mon-card .mc-open:hover, .mon-card .mc-open:focus-visible { outline: 2px solid var(--c-team); }
.mc-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mc-line .alink { font-size: 14px; }
.mc-sub { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mc-hp { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; max-width: 340px; }
.mc-hp .track { margin: 0; }
.mc-hp span { font-size: 11.5px; color: var(--muted); }
.mc-moves { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.mc-move { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: rgba(0,0,0,.25); border-left: 3px solid var(--mt, #888); }
.mon-card .row { margin-top: 6px; }

/* ---------- Pokédex */
.dex-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dex-cell.caught { border-color: color-mix(in srgb, var(--c-dex) 40%, var(--line)); }
.dex-cell.focus { outline: 2px solid var(--c-dex); }
.dex-ball { color: var(--c-dex) !important; }
.evo-node.link { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; background: var(--panel2); border-radius: 10px; padding: 4px 10px; border: 1px solid transparent; }
.evo-node.link:hover, .evo-node.link:focus-visible { border-color: var(--c-dex); }
.evo-node.current { border-color: var(--c-dex); background: color-mix(in srgb, var(--c-dex) 14%, var(--panel2)); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 8px 0; }
.kv > div { padding: 6px 9px; border-radius: 9px; background: var(--hud-raise); display: grid; }
.kv span { font-size: 11px; color: var(--muted); }
.kv b { font-size: 13px; font-weight: 700; }
.flavor { font-style: italic; color: #d5dde4; border-left: 3px solid var(--c-dex); padding-left: 10px; margin: 10px 0; }

/* ---------- Mochila e Mart */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.item-tile { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: var(--hud-raise); border: 1px solid transparent; font-size: 12.5px; min-width: 0; }
.item-tile:hover, .item-tile:focus-visible { border-color: color-mix(in srgb, var(--c-item) 55%, transparent); }
.item-tile.sel { border-color: var(--c-item); background: color-mix(in srgb, var(--c-item) 12%, transparent); }
.item-tile .it-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-tile .it-qty { font-weight: 800; color: var(--c-item); }
.item-tile.auto::after { content: 'AUTO'; font-size: 8.5px; font-weight: 800; padding: 0 4px; border-radius: 4px; background: var(--c-auto); color: #06121f; }
.item-detail { margin: 12px 0 0; padding: 12px; background: rgba(0,0,0,.25); border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c-item) 30%, transparent); display: grid; gap: 8px; }
.item-detail-head { display: flex; align-items: center; gap: 10px; }
.item-detail-head strong { font-size: 15px; }
.item-detail p { margin: 0; }
.use-list { display: grid; gap: 4px; }
.use-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 9px; background: var(--hud-raise); }
.use-row .track { margin: 2px 0 0; }

.shop-list { display: grid; gap: 4px; }
.shop-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--hud-raise); }
.shop-row.locked { opacity: .5; }
.shop-row .price { font-weight: 800; color: var(--c-money); white-space: nowrap; }
.shop-row .have { font-size: 11.5px; color: var(--muted); }
.shop-row .btns { display: flex; gap: 4px; }
.shop-row .it-name { font-weight: 600; }

/* Golpes que aprende (ficha do Pokémon e Pokédex) */
details.learnset { overflow-x: auto; margin: 6px 0; border: 1px solid var(--hud-line); border-radius: 10px; padding: 0 8px; }
details.learnset[open] { padding-bottom: 6px; }
details.learnset summary { cursor: pointer; font-weight: 700; padding: 7px 0; }
table.moves-table td, table.moves-table th { padding: 3px 6px; white-space: nowrap; }
table.moves-table tr.known td { background: rgba(95, 211, 138, .12); }
table.moves-table tr.known td:last-child { color: var(--c-team); font-weight: 700; }
table.moves-table tr.unsupported td { opacity: .55; }
.details, .dex-detail { overflow-x: auto; }

/* Nature, IVs, STAB e vantagens de tipo */
td.nat-up { color: #6fd66f; font-weight: 700; }
td.nat-down { color: #ff7b72; font-weight: 700; }
.iv-max { color: var(--c-money); font-weight: 700; }
.iv-good { color: #b8e0a0; }
.stab { margin-left: 6px; font-size: 10px; font-weight: 800; color: #1a1408; background: var(--c-money); border-radius: 4px; padding: 0 4px; vertical-align: middle; }
.btag { margin-left: 6px; font-size: 10px; font-weight: 800; color: #fff; background: #c8463c; border-radius: 4px; padding: 0 4px; vertical-align: middle; }
.mtag { margin-left: 6px; font-size: 10px; font-weight: 800; color: #fff; border-radius: 4px; padding: 0 4px; vertical-align: middle; white-space: nowrap; }
.mtag-area, .sb-reach.mtag-area { background: #d9822b; }
.mtag-heal, .sb-reach.mtag-heal { background: #2f9e44; }
.mtag-status, .sb-reach.mtag-status { background: #1c8c8c; }
.mtag-buff, .sb-reach.mtag-buff { background: #3a6fd8; }
.mtag-debuff, .sb-reach.mtag-debuff { background: #8a3fb8; }
.sb-reach { color: #fff; }
.matchups { display: grid; gap: 5px; margin: 6px 0; }
.mu-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.mu-label { min-width: 120px; font-weight: 700; }
.mu-row.weak .mu-label { color: #ff8a7a; }
.mu-row.resist .mu-label { color: #8fd18f; }
.mu-row.immune .mu-label { color: #9fb4ff; }

/* Auto-Helper (janela, cartões em acordeão) */
.auto-helper { display: grid; gap: 10px; }
.ah-card { background: var(--hud-raise); border: 1px solid var(--hud-line); border-radius: 12px; overflow: hidden; }
.ah-card.open { border-color: var(--c-auto); box-shadow: 0 0 0 1px rgba(87, 169, 255, .25); }
.ah-card.info { border-color: var(--hud-line); }
.ah-head { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.ah-head:hover { background: var(--hud-raise); }
.ah-head.static { cursor: default; align-items: flex-start; }
.ah-icon { width: 22px; text-align: center; color: var(--c-auto); font-size: 16px; flex: none; }
.ah-titles { flex: 1; display: grid; gap: 3px; }
.ah-titles strong { font-size: 14px; }
.ah-accent { color: var(--c-auto); }
.ah-body { border-top: 1px solid var(--hud-line); padding: 12px 14px; display: grid; gap: 10px; background: rgba(0, 0, 0, .2); }
.ah-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.ah-select { min-width: 200px; max-width: 100%; }
.ah-val { color: var(--c-auto); font-weight: 800; }
.ah-note { margin: 0; color: var(--muted); font-size: 12px; }
.ah-check { font-size: 13px; }
.ah-range { width: 100%; appearance: none; height: 8px; border-radius: 6px; outline: none;
  background: linear-gradient(90deg, var(--c-auto) 0 var(--p, 50%), #2a3442 var(--p, 50%) 100%); }
.ah-range::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--c-auto); cursor: pointer; }
.ah-range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--c-auto); cursor: pointer; }
.ah-tg { margin-left: auto; }

/* Auto Catch: escolha das espécies (busca + lista) */
.cp { display: grid; gap: 8px; }
.cp-head { font-weight: 700; }
.cp-chosen { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow-y: auto; }
.cp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 2px; border: 1px solid var(--c-auto); border-radius: 8px; background: var(--hud-raise); font-size: 12.5px; }
.cp-chip img, .cp-row img, .cp-noimg { width: 28px; height: 28px; flex: none; }
.cp-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 5px; border-radius: 6px; }
.cp-x:hover { color: #fff; background: #c8463c; }
.cp-search { width: 100%; box-sizing: border-box; }
.cp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; max-height: 240px; overflow-y: auto; padding-right: 2px; }
.cp .cp-row { display: flex; justify-content: flex-start; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border: 1px solid var(--hud-line); border-radius: 8px; background: var(--hud-raise); color: inherit; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; min-height: 34px; }
.cp-row:hover { border-color: var(--c-auto); }
.cp-row.on { border-color: var(--c-auto); box-shadow: inset 0 0 0 1px var(--c-auto); }
.cp-name { flex: 1; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-mark { font-weight: 800; color: var(--muted); }
.cp-row.on .cp-mark { color: var(--c-auto); }
.cp-empty { grid-column: 1 / -1; }
@media (max-width: 720px) { .cp-list { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); max-height: 200px; } }

/* ---------- celular */
@media (max-width: 720px) {
  :root { --slot: calc((100vw - 52px) / 4); }
  .ghud { padding: 6px; gap: 6px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    grid-template-areas: "top top" "left right" "mid mid" "log res" "bar bar"; }
  .g-left, .g-right { align-self: start; max-height: 100%; }
  .g-right { gap: 6px; }
  .hud-left { gap: 6px; }
  .menubar { width: 100%; justify-content: space-between; padding: 3px; gap: 0; }
  .mb-sep, .mb-key { display: none; }
  .mb { min-width: 0; flex: 1; padding: 3px 1px 5px; font-size: 9.5px; }
  .mb-ico { height: 24px; }
  .mb-ico svg { width: 22px; height: 22px; } .mb-ico img { width: 24px; height: 24px; } .mb-team img { width: 26px; height: 26px; }
  .player-card { padding: 7px 6px 6px; gap: 5px; }
  .pc-avatar { width: 34px; height: 34px; } .pc-avatar canvas { width: 32px; height: 32px; }
  .pc-name { font-size: 13px; }
  .pc-chips { grid-template-columns: 1fr; gap: 4px; }
  .chip { padding: 3px 6px; font-size: 11.5px; }
  .hp-head { padding: 7px 8px 5px; }
  .hp-body { padding: 0 5px 6px; }
  .tm { padding: 3px 4px; gap: 4px; } .tm-icon { width: 28px; height: 28px; } .tm-icon img { width: 28px; height: 28px; }
  .g-res .hpanel { width: 100%; }
  .g-log { align-items: stretch; }
  .hud-log2 { max-height: 64px; font-size: 11px; padding: 4px 7px; }
  .hud-wild2 { width: 100%; font-size: 11.5px; padding: 5px 8px; }
  .modal-bg { top: 56px; padding: 6px; place-items: end center; }
  .modal.win { max-height: 86vh; border-radius: 14px; }
  .win-body { padding: 10px; }
  .ms-hero { grid-template-columns: minmax(0, 1fr); justify-items: start; padding: 10px; }
  .ms-hero > * { min-width: 0; max-width: 100%; }
  .ms-bars { max-width: 100%; width: 100%; }
  .hp-auto .hp-extra { display: none; }
  .mb-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .ms-cols { grid-template-columns: minmax(0, 1fr); }
  .sbar { grid-template-columns: 86px 30px 1fr 46px; gap: 6px; }
  .ah-select { min-width: 0; width: 100%; }
  .shop-row { grid-template-columns: auto 1fr; }
  .shop-row .btns { grid-column: 1 / -1; justify-content: flex-end; }
}

/* cor do assunto: no fim do arquivo para valer sobre os padrões dos componentes */
[data-tone="neutral"] { --tone: var(--c-neutral); }
[data-tone="team"] { --tone: var(--c-team); }
[data-tone="item"] { --tone: var(--c-item); }
[data-tone="dex"] { --tone: var(--c-dex); }
[data-tone="auto"] { --tone: var(--c-auto); }
[data-tone="money"] { --tone: var(--c-money); }
[data-tone="hunt"] { --tone: var(--c-hunt); }
[data-tone="center"] { --tone: var(--c-center); }
[data-tone="boss"] { --tone: var(--c-boss); }
[data-tone="farm"] { --tone: #7fd06a; }


/* ---------- Hunts: fundo por ambiente (cores do bioma) e foto real do mapa 3D nas regiões que existem */
.categories { gap: 12px; align-items: start; }
.category { --env1: #2a3542; --env2: #1a222c; position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--hud-line);
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--env1) 55%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--env1) 70%, #111821), var(--env2));
  padding: 0; display: flex; flex-direction: column; min-height: 130px; }
.category::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .14; background-image: var(--env-pattern, none); background-size: 28px 28px; }
.category > * { position: relative; z-index: 1; }
.cat-title { margin: 0; padding: 12px 14px 4px; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cat-empty { margin: 0; padding: 0 14px 14px; color: rgba(232,239,244,.72); font-size: 12.5px; }
.category.empty { opacity: 1; }
.category.empty .cat-title { color: rgba(232,239,244,.8); }
.region-cover { height: 132px; margin: 6px 10px 0; border-radius: 10px; background-size: cover; background-position: center; border: 1px solid rgba(255,255,255,.15); box-shadow: inset 0 -40px 40px -20px rgba(0,0,0,.55); }
.category .region { border-top: 0; margin: 0; padding: 10px 14px 14px; }
.category .region p { margin: 6px 0; }
.category .species-row { background: rgba(0,0,0,.25); border-radius: 8px; padding: 4px; }

.category[data-env="forest"] { --env1: #2f7a3e; --env2: #10261a;
  --env-pattern: radial-gradient(circle at 30% 30%, #9be38f 0 3px, transparent 4px); }
.category[data-env="cave"] { --env1: #6b5440; --env2: #1d1712;
  --env-pattern: linear-gradient(135deg, transparent 45%, #d8b98f 46% 52%, transparent 53%); }
.category[data-env="ice-cave"] { --env1: #5b9fc4; --env2: #0f2433;
  --env-pattern: linear-gradient(135deg, transparent 45%, #d6f1ff 46% 52%, transparent 53%); }
.category[data-env="sea"] { --env1: #1f6fb2; --env2: #0b1f36;
  --env-pattern: radial-gradient(ellipse at 50% 100%, transparent 60%, #9fd4ff 62% 70%, transparent 72%); }
.category[data-env="lake"] { --env1: #1f8f8a; --env2: #0b2626;
  --env-pattern: radial-gradient(circle, transparent 55%, #a6efe8 57% 62%, transparent 64%); }
.category[data-env="field"] { --env1: #8aa83a; --env2: #22280f;
  --env-pattern: linear-gradient(90deg, transparent 46%, #e6f59a 47% 53%, transparent 54%); }
.category[data-env="desert"] { --env1: #c9a25a; --env2: #2a1f0e;
  --env-pattern: radial-gradient(ellipse at 50% 100%, transparent 58%, #f3d9a0 60% 66%, transparent 68%); }
.category[data-env="power-plant"] { --env1: #b8952a; --env2: #1f1a0a;
  --env-pattern: linear-gradient(120deg, transparent 40%, #ffe66b 41% 47%, transparent 48%, transparent 55%, #ffe66b 56% 60%, transparent 61%); }
.category[data-env="ruins"] { --env1: #8a6d4c; --env2: #221a12;
  --env-pattern: linear-gradient(#e7cfa6 0 2px, transparent 2px), linear-gradient(90deg, #e7cfa6 0 2px, transparent 2px); }

/* ---------- popups da Hunt (drop e captura) */
.g-res { position: relative; }
.notif-stack { position: absolute; bottom: calc(100% + 8px); right: 0; width: 252px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; pointer-events: none; z-index: 30; }
.notif { all: unset; box-sizing: border-box; pointer-events: auto; cursor: pointer; display: grid; gap: 6px; padding: 9px 10px; border-radius: 12px;
  background: rgba(14, 20, 28, .95); border: 1px solid var(--hud-line); border-left: 4px solid var(--c-item); box-shadow: 0 8px 24px rgba(0,0,0,.5);
  transform: translateX(24px); opacity: 0; transition: transform .25s ease-out, opacity .25s; }
.notif.in { transform: none; opacity: 1; }
.notif.out { transform: translateX(24px); opacity: 0; }
.notif:hover, .notif:focus-visible { border-color: rgba(255,255,255,.35); }
.notif.rare { border-left-color: var(--c-money); background: linear-gradient(135deg, rgba(80, 62, 14, .95), rgba(14, 20, 28, .95) 60%); }
.notif.capture { border-left-color: var(--c-dex); background: linear-gradient(135deg, rgba(90, 24, 24, .95), rgba(14, 20, 28, .95) 65%); }
.notif.capture.shiny { border-left-color: var(--c-money); }
.nt-head { display: flex; align-items: center; gap: 9px; }
.nt-icon { width: 36px; height: 36px; border-radius: 9px; background: rgba(0,0,0,.3); display: grid; place-items: center; flex: none; }
.nt-icon.big { width: 52px; height: 52px; }
.nt-title { display: grid; gap: 1px; min-width: 0; }
.nt-title strong { font-size: 13.5px; }
.notif.drop .nt-title strong { color: var(--c-item); }
.notif.rare .nt-title strong, .notif.capture.shiny .nt-title strong { color: var(--c-money); }
.notif.capture .nt-title strong { color: #ff9a94; }
.nt-title span { font-size: 11.5px; color: var(--muted); }
.nt-title .nt-new { color: var(--c-team); font-weight: 700; }
.nt-items { display: flex; flex-wrap: wrap; gap: 4px; }
.nt-item { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 8px; background: rgba(240,165,65,.12); border: 1px solid rgba(240,165,65,.3); font-size: 12px; font-weight: 600; }
.nt-item.rare { background: rgba(245,200,76,.18); border-color: var(--c-money); color: var(--c-money); }
.nt-foot { display: flex; gap: 10px; font-size: 11.5px; font-weight: 700; flex-wrap: wrap; }
.nt-foot .xp { color: var(--xp); } .nt-foot .money { color: var(--c-money); } .nt-foot .lv { color: var(--c-team); }
@media (max-width: 720px) {
  .notif-stack { width: calc(100vw - 12px); }
  .notif { padding: 7px 9px; }
}

/* Hunts: todos os cards do mesmo tamanho (linhas iguais, Pokémon em 2 fileiras, botão no rodapé) */
.categories { align-items: stretch; grid-auto-rows: 1fr; }
.category .region { flex: 1; display: flex; flex-direction: column; }
.category .species-row { min-height: 80px; align-content: flex-start; }
.category .region > .btn { margin-top: auto; align-self: flex-start; }

/* Hunts por nível do treinador: abas por ambiente (uma Hunt por vez, mesmo tamanho de card) e Hunt bloqueada */
.category { display: flex; flex-direction: column; }
.cat-body { flex: 1; display: flex; flex-direction: column; }
.tier-tabs { display: flex; flex-wrap: nowrap; align-items: center; gap: 3px; padding: 4px 10px 0; overflow: hidden; }
.tier-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-right: 2px; }
.tier-tab { font: inherit; font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; cursor: pointer; flex: none;
  background: rgba(0,0,0,.35); color: var(--hud-text, #e8eff4); border: 1px solid rgba(255,255,255,.18); }
.tier-tab:hover { border-color: rgba(255,255,255,.4); }
.tier-tab.sel { background: var(--c-hunt); border-color: var(--c-hunt); color: #1a1208; }
.tier-tab.locked { color: rgba(232,239,244,.55); border-style: dashed; }
.tier-tab.locked.sel { background: rgba(255,143,74,.3); border-color: var(--c-hunt); color: #fff; }
.home-tabs { flex-wrap: wrap; overflow: visible; padding: 0 0 10px; row-gap: 4px; }
.region-cover.locked { filter: grayscale(.85) brightness(.45); }
.category .region > .btn.lock:disabled { opacity: 1; background: rgba(0,0,0,.45); border-color: var(--c-money); color: var(--c-money); }

/* ---------- PC do Centro Pokémon (screens/pc.js): equipe à esquerda, caixa em grade de slots à direita (como nos jogos) */
.pcbox-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.pcbox-col .section-title { margin-top: 0; }
.pcbox-col .toolbar { margin-bottom: 8px; flex-wrap: nowrap; }
.pcbox-col .toolbar .input[type="search"] { flex: 1; min-width: 0; }
.pcbox-party { min-height: 120px; border-radius: 12px; padding: 2px; }
.pcbox-party.drop-over { outline: 2px dashed var(--c-team); outline-offset: 2px; }
.pcbox-drop-hint { border: 1px dashed var(--hud-line); border-radius: 10px; padding: 10px; text-align: center; font-size: 12px; color: var(--muted); }
.pcbox-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 10px; background: var(--hud-raise); border: 1px solid transparent; margin-bottom: 4px; }
.pcbox-row.active { border-color: color-mix(in srgb, var(--c-team) 55%, transparent); }
.pcbox-row.drop-over { border-color: var(--c-center); background: color-mix(in srgb, var(--c-center) 14%, transparent); }
.pcbox-row.fainted .pcbox-open img { filter: grayscale(1); opacity: .6; }
.pcbox-open { all: unset; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: rgba(0,0,0,.22); flex: none; }
.pcbox-open:hover, .pcbox-open:focus-visible { outline: 2px solid var(--c-team); }
.pcbox-info { min-width: 0; display: grid; gap: 3px; }
.pcbox-info .mc-line .alink { font-size: 13.5px; }
.pcbox-sub { display: grid; grid-template-columns: auto minmax(40px, 1fr); gap: 8px; align-items: center; }
.pcbox-sub .track { margin: 0; }
.pcbox-col .btn.primary { background: var(--c-center); border-color: var(--c-center); color: #fff; }
/* arrastar */
.pcbox-drag { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.pcbox-drag.dragging { opacity: .35; }
.pcbox-ghost { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 12px; background: rgba(13, 19, 27, .75); box-shadow: 0 6px 18px rgba(0,0,0,.5); outline: 2px solid var(--c-center); }
/* cabeçalho da caixa: setas e nome */
.pcbox-head { display: grid; grid-template-columns: 38px 1fr 38px; gap: 6px; margin-bottom: 6px; }
.pcbox-arrow { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; border-radius: 10px; background: var(--hud-bg2); border: 1px solid var(--hud-line); font-size: 14px; color: var(--text); }
.pcbox-arrow:hover, .pcbox-arrow:focus-visible, .pcbox-arrow.drop-over { border-color: var(--c-center); background: color-mix(in srgb, var(--c-center) 22%, var(--hud-bg2)); }
.pcbox-label { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 10px; border-radius: 10px; font-size: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c-center) 30%, #1c2632), #16202b); border: 1px solid color-mix(in srgb, var(--c-center) 45%, transparent); }
.pcbox-label strong { letter-spacing: .04em; }
.pcbox-label span { font-size: 12px; color: var(--muted); }
/* grade de slots, com fundo temático por caixa */
.pcbox-grid { --b1: #4f9a55; --b2: #3f8546; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 8px; border-radius: 12px;
  border: 1px solid rgba(0,0,0,.35); box-shadow: inset 0 0 0 2px rgba(255,255,255,.08);
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.05) 14px 16px), linear-gradient(180deg, var(--b1), var(--b2)); }
.pcbox-grid[data-theme="sea"] { --b1: #3e86c4; --b2: #2c6aa3; }
.pcbox-grid[data-theme="cave"] { --b1: #7a6550; --b2: #5e4c3c; }
.pcbox-grid[data-theme="desert"] { --b1: #c9a45f; --b2: #a8854a; }
.pcbox-grid[data-theme="forest"] { --b1: #2f6f45; --b2: #245636; }
.pcbox-grid[data-theme="ice"] { --b1: #8fbfd9; --b2: #6c9fbd; }
.pcbox-grid[data-theme="sky"] { --b1: #8a9fe0; --b2: #6b7fc4; }
.pcbox-grid[data-theme="volcano"] { --b1: #a8513b; --b2: #84402f; }
.pcbox-slot { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; background: rgba(0,0,0,.12); border: 1px solid rgba(255,255,255,.10); min-width: 0; }
.pcbox-slot img { max-width: 100%; height: auto; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.pcbox-slot.filled:hover, .pcbox-slot.filled:focus-visible { background: rgba(255,255,255,.18); outline: none; }
.pcbox-slot.sel { background: rgba(255,255,255,.22); box-shadow: 0 0 0 2px var(--c-center); }
.pcbox-slot.drop-over { background: rgba(255,255,255,.28); box-shadow: 0 0 0 2px #fff; }
.pcbox-slot.dim { opacity: .28; }
.pcbox-slot.hit { box-shadow: 0 0 0 2px var(--c-money); }
.pcbox-slot.fainted img { filter: grayscale(1); opacity: .7; }
.pcbox-shiny { position: absolute; top: 1px; right: 4px; font-size: 11px; color: #ffe27a; text-shadow: 0 1px 2px #000; }
.pcbox-stars { position: absolute; bottom: 1px; left: 4px; font-size: 10px; font-weight: 800; color: #f5c84c; text-shadow: 0 1px 2px #000; }
.pcbox-found { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.pcbox-found:empty { display: none; }
.pcbox-sel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 8px; padding: 6px 8px; border-radius: 10px; background: var(--hud-raise); min-height: 40px; }
.pcbox-sel > .muted { grid-column: 1 / -1; }
.pcbox-sel .row { display: flex; gap: 6px; }
@media (max-width: 720px) { .pcbox-cols { grid-template-columns: minmax(0, 1fr); } }

/* Bônus da conta pela Pokédex (pokedex/account-bonus.js) */
.dex-bonus-panel { display: grid; gap: 6px; margin: 0 0 10px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--c-dex) 35%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--c-dex) 8%, transparent); }
.dex-bonus-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.dex-bonus-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.dex-bonus-stat { display: inline-flex; gap: 4px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.dex-bonus-stat.on { color: inherit; border-color: var(--c-dex); }
.dex-bonus-stat.on b { color: var(--c-dex); }
.dex-cell { position: relative; }
.dex-prog { position: absolute; bottom: 3px; right: 5px; display: flex; gap: 3px; font-size: 10px; color: var(--muted); }
.dex-prog .done { color: var(--c-dex); font-size: 12px; }
.dex-prog .shiny { color: var(--c-money); font-size: 12px; }
.dex-bonus-tracks { display: grid; gap: 2px; }
.dex-bonus-track { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.dex-bonus-track.shiny .alink { color: var(--c-money); }
.dex-bonus-species.shiny.done { border-color: var(--c-money); }
.dex-bonus-species { display: grid; gap: 4px; margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.dex-bonus-species.done { border-color: var(--c-dex); }
.sbar-bonus { color: var(--c-dex); font-size: 10px; }
.dex-bonus-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; }
.dex-bonus-bar > div { height: 100%; background: var(--c-dex); }
.dex-bonus-species.shiny .dex-bonus-bar > div { background: var(--c-money); }
/* ficha da espécie simplificada: progresso do bônus numa linha, onde encontrar, versão shiny */
.dex-bonus-species { margin: 6px 0; }
.dex-bonus-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.dex-shiny { align-items: center; gap: 6px; }
.dex-where { display: flex; gap: 6px; flex-wrap: wrap; }
.dex-where-hunt { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.dex-where-hunt.locked { opacity: .55; }

/* modo da Hunt (Normal/Hard) na tela de Hunts */
.hunt-modes .mode-info { font-size: 11.5px; margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* bando de selvagens: a barra do alvo do jogador fica destacada */
.hpbar.foe.target { outline: 2px solid var(--c-hunt, #f0a030); outline-offset: 1px; z-index: 2; }
.w-pack { margin-left: 4px; }
.hpbar.foe.compact .name { display: none; }
.hpbar.foe.compact { opacity: .85; }
.shop-row.sell-all { outline: 1px solid var(--hud-accent, #5b8bd6); }

/* Escolher golpes (ficha do Pokémon) */
.ms-moves-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ms-moves-head > .btn, .ms-moves-btns { margin-left: auto; }
.ms-moves-btns { display: inline-flex; gap: 6px; }
.mpick .mcard-eff { display: none; }
.mpick .mcard { padding: 4px 10px; }
.mpick { all: unset; cursor: pointer; display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 6px; }
.mpick:focus-visible .mcard { outline: 2px solid currentColor; }
.mpick-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; border: 2px dashed var(--muted, #888); }
.mpick.sel .mpick-n { border-style: solid; background: var(--tone, #5573ea); border-color: var(--tone, #5573ea); color: #fff; }
.mpick .mcard { opacity: .7; }
.mpick.sel .mcard { opacity: 1; }
.mpick-lv { font-size: 11px; min-width: 42px; }

/* ---------- painéis soltos (arrastados pelo jogador: hud/drag.js) */
.g-float { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.g-float > .hpanel { position: absolute; pointer-events: auto; max-height: calc(100% - 8px); overflow: auto; scrollbar-width: thin; }
.hud-drag-handle { touch-action: none; }
.hpanel.dragging { opacity: .85; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); cursor: grabbing; }
.hpanel.floating .hp-head { cursor: grab; }
.player-card { position: relative; }
.hud-grip { position: absolute; top: 4px; right: 6px; font-size: 14px; line-height: 1; opacity: .45; cursor: grab; user-select: none; padding: 2px; }
.hud-grip:hover { opacity: .9; }
@media (max-width: 720px) { .hud-grip { display: none; } }

/* seta que mostra/esconde os painéis: só existe no celular (mobile.css) */
.hud-more { display: none; }
