/*
 * Tema HGSS: carregado por último (game/index.html), por cima de hud.css, skill-bar.css e day-care.css.
 * Referências do jogador: o "mapmaking guide" de HG/SS (painéis cinza-escuros arredondados, borda fina clara,
 * títulos pequenos em maiúsculas pixeladas com filete, amostras de cor + rótulo, paleta do mapa) e a folha
 * de barras de HP de HG/SS (rótulo "HP" laranja em caixa escura, barra verde/amarela/vermelha, XP azul).
 * Fonte: assets/fonts/idlepoke-pixel.ttf, desenhada para o projeto (5×7, maiúsculas, minúsculas, acentos do pt-BR).
 *   Nítida em 11 px (1 pixel da fonte = 1 px) e 22 px; 16,5 px fica um pouco suave e é usada só em nomes.
 * Só estilo: nenhuma regra muda o que é mostrado.
 */
@font-face { font-family: 'Idlepoke Pixel'; src: url('/assets/fonts/idlepoke-pixel.ttf') format('truetype'); font-display: swap; }

:root {
  --px: 'Idlepoke Pixel', 'Courier New', monospace;
  /* paleta do mapa HG/SS: terra (verdes), água (azuis), montanha (beges), cidades (vermelho) */
  --map-land: #63c98a; --map-land-dark: #3f9a68;
  --map-water: #4fb6e3; --map-water-deep: #2f86c4; --map-foam: #b9ecff;
  --map-mount: #e0a46a; --map-mount-dark: #b07a4b;
  --map-town: #e2475b; --map-road: #f4f4f4;
  /* assuntos da HUD mapeados na paleta */
  --c-team: var(--map-land);
  --c-auto: var(--map-water);
  --c-item: var(--map-mount);
  --c-dex: var(--map-town);
  --c-money: #f2cb4f;
  --c-hunt: #f08a3c;
  --c-center: #f07fa6;
  --c-neutral: #a9a9a9;
  /* painéis do guia */
  --hud-bg: rgba(40, 40, 42, .93);
  --hud-bg2: rgba(56, 56, 60, .95);
  --hud-raise: rgba(255, 255, 255, .045);
  --hud-hover: rgba(255, 255, 255, .085);
  --hud-line: rgba(255, 255, 255, .16);
  --hud-r: 8px;
  --hp-tag: #f4a52a;
}

/* ---------- painéis: cinza-escuro, borda clara fina, sem faixa colorida grossa */
.hpanel, .menubar, .hud-log2, .skillbar, .modal.win, .notif {
  background: var(--hud-bg); border: 1px solid var(--hud-line); border-radius: var(--hud-r);
  box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 6px 18px rgba(0,0,0,.35);
}
.hpanel::before { height: 0; }
.modal.win::before { height: 0; }
.modal.win { background: #29292b; }

/* títulos: pequenos, maiúsculos, pixelados, com filete fino até a borda (como "WATER", "LAND" no guia) */
.hp-head { font-family: var(--px); font-size: 11px; font-weight: 400; letter-spacing: .12em; color: #d9d9d9; padding: 9px 10px 7px; gap: 8px; }
.hp-head .hp-title { flex: 0 1 auto; }
.hp-head .hp-title::after { content: ''; display: inline-block; vertical-align: middle; width: 0; }
.hp-head .hp-extra { font-family: var(--px); font-size: 11px; letter-spacing: .04em; color: #9a9a9a; margin-left: auto; }
.hp-head .ico { filter: drop-shadow(0 1px 0 #000); }
.hp-head::after { content: ''; order: 2; flex: 1 1 10px; height: 1px; background: rgba(255,255,255,.18); min-width: 8px; }
.hp-head .hp-extra, .hp-head .hp-arrow, .hp-head .res-money { order: 3; }
.hp-head .hp-arrow { font-family: var(--px); color: #8a8a8a; }
/* amostra de cor do assunto antes do título (como as amostras do guia) */
.hp-head > .ico { width: 16px; height: 16px; border-radius: 4px; background: color-mix(in srgb, var(--tone) 28%, #1d1d1f); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 60%, transparent); }
.hp-head > .ico svg { width: 12px; height: 12px; }

.section-title { font-family: var(--px); font-size: 11px; font-weight: 400; letter-spacing: .14em; color: #cfcfcf; }
.section-title::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--tone, #8a8a8a); flex: none; }
.section-title::after { background: rgba(255,255,255,.16); }

/* janelas: título grande pixelado e sublinhado, como "Pokémon mapmaking guide" */
.win-head { border-bottom: 0; padding: 14px 12px 6px 18px; }
.win-head h2 { font-family: var(--px); font-size: 22px; font-weight: 400; letter-spacing: .04em; padding-bottom: 6px; border-bottom: 2px solid rgba(255,255,255,.75); flex: 0 1 auto; margin-right: auto; }
.win-head h2::before { width: 12px; height: 12px; border-radius: 3px; }
.win .actions { border-top: 1px solid rgba(255,255,255,.1); }

/* ---------- menu do topo */
.mb-label { font-family: var(--px); font-size: 11px; font-weight: 400; letter-spacing: .06em; }
.mb-key { font-family: var(--px); font-size: 11px; transform: scale(.82); transform-origin: top right; }
.mb::after { left: 38%; right: 38%; height: 3px; border-radius: 2px; opacity: .8; }
.mb.open { background: color-mix(in srgb, var(--tone) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 55%, transparent); }
.mb-sep { background: rgba(255,255,255,.14); }
.mb-badge { font-family: var(--px); font-size: 11px; font-weight: 400; }

/* ---------- textos de destaque em pixel */
.pc-name, .tm-n, .w-name, .ms-title strong, .nt-title strong, .mc-line .alink, .owned-mon, .dex-name, .it-name, .shop-row .it-name {
  font-family: var(--px); font-weight: 400; letter-spacing: .02em;
}
.pc-name { font-size: 16.5px; }
.tm-n { font-size: 11px; }
.tm-lv, .ms-title .muted, .w-head > .muted { font-family: var(--px); font-size: 11px; color: #e8e8e8; }
.tm-lv::first-letter { color: var(--c-money); }
.w-name { font-size: 16.5px; }
.ms-title strong { font-size: 22px; }
.pill { font-family: var(--px); font-size: 11px; font-weight: 400; letter-spacing: .04em; padding: 0 5px; border-radius: 4px; line-height: 13px; }
.chip strong, .stat strong, .money-tag, .price, .it-qty, .res-chip span, .nt-foot, .sbar-val { font-family: var(--px); font-weight: 400; font-size: 11px; letter-spacing: .03em; }
.money-tag, .price { font-size: 16.5px; }
.res-caption, .tier-label, .stat span, .ar-sum, .sbar-label, .sbar-iv { font-family: var(--px); font-weight: 400; font-size: 11px; letter-spacing: .05em; }
.ar-name { font-family: var(--px); font-weight: 400; font-size: 11px; letter-spacing: .05em; }
.type, button.type { font-family: var(--px); font-weight: 400; font-size: 11px; letter-spacing: .03em; border-radius: 3px; padding: 1px 5px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }

/* ---------- barras de HP no estilo HG/SS: caixa escura com "HP" laranja + barra verde/amarela/vermelha; XP azul */
.track { position: relative; height: 9px; border-radius: 3px; background: #4b4b50; border: 1px solid #111; box-sizing: border-box; overflow: hidden; }
.track .fill { border-radius: 1px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.35); }
.track .fill[data-level="ok"], .track .fill:not([data-level]) { background: #48d870; }
.track .fill[data-level="mid"] { background: #f8d030; }
.track .fill[data-level="low"] { background: #f85838; }
.track:not(.xp) { padding-left: 17px; background: linear-gradient(90deg, #26262a 0 16px, #4b4b50 16px); }
.track:not(.xp)::before { content: 'HP'; position: absolute; left: 1px; top: 50%; transform: translateY(-50%); font: 11px/1 var(--px); color: var(--hp-tag); letter-spacing: 0; }
.track .fill { height: 100%; }
.track.xp { height: 5px; padding: 0; border-color: #111; background: #3a3a3e; }
.track.xp .fill { background: #40c8f8; box-shadow: inset 0 -1px 0 rgba(0,0,0,.2); }
.tm .track { height: 9px; }
.tm .track.xp { height: 4px; }
.tm-sub { font-family: var(--px); font-size: 11px; }
.w-hp .track { height: 11px; }
.w-hp span, .ms-bars > span:not(.muted) { font-family: var(--px); font-size: 11px; }
.ms-bars .track { height: 10px; }
/* barras sobre os sprites no mapa (cartão claro do HG/SS) */
.hpbar { width: 104px; background: linear-gradient(180deg, #f2f2f2, #cfd0d4); color: #202020; border: 1px solid #1b1b1b !important; border-radius: 4px 10px 4px 4px; padding: 2px 6px 3px; box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.hpbar .name { font: 11px/1.2 var(--px); color: #202020; }
.hpbar.foe { border-left: 3px solid var(--map-town) !important; }
.hpbar.ally { border-left: 3px solid var(--map-water) !important; }
.hpbar .track { margin: 2px 0 0; }

/* ---------- linhas com amostra + rótulo (Time, Auto-Helper, Itens) */
.tm { border-radius: 6px; background: rgba(255,255,255,.035); }
.tm.active { background: color-mix(in srgb, var(--c-team) 9%, transparent); }
.tm-icon, .nt-icon, .mon-card .mc-open, .pcbox-open { border-radius: 6px; background: #1f1f21; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.ar { border-radius: 6px; }
.ar::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: #555; flex: none; }
.ar:not(.off)::before { background: var(--c-auto); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-auto) 30%, transparent); }
.tg input:checked + .tg-ui { background: var(--map-water-deep); }
.res-chip { border-radius: 6px; background: #1f1f21; }
.stat { border-radius: 6px; background: #1f1f21; border-left: 0; padding-left: 6px; }
.stat::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--tone, #8a8a8a); align-self: center; margin-right: 2px; flex: none; }
.stat span { flex: 1; }
.chip { border-radius: 6px; }
.pc-place::before { border-radius: 2px; }

/* registro: texto pixel pequeno */
.hud-log2 { font: 11px/1.55 var(--px); letter-spacing: .03em; }
.hud-log2 > div::before { border-radius: 1px; }

/* selvagem: cartão do inimigo com a borda da cidade (vermelho do mapa) */
.hud-wild2 { background: rgba(40, 40, 42, .94); border: 1px solid var(--hud-line); border-left: 4px solid var(--map-town); border-radius: var(--hud-r); }

/* popups */
.notif { border-left-width: 4px; }
.notif.drop { border-left-color: var(--map-mount); }
.notif.capture { border-left-color: var(--map-town); background: rgba(40, 40, 42, .95); }
.notif.rare { background: linear-gradient(135deg, rgba(90, 70, 20, .9), rgba(40, 40, 42, .95) 60%); }
.nt-item { border-radius: 6px; }

/* abas e botões */
.seg { border-radius: 8px; background: #1f1f21; }
.seg button { font-family: var(--px); font-size: 11px; font-weight: 400; letter-spacing: .06em; border-radius: 5px; padding: 6px 10px; }
.btn { border-radius: 6px; }
.lbtn { border-radius: 6px; font-family: var(--px); font-weight: 400; font-size: 11px; letter-spacing: .04em; padding: 6px 10px; }
.lbtn .dot { border-radius: 2px; }
.hlink { font-family: var(--px); font-weight: 400; font-size: 11px; letter-spacing: .04em; }
.tier-tab { font-family: var(--px); font-weight: 400; font-size: 11px; border-radius: 4px; }

/* cartões e listas das janelas */
.mon-card, .item-tile, .shop-row, .use-row, .pcbox-row, .mcard, .kv > div, .ah-card, .dex-cell, .category, .item-detail, details.learnset { border-radius: 8px; }
.mon-card, .shop-row, .use-row, .pcbox-row, .item-tile, .kv > div, .mcard { background: #232325; }
.dex-cell { background: #232325; border-color: rgba(255,255,255,.12); }
.dex-no { font-family: var(--px); font-size: 11px; }
.category { border-color: rgba(255,255,255,.16); }
.cat-title { font-family: var(--px); font-weight: 400; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.cat-title::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.25); }
.region-cover { border-radius: 6px; }

/* barra de golpes: mesma moldura dos painéis */
.sb-title { font-family: var(--px); font-size: 11px; letter-spacing: .05em; color: #bdbdbd; }
.sb-slot { border-radius: 6px; }
.sb-name { font-family: var(--px); font-weight: 400; font-size: 11px; letter-spacing: .02em; }
.sb-info, .sb-tags span, .sb-key, .sb-cd { font-family: var(--px); font-weight: 400; }
.sb-info { font-size: 11px; }

@media (max-width: 720px) {
  .mb-label { font-size: 11px; letter-spacing: 0; }
  .win-head h2 { font-size: 16.5px; }
  .pc-name { font-size: 11px; }
}

/* cartão do treinador (nível) */
.pc-tlv, .pc-txp-text { font-family: var(--px); font-weight: 400; font-size: 11px; letter-spacing: .04em; }
.pc-txp { height: 7px; border-radius: 3px; border: 1px solid #111; background: #3a3a3e; }
.pc-place { font-family: var(--px); font-size: 11px; letter-spacing: .03em; }

/* mais textos de destaque em pixel: golpes, tipos fortes/fracos, itens dos popups, Hunts e números sobre o mapa */
.mcard-head strong, .mu-label, .nt-item, .category .region > div > strong, .item-detail-head strong, .ah-titles strong { font-family: var(--px); font-weight: 400; letter-spacing: .02em; }
.mcard-head strong, .item-detail-head strong, .ah-titles strong { font-size: 16.5px; }
.mu-label, .nt-item { font-size: 11px; }
.category .region > div > strong { font-size: 16.5px; }
.float { font-family: var(--px); font-weight: 400; font-size: 22px; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.float.crit { font-size: 22px; } .float.status, .float.note { font-size: 11px; }
