/* =====================================================================
   Visual do jogo — retrô "caixas flutuantes + TV antiga" (cores e fontes: temas/<tema>/tema.css).
   Painéis azul-marinho quase pretos com borda pixel creme/dourada de canto
   chanfrado (sombras em cruz), contorno escuro e sombra projetada que solta a
   caixa do fundo. Destaques em dourado (moeda, seleção, botão principal) e
   laranja Konoha. Por cima de tudo, um filtro CRT feito só com CSS (#crt).
   ===================================================================== */

@property --lift { syntax: "<length>"; inherits: false; initial-value: 0px; }

:root {
  /* cores e fontes: temas/<tema>/tema.css (carregado antes deste arquivo) */
  --top-h: 52px;
  --dock-h: 76px;
  --bottom-h: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
  --side-w: 220px;
  /* Escala do HUD em telas grandes (o canvas do mapa não usa zoom: só desconta a altura das barras). */
  --hud-zoom: 1;
  /* Largura/altura da tela já descontado o zoom (para usar dentro de elementos com zoom). */
  --vw: calc(100vw / var(--hud-zoom));
  --vh: calc(100dvh / var(--hud-zoom));
  /* Altura livre entre as barras, em unidades do HUD. */
  --free-h: calc(var(--vh) - var(--top-h) - var(--bottom-h));
  --ease: cubic-bezier(.2, .8, .3, 1);
  --font-pixel: var(--font-ui);
  --dither: radial-gradient(#ffffff0a 1px, transparent 1.2px) 0 0 / 4px 4px;
  font-family: var(--font-ui);
  font-size: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--text); overflow: hidden; -webkit-tap-highlight-color: transparent; }
body { line-height: 1.25; -webkit-font-smoothing: none; font-synthesis: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, [data-open]:focus-visible { outline: 2px dashed var(--gold); outline-offset: 5px; }
img { image-rendering: pixelated; }
.hidden { display: none !important; }
::selection { background: var(--gold); color: var(--gold-ink); }
.muted { color: var(--muted); }

/* Barras de rolagem quadradas */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--navy-0); }
::-webkit-scrollbar-thumb { background: var(--navy-4); border: 3px solid var(--navy-0); box-shadow: inset 0 2px 0 #ffffff1a; }
::-webkit-scrollbar-thumb:hover { background: var(--edge-dim); }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--navy-4) var(--navy-0); } }

#app { position: fixed; inset: 0; }
#game {
  position: absolute; left: 0; right: 0; top: calc(var(--top-h) * var(--hud-zoom)); bottom: calc(var(--bottom-h) * var(--hud-zoom));
  width: 100%; height: calc(100% - (var(--top-h) + var(--bottom-h)) * var(--hud-zoom));
  image-rendering: pixelated; cursor: pointer; background: #05080c;
}
/* Efeitos visuais Alto (visual.js): cores um pouco mais vivas e contrastadas. O filtro roda na placa de vídeo. */
html.gfx-alta #game { filter: saturate(1.08) contrast(1.03); }

.hud { position: absolute; z-index: 5; }
#topbar, #bottombar, #quest-card, #analyzer, #minimap-box, #battle-bar, #toasts, #chat-peek, #dialog, #capture-pop, #menu-drawer, #panel, #offer-pop, #gift-stack, #joystick, #hud-tab { zoom: var(--hud-zoom); }

/* ---------- Ícones (assets/ui/icons, 64×64) ---------- */
.ico { width: var(--s, 32px); height: var(--s, 32px); display: inline-block; vertical-align: middle; flex: none; image-rendering: pixelated; object-fit: contain; }
[data-ico] { display: inline-block; }

/* =====================================================================
   CAIXA FLUTUANTE — a peça base de toda a interface.
   Borda (--edge) de --px com canto chanfrado, contorno escuro de 2 px, chanfro
   interno claro/escuro, sombra dura projetada e sombra suave. --lift levanta.
   :where() deixa a especificidade zerada: qualquer regra comum sobrescreve.
   ===================================================================== */
:where(.fbox, #panel, #dialog, #capture-pop, #legend-pop, #launch-pop, #le-pop, #offer-pop, .cr-wrap, #quest-card, #analyzer, #minimap-box, #battle-bar,
  .tb-player, .tb-auto, .coin, .icon-btn, .lead-card, .team-slot, .hot-slot, #hotbar, .card, .list-item, .toast,
  .an-big, .an-grid > div, .empty-note, .log, .menu-card, .menu-chip, .menu-toggle, .tab, .seg, .day-cell,
  select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, .cr-name,
  .cr-starter, .cr-identity, .auth-save, .dlg-name, .p-ico) {
  --px: 2px;
  --edge: var(--edge-base);
  --ol: var(--outline);
  --face: var(--navy-1);
  --drop: #000000b0;
  --glow: 0 0 0 0 transparent;
  background-color: var(--face);
  box-shadow:
    inset 0 var(--px) 0 0 #ffffff12, inset 0 calc(-1 * var(--px)) 0 0 #0000005c,
    calc(-1 * var(--px)) 0 0 0 var(--edge), var(--px) 0 0 0 var(--edge), 0 calc(-1 * var(--px)) 0 0 var(--edge), 0 var(--px) 0 0 var(--edge),
    calc(-1 * var(--px) - 2px) 0 0 0 var(--ol), calc(var(--px) + 2px) 0 0 0 var(--ol), 0 calc(-1 * var(--px) - 2px) 0 0 var(--ol), 0 calc(var(--px) + 2px) 0 0 var(--ol),
    calc(-1 * var(--px)) calc(-1 * var(--px)) 0 0 var(--ol), var(--px) calc(-1 * var(--px)) 0 0 var(--ol), calc(-1 * var(--px)) var(--px) 0 0 var(--ol), var(--px) var(--px) 0 0 var(--ol),
    0 calc(var(--px) + 5px + var(--lift)) 0 calc(var(--px) - 1px) var(--drop),
    0 calc(12px + var(--lift) * 2) 18px -4px #00000080,
    var(--glow);
}
.fbox-3, #panel, #dialog, #capture-pop, .cr-wrap, .menu-card, .cr-starter { --px: 3px; }
/* Interativa: levanta 2–3 px no hover. */
.lift, .card[data-act], .menu-card, .menu-chip, .lead-card, .team-slot, .hot-slot, .tb-player, .icon-btn, .cr-starter, .tab, .day-cell.today {
  transition: transform .14s var(--ease), --lift .14s var(--ease), filter .15s;
}
.lift:hover, .card[data-act]:hover, .menu-chip:hover, .lead-card:hover, .team-slot:hover, .hot-slot:not(.empty):hover, .tb-player:hover, .icon-btn:hover, .tab:not(.on):hover {
  transform: translateY(-2px); --lift: 2px; --edge: var(--gold);
}
.lift:active, .card[data-act]:active, .menu-chip:active, .lead-card:active, .team-slot:active, .hot-slot:active, .tb-player:active, .icon-btn:active { transform: translateY(1px); --lift: -1px; }
.panel-float { --px: 2px; }

/* ---------- Peças básicas ---------- */
/* Barra segmentada em pixel (HP verde, EXP azul). */
.bar {
  position: relative; display: block; height: 10px; background: #02030a; overflow: hidden;
  box-shadow: inset 0 0 0 1px #000, inset 0 2px 0 #00000080;
  outline: 1px solid #ffffff1c; outline-offset: 0;
}
.bar > span {
  position: absolute; inset: 1px auto 1px 1px; width: 0; max-width: calc(100% - 2px);
  background: linear-gradient(180deg, #b8ffc4 0 2px, var(--green) 2px 60%, #2f9e4c 60%);
  transition: width .35s var(--ease);
}
.bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 5px, #00000073 5px 6px); pointer-events: none; }
.bar.thin { height: 6px; }
.bar.thin > span { background: linear-gradient(180deg, #b8ffc4 0 1px, var(--green) 1px 60%, #2f9e4c 60%); }
.bar.thin::after { background: repeating-linear-gradient(90deg, transparent 0 4px, #00000073 4px 5px); }
.bar.xp > span { background: linear-gradient(180deg, #c9e6ff 0 2px, var(--blue) 2px 60%, #2c6fd0 60%); }
.bar.hp-mid > span { background: linear-gradient(180deg, #fff2a8 0 2px, #f5c242 2px 60%, #c98f1c 60%); }
.bar.hp-low > span { background: linear-gradient(180deg, #ffc0b4 0 2px, var(--red) 2px 60%, #b02a1c 60%); animation: lowHp 1s steps(2) infinite; }

/* Badge de nível: plaquinha dourada com contorno pixel. */
.lvl-badge {
  font-style: normal; font-family: var(--font-ui); font-weight: 700; font-size: 14px; line-height: 15px; white-space: nowrap; display: inline-block;
  background: linear-gradient(180deg, var(--gold-hi) 0 2px, var(--gold) 2px 70%, var(--gold-2) 70%); color: var(--gold-ink); padding: 0 5px;
  box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 3px 0 #0008; letter-spacing: .3px;
}

/* Botões chunky: cinza-claro (secundário), dourado (principal), vermelho (perigo). */
.btn {
  --bf: var(--silver); --bf-hi: #ffffff; --bf-lo: var(--silver-2); --bink: #141826; --bedge: #04050b;
  position: relative; border: 0; background: linear-gradient(180deg, var(--bf-hi) 0 2px, var(--bf) 2px calc(100% - 4px), var(--bf-lo) calc(100% - 4px));
  color: var(--bink); padding: 8px 14px 9px; font-family: var(--font-ui); font-weight: 700; font-size: 17px; letter-spacing: .6px; text-transform: uppercase;
  line-height: 1.1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 2px;
  box-shadow: -2px 0 0 0 var(--bedge), 2px 0 0 0 var(--bedge), 0 -2px 0 0 var(--bedge), 0 2px 0 0 var(--bedge), 0 6px 0 0 #000000a8;
  transition: transform .1s var(--ease), filter .15s, box-shadow .1s;
  text-shadow: 0 1px 0 #ffffff66;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: -2px 0 0 0 var(--bedge), 2px 0 0 0 var(--bedge), 0 -2px 0 0 var(--bedge), 0 2px 0 0 var(--bedge), 0 3px 0 0 #000000a8; }
.btn.primary, .btn.gold { --bf: var(--gold); --bf-hi: var(--gold-hi); --bf-lo: var(--gold-2); --bink: var(--gold-ink); }
.btn.gold { overflow: hidden; }
.btn.gold::before { content: ""; position: absolute; top: 0; bottom: 0; width: 10px; left: -20px; background: #ffffffa0; transform: skewX(-20deg); animation: shine 2.6s steps(14) infinite; }
.btn.danger { --bf: #e8473a; --bf-hi: #ff9c8a; --bf-lo: #a52a20; --bink: #fff; text-shadow: 0 1px 0 #0006; }
.btn.small { padding: 6px 10px 7px; font-size: 16px; }
.btn:disabled { filter: grayscale(.9) brightness(.7); cursor: not-allowed; }
.btn .ico { margin: -4px 0; }

.icon-btn {
  --face: var(--navy-2); --edge: var(--edge-dim); border: 0; padding: 4px 8px; line-height: 1; color: var(--text); margin: 2px;
  display: inline-grid; place-items: center;
}
.icon-btn.square { width: 38px; height: 38px; font-size: 23px; padding: 0; flex: none; }
.icon-btn.mini { padding: 0; width: 24px; height: 24px; font-size: 17px; flex: none; }

/* ---------- Topo ---------- */
#topbar, #bottombar { background: var(--dither), linear-gradient(180deg, #0d1226, #070a15); }
#topbar {
  left: 0; right: 0; top: 0; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 6px 12px;
  padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right));
  box-shadow: 0 2px 0 var(--rail), 0 4px 0 #000, 0 8px 14px #0008;
}
.tb-player { position: relative; display: flex; align-items: center; gap: 8px; border: 0; padding: 2px 10px 2px 2px; min-width: 170px; height: 38px; margin-left: 4px; color: var(--text); }
.tb-player img { width: 34px; height: 34px; background: #02040b; box-shadow: inset 0 0 0 1px #000; }
.tb-lvl-mini { display: none; }
.tb-player-info { display: flex; flex-direction: column; gap: 5px; flex: 1; text-align: left; min-width: 0; }
.tb-name { font-size: 18px; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.tb-name b { overflow: hidden; text-overflow: ellipsis; letter-spacing: .5px; text-shadow: 1px 1px 0 #000; }
.tb-auto { display: flex; align-items: center; gap: 8px; padding: 0 4px 0 6px; height: 38px; transition: background .2s; }
.tb-auto.on { --edge: var(--green); --face: #0d2618; --glow: 0 0 16px 0 #6be27f40; }
.tb-auto.on .auto-icon { animation: spin 2.4s steps(12) infinite; }
.tb-auto.warn { --edge: var(--accent); }
.tb-auto.warn #auto-hint { color: var(--accent); }
.auto-icon { display: inline-grid; place-items: center; }
.auto-label { display: flex; flex-direction: column; line-height: 1.05; min-width: 82px; padding-top: 2px; }
.auto-label small { font-family: var(--font-px); font-size: 9px; line-height: 10px; color: var(--muted); letter-spacing: .5px; white-space: nowrap; margin-bottom: 1px; }
.auto-label b { font-size: 18px; letter-spacing: .5px; }
.tb-auto.on .auto-label b { color: var(--green); }
.auto-cfg { width: 28px; height: 28px; padding: 0; }
/* Interruptor pixel: trilho quadrado e botão que desliza. */
.switch {
  width: 44px; height: 22px; border: 0; background: #3a1018; position: relative; padding: 0; flex: none; margin: 0 2px;
  box-shadow: inset 0 3px 0 #0009, -2px 0 0 #000, 2px 0 0 #000, 0 -2px 0 #000, 0 2px 0 #000; transition: background .2s;
}
.switch span { position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: #ff7a6a; box-shadow: inset 0 2px 0 #fff6, inset 0 -2px 0 #0005, 0 0 0 1px #000; transition: left .18s steps(4), background .2s; }
.switch[aria-checked="true"] { background: #0f4a22; }
.switch[aria-checked="true"] span { left: 25px; background: #a6f5b4; }
.tb-spacer { flex: 1; min-width: 0; }
.tb-currency { display: flex; gap: 12px; align-items: center; }
.coin { --face: var(--navy-0); --edge: var(--edge-dim); padding: 0 10px 0 6px; height: 32px; display: inline-flex; align-items: center; gap: 6px; font-size: 21px; white-space: nowrap; }
.coin b { font-variant-numeric: tabular-nums; text-shadow: 1px 1px 0 #000; }
#tb-ryo-chip b { color: var(--gold); }
#tb-selos-chip b { color: var(--accent); }
.coin.boost { font-size: 17px; color: var(--accent); gap: 10px; padding: 0 8px; }
.coin.boost:empty { display: none; }
.boost-item { display: inline-flex; align-items: center; gap: 4px; }
.boost-item .bt-short { display: none; }
#btn-analyzer[aria-pressed="true"] { --edge: var(--gold); --face: var(--gold-deep); }
#btn-crt[aria-pressed="true"] { --edge: var(--gold); --face: var(--gold-deep); }
.tb-crt { flex: none; }
#btn-music[aria-pressed="true"] { --edge: var(--gold); --face: var(--gold-deep); }
.tb-music { flex: none; }
.tb-vote, .tb-invite, .tb-discord { flex: none; position: relative; }
.tb-vote.ready, .tb-discord { --edge: var(--gold); --face: var(--gold-deep); }
.tb-vote.ready::after, .tb-discord::after { content: "+"; position: absolute; top: -6px; right: -10px; font-size: 11px; line-height: 14px; padding: 0 15px 0 3px; background: url(assets/ui/icons/diamante.png) right 2px center / 12px no-repeat, var(--red); image-rendering: pixelated; color: #fff; box-shadow: 0 0 0 1px #000; animation: pulse 1.2s steps(2) infinite; pointer-events: none; }
.vote-box { display: grid; gap: 12px; justify-items: start; }
.vote-box .vote-art { justify-self: center; }
.vote-number { justify-self: stretch; display: grid; justify-items: center; gap: 4px; padding: 12px 16px; text-align: center;
  border: 2px solid var(--gold); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--outline); }
.vote-number small { color: var(--gold-hi); font-family: var(--font-px); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.vote-number b { color: var(--gold); font-family: var(--font-px); font-size: 34px; line-height: 1.2; text-shadow: 2px 2px 0 var(--outline); user-select: all; }
.vote-number span { color: var(--text); }
.vote-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.vote-box .btn { justify-self: center; text-decoration: none; }
.vote-wait { justify-self: center; }
/* Sequência de 7 votos: uma casa por dia, o baú do bônus no fim */
.vote-streak { justify-self: stretch; display: grid; gap: 8px; }
.vote-streak ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.vs-day { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; text-align: center;
  border: 2px solid var(--outline); background: var(--accent-soft); opacity: .55; }
.vs-day small { font-family: var(--font-px); font-size: 9px; text-transform: uppercase; color: var(--text); }
.vs-day em { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-family: var(--font-px); font-size: 14px; color: var(--gold); white-space: nowrap; }
.vs-day.done { opacity: 1; border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold-deep); }
.vs-day.done small::after { content: " ✓"; color: var(--gold); }
.vs-day.bonus { opacity: 1; border-color: var(--gold); background: var(--gold-deep); }
.vs-day.bonus em { color: var(--gold-hi); font-weight: bold; }
.vote-streak p { margin: 0; }
/* Meta da semana: votos do servidor inteiro, um marco por degrau */
.vote-rate { justify-self: stretch; display: grid; gap: 6px; justify-items: start; padding: 10px 12px; border: 2px dashed var(--gold); background: var(--gold-deep); }
.vote-rate p { margin: 0; }
.vote-rate.done { border: 0; background: none; padding: 0; justify-self: center; }
.vote-goal { justify-self: stretch; display: grid; gap: 8px; padding: 10px 12px; border: 2px solid var(--outline); background: var(--accent-soft); }
.vote-goal p { margin: 0; }
.vg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vg-head b { font-family: var(--font-px); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); }
.vg-bar { position: relative; height: 16px; border: 2px solid var(--outline); background: #14110a; box-shadow: 0 0 0 1px var(--gold); }
.vg-bar > span { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, var(--gold-hi) 6px 8px); }
.vg-bar > i { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: var(--outline); box-shadow: 0 0 0 1px var(--text); }
.vg-bar > i.done { background: var(--gold-hi); }
.vg-bar > i:last-child { margin-left: -4px; }
.vg-count b { font-family: var(--font-px); font-size: 18px; color: var(--gold); }
.vg-tiers { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.vg-tiers li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 6px; border-left: 3px solid var(--outline); opacity: .8; }
.vg-tiers li > b { font-family: var(--font-px); font-size: 12px; min-width: 76px; }
.vg-tiers li > span { flex: 1 1 180px; }
.vg-tiers li > span .ico { vertical-align: middle; }
.vg-tiers li.done { opacity: 1; border-left-color: var(--gold); background: var(--gold-deep); }
.vg-tiers li.done > b::after { content: " ✓"; color: var(--gold); }
.vg-festival { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid var(--gold); background: var(--gold-deep); color: var(--gold-hi); }
.boost-item.festival { color: var(--gold-hi); cursor: pointer; font-weight: 700; }
.boost-item.legend-ev { color: var(--gold-hi); cursor: pointer; font-weight: 700; }
/* o selo com o texto inteiro empurra a barra para fora da tela em notebook pequeno */
@media (max-width: 1240px) {
  .boost-item.legend-ev { flex-direction: column; gap: 1px; font-size: 12px; line-height: 11px; }
  .boost-item.legend-ev .bt-full { display: none; }
  .boost-item.legend-ev .bt-short { display: inline; }
}
@media (max-width: 480px) {
  .vote-streak ol { gap: 2px; }
  .vs-day { padding: 4px 0; min-width: 0; }
  .vs-day small { font-size: 8px; }
  .vs-day.done small::after { content: none; }
  .vs-day em { font-size: 11px; gap: 1px; }
  .vs-day em .ico { --s: 12px; width: 12px; height: 12px; }
}
/* Convidar amigos (invite_ui.js) e a faixa do convite no cadastro (account.js) */
.inv-box { display: grid; gap: 12px; justify-items: start; }
.inv-box .vote-art, .inv-box > .btn { justify-self: center; }
.inv-gift { justify-self: stretch; margin: 0; padding: 10px 14px; border: 2px solid var(--gold); border-radius: 6px; line-height: 1.6; }
.inv-link { justify-self: stretch; display: flex; gap: 8px; }
.inv-link input { flex: 1; min-width: 0; padding: 8px 10px; font: inherit; color: var(--text); background: rgba(0, 0, 0, .35); border: 2px solid var(--outline); border-radius: 6px; }
.inv-share { justify-self: center; display: flex; gap: 8px; flex-wrap: wrap; }
.inv-share .btn { text-decoration: none; }
.inv-title { margin: 6px 0 0; font-size: inherit; color: var(--gold-hi); }
.inv-friends { justify-self: stretch; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inv-friend { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.inv-bar { grid-column: 1 / -1; height: 8px; background: rgba(0, 0, 0, .4); border-radius: 4px; overflow: hidden; }
.inv-bar i { display: block; height: 100%; background: var(--gold); }
.inv-ready { color: var(--gold); font-weight: bold; }
/* Clã (clan_ui.js) */
/* nome do clã em dourado e a sigla pequena ao lado (no cabeçalho, na lista e no ranking) */
.clan-title { color: var(--gold); }
.clan-tag-sm { margin-left: 8px; font-family: var(--font-px); font-size: 10px; font-weight: 400; letter-spacing: 1px; color: var(--muted); text-shadow: none; vertical-align: 2px; white-space: nowrap; }
.p-head .clan-tag-sm { font-size: 13px; vertical-align: 4px; }
.emblem-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.emblem-opt { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; font: inherit; color: var(--text); background: rgba(0, 0, 0, .3); border: 2px solid transparent; border-radius: 6px; cursor: pointer; }
.emblem-opt small { font-size: 11px; color: var(--muted); }
.emblem-opt:hover { border-color: var(--edge-dim); }
.emblem-opt.on { border-color: var(--gold); background: var(--accent-soft); }
.emblem-opt.on small { color: var(--gold); }
.clan-head { display: flex; gap: 12px; align-items: flex-start; }
.clan-head h3 { margin: 0 0 4px; }
.clan-head p { margin: 0 0 4px; }
.clan-bonus { display: grid; gap: 4px; margin: 12px 0; padding: 10px 14px; border: 2px solid var(--edge-dim, #ffffff22); border-radius: 6px; background: rgba(0, 0, 0, .25); }
.clan-bonus.on { border-color: var(--gold); background: var(--accent-soft); }
.clan-bonus > b { font-size: 1.15em; color: var(--gold-hi); }
.clan-bonus.on > b { color: var(--gold); }
.clan-bonus.intro { margin-top: 0; }
.clan-discord > b { display: flex; align-items: center; gap: 6px; }
.clan-discord .clan-row { margin: 4px 0 0; }
.clan-row { gap: 8px; flex-wrap: wrap; }
.clan-status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.clan-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #5a6370; box-shadow: 0 0 0 1px #000; margin-right: 4px; vertical-align: 0; }
.clan-dot.on { background: #4cd964; }
.clan-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.clan-field { display: grid; gap: 6px; margin: 10px 0; }
.clan-field label { font-weight: 600; }
.clan-input { width: 100%; box-sizing: border-box; padding: 8px 10px; font: inherit; color: var(--text); background: rgba(0, 0, 0, .35); border: 2px solid var(--outline); border-radius: 6px; }
.clan-input.short { max-width: 140px; text-transform: uppercase; }
.clan-tabbody { margin-top: 12px; }
.clan-tabbody > .inv-link { margin-bottom: 12px; }
.boost-item.clan { color: var(--gold); cursor: pointer; }
/* Total de XP a mais (ui.js, xpTotalHudHtml): incenso, clã, VIP e equipamentos multiplicados; toca e mostra a conta */
.boost-item.xp-total { color: #9dff8a; cursor: pointer; font-weight: 700; }
.boost-item.xp-total .xt-ico { font-size: .8em; padding: 0 3px; border: 1px solid currentColor; border-radius: 3px; line-height: 1.2; }
.boost-item.more { color: var(--accent); cursor: pointer; font-weight: 700; }
.boost-item.more .xt-ico { font-size: .8em; padding: 0 3px; border: 1px solid currentColor; border-radius: 3px; line-height: 1.2; }
/* Um selo só para a XP ("XP +N%": itens, clã, festival, boost global e recém-chegado) e um "+N bônus" para os outros
   tipos; os dois abrem o painel Bônus ativos (sugestão de jogador, 01/11/2026). Antes cada item tinha o seu relógio na
   barra, que passava de 15 ícones. */
#tb-boosts:has(.xp-total) .boost-item:is(.clan, .festival) { display: none; }
/* painel Bônus ativos (ui.js, bonusPanel) e a etiqueta Soma / Não soma dos itens */
.bonus-total { color: #9dff8a; margin-left: 6px; }
.bonus-row { align-items: center; }
.bonus-row .ico, .bonus-row > img { flex: none; }
.bonus-pct { color: #9dff8a; font-weight: 700; }
.bonus-tag { white-space: nowrap; }
.bonus-tag.on { color: #9dff8a; }
.bonus-tag.wait { color: var(--gold); }
.bonus-tag.lost { color: #ff9a8a; }
.bonus-row.lost { opacity: .75; }
.bonus-help { margin-top: 16px; padding: 10px 14px; --face: var(--navy-2); }
.bonus-help p { margin: 8px 0 0; font-size: 15px; }
.stack-tag { font-size: 12px; color: var(--gold); }
.stack-tag.on { color: #9dff8a; }
/* Configurações › Letra: Legível troca as fontes pixel pela letra do sistema nas telas (ui.js, applyFont); o mapa segue pixel.
   No mesmo tamanho, a letra do sistema sai maior que a Jersey 10 e bem menor que a Press Start 2P: cada uma ganha a
   própria escala (size-adjust) para os textos caberem nos mesmos espaços. */
@font-face { font-family: "Legivel UI"; src: local("Segoe UI"), local("Roboto"), local("Helvetica Neue"), local("Arial"); size-adjust: 76%; }
@font-face { font-family: "Legivel UI"; font-weight: 700; src: local("Segoe UI Bold"), local("Roboto Bold"), local("Helvetica Neue Bold"), local("Arial Bold"); size-adjust: 76%; }
@font-face { font-family: "Legivel PX"; src: local("Segoe UI Semibold"), local("Roboto Medium"), local("Helvetica Neue Medium"), local("Arial Bold"); size-adjust: 118%; }
html.font-legivel { --font-ui: "Legivel UI", system-ui, sans-serif; --font-px: "Legivel PX", system-ui, sans-serif; }
/* Configurações › Atalhos de teclado (ui.js, keysHtml) */
.keys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; margin: 6px 0 4px; }
.key-row { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.key-row .keys { flex: none; min-width: 30px; display: inline-flex; gap: 3px; }
.key-row.wide { grid-column: 1 / -1; }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; text-align: center; font: 700 13px/18px var(--font-px, monospace); color: var(--gold-hi); background: var(--navy-0); border: 2px solid var(--edge-dim); border-bottom-width: 3px; }
.clan-shop .btn { white-space: nowrap; }
.clan-shop.on { --edge: var(--gold); }
.chat-line.system { color: var(--muted); font-style: italic; }
/* Baú do clã (clan_ui.js) e o botão dele no canto do chat do clã (chat_ui.js) */
.clan-chest { display: grid; gap: 8px; margin: 12px 0; padding: 10px 14px; border: 2px solid var(--gold); border-radius: 6px; background: rgba(0, 0, 0, .25); }
.clan-chest p { margin: 0; }
.chest-count { margin-left: auto; white-space: nowrap; color: var(--gold); font-size: 1.1em; }
.chest-bar { display: block; height: 10px; background: rgba(0, 0, 0, .45); border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px #000; }
.chest-bar i { display: block; height: 100%; background: var(--gold); }
.chest-who { line-height: 1.6; }
.clan-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }
.chest-btn { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 8px; font: inherit; color: var(--text); background: var(--navy-2, #1d2340); border: 2px solid var(--gold); border-radius: 6px; cursor: pointer; box-shadow: 0 2px 0 #000; }
.chest-btn span { display: grid; line-height: 1.1; text-align: left; }
.chest-btn small { color: var(--muted); font-size: 11px; }
.chest-btn.full { box-shadow: 0 0 0 2px var(--gold), 0 0 12px var(--gold); }
.chat-line.system b { color: var(--gold-hi); font-style: normal; }
.inv-done { color: var(--muted); }
.inv-event { position: relative; justify-self: stretch; display: grid; gap: 6px; padding: 12px 14px 10px; border: 2px solid var(--gold); border-radius: 6px; background: rgba(242, 193, 78, .1); }
.inv-event h3 { margin: 0; font-size: inherit; color: var(--gold-hi); }
.inv-event p { margin: 0; }
.inv-event-tag { position: absolute; top: -10px; right: 10px; padding: 0 6px; font-size: 11px; line-height: 16px; background: var(--red); color: #fff; box-shadow: 0 0 0 1px #000; }
.tb-invite.evento { --edge: var(--gold); --face: var(--gold-deep); }
.tb-invite.evento::after { content: "VIP"; position: absolute; top: -6px; right: -10px; font-size: 11px; line-height: 14px; padding: 0 3px; background: var(--red); color: #fff; box-shadow: 0 0 0 1px #000; animation: pulse 1.2s steps(2) infinite; pointer-events: none; }
.auth-invite { display: grid; gap: 4px; justify-items: center; text-align: center; margin: 0 0 12px; padding: 10px 14px; border: 2px solid var(--gold); border-radius: 6px; background: rgba(0, 0, 0, .3); }
.auth-invite b { color: var(--gold); }
/* Faixa do Fundador na tela de entrada (até o lançamento), com a contagem regressiva */
.auth-founder { display: grid; gap: 4px; justify-items: center; text-align: center; width: 100%; margin: 0 0 12px; padding: 10px 14px; border: 2px solid #5ac83a; border-radius: 6px; background: rgba(20, 60, 14, .45); color: inherit; font: inherit; box-shadow: 0 0 12px #5ac83a55; }
button.auth-founder { cursor: pointer; }
button.auth-founder:hover { background: rgba(30, 80, 20, .55); }
.auth-founder > b { color: #c8ff9a; font-size: 19px; line-height: 1.5; }
.auth-founder > span { font-size: 17px; }
.auth-founder .vip-badge { font-size: 15px; line-height: 18px; vertical-align: 2px; margin: 0 2px; }
.auth-founder > .auth-founder-left { font-family: var(--font-px); font-size: 13px; color: var(--gold); letter-spacing: 1px; white-space: nowrap; margin-top: 2px; }
.auth-founder-left b { color: #fff; }
.auth-invite-items { line-height: 1.6; }

/* ---------- Missão ---------- */
#quest-card {
  --edge: var(--accent); --face: var(--navy-1);
  top: calc(var(--top-h) + 12px); left: 50%; transform: translateX(-50%);
  width: min(440px, calc(var(--vw) - 2 * var(--side-w) - 56px)); padding: 6px 8px 8px 10px;
}
/* Minimizada (clique no cartão): vira um quadradinho colado no minimapa, para não cobrir a saída no alto do mapa (a
   escadaria da praça). Clicar nele volta. Os avisos, que ficam nesse mesmo canto, descem para baixo dele. */
#quest-card.mini { left: auto; right: calc(var(--side-w) + 28px); transform: none; width: auto; padding: 5px; }
html:has(#quest-card.mini) #toasts { top: calc(var(--top-h) + 66px); }
#quest-card.mini :is(.quest-titles, .quest-pct, #quest-guide, #quest-more, .quest-bar, .quest-body) { display: none; }
.quest-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.quest-icon { display: inline-grid; place-items: center; }
.quest-titles { display: flex; flex-direction: column; flex: 1; line-height: 1.15; min-width: 0; }
.quest-titles small { color: var(--accent); font-family: var(--font-px); font-size: 9px; letter-spacing: .5px; margin-bottom: 3px; }
.quest-titles b { font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 #000; }
.quest-pct { color: var(--gold); font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; text-shadow: 1px 1px 0 #000; }
#quest-guide.on { --edge: var(--gold); --face: #3a2a08; }
.quest-bar { margin-top: 6px; }
.quest-bar > span { background: linear-gradient(180deg, #ffd0a0 0 1px, var(--accent) 1px 60%, var(--accent-2) 60%) !important; }
.quest-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s var(--ease), margin .25s; font-size: 17px; color: var(--muted); }
.quest-body > * { overflow: hidden; }
#quest-card.open .quest-body { grid-template-rows: 1fr; margin-top: 6px; }
.quest-body-inner { min-height: 0; }
.objective { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 2px dotted #ffffff1a; color: var(--text); }
.objective b { color: var(--gold); }
.objective.done { color: var(--green); text-decoration: line-through; }
.objective.gate { color: var(--accent); border-top: 0; padding-top: 0; font-size: 0.92em; }

/* ---------- Hunt Analyzer ---------- */
#analyzer {
  left: 12px; top: calc(var(--top-h) + 12px); width: 270px; z-index: 6;
  max-height: calc(var(--free-h) - 24px); overflow: auto; transition: width .2s var(--ease);
}
#analyzer.min { width: auto; min-width: var(--side-w); max-width: calc(50% - 240px); overflow: hidden; }
#analyzer.min .an-body { display: none; }
.float-head { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 10px; cursor: pointer; user-select: none; background: var(--navy-0); box-shadow: 0 2px 0 var(--rail); }
#analyzer.min .float-head { box-shadow: none; background: none; }
.float-title { flex: 1; display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.float-head small { font-family: var(--font-px); font-size: 9px; color: var(--accent); letter-spacing: .5px; margin-bottom: 3px; }
.float-head b { font-size: 20px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.an-summary { display: none; flex: 1; font-size: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-summary b { color: #a6f5b4; font-variant-numeric: tabular-nums; font-size: 20px; text-shadow: 1px 1px 0 #000; }
.an-summary small { font-size: 14px; color: var(--muted); letter-spacing: 0; margin: 0 8px 0 3px; font-family: var(--font-ui); }
.an-summary .an-ico { font-style: normal; margin-right: 6px; vertical-align: -3px; }
.an-summary b.gold { color: var(--gold); }
#analyzer.min .float-title { display: none; }
#analyzer.min .an-summary { display: block; }
#analyzer.min #an-reset, #analyzer.min #an-close { display: none; }
#an-min { transition: transform .2s; }
#analyzer:not(.min) #an-min { transform: rotate(180deg); }
.an-body { padding: 10px; }
.an-rates { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
.an-big { --face: var(--navy-0); --edge: var(--edge-dim); padding: 5px 8px; display: flex; flex-direction: column; }
.an-big small { color: var(--muted); font-size: 14px; }
.an-big b { font-size: 27px; color: #a6f5b4; font-variant-numeric: tabular-nums; text-shadow: 2px 2px 0 #000; }
.an-big.gold b { color: var(--gold); }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.an-grid > div { --face: var(--navy-2); --edge: var(--edge-dim); --drop: transparent; padding: 4px 8px; display: flex; flex-direction: column; }
.an-grid b { font-size: 20px; font-variant-numeric: tabular-nums; }
.an-grid small { font-size: 14px; color: var(--muted); }
.feed-title { margin: 14px 2px 6px; font-family: var(--font-px); font-size: 9px; color: var(--accent); letter-spacing: .6px; text-transform: uppercase; }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.feed li { display: flex; align-items: center; gap: 6px; background: var(--navy-2); padding: 2px 6px; font-size: 16px; animation: fadeIn .3s var(--ease); box-shadow: inset 2px 0 0 var(--rail); }
.feed img { width: 26px; height: 26px; }
.feed .res { margin-left: auto; font-weight: 700; font-size: 14px; text-transform: uppercase; }
.res.vitória { color: var(--green); } .res.derrota, .res.escapou { color: var(--red); } .res.recrutado, .res[class*="recrutado"] { color: var(--gold); }

/* ---------- Minimapa ---------- */
#minimap-box { right: 12px; top: calc(var(--top-h) + 12px); width: var(--side-w); z-index: 6; overflow: hidden; }
.mm-head { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; padding: 6px 8px 6px 8px; text-align: left; min-height: 36px; }
.mm-head b { flex: 1; font-size: 17px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .5px; text-shadow: 1px 1px 0 #000; }
.mm-clock { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--gold); font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 1px 1px 0 #000; }
#mm-daynight { display: inline-flex; font-style: normal; }
.mm-caret { color: var(--muted); font-size: 14px; transition: transform .2s; }
#minimap-box.min .mm-caret { transform: rotate(-90deg); }
#minimap-box.min .mm-body { display: none; }
.mm-body { padding: 0 8px 8px; }
.mm-map { position: relative; margin-top: 4px; }
#minimap { display: block; width: 100%; height: auto; aspect-ratio: 196 / 120; background: #000; image-rendering: pixelated; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--rail); }
/* Campo de Batalha: os nomes das áreas por cima do minimapa (ui.js, warAreaLabels) */
.mm-areas { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mm-areas span { position: absolute; transform: translate(-50%, -50%); width: 62px; text-align: center; font-size: 13px; line-height: 0.9; color: #fff; text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000, 1px 1px 0 #000; opacity: 0.92; }
.mm-areas span.estreita { width: 36px; font-size: 11px; }
.mm-areas span.here { color: var(--cor); opacity: 1; }
.mm-info { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; font-size: 16px; }
.mm-info small { color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-info small:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.mm-switch { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
/* equipe abaixo do nível de entrada da zona (ui.js, underLevelDialog): alerta pequeno colado na faixa da zona */
.mm-zonebox { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mm-under { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px; border: 1px solid var(--red); border-radius: 3px; background: #ff5a4822; color: var(--red); font: inherit; font-size: 14px; line-height: 16px; cursor: pointer; white-space: nowrap; animation: mm-under-pulse 1.6s ease-in-out infinite; }
.mm-under:hover { background: #ff5a4844; }
.mm-under.hidden { display: none; }
@keyframes mm-under-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .mm-under { animation: none; } }

/* ---------- Combate ---------- */
#battle-bar {
  --edge: var(--red); --face: #2a0c12;
  bottom: calc(var(--bottom-h) + 16px); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; max-width: calc(var(--vw) - 24px);
  padding: 3px 4px 3px 8px; font-weight: 700; font-size: 18px; white-space: nowrap; animation: popIn .2s var(--ease); text-shadow: 1px 1px 0 #000;
}
.battle-ico { display: inline-grid; place-items: center; }
#battle-text { overflow: hidden; text-overflow: ellipsis; letter-spacing: .3px; }

/* ---------- Dock (barra inferior) ---------- */
#bottombar {
  left: 0; right: 0; bottom: 0; height: var(--bottom-h); display: flex; align-items: center; gap: 12px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
  padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right));
  box-shadow: 0 -2px 0 var(--rail), 0 -4px 0 #000, 0 -8px 14px #0008;
}
.lead-card { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; width: 250px; height: 60px; cursor: pointer; flex: none; margin-left: 4px; }
.lead-card > img { width: 52px; height: 52px; background: radial-gradient(#26407a, var(--navy-deep) 75%); flex: none; box-shadow: inset 0 0 0 1px #000; }
.lead-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lead-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lead-title b { font-size: 18px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .4px; text-shadow: 1px 1px 0 #000; }
.lead-bar { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; color: var(--muted); }
.lead-bar small:first-child { font-family: var(--font-px); font-size: 9px; }
.lead-bar small:last-child { font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; color: var(--text); }
.team-box { position: relative; display: flex; align-items: center; flex: none; }
.team-slots { display: grid; grid-template-columns: repeat(5, 46px); gap: 10px; }
.team-slot {
  --face: var(--navy-0); --edge: var(--edge-dim); position: relative; height: 60px; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; font-size: 13px; font-weight: 700; color: var(--muted); padding: 2px 3px 4px; cursor: pointer;
}
.team-slot img { width: 38px; height: 38px; }
.team-slot .bar { width: 100%; height: 5px; margin-top: 2px; }
.team-slot .bar::after { display: none; }
.team-slot.ko img { filter: grayscale(1) brightness(.6); }
.team-slot.ko::after { content: "KO"; position: absolute; top: 3px; right: 3px; color: var(--red); font-family: var(--font-px); font-size: 9px; }
.team-slot.empty { justify-content: center; font-size: 23px; color: var(--dim); --face: transparent; --drop: transparent; --edge: #2a3150; }
.team-count {
  position: absolute; top: -12px; right: -6px; font-family: var(--font-px); font-size: 9px; color: var(--gold-ink); background: var(--gold); padding: 2px 4px; line-height: 1;
  pointer-events: none; box-shadow: 0 0 0 1px #000, 0 2px 0 1px #0008; z-index: 1;
}
#hotbar { --face: var(--navy-0); --edge: var(--edge-dim); --drop: transparent; display: flex; gap: 8px; padding: 5px; flex: none; }
.hot-slot {
  --face: var(--navy-2); --edge: #3a4470; --drop: transparent; position: relative; width: 44px; height: 46px; border: 0;
  display: grid; place-items: center; padding: 0; color: var(--text);
}
.hot-slot .k { position: absolute; left: 3px; top: 3px; font-family: var(--font-px); font-size: 9px; color: var(--muted); }
.hot-slot .n { position: absolute; right: 2px; bottom: 1px; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 1px 1px 0 #000, -1px 0 0 #000; }
.hot-slot .n.zero { color: var(--red); }
.hot-slot.empty { color: var(--dim); font-size: 23px; --face: transparent; --edge: #252c4a; }
.quick-menu { flex: 1; display: flex; justify-content: flex-end; gap: 4px; min-width: 0; overflow: hidden; padding: 6px 6px 8px; margin: -6px -6px -8px; }
.menu-btn {
  position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text);
  font-size: 14px; font-weight: 700; text-transform: uppercase; gap: 3px; padding: 4px 2px; min-height: 44px; transition: transform .12s var(--ease), background .12s;
  white-space: nowrap; letter-spacing: .4px; text-shadow: 1px 1px 0 #000;
}
.menu-btn b { font-weight: 700; }
.menu-btn:hover { background: #ffffff10; transform: translateY(-2px); }
.menu-btn:hover b { color: var(--gold); }
.menu-btn:active { transform: translateY(1px); }
.menu-btn.off { opacity: .5; filter: grayscale(.8); }
.menu-btn.off::after { content: "EM BREVE"; position: absolute; top: 2px; left: 2px; font-family: var(--font-px); font-size: 9px; background: #000a; padding: 1px 2px; }
.dot {
  position: absolute; top: 0; right: 2px; background: var(--red); color: #fff; font-size: 13px; font-style: normal; font-weight: 700; padding: 0 4px; line-height: 14px;
  box-shadow: 0 0 0 1px #000, 0 2px 0 1px #0008; animation: pulse 1.2s steps(2) infinite; text-shadow: none; z-index: 2;
}
.quick-menu .menu-btn { width: 60px; flex: none; }
/* botões que não couberam na barra (fitQuickMenu em ui.js esconde do menos importante para o mais) */
.quick-menu .menu-btn.qm-fit { display: none; }
.quick-menu .menu-toggle { --edge: var(--gold); --face: var(--gold-deep); margin: 0 2px 0 6px; }
.quick-menu .menu-toggle b { color: var(--gold); }
.quick-menu .menu-toggle[aria-expanded="true"] { --face: #4a3a10; }

/* ---------- Menu principal (tela cheia, fundo pintado + cartões) ---------- */
#drawer-backdrop { display: none !important; }
#menu-drawer {
  position: absolute; z-index: 23; left: 0; right: 0; top: var(--top-h); bottom: 0; overflow: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, #05081440, #050814b8 70%, #050814e0), var(--bg-menu, none) center / cover no-repeat, radial-gradient(ellipse at 50% 0%, #1b2a5a, #050814 70%);
  image-rendering: pixelated; animation: fadeIn .18s;
}
.drawer-inner { width: min(1120px, 100%); margin: 0 auto; padding: 18px 22px 26px; min-height: 100%; animation: drawerIn .22s var(--ease); }
.drawer-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.drawer-title { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.drawer-title small { font-family: var(--font-px); font-size: 9px; color: var(--accent); letter-spacing: 1px; text-shadow: 1px 1px 0 #000; }
.drawer-title b { font-family: var(--font-px); font-size: 26px; color: var(--gold); letter-spacing: 2px; text-shadow: 3px 3px 0 #000, -1px 0 0 #ff3d6e88, 1px 0 0 #3dd6ff88; font-weight: 400; }
.drawer-hint { color: var(--muted); font-size: 17px; text-shadow: 1px 1px 0 #000; }
.menu-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 22px 20px; padding: 6px; }
.menu-card {
  --face: var(--navy-1); position: relative; border: 0; padding: 6px 6px 0; display: flex; flex-direction: column; color: var(--text); text-align: center;
  animation: cardIn .3s var(--ease) both;
}
.menu-card:nth-child(2) { animation-delay: .03s; } .menu-card:nth-child(3) { animation-delay: .06s; } .menu-card:nth-child(4) { animation-delay: .09s; }
.menu-card:nth-child(5) { animation-delay: .12s; } .menu-card:nth-child(6) { animation-delay: .15s; } .menu-card:nth-child(n+7) { animation-delay: .18s; }
.mc-art { display: block; position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #02040b; box-shadow: 0 0 0 2px #000; }
.card-art { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: transform .25s var(--ease); }
.card-art.emo {
  display: grid; place-items: center;
  background: var(--dither), repeating-linear-gradient(45deg, #ffffff06 0 6px, transparent 6px 12px), radial-gradient(circle at 50% 40%, #2a3a78, #070b18 75%);
}
.mc-label {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px 9px; font-size: 20px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; text-shadow: 2px 2px 0 #000; white-space: nowrap; overflow: hidden;
}
.menu-card:hover, .menu-card:focus-visible { transform: translateY(-4px); --lift: 4px; --edge: var(--gold); --glow: 0 0 22px 2px #ffd04055; outline: none; }
.menu-card:hover .card-art, .menu-card:focus-visible .card-art { transform: scale(1.04); }
.menu-card:hover .mc-label, .menu-card:focus-visible .mc-label { color: var(--gold); }
.menu-card:hover::after, .menu-card:focus-visible::after {
  content: ""; position: absolute; inset: -9px; pointer-events: none; box-shadow: 0 0 0 2px #ffd04066; animation: blink 1s steps(2) infinite;
}
.menu-card:active { transform: translateY(0); --lift: 0px; }
.menu-card.off .mc-art { filter: grayscale(1) brightness(.55); }
.menu-card.off { --edge: var(--edge-dim); }
.mc-soon {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-family: var(--font-px); font-size: 9px; font-style: normal; color: var(--gold-ink);
  background: var(--gold); padding: 4px 6px; box-shadow: 0 0 0 2px #000, 0 3px 0 2px #0008; white-space: nowrap;
}
.menu-card .dot { top: -8px; right: -8px; font-size: 16px; line-height: 18px; padding: 0 6px; }
.menu-grid { display: flex; flex-wrap: wrap; gap: 14px 14px; padding: 26px 6px 6px; }
.menu-chip {
  --face: var(--navy-2); --edge: var(--edge-dim); flex-direction: row; min-height: 46px; padding: 4px 14px 4px 6px; gap: 8px; font-size: 17px;
  transition: transform .14s var(--ease), --lift .14s var(--ease);
}
.menu-chip:hover { background-color: var(--navy-3); }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px 6px 0; }
.drawer-actions .btn { min-height: 38px; }

/* ---------- Diálogo de NPC (caixa de RPG retrô) ---------- */
#dialog {
  --edge: var(--edge-base); --face: var(--navy-1);
  position: absolute; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-h) + 18px); width: min(660px, calc(var(--vw) - 24px));
  padding: 14px 20px 10px; cursor: pointer; animation: popIn .18s var(--ease);
  background-image: var(--dither), linear-gradient(180deg, #121a38, var(--navy-1) 60%);
}
#dialog::after { content: "▼"; position: absolute; right: 14px; bottom: 8px; color: var(--gold); font-size: 17px; text-shadow: 1px 1px 0 #000; animation: arrowBob .8s steps(2) infinite; }
#dialog:has(.dlg-choices:not(:empty))::after { display: none; }
.dlg-name {
  --face: var(--accent-2); --edge: #ffc88a; position: absolute; top: -16px; left: 16px; display: inline-block; font-weight: 700; color: #fff;
  padding: 3px 12px; font-size: 20px; letter-spacing: .6px; text-shadow: 1px 1px 0 #000; background-image: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.dlg-name:empty { display: none; }
.dlg-text { font-size: 23px; margin: 8px 0 6px; min-height: 2.6em; line-height: 1.4; text-shadow: 1px 1px 0 #000; }
.dlg-choices { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 0 2px; }
.dlg-choices:empty { display: none; }
.dlg-hint { font-family: var(--font-px); font-size: 9px; color: var(--dim); text-align: right; padding-right: 22px; margin-top: 2px; }
/* no celular não há teclado: a dica fala de tocar */
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .hint-kb { display: none; } .hint-touch { display: inline; } }

/* ---------- Toasts ---------- */
#toasts { position: absolute; z-index: 30; top: calc(var(--top-h) + 12px); right: calc(var(--side-w) + 28px); display: flex; flex-direction: column; gap: 12px; align-items: flex-end; pointer-events: none; }
.toast {
  --edge: var(--edge-dim); --face: var(--navy-1); border-left: 6px solid var(--accent); padding: 7px 12px; font-size: 18px; font-weight: 600; max-width: 360px;
  animation: toastIn .25s var(--ease); text-shadow: 1px 1px 0 #000;
}
.toast.gold { border-left-color: var(--gold); --edge: #b89a48; }
.toast.warn { border-left-color: var(--red); --edge: #8a3a40; }
/* aviso que abre uma tela (anúncio no mercado, compra de outro jogador) */
.toast.clickable { pointer-events: auto; cursor: pointer; }
.toast.clickable:hover { filter: brightness(1.15); }
.toast.market { border-left-color: #4fd0a0; --edge: #2f7a62; font-size: 17px; }
.toast.market.gold { border-left-color: var(--gold); --edge: #b89a48; }
.toast.shout { --glow: 0 0 18px 0 #ffd04050; }
.toast .ico, .toast img.ico { vertical-align: -5px; }
.toast .vip-badge { font-size: 11px; line-height: 13px; vertical-align: 2px; }
.toast b.gold { color: var(--gold); }

/* ---------- Captura ---------- */
#capture-pop {
  --edge: var(--gold); --face: var(--navy-1); --glow: 0 0 28px 0 #ffd04040;
  /* acima dos painéis (25): o recrutamento tem prazo e não pode ficar escondido atrás da loja */
  position: absolute; z-index: 27; left: 50%; top: calc(var(--top-h) + 84px); transform: translateX(-50%); width: min(440px, calc(var(--vw) - 24px));
  padding: 14px; text-align: center; animation: popIn .2s var(--ease);
}
.cap-title { font-family: var(--font-px); font-size: 11px; color: var(--gold); text-shadow: 2px 2px 0 #000; margin-bottom: 8px; animation: blink 1.2s steps(2) infinite; }
#capture-pop img:not(.ico) { width: 72px; height: 72px; }
.cap-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.cap-timer { height: 6px; background: repeating-linear-gradient(90deg, var(--gold) 0 5px, var(--gold-2) 5px 6px); margin-top: 12px; transition: width .2s linear; box-shadow: 0 0 0 1px #000; }
#fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 40; transition: opacity .18s; }
#fade.on { opacity: 1; transition: none; }

/* ---------- Painéis (modal) ---------- */
#panel-wrap {
  position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; padding: 20px; animation: fadeIn .15s;
  background: radial-gradient(ellipse at center, #0a102acc, #020408f0);
}
#panel {
  --face: var(--navy-1);
  width: min(920px, calc(var(--vw) - 40px)); max-height: calc(100vh - 40px); max-height: calc(var(--vh) - 40px); overflow: auto; overscroll-behavior: contain;
  animation: popIn .2s var(--ease);
}
.p-head {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px;
  background: var(--dither), linear-gradient(180deg, #17204a, #0c1228); box-shadow: 0 3px 0 var(--rail), 0 5px 0 #000;
}
.p-ico { --face: var(--navy-0); --edge: var(--edge-dim); --drop: transparent; width: 42px; height: 42px; display: grid; place-items: center; flex: none; margin: 4px; }
.p-head h2 { margin: 0; font-family: var(--font-ui); font-weight: 700; font-size: 34px; flex: 1; letter-spacing: .8px; min-width: 0; overflow-wrap: anywhere; line-height: 1.05; text-shadow: 2px 2px 0 #000; }
.p-head small { display: block; font-family: var(--font-px); color: var(--accent); font-weight: 400; font-size: 9px; letter-spacing: .6px; text-transform: uppercase; margin-bottom: 6px; text-shadow: 1px 1px 0 #000; }
.p-body { padding: 16px 20px 24px; }
.p-body h3 {
  margin: 22px 0 12px; font-family: var(--font-px); font-weight: 400; font-size: 9px; letter-spacing: .8px; text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 10px; text-shadow: 1px 1px 0 #000;
}
.p-body h3::before { content: ""; width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 0 2px #000; flex: none; }
.p-body h3::after { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--rail) 0 6px, transparent 6px 10px); }
.p-body p { color: var(--muted); line-height: 1.45; }
.p-body p b { color: var(--text); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 4px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { --face: var(--navy-2); padding: 10px; position: relative; }
.card.sel { --edge: var(--gold); --glow: 0 0 14px 0 #ffd04055; }
.card.lock, .list-item.lock { opacity: .55; filter: grayscale(.6); }
.card img.sprite { width: 64px; height: 64px; display: block; margin: 0 auto; }
.card .name { font-weight: 700; text-align: center; font-size: 20px; text-shadow: 1px 1px 0 #000; margin-top: 2px; }
.card .sub { text-align: center; font-size: 16px; color: var(--muted); line-height: 1.35; }
.card .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-top: 10px; }
.card small { color: var(--muted); }
.item-card { text-align: center; }
.item-ico { position: relative; display: grid; place-items: center; width: 72px; height: 72px; margin: 2px auto 6px; background: radial-gradient(circle, var(--navy-mid), var(--navy-deep) 70%); box-shadow: 0 0 0 2px #000, inset 0 0 0 1px #ffffff14; flex: none; }
.item-ico .qty { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-size: 16px; font-weight: 700; background: var(--navy-0); color: var(--gold); padding: 0 4px; box-shadow: 0 0 0 2px #000; }
.shop-card .row { align-items: flex-start; }
.shop-card .item-ico { margin: 0; }
.shop-card .owned { color: var(--text); }
.shop-qty { margin-top: 10px; padding-top: 4px; border-top: 1px solid var(--edge-dim); }
.shop-qty .custom-row input[type="number"] { width: 84px; }
.shop-qty #shop-qty-total { font-size: 18px; color: var(--gold); }
.shop-qty #shop-qty-total.short { color: var(--red); }
.price { color: var(--gold); margin-right: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 21px; text-shadow: 1px 1px 0 #000; }
.stat-card b { display: block; font-size: 29px; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.stat-card small { font-size: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.list { display: flex; flex-direction: column; gap: 14px; padding: 4px; }
.list-item { --face: var(--navy-2); display: flex; align-items: center; gap: 12px; padding: 8px 10px; }
.team-name { width: 150px; max-width: 100%; font-weight: 700; }
.list-item > img { width: 48px; height: 48px; flex: none; background: radial-gradient(circle, var(--navy-mid), var(--navy-deep) 70%); box-shadow: 0 0 0 2px #000; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item b { text-shadow: 1px 1px 0 #000; }
.list-item small { color: var(--muted); }
.list-item > .row { flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
/* Rastreador do Bingo Book: uma linha curta por espécie que falta */
.tracker summary { cursor: pointer; padding: 6px 0; }
.tracker .list { gap: 6px; }
.tracker .list-item { padding: 4px 8px; gap: 10px; }
.tracker .list-item > img { width: 32px; height: 32px; }
/* silhueta de quem ainda não foi visto: o filtro pegaria o fundo da moldura, então ela some aqui */
.tracker .list-item > img.unknown { filter: brightness(0) invert(.55) opacity(.6); background: none; box-shadow: none; }
.tag {
  display: inline-block; font-size: 14px; font-weight: 700; padding: 1px 6px; background: #ffffff12; margin: 1px 3px 1px 0; text-transform: uppercase;
  letter-spacing: .4px; box-shadow: inset 0 0 0 1px #ffffff1c, 0 0 0 1px #000; line-height: 1.35;
}
.tag.ok { color: var(--green); }
.boost-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.elem-gem { width: 22px; height: 22px; flex: none; background: var(--c); transform: rotate(45deg); box-shadow: inset 3px 3px 0 #ffffff66, inset -3px -3px 0 #0006, 0 0 0 2px #000; margin: 0 6px; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 18px; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--rail); }
.stat-table td, .stat-table th { padding: 6px 9px; text-align: left; }
/* moldura do nome pelo nível da conta (amostra na tabela do Perfil; no mapa é desenhada em world.js) */
.nameplate-swatch { display: inline-block; padding: 0 8px; border: 2px solid; border-radius: 4px; background: rgba(10, 12, 20, 0.62); color: #fff; line-height: 1.3; }
.stat-table th { color: var(--gold); font-family: var(--font-px); font-weight: 400; font-size: 9px; text-transform: uppercase; background: var(--navy-0); }
.stat-table tr:nth-child(odd) td { background: #ffffff06; }
.empty-note { --face: var(--navy-0); --edge: var(--edge-dim); --drop: transparent; padding: 20px; text-align: center; color: var(--muted); }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 2px dotted #ffffff12; min-height: 50px; }
.form-row label { font-weight: 600; }
.form-row label small { font-weight: 400; }
select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, .cr-name {
  --face: var(--navy-0); --edge: var(--edge-dim); --drop: transparent; border: 0; color: var(--text); padding: 7px 10px; min-height: 36px; margin: 4px; border-radius: 0;
}
select:focus, input:focus, textarea:focus { --edge: var(--gold); outline: none; }
select { cursor: pointer; }
option { background: var(--navy-1); }
textarea { width: calc(100% - 8px); min-height: 90px; resize: vertical; }
/* Caixa de marcar pixel */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; flex: none; margin: 4px; cursor: pointer; background: var(--navy-0);
  box-shadow: -2px 0 0 var(--edge-dim), 2px 0 0 var(--edge-dim), 0 -2px 0 var(--edge-dim), 0 2px 0 var(--edge-dim), inset 0 2px 0 #0008;
}
input[type="checkbox"]:checked {
  background: linear-gradient(var(--gold), var(--gold)) center / 12px 12px no-repeat, var(--navy-0);
  box-shadow: -2px 0 0 var(--gold), 2px 0 0 var(--gold), 0 -2px 0 var(--gold), 0 2px 0 var(--gold), inset 0 2px 0 #0008;
}
input[type="checkbox"]:focus-visible { outline: 2px dashed var(--gold); outline-offset: 4px; }
/* Controle deslizante pixel */
input[type="range"] { appearance: none; -webkit-appearance: none; width: 160px; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; background: var(--navy-0); box-shadow: 0 0 0 2px var(--edge-dim); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 20px; margin-top: -6px; background: var(--gold); box-shadow: inset 0 3px 0 var(--gold-hi), inset 0 -3px 0 var(--gold-2), 0 0 0 2px #000; }
input[type="range"]::-moz-range-track { height: 8px; background: var(--navy-0); box-shadow: 0 0 0 2px var(--edge-dim); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 20px; border: 0; border-radius: 0; background: var(--gold); box-shadow: 0 0 0 2px #000; }
/* Abas e seletor segmentado */
.tabs { display: flex; gap: 12px; padding: 4px; flex-wrap: wrap; }
.tab, .seg-btn { border: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; cursor: pointer; }
.tab { --face: var(--navy-2); --edge: var(--edge-dim); padding: 7px 14px; font-size: 18px; color: var(--muted); text-shadow: 1px 1px 0 #000; }
.tab.on { --face: var(--gold-deep); --edge: var(--gold); color: var(--gold); transform: translateY(-2px); --lift: 2px; }
.seg { --face: var(--navy-0); --edge: var(--edge-dim); --drop: transparent; display: inline-flex; padding: 3px; gap: 3px; margin: 4px; }
.seg-btn { background: none; padding: 5px 10px; font-size: 17px; color: var(--muted); }
.seg-btn:hover { color: var(--text); background: #ffffff0c; }
.seg-btn.on { background: linear-gradient(180deg, var(--gold-hi) 0 2px, var(--gold) 2px 80%, var(--gold-2) 80%); color: var(--gold-ink); box-shadow: 0 0 0 1px #000; }
/* Arquivo: filtro por raridade e ordem */
.box-ctls { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
.box-ctl { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.box-ctl > small { margin: 0 4px; }
.box-ctl .seg { flex-wrap: wrap; }
/* Expedições: aliados do Arquivo em cartões para tocar (vários marcados de uma vez) */
#exp-search { margin-top: 4px; }
.exp-chosen { flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 6px; min-height: 36px; }
.exp-chips { display: inline-flex; gap: 2px; }
.exp-chips img { image-rendering: pixelated; }
.exp-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 4px; }
.card.exp-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; font: inherit; color: inherit; cursor: pointer; }
.card.exp-pick img { image-rendering: pixelated; }
.card.exp-pick .name { font-size: 15px; line-height: 1.1; margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-check { position: absolute; top: 3px; right: 3px; min-width: 20px; height: 20px; font-style: normal; font-weight: 700; font-size: 14px; line-height: 20px; text-align: center; color: #000; background: var(--gold); }
/* Mochila > Equipamentos: barra de filtros com menus; o bônus filtrado fica destacado nos cards */
.gear-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 12px; margin-top: 10px; padding: 6px 8px; background: var(--navy-deep); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--edge-dim); }
.gear-menu { display: flex; flex-direction: column; min-width: 0; }
.gear-menu > small { margin: 0 4px; color: var(--muted); }
.gear-menu select { min-width: 170px; max-width: 100%; }
.gear-menu.on > small { color: var(--gold); }
.gear-menu.on select { --edge: var(--gold); color: var(--gold); }
.gear-count { display: flex; align-items: center; gap: 8px; margin: 0 0 6px auto; }
.gear-stats .hl { color: var(--gold); background: #f0c04022; box-shadow: -4px 0 0 #f0c04022, 4px 0 0 #f0c04022; }
@media (max-width: 640px) { .gear-menu { flex: 1 1 140px; } .gear-menu select { min-width: 0; width: calc(100% - 8px); } .gear-count { margin-left: 0; } }
.boss-bar { height: 18px; }
.boss-bar > span { background: linear-gradient(180deg, #ffd0a0 0 3px, #ff8040 3px 60%, #c8402c 60%) !important; }
/* fila dos chefes: o atual em destaque, os próximos apagados */
.boss-roster { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.boss-next { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 6px; background: var(--navy-deep); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--edge-dim); opacity: .55; }
.boss-next.now { opacity: 1; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--gold); }
.boss-next small { font-size: 14px; color: var(--muted); }
.boss-next.now small { color: var(--gold); }
.log { --face: var(--navy-0); --edge: var(--edge-dim); --drop: transparent; padding: 10px; font-size: 17px; color: var(--muted); max-height: 200px; overflow: auto; }
.chart-cycle { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Bônus diário: fileira da semana (hoje em dourado) e missões com botão de resgate. */
.day-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; padding: 6px 4px 4px; }
.day-cell { --face: var(--navy-2); --edge: var(--edge-dim); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 2px 8px; text-align: center; }
.day-cell small { font-family: var(--font-px); font-size: 9px; color: var(--muted); text-transform: uppercase; }
.day-cell b { font-size: 18px; text-shadow: 1px 1px 0 #000; }
.day-cell.past { opacity: .5; }

.day-cell.next { --face: var(--navy-0); }
.day-cell.next .ico { filter: grayscale(1) brightness(.6); }
.day-cell.today {
  --edge: var(--gold); --face: #2e2408; --glow: 0 0 18px 2px #ffd04050; transform: translateY(-3px); --lift: 3px;
  background-image: linear-gradient(180deg, #4a3a10, #2a1e06);
}
.day-cell.today small { color: var(--gold); }
.day-cell.today b { color: var(--gold); }
.daily-task.ready { --edge: var(--gold); }
.daily-task.claimed { opacity: .6; }
.daily-check {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: var(--muted); background: var(--navy-0);
  box-shadow: 0 0 0 2px var(--edge-dim), 0 0 0 4px #000;
}
.daily-task.claimed .daily-check { color: var(--green); box-shadow: 0 0 0 2px var(--green), 0 0 0 4px #000; }
.daily-task.ready .daily-check { color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px #000; }

/* ---------- Criação e telas de conta ---------- */
#creation {
  position: absolute; inset: 0; z-index: 50; overflow: auto;
  background: var(--bg-menu, none) center / cover no-repeat fixed, #0a0f20 var(--bg-vila, none) center / cover fixed;
  image-rendering: pixelated;
}
#creation::before { content: ""; position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 30%, #0a102a55, #03050cd8 80%); }
.cr-wrap {
  --face: var(--navy-1);
  position: relative; width: min(1000px, calc(100% - 32px)); margin: 28px auto; color: var(--text); padding: 22px 26px 26px;
  background-image: var(--dither), linear-gradient(180deg, #111938, var(--navy-1) 200px); animation: popIn .3s var(--ease);
}
.cr-logo-img { display: block; width: min(440px, 80%); height: auto; margin: -6px auto 4px; image-rendering: pixelated; animation: float 3.2s ease-in-out infinite; filter: drop-shadow(0 6px 0 #000a); }
.cr-logo {
  text-align: center; font-family: var(--font-px); font-size: 40px; line-height: 1.1; color: var(--accent); letter-spacing: 3px;
  text-shadow: 4px 4px 0 #000, -2px 0 0 #ff3d6e66, 2px 0 0 #3dd6ff66; animation: float 3.2s ease-in-out infinite;
}
.cr-kicker { text-align: center; color: var(--accent); font-family: var(--font-px); letter-spacing: 2px; font-size: 9px; margin-top: 16px; text-shadow: 1px 1px 0 #000; }
.load-bar { width: min(320px, 80vw); height: 14px; margin: 8px auto 0; }
.load-bar > span { transition: width 0.15s steps(4); }
.cr-title { text-align: center; font-weight: 700; font-size: 42px; margin: 6px 0 12px; line-height: 1.1; letter-spacing: 1px; text-shadow: 3px 3px 0 #000, -1px 0 0 #ff3d6e77, 1px 0 0 #3dd6ff77; }
.cr-text, .cr-wrap > p { color: var(--muted); text-align: center; margin: 4px 0 16px; }
.cr-identity { --face: var(--navy-0); --edge: var(--accent); padding: 16px; text-align: center; margin-top: 22px; }
.cr-label { display: block; font-family: var(--font-px); font-size: 9px; letter-spacing: 2px; color: var(--accent); margin-bottom: 4px; }
.cr-name {
  width: min(560px, calc(100% - 8px)); text-align: center; font-weight: 700; font-size: 29px; letter-spacing: 3px; padding: 12px; margin: 10px 4px 6px;
  text-transform: uppercase;
}
.cr-name::placeholder { color: var(--dim); }
.cr-looks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 14px; }
.cr-section { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 8px; }
.cr-section b { font-weight: 700; font-size: 26px; }
.cr-section small { color: var(--accent); }
.cr-starters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 6px; }
.cr-starter { --face: var(--navy-2); border: 0; color: var(--text); padding: 6px 6px 0; text-align: center; display: flex; flex-direction: column; justify-content: flex-start; transition: transform .15s var(--ease), --lift .15s var(--ease); }
.cr-starter:hover { transform: translateY(-3px); --lift: 3px; --edge: var(--gold); }
.cr-starter .art {
  height: 170px; display: grid; place-items: center; box-shadow: 0 0 0 2px #000;
  background: var(--dither), repeating-linear-gradient(45deg, #ffffff07 0 8px, transparent 8px 16px), radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--el, #3a4a8a) 55%, var(--navy-deep)), #070b18 78%);
}
.cr-starter img { width: 140px; height: 140px; filter: drop-shadow(0 4px 0 #0008); }
.cr-starter b { display: block; font-family: var(--font-px); font-weight: 400; font-size: 13px; padding-top: 12px; letter-spacing: 1px; text-shadow: 2px 2px 0 #000; }
.cr-starter small { display: block; font-size: 16px; color: var(--accent); padding: 6px 0 4px; font-weight: 700; letter-spacing: .5px; }
.cr-starter.sel { --edge: var(--gold); --glow: 0 0 24px 2px #ffd04060; transform: translateY(-5px); --lift: 5px; }
.cr-starter.sel b { color: var(--gold); }
.cr-starter.sel .art img { animation: float 1.6s ease-in-out infinite; }
.cr-confirm { margin-top: 20px; width: calc(100% - 4px); padding: 14px; font-size: 22px; min-height: 52px; letter-spacing: 1.5px; }
.cr-heroes { grid-template-columns: repeat(4, 1fr); }
.cr-blurb { display: block; font-size: 16px; color: var(--muted); padding: 0 8px 12px; line-height: 1.35; }
.cr-chosen { text-align: center; margin-top: 12px; font-weight: 700; color: var(--gold); text-shadow: 1px 1px 0 #000; }

.auth-wrap { width: min(470px, calc(100% - 32px)); margin-top: max(24px, 8vh); }
.auth-form { display: grid; gap: 12px; margin-top: 8px; }
.auth-form label { display: grid; gap: 4px; font-family: var(--font-px); font-size: 9px; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }
.auth-form input { font-family: var(--font-ui); font-weight: 600; font-size: 22px; padding: 10px 12px; min-height: 46px; letter-spacing: .5px; }
.auth-form .cr-confirm { margin-top: 6px; }
.auth-form label.auth-show { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.auth-form .auth-show input { min-height: 0; width: 18px; height: 18px; padding: 0; margin: 0; }
/* CAPTCHA do cadastro (Turnstile, quadro da Cloudflare): espaço reservado para a tela não pular quando ele aparece */
.auth-captcha { min-height: 66px; display: flex; justify-content: center; align-items: center; color: var(--muted); }
.auth-error { min-height: 1.2em; color: var(--red); font-weight: 700; font-size: 18px; text-shadow: 1px 1px 0 #000; }
.auth-switch { display: block; width: 100%; margin-top: 14px; background: none; border: 0; color: var(--muted); font-weight: 600; cursor: pointer; padding: 10px 6px; min-height: 44px; }
.auth-switch b { color: var(--gold); }
.auth-switch:hover { color: var(--text); }
.auth-text { text-align: center; margin: 6px 0 14px; color: var(--muted); }
.auth-small { font-size: 19px; margin: 4px 0 10px; }
.auth-text a, .auth-legal a { color: var(--gold); }
.auth-legal { text-align: center; margin: 18px 0 0; font-size: 19px; color: var(--muted); }
.p-body a:not(.btn) { color: var(--gold); }
.auth-save { --face: var(--navy-0); --edge: var(--gold); text-align: center; padding: 12px; font-weight: 600; margin: 4px; }

/* =====================================================================
   FILTRO CRT (TV antiga): scanlines + grade RGB, vinheta com cantos
   arredondados, ruído e cintilação. Só CSS; nenhum canvas extra por quadro.
   Leve sobre o mapa; mais forte com menu, painel ou tela de entrada abertos.
   ===================================================================== */
/* Filtro de TV de tubo. Camadas (todas sem clique, só CSS + um filtro SVG):
   - .crt-scan: linhas de varredura suaves (sombra em onda, não risco duro) e um brilho leve no meio da tela;
   - .crt-roll: a faixa clara que desce devagar, como a varredura de uma TV velha;
   - .crt-glass: o vidro abaulado (reflexo no alto à esquerda e a borda que escurece em curva);
   - ::after: a moldura com cantos bem arredondados e a vinheta que segue a curva do tubo;
   - as linhas são desenhadas curvas (abrem para as bordas, como num vidro abaulado), uma vez por tamanho de
     tela, em ui.js (drawCrtLines). Curvar o conteúdo de verdade (filtro SVG) custava ~300 ms por quadro animado.
   --scan/--vig/--round/--glass sobem com menu aberto; o mapa durante o jogo fica sempre mais leve. */
#crt { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; display: none; --scan: .1; --vig: .3; --round: 10px; --glass: .5; --noise: 0; --roll: .03; }
html.crt-1 #crt, html.crt-2 #crt { display: block; }
/* durante o jogo (nenhum menu aberto) o filtro sobre o mapa é opcional: botão da TV na barra de cima */
html:not(.crt-game):not(:has(#menu-drawer:not(.hidden), #panel-wrap:not(.hidden), #creation:not(.hidden))) #crt { display: none; }
html.crt-1 #crt { --scan: .08; --vig: .28; --round: 12px; --glass: .35; }
html.crt-2 #crt { --scan: .13; --vig: .4; --round: 18px; --glass: .55; }
html.crt-1:has(#menu-drawer:not(.hidden), #panel-wrap:not(.hidden), #creation:not(.hidden)) #crt { --scan: .14; --vig: .55; --round: 26px; --glass: .7; --noise: .03; --roll: .04; }
html.crt-2:has(#menu-drawer:not(.hidden), #panel-wrap:not(.hidden), #creation:not(.hidden)) #crt { --scan: .2; --vig: .72; --round: 38px; --glass: 1; --noise: .045; --roll: .06; }
#crt > * { position: absolute; inset: 0; display: block; }
.crt-scan { width: 100%; height: 100%; opacity: calc(var(--scan) * 3.2); mix-blend-mode: multiply; }
.crt-roll {
  bottom: auto !important; height: 22%;
  background: linear-gradient(180deg, transparent, rgb(255 255 255 / var(--roll)) 45%, rgb(255 255 255 / calc(var(--roll) * 1.4)) 50%, rgb(255 255 255 / var(--roll)) 55%, transparent);
  animation: crtRoll 7s linear infinite; will-change: transform;
}
.crt-glass {
  border-radius: var(--round);
  background:
    /* fósforo mais aceso no meio do tubo */
    radial-gradient(ellipse 60% 52% at 50% 46%, rgb(255 236 200 / calc(var(--glass) * .05)), transparent 72%),
    /* reflexo do vidro: mancha clara no alto à esquerda e um filete curvo perto da borda de cima */
    radial-gradient(ellipse 55% 38% at 22% 8%, rgb(255 255 255 / calc(var(--glass) * .07)), transparent 70%),
    radial-gradient(ellipse 120% 18% at 50% -6%, transparent 78%, rgb(255 255 255 / calc(var(--glass) * .06)) 86%, transparent 94%),
    /* a borda do tubo escurece em curva (mais nos cantos), como uma tela abaulada */
    radial-gradient(ellipse 140% 125% at 50% 50%, transparent 52%, rgb(0 0 0 / calc(var(--vig) * .55)) 74%, rgb(0 0 0 / var(--vig)) 100%);
}
#crt::after {
  /* moldura: cantos arredondados (fora deles, preto) e sombra interna larga que dá volume ao vidro */
  content: ""; position: absolute; inset: 0; border-radius: var(--round);
  box-shadow: 0 0 0 100vmax #000, inset 0 0 0 2px rgb(0 0 0 / .9), inset 0 0 calc(var(--round) * 2.2 + 24px) rgb(0 0 0 / calc(var(--vig) * .8)), inset 0 0 6px 2px rgb(255 255 255 / calc(var(--glass) * .04));
}
.crt-noise {
  inset: -50% !important; opacity: var(--noise); will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: crtNoise .6s steps(6) infinite;
}
html:has(#menu-drawer:not(.hidden), #panel-wrap:not(.hidden), #creation:not(.hidden)) .crt-glass { animation: crtFlicker 6s steps(1) infinite; }
html:not(:has(#menu-drawer:not(.hidden), #panel-wrap:not(.hidden), #creation:not(.hidden))) :is(.crt-noise, .crt-roll) { display: none; }
/* Leve aberração cromática e brilho nos títulos quando o filtro está ligado. */
html:not(.crt-0) .p-head h2, html:not(.crt-0) .cr-title { text-shadow: 2px 2px 0 #000, -1px 0 0 #ff3d6e80, 1px 0 0 #3dd6ff80, 0 0 10px #ffffff30; }
html:not(.crt-0) .drawer-title b { text-shadow: 3px 3px 0 #000, -2px 0 0 #ff3d6e88, 2px 0 0 #3dd6ff88, 0 0 14px #ffd04066; }
html.crt-0 .drawer-title b, html.crt-0 .cr-logo { text-shadow: 3px 3px 0 #000; }

/* ---------- Animações ---------- */
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; scale: .96; } }
@keyframes drawerIn { from { opacity: 0; translate: 0 14px; } }
@keyframes cardIn { from { opacity: 0; translate: 0 18px; } }
@keyframes sheetIn { from { translate: 0 40px; opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.15); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes float { 50% { translate: 0 -4px; } }
@keyframes arrowBob { 50% { translate: 0 3px; } }
@keyframes lowHp { 50% { filter: brightness(1.5); } }
@keyframes shine { 0% { left: -20px; } 40%, 100% { left: calc(100% + 20px); } }
@keyframes crtNoise { 0% { transform: translate(0, 0); } 20% { transform: translate(-7%, 4%); } 40% { transform: translate(5%, -6%); } 60% { transform: translate(-3%, 8%); } 80% { transform: translate(8%, 2%); } 100% { transform: translate(-5%, -4%); } }
@keyframes crtRoll { from { transform: translateY(-110%); } to { transform: translateY(560%); } }
@keyframes crtFlicker { 0% { opacity: 1; } 31% { opacity: .82; } 32% { opacity: 1; } 67% { opacity: .9; } 68% { opacity: 1; } 93% { opacity: .85; } 94% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .crt-noise { display: none; }
}

/* ---------- Toque: alvos de pelo menos 40 px ---------- */
@media (pointer: coarse) {
  .btn, .btn.small { min-height: 40px; }
  .btn.small { padding: 8px 12px; }
  .icon-btn.mini { width: 34px; height: 34px; font-size: 20px; }
  #quest-guide { width: 34px; height: 34px; }
  select { min-height: 40px; }
  .seg-btn { min-height: 38px; }
}

/* ---------- Responsivo ---------- */
/* Monitores grandes: HUD um pouco maior para continuar legível. */
@media (min-width: 1800px) and (min-height: 950px) { :root { --hud-zoom: 1.2; } }
@media (min-width: 2300px) and (min-height: 1300px) { :root { --hud-zoom: 1.5; } }
@media (max-width: 1140px) {
  :root { --side-w: 200px; }
  #topbar, #bottombar { gap: 10px; }
  .lead-card { width: 210px; }
  .team-slots { grid-template-columns: repeat(5, 40px); gap: 8px; }
  .team-slot img { width: 32px; height: 32px; }
  .hot-slot { width: 40px; }
  #hotbar { gap: 6px; }
  .quick-menu .menu-btn { width: 54px; }
}
@media (max-width: 960px) {
  .lead-card { width: 172px; position: relative; }
  /* o nível vai para o canto do retrato e o nome usa a largura toda (senão "NARUTO GENIN" vira "NARU…") */
  .lead-title .lvl-badge { position: absolute; left: 3px; bottom: 3px; }
  .lead-title b { font-size: 17px; letter-spacing: 0; }
  .team-slots { grid-template-columns: repeat(5, 36px); gap: 8px; }
  .team-slot img { width: 30px; height: 30px; }
  .hot-slot { width: 36px; }
  .hot-slot .ico { --s: 28px !important; width: 28px; height: 28px; }
  .tb-player { min-width: 0; }
  .tb-currency .hide-md { display: none; }
  /* bônus na barra de cima como no celular (ícone em cima, texto curto embaixo): com o total de XP, incenso e clã
     juntos não cabia */
  .coin.boost { padding: 0 5px; gap: 6px; }
  .boost-item { flex-direction: column; gap: 1px; font-size: 12px; line-height: 11px; }
  .boost-item .bt-full { display: none; }
  .boost-item .bt-short { display: inline; }
  .quick-menu .menu-btn:not(.menu-toggle) { display: none; }
  .menu-cards { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 16px; }
}

/* Tela baixa (notebook de 720 px, janela não maximizada): cartões do menu menores para a última fileira caber. */
@media (min-width: 761px) and (max-height: 800px) {
  .drawer-inner { padding-top: 10px; padding-bottom: 14px; }
  .drawer-head { margin-bottom: 8px; }
  .menu-cards { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 14px; }
  .mc-label { font-size: 17px; padding: 6px 4px 7px; }
}

/* Celular e janelas estreitas: dock em duas linhas, topo enxuto, painéis como folha inferior. */
@media (max-width: 760px) {
  :root { --top-h: 50px; --dock-h: 120px; --side-w: 170px; }
  .hide-sm { display: none !important; }
  #topbar { gap: 10px; padding-top: 5px; padding-bottom: 5px; }
  .tb-player { padding: 2px; width: 40px; min-width: 40px; height: 38px; justify-content: center; }
  .tb-player-info { display: none; }
  .tb-lvl-mini { display: block; position: absolute; right: -6px; bottom: -6px; font-size: 13px; padding: 0 3px; line-height: 13px; }
  .tb-spacer { display: none; }
  /* o interruptor nunca pode vazar por cima das moedas: o Auto Hunt para de encolher nele (mín. 60 px) */
  .tb-auto { flex: 1; min-width: 60px; container-type: inline-size; }
  .auto-label { min-width: 0; flex: 1; overflow: hidden; }
  .auto-label b, .auto-label small { overflow: hidden; text-overflow: ellipsis; }
  .coin { padding: 0 8px 0 4px; }
  .tb-currency { gap: 8px; }
  /* bônus ativo (incenso etc.): ícone em cima e tempo curto embaixo, para sobrar espaço ao Auto Hunt */
  .coin.boost { padding: 0 5px; gap: 6px; }
  .boost-item { flex-direction: column; gap: 1px; font-size: 12px; line-height: 11px; }
  .boost-item .bt-full { display: none; }
  .boost-item .bt-short { display: inline; }

  #quest-card { left: 10px; right: 10px; width: auto; transform: none; top: calc(var(--top-h) + 10px); padding: 5px 8px 6px; }
  /* aberta, a missão fica por cima do analisador e do minimapa (que começam logo abaixo dela) */
  #quest-card.open { z-index: 8; }
  #quest-card.mini { right: 10px; }
  .quest-titles b { font-size: 18px; }
  #analyzer, #minimap-box { top: calc(var(--top-h) + 82px); }
  #analyzer { left: 10px; }
  #analyzer:not(.min) { width: min(300px, calc(100vw - 20px)); z-index: 7; max-height: calc(var(--free-h) - 90px); }
  #minimap-box { right: 10px; }
  #analyzer.min .an-summary .an-ico { display: none; }
  #analyzer.min .an-summary b { font-size: 17px; }
  #analyzer.min .an-summary small { margin: 0 4px 0 2px; }
  #analyzer.min { min-width: 0; max-width: calc(100% - var(--side-w) - 34px); }
  #analyzer.min #an-min { display: none; }
  #analyzer.min .float-head { padding: 0 8px; min-height: 36px; }
  #analyzer.min .an-summary::after { content: " ▾"; color: var(--muted); }
  #toasts, html:has(#quest-card.mini) #toasts { left: 10px; right: 10px; top: calc(var(--top-h) + 10px); align-items: center; }
  .toast { max-width: 100%; }

  /* Linha 1: líder | equipe. Linha 2: itens | botão Menu. A coluna do meio completa a largura da equipe. */
  #bottombar {
    display: grid; grid-template-columns: minmax(0, 1fr) 100px 74px; grid-template-rows: 54px 46px; gap: 10px 10px; align-items: stretch;
    grid-template-areas: "lead team team" "hot hot menu";
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .lead-card { grid-area: lead; }
  .team-box { grid-area: team; justify-self: end; }
  #hotbar { grid-area: hot; }
  .quick-menu { grid-area: menu; overflow: visible; padding: 0; margin: 0; }
  .lead-card { width: auto; height: 54px; padding: 3px 8px 3px 3px; min-width: 0; margin-left: 0; }
  .lead-title b { font-size: 17px; }
  .lead-card > img { width: 46px; height: 46px; }
  .lead-bar { grid-template-columns: 24px 1fr auto; }
  .team-box { align-self: stretch; }
  .team-slots { grid-template-columns: repeat(5, 30px); gap: 7px; }
  .team-slot { height: 54px; padding: 1px 2px 3px; }
  .team-slot img { width: 26px; height: 26px; }
  .team-slot span:not(.bar) { font-size: 12px; }
  #hotbar { padding: 4px; gap: 6px; min-width: 0; }
  .hot-slot { flex: 1; width: auto; min-width: 34px; height: 38px; }
  .quick-menu { flex: none; }
  .quick-menu .menu-btn.menu-toggle { width: 70px; height: 46px; min-height: 0; flex-direction: row; gap: 4px; font-size: 16px; margin: 0 0 0 4px; }
  .quick-menu .menu-btn.menu-toggle .ico { --s: 24px; width: 24px; height: 24px; }

  #menu-drawer { top: var(--top-h); }
  .drawer-inner { padding: 14px 14px 22px; }
  .drawer-title b { font-size: 26px; }
  .drawer-hint { display: none; }
  .menu-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px; }
  .mc-label { font-size: 16px; padding: 6px 2px 7px; gap: 4px; letter-spacing: .3px; }
  .mc-label .ico { display: none; }
  .menu-grid { gap: 12px; padding-top: 22px; }
  .menu-chip { flex: 1 1 140px; }

  #panel-wrap { padding: 0; place-items: end stretch; }
  #panel { width: 100%; max-height: calc(100dvh - 24px); animation: sheetIn .25s var(--ease); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .p-head { padding: 8px 8px 8px 10px; gap: 8px; }
  .p-ico { width: 36px; height: 36px; }
  .p-head h2 { font-size: 27px; }
  .p-body { padding: 12px 12px 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .grid.wide { grid-template-columns: 1fr; }
  .exp-picks { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); max-height: 240px; }
  .list-item { flex-wrap: wrap; }
  .list-item > .row { width: 100%; }
  .stat-table { display: block; overflow-x: auto; white-space: nowrap; }
  .form-row { flex-wrap: wrap; }
  .day-row { gap: 8px; }
  .day-cell .ico { --s: 24px !important; width: 24px; height: 24px; }
  #dialog { padding: 14px 14px 8px; bottom: calc(var(--bottom-h) + 16px); }
  .dlg-text { font-size: 21px; }

  .cr-wrap { padding: 18px 14px 20px; margin: 16px auto; }
  .cr-logo { font-size: 39px; }
  .cr-title { font-size: 34px; }
  .cr-looks { grid-template-columns: repeat(2, 1fr); } .cr-starters { grid-template-columns: 1fr 1fr 1fr; } .cr-heroes { grid-template-columns: 1fr 1fr; }
  .cr-starter img { width: 96px; height: 96px; } .cr-starter .art { height: 112px; }
}
/* celular: música, voto e convite saem da barra de cima (ficam na Config e no Menu), senão cobrem o Auto Hunt */
@media (max-width: 520px) {
  .tb-music, .tb-vote, .tb-invite, .tb-discord, .tb-achv { display: none; }
  /* o filtro de TV continua na Config: aqui o espaço é do Auto Hunt e do bônus ativo (incenso etc.) */
  .tb-crt { display: none; }
  /* moedas mais enxutas: com um incenso ligado, "115,5 mil" + diamantes + bônus ainda cabem em 360 px */
  #topbar { gap: 8px; }
  .tb-currency { gap: 6px; }
  .coin { font-size: 18px; gap: 4px; padding: 0 6px 0 3px; }
  .coin .ico { --s: 20px !important; width: 20px; height: 20px; }
  .coin.boost { padding: 0 4px; }
}
@media (max-width: 400px) {
  /* com bônus ativo não cabe o atalho do chat: ele continua no Menu (as não lidas somam na bolinha do Menu) */
  #topbar:has(.coin.boost:not(:empty)) .tb-chat { display: none; }
  .tb-auto { padding-left: 8px; gap: 6px; }
  .auto-label small { letter-spacing: 0; font-size: 6px; }
  .auto-label b { font-size: 15px; letter-spacing: 0; }
  #bottombar { grid-template-columns: minmax(0, 1fr) 82px 70px; }
  .team-slots { grid-template-columns: repeat(5, 26px); gap: 6px; }
  .team-slot img { width: 24px; height: 24px; }
  .menu-cards { gap: 14px 12px; }
  .mc-label { font-size: 14px; }
  .day-row { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .day-cell { padding: 5px 0 6px; }
  .day-cell small { font-size: 8px; }
}
/* Auto Hunt no celular: conforme a caixa encolhe (incenso, chat, tela estreita), sai primeiro o ⚙ (os filtros
   estão na Config), depois o ícone, depois o texto — aí volta um ícone pequeno, e com 2+ bônus fica só o
   interruptor, que já mostra o estado. Medidas: ícone 32, texto ≥ 46, interruptor 48, ⚙ 28, espaços 8. */
@container (max-width: 185px) { .tb-auto .auto-cfg { display: none; } }
@container (max-width: 149px) { .tb-auto .auto-icon { display: none; } }
@container (max-width: 99px) {
  .tb-auto .auto-label { display: none; }
  .tb-auto .auto-icon { display: inline-grid; }
  .tb-auto .auto-icon .ico { --s: 22px !important; width: 22px; height: 22px; }
}
@container (max-width: 77px) { .tb-auto .auto-icon { display: none; } }
/* Telas baixas (paisagem no celular): dock em uma linha só. */
@media (max-height: 520px) and (min-width: 600px) {
  :root { --top-h: 46px; --dock-h: 64px; }
  .tb-player, .tb-auto, .icon-btn.square { height: 34px; }
  .icon-btn.square { width: 34px; }
  .lead-card, .team-slot { height: 50px; }
  .lead-card > img { width: 42px; height: 42px; }
  .hot-slot { height: 42px; }
  #hotbar { padding: 3px; }
  #minimap-box:not(.min) .mm-body { display: none; }
  .menu-cards { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 14px; }
  .drawer-inner { padding-top: 12px; }
  .drawer-head { margin-bottom: 10px; }
  /* Celular deitado (largura <= 760): volta o dock para uma linha e a missão para o centro. */
  #bottombar { display: flex; padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  #bottombar .lead-card { width: 172px; height: 50px; }
  #bottombar .team-box { justify-self: auto; }
  #bottombar .quick-menu { flex: 1; }
  #bottombar .quick-menu .menu-btn.menu-toggle { width: 58px; height: 48px; flex-direction: column; gap: 1px; font-size: 13px; }
  #bottombar .quick-menu .menu-btn.menu-toggle .ico { --s: 24px; width: 24px; height: 24px; }
  #bottombar #hotbar { flex: none; }
  #bottombar .hot-slot { flex: none; width: 36px; height: 40px; }
  #quest-card { left: 50%; right: auto; transform: translateX(-50%); width: min(400px, calc(var(--vw) - 2 * var(--side-w) - 56px)); }
  #quest-card.mini { right: calc(var(--side-w) + 28px); }
  #analyzer, #minimap-box, #toasts { top: calc(var(--top-h) + 10px); }
}
@media (max-height: 520px) and (min-width: 600px) and (max-width: 700px) {
  #bottombar .lead-card { width: 150px; }
  #bottombar .team-slots { grid-template-columns: repeat(5, 28px); gap: 6px; }
  #bottombar .hot-slot { width: 32px; }
}
.portrait { width: 96px; height: 96px; flex: none; background: radial-gradient(circle, var(--navy-mid), var(--navy-deep) 70%); box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--edge-base), 0 0 0 6px #000, 0 8px 0 4px #0008; margin: 6px; }

/* ==============================================================
   Diamantes, VIP e ofertas (premium.js)
   ===================================================================== */
/* Chip de diamantes na barra de cima, com o "+" dourado brilhando. */
.coin-diamond { border: 0; cursor: pointer; color: var(--text); padding-right: 4px; transition: transform .14s var(--ease); }
.coin-diamond:hover { transform: translateY(-2px); --edge: var(--gold); }
.coin-diamond b { color: #8fe8ff; }
.coin-plus {
  font-style: normal; font-weight: 700; font-size: 18px; line-height: 18px; width: 20px; height: 20px; display: grid; place-items: center; margin-left: 2px;
  background: linear-gradient(180deg, var(--gold-hi) 0 2px, var(--gold) 2px 70%, var(--gold-2) 70%); color: var(--gold-ink);
  box-shadow: 0 0 0 2px #000; position: relative; overflow: hidden; animation: plusGlow 1.6s steps(4) infinite;
}
.coin-plus::before { content: ""; position: absolute; top: 0; bottom: 0; width: 5px; left: -10px; background: #ffffffc0; transform: skewX(-20deg); animation: shine 2.2s steps(10) infinite; }
.coin-diamond.has-offer { --edge: var(--gold); --glow: 0 0 12px 0 #ffd04070; }
@keyframes plusGlow { 50% { box-shadow: 0 0 0 2px #000, 0 0 10px 2px #ffd040a0; } }

/* Selo VIP: plaquinha dourada ao lado do nome (só aparece com VIP ativo). */
.vip-badge {
  display: none; font-style: normal; font-weight: 700; font-size: 13px; line-height: 15px; padding: 0 4px; letter-spacing: .6px;
  background: linear-gradient(180deg, #fff6c0 0 2px, #ffcf3a 2px 60%, #d98a0a 60%); color: #3a1c00;
  box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 0 8px #ffd04080;
}
html.is-vip .vip-badge, .vip-badge.on { display: inline-block; }
/* no chat o selo vem de cada mensagem (quem mandou tinha VIP), não do VIP de quem lê */
.chat-line .vip-badge { font-size: 11px; line-height: 13px; margin-right: 5px; vertical-align: 1px; }
.tag.vip-tag { color: var(--gold-ink); background: linear-gradient(180deg, #fff6c0, #ffcf3a 60%, #d98a0a); }
/* Níveis do VIP: Chunin bronze, Jounin prata, Hokage ouro com brilho. A barra de cima usa html[data-vip]. */
.vip-badge.t-chunin, html[data-vip="chunin"] #tb-vip {
  background: linear-gradient(180deg, #ffd2a8 0 2px, #d08a4a 2px 60%, #8a4a1e 60%); color: #2a1004;
  box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 0 8px #d08a4a80;
}
.vip-badge.t-jounin, html[data-vip="jounin"] #tb-vip {
  background: linear-gradient(180deg, #ffffff 0 2px, #dfe8f0 2px 60%, #8a9aaa 60%); color: #14202c;
  box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 0 8px #c8d4e080;
}
.vip-badge.t-hokage, html[data-vip="hokage"] #tb-vip {
  background: linear-gradient(180deg, #fff6c0 0 2px, #ffcf3a 2px 60%, #d98a0a 60%); color: #3a1c00;
  box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 0 10px #ffd040a0;
  animation: hokageGlow 2.4s ease-in-out infinite;
}
@keyframes hokageGlow { 50% { box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 0 16px #ffd040e0; } }
/* VIP Kage (vitalício): plaquinha roxa com letras douradas. */
.vip-badge.t-kage, html[data-vip="kage"] #tb-vip {
  background: linear-gradient(180deg, #8a5ac8 0 2px, #4a2a7a 2px 60%, #2a1446 60%); color: var(--gold);
  box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 0 10px #b071e8a0;
}
/* Tag DEV de quem faz o jogo: vermelho escuro, quase vinho, com letras claras. Vem antes do selo do VIP. */
.vip-badge.t-dev {
  background: linear-gradient(180deg, #e0505c 0 2px, #a3121f 2px 60%, #6a0812 60%); color: #fff0f0;
  box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 0 8px #c0182a90;
}
.vip-badge.t-dev { margin-right: 4px; }
/* Tag FUNDADOR (conta criada antes do lançamento): verde da Folha, com letras claras. Entre a DEV e a do VIP. */
.vip-badge.t-fundador {
  background: linear-gradient(180deg, #9be86a 0 2px, #3f9a2c 2px 60%, #1f5a16 60%); color: #f4ffe8;
  box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, 0 0 8px #5ac83a90; margin-right: 4px;
}
/* Perfil: aviso do Fundador antes do lançamento */
.founder-soon { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 12px 0; flex-wrap: wrap; }
.founder-soon > .vip-badge { flex: none; }
.founder-soon .grow { min-width: 180px; flex: 1; }
/* Perfil › Selos no nome */
.name-tags { display: grid; gap: 6px; }
.name-tag-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.name-tag-prev { min-width: 96px; }
.name-tag-prev .clan-tag-sm { margin-left: 0; font-size: 13px; color: var(--text); }
/* Aba VIP: os quatro níveis lado a lado e a tabela com a coluna do seu nível em destaque. */
.vip-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.vip-card .row { align-items: center; gap: 6px; }
.vip-card .vip-price { font-size: 20px; color: var(--gold); margin: 6px 0 2px; }
.vip-card .vip-price small { font-size: 12px; color: var(--muted, #9aa4ae); }
.vip-card.t-chunin { --edge: #b0703a; }
.vip-card.t-jounin { --edge: #a8b8c8; }
.vip-card.t-hokage { --edge: var(--gold); }
.vip-card.on { --glow: 0 0 14px 0 #ffd04050; }
.vip-upgrade { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #ffffff22; display: flex; flex-direction: column; gap: 6px; }
/* Kage: fica fora da grade dos mensais, numa faixa larga de apoiador (é apoio ao jogo, não "o quarto nível"). */
.vip-kage { --edge: #b071e8; --face: #1c1030; --glow: 0 0 16px 0 #b071e850; margin: 18px 0 14px; padding-top: 18px; }
.vip-kage .ribbon { background: #6a3aa8; }
.vip-kage .grow > p { margin: 6px 0; }
.vip-kage .vip-price { color: var(--gold); }
.vip-table td.mine { background: #ffd04018; }
.vip-trial { --edge: #ff8a3a; }
.supporter-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 10px 0; }
.supporter-name { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #00000040; box-shadow: inset 0 0 0 1px #ffffff14; }
/* Buff dentro da tela onde é usado (premium.js, buffOffer): uma linha com o botão "Ativar". */
.buff-offer { margin: 10px 0; --edge: #ffd04066; }
.buff-offer .tag.ok { white-space: nowrap; }
.double-offline { --edge: var(--gold); }
.cap-buff { margin-top: 8px; text-align: center; }
/* Aviso de XP reduzida na barra de cima (inimigos fracos para o líder): toca e abre o Selo do Veterano. */
.boost-item.xp-low { color: #ffb070; cursor: pointer; }
/* Caçada em Sequência (ui.js, chainHudHtml): toca e abre o painel da Caçada; dourado quando já dá brilhante a mais. */
.boost-item.chain { color: #cfe8ff; cursor: pointer; }
/* Hunt Analyzer: atalho para os boosts curtos de diamante */
.an-turbo { display: block; width: 100%; margin: 6px 0 2px; }
.an-turbo.hidden { display: none; }
/* Hunt Analyzer: XP reduzida pelos inimigos fracos (ui.js, xpLowPct); com área melhor já visitada, o toque leva até ela */
.an-low { --bf: #5a3418; --bf-hi: #8a5228; --bf-lo: #3a200e; --bink: #ffc48a; display: block; width: 100%; margin: 8px 0 2px; white-space: normal; text-align: left; text-shadow: 0 1px 0 #000; }
.an-low.go { --bf: #8a4a14; --bf-hi: #c47a30; --bf-lo: #5a2e0a; --bink: #fff1d6; }
.an-low.hidden { display: none; }
.boost-item.chain.hot { color: var(--gold); }
.chain-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin: 10px 0; }
.chain-steps .card { padding: 6px; text-align: center; opacity: .55; }
.chain-steps .card.on { opacity: 1; box-shadow: inset 0 0 0 2px var(--gold); }
/* Cor de nome e moldura compradas (premium.js só liga se a conta tiver o desbloqueio). */
#tb-name, #panel[data-panel="perfil"] .p-head h2 { color: var(--name-color, inherit); }
/* Molduras animadas (shared/cosmeticos.js, FRAMES): um canvas de pixel art por cima do retrato, desenhado por
   dist/src/cosmeticos.js. O retrato ocupa os 24 px do meio de 40: o canvas tem 166,7% do retrato, centrado. */
.pf { position: relative; display: inline-block; flex: none; line-height: 0; vertical-align: middle; }
.pf > .pf-cv { position: absolute; left: -33.333%; top: -33.333%; width: 166.667%; height: 166.667%; pointer-events: none; image-rendering: pixelated; z-index: 1; }
.pf[data-pf] > img { box-shadow: none !important; }
.pf.port { margin: 6px; }
.pf.port[data-pf] { margin: 34px 38px 34px 34px; }
.pf.port > .portrait { margin: 0; }
/* na loja e no Guarda-roupa: retrato de 42 px, que com a moldura (166,7%) cabe na caixa de 72 px do ícone */
.pf.shop > img { width: 42px; height: 42px; display: block; }
/* nos rankings: o mesmo quadradinho das imagens de lista (.list-item > img); com moldura, ela fica por cima e ganha
   espaço para não encostar na posição nem no nome */
.pf.rank > img { width: 48px; height: 48px; display: block; background: radial-gradient(circle, var(--navy-mid), var(--navy-deep) 70%); box-shadow: 0 0 0 2px #000; }
.pf.rank[data-pf] { margin: 0 10px; }
.clan-tag-sm.gold { color: #ffd040; }
/* Nome com efeito (NAME_FX): o degradê corre pela letra; o do Raio pisca. */
@keyframes nfx { from { background-position: 0 0; } to { background-position: -200% 0; } }
@keyframes nfx-flash { from { background-position: 0 0; } 22% { background-position: -100% 0; filter: drop-shadow(1px 1px 0 #000) brightness(1.9); } 24% { filter: drop-shadow(1px 1px 0 #000); } to { background-position: -400% 0; } }
@media (prefers-reduced-motion: reduce) { #tb-name, [style*="nfx"] { animation: none !important; } }

/* Loja de diamantes */
.premium-body { margin-top: 12px; }
.premium-off { margin-bottom: 14px; --edge: var(--gold); }
.premium-off .ico { margin-bottom: 6px; }
.pack-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pack-card { text-align: center; padding-top: 18px; }
.pack-card.hot { --edge: var(--gold); --glow: 0 0 14px 0 #ffd04040; }
.pack-amount { font-size: 26px; font-weight: 700; color: #8fe8ff; text-shadow: 2px 2px 0 #000; display: inline-flex; align-items: center; gap: 4px; }
.pack-amount s { color: var(--dim); font-size: 18px; text-shadow: none; }
.ribbon {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-family: var(--font-px); font-size: 9px;
  padding: 4px 6px; background: var(--accent); color: #fff; box-shadow: 0 0 0 2px #000; text-shadow: 1px 1px 0 #0008; z-index: 1;
}
.ribbon.soft { background: var(--navy-4); }
.starter-card, .deal-banner, .vip-status.on, .vip-hint { --edge: var(--gold); --face: #221c0c; margin-bottom: 14px; }
.starter-card .tag { margin-top: 4px; }
.vip-col { color: var(--gold); font-weight: 700; }
.odds { color: var(--accent) !important; }
.block-why { display: block; width: 100%; text-align: center; color: var(--muted); font-size: 14px; }
.legal { font-size: 15px; color: var(--dim) !important; margin-top: 18px; }
.legal b { color: var(--muted) !important; }
.pix-qr { display: block; width: 220px; height: 220px; margin: 10px auto; image-rendering: auto; background: #fff; padding: 8px; }

/* Oferta (estilo do Bônus diário): arte grande, fileira de cartas e botão dourado enorme. */
.offer-hero { text-align: center; }
.offer-hero .ico { animation: float 2.6s ease-in-out infinite; }
.offer-hero p { margin: 6px auto 14px; max-width: 560px; }
.offer-cells { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
.offer-cells .day-cell b { font-size: 20px; }
.offer-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; }
.btn.offer-buy { font-size: 24px; padding: 14px 34px 15px; min-width: min(420px, 100%); }

/* Oferta contextual: cartão pequeno no canto, acima do dock; some sozinho. */
#offer-pop {
  --edge: var(--gold); --face: var(--navy-1); --glow: 0 0 18px 0 #ffd04040;
  position: absolute; z-index: 16; right: 16px; bottom: calc(var(--bottom-h) + 16px); width: min(360px, calc(var(--vw) - 32px));
  display: flex; align-items: center; gap: 10px; padding: 10px; animation: toastIn .25s var(--ease); font-size: 17px; line-height: 1.25;
}
#offer-pop small { color: var(--muted); }
.offer-pop-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; }
@media (max-width: 760px) {
  .coin-diamond .coin-plus { width: 16px; height: 16px; font-size: 15px; }
  .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .btn.offer-buy { font-size: 20px; padding: 12px 18px; }
  #offer-pop { right: 8px; left: 8px; width: auto; bottom: calc(var(--bottom-h) + 8px); }
}
/* ---------- Itens de drop (items_ui.js) ---------- */
.gear-card { text-align: center; }
.eq-bonus { color: #7dff9a !important; }
.gear-stats { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; font-size: 16px; line-height: 1.2; }
.gear-stats b { color: var(--gold); text-shadow: 1px 1px 0 #000; }
.gear-stats span { color: #bfe8ff; }
.gear-head .gear-stats { align-items: flex-start; margin: 6px 0; }
.item-ico.big { width: 112px; height: 112px; display: grid; place-items: center; background: radial-gradient(circle, var(--navy-mid), var(--navy-deep) 70%); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--edge, transparent); }
.lock-ico { position: absolute; left: -6px; top: -6px; font-style: normal; font-size: 14px; line-height: 0; }
.ico-inline { vertical-align: -3px; }
.rar-tag { font-weight: 700; }
.chips { flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.costs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0; justify-content: center; }
.list-item .costs { justify-content: flex-start; }
.cost { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; }
.cost.miss { color: var(--red, #ef5a4a); }
.cost small { color: var(--muted); }
.gear-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 460px; }
.gear-slot {
  --face: var(--navy-2); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border: 0; color: var(--text); font: inherit; cursor: pointer;
  background: var(--face); box-shadow: -2px 0 0 var(--edge, var(--edge-base)), 2px 0 0 var(--edge, var(--edge-base)), 0 -2px 0 var(--edge, var(--edge-base)), 0 2px 0 var(--edge, var(--edge-base)), 0 5px 0 #0008;
  transition: transform .14s var(--ease);
}
.gear-slot:hover { transform: translateY(-2px); }
.gear-slot.empty { opacity: .7; }
.gear-slot.empty span { font-size: 28px; line-height: 40px; filter: grayscale(.6); }
.gear-slot small { font-size: 14px; color: var(--muted); }
/* Mochila > Equipamentos: boneco do aliado | bolsa em grade | ficha da peça */
#panel:has(.inv) { width: min(1100px, calc(var(--vw) - 40px)); }
.inv { display: grid; grid-template-columns: 236px minmax(0, 1fr) 220px; grid-template-areas: "doll bag detail"; gap: 14px; margin-top: 12px; align-items: start; }
.inv-doll, .inv-detail { --face: var(--navy-2); background: var(--face); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--edge, var(--edge-dim)); padding: 10px; }
.inv-doll { grid-area: doll; display: flex; flex-direction: column; gap: 8px; }
/* a equipe toda numa linha só: com 6 aliados cada rosto encolhe em vez de cair para baixo */
.inv-allies { display: flex; gap: 4px; justify-content: center; }
.inv-ally { flex: 0 1 40px; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 2px 0; border: 0; background: var(--navy-deep); color: var(--muted); font: inherit; cursor: pointer; box-shadow: 0 0 0 2px #000; opacity: .7; }
.inv-ally img { width: 100%; max-width: 32px; height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.inv-ally small { font-size: 12px; line-height: 1; }
.inv-ally.on { opacity: 1; color: var(--gold); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--gold); }
.inv-name { text-align: center; line-height: 1.1; }
.inv-name b { display: block; font-size: 20px; text-shadow: 2px 2px 0 #000; }
.inv-name small { color: var(--accent); }
.inv-body { display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: auto auto auto; grid-template-areas: ". cabeca ." "arma sprite colete" ". acessorio ."; align-items: center; justify-items: center; gap: 2px; }
.inv-sprite { grid-area: sprite; width: 96px; height: 96px; image-rendering: pixelated; }
.inv-sl { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.inv-sl small { font-size: 13px; color: var(--muted); line-height: 1; }
.inv-sl-cabeca { grid-area: cabeca; } .inv-sl-arma { grid-area: arma; } .inv-sl-colete { grid-area: colete; } .inv-sl-acessorio { grid-area: acessorio; }
.inv-slot, .inv-cell {
  position: relative; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; cursor: pointer; font: inherit; color: var(--text);
  background: radial-gradient(circle, var(--navy-mid), var(--navy-deep) 75%); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--edge, var(--edge-dim));
}
.inv-slot .qty, .inv-cell .qty, .inv-detail .qty { position: absolute; right: 1px; bottom: 0; font-style: normal; font-size: 13px; font-weight: 700; color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
.inv-slot .lock-ico, .inv-cell .lock-ico { left: 1px; top: 8px; }
.inv-slot.empty { opacity: .55; filter: grayscale(.6); }
.inv-slot.sel, .inv-cell.sel { box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--edge, var(--edge-dim)), 0 0 0 4px var(--gold); z-index: 1; }
.inv-slot:hover, .inv-cell:not(.blank):hover { filter: brightness(1.25); }
[id^="skins-"] { scroll-margin-top: 96px; } /* o título do personagem não fica atrás do cabeçalho da loja */
/* trocar a skin na Mochila: a que falta fica apagada e leva para a loja */
.inv-skins { border-top: 1px solid #ffffff1a; padding-top: 6px; }
.inv-skins > small:first-child { display: block; font-family: var(--font-px); font-size: 9px; color: var(--gold); text-transform: uppercase; margin-bottom: 4px; }
.inv-skin-row { display: flex; flex-wrap: wrap; gap: 4px; }
.inv-skin { width: 44px; height: 44px; padding: 2px; border: 0; background: var(--navy-deep); box-shadow: 0 0 0 2px #000, inset 0 0 0 1px var(--edge-dim); cursor: pointer; }
.inv-skin img { width: 40px; height: 40px; image-rendering: pixelated; display: block; }
.inv-skin.on { box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--gold); }
.inv-skin.locked img { filter: saturate(.7) brightness(.62); }
.inv-skin.locked:hover img { filter: none; }
.inv-bonus { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; font-size: 15px; border-top: 1px solid #ffffff1a; padding-top: 6px; }
.inv-bonus > small { grid-column: 1 / -1; font-family: var(--font-px); font-size: 9px; color: var(--gold); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.inv-bonus small { color: var(--muted); }
.inv-bonus b { color: #7dff9a; }
.inv-doll-acts { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.inv-bag { grid-area: bag; min-width: 0; }
.inv-bag .chips .tab { padding: 4px 8px; font-size: 8px; }
.inv-bag .gear-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 8px; }
.inv-bag .gear-menu select { min-width: 0; width: 100%; }
.inv-bag .gear-count { grid-column: 1 / -1; margin: 2px 0 0; }
@media (max-width: 1000px) { .inv-bag .gear-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inv-bag-head { display: flex; flex-direction: column; gap: 2px; }
.inv-bag-head b { color: var(--gold); font-size: 19px; text-shadow: 1px 1px 0 #000; }
.inv-bag-head small { color: var(--muted); }
.inv-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.inv-cell { width: auto; height: auto; aspect-ratio: 1; }
.inv-cell .ico, .inv-cell img:not(.inv-wearer) { max-width: 80%; height: auto; }
.inv-cell.blank { cursor: default; background: var(--navy-deep); box-shadow: 0 0 0 2px #000, inset 0 0 0 1px #ffffff10; }
.inv-wearer { position: absolute; left: 1px; bottom: 1px; width: 18px; height: 18px; image-rendering: pixelated; background: #000a; box-shadow: 0 0 0 1px #000; }
.inv-wearer.me { box-shadow: 0 0 0 1px var(--gold); }
.inv-detail { grid-area: detail; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.inv-detail.empty { color: var(--muted); padding: 18px 12px; }
.inv-detail .item-ico.big { width: 96px; height: 96px; margin: 2px 0; }
.inv-rar { font-family: var(--font-px); font-size: 9px; letter-spacing: .6px; text-transform: uppercase; text-shadow: 1px 1px 0 #000; }
.inv-title { font-size: 21px; line-height: 1.1; text-shadow: 2px 2px 0 #000; }
.inv-detail > small { color: var(--muted); }
.inv-detail .gear-stats { align-items: center; }
.inv-diff { font-weight: 700; }
.inv-diff.up { color: var(--green) !important; }
.inv-diff.down { color: var(--red) !important; }
.inv-acts { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 6px; }
.inv-acts .btn { width: 100%; justify-content: center; }
@media (max-width: 1000px) {
  .inv { grid-template-columns: 236px minmax(0, 1fr); grid-template-areas: "doll bag" "detail bag"; }
  .inv-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .inv { grid-template-columns: minmax(0, 1fr); grid-template-areas: "doll" "bag" "detail"; }
  .inv-doll { max-width: 340px; width: 100%; justify-self: center; }
  /* a ficha da peça fica presa no pé da tela enquanto a bolsa rola */
  .inv-detail { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: auto 1fr; text-align: left; justify-items: start; column-gap: 10px; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--edge, var(--edge-dim)), 0 -6px 12px #000c; }
  .inv-detail { padding: 8px; row-gap: 0; }
  .inv-detail .item-ico.big { grid-row: 1 / span 4; width: 56px; height: 56px; }
  .inv-detail .item-ico.big .ico, .inv-detail .item-ico.big img { width: 48px; height: 48px; }
  .inv-title { font-size: 18px; }
  .inv-detail .gear-stats { align-items: flex-start; font-size: 13px; margin: 2px 0; }
  .inv-detail .inv-acts, .inv-detail .inv-diff { grid-column: 1 / -1; }
  .inv-acts { flex-direction: row; margin-top: 4px; }
  .inv-acts .btn { width: auto; flex: 1 1 0; }
  /* no pé da tela só cabem Equipar/Tirar e Melhorar; trancar e desmontar ficam na ficha completa */
  .inv-acts .btn:is([data-act="lock"], [data-act="salvage"]) { display: none; }
  .inv-detail.empty { display: block; text-align: center; }
}
.btn[disabled] { filter: grayscale(.8) brightness(.8); cursor: not-allowed; }

/* ---------- Arena do Estádio (arena_ui.js) ---------- */
.ar-tickets { --face: var(--navy-2); --edge: #b89a48; display: flex; align-items: center; gap: 14px; padding: 10px 12px; margin: 4px 4px 0; flex-wrap: wrap; }
.ar-tickets .grow { flex: 1; min-width: 140px; }
.ar-tickets b { color: var(--gold); font-size: 21px; text-shadow: 1px 1px 0 #000; }
.ar-ticket-row { display: flex; gap: 4px; }
.ar-ticket { display: grid; place-items: center; width: 40px; height: 40px; background: radial-gradient(circle, var(--navy-mid), var(--navy-deep) 70%); box-shadow: 0 0 0 2px #000; }
.ar-ticket.empty .ico { filter: grayscale(1) brightness(.45); opacity: .6; }
.ar-ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 4px; }
.ar-step {
  --edge: var(--edge-base); --face: var(--navy-2); position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 2px 6px; border: 0; color: var(--text); cursor: pointer; font: inherit; background: var(--face);
  box-shadow: -2px 0 0 var(--edge), 2px 0 0 var(--edge), 0 -2px 0 var(--edge), 0 2px 0 var(--edge), 0 6px 0 #0008;
  transition: transform .14s var(--ease);
}
.ar-step b { font-family: var(--font-px); font-size: 11px; font-weight: 400; color: var(--gold); text-shadow: 1px 1px 0 #000; }
.ar-step small { color: var(--muted); font-size: 15px; }
.ar-step i { font-style: normal; font-size: 15px; line-height: 1; }
.ar-step.done i { color: var(--green); }
.ar-step.lock { opacity: .5; filter: grayscale(.7); }
.ar-step:hover { transform: translateY(-2px); --edge: var(--gold); }
.ar-step.on { --edge: var(--gold); --face: var(--gold-deep); }
.ar-detail { --face: var(--navy-2); --edge: var(--gold-2); margin: 16px 4px 0; padding: 12px 14px; }
.ar-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ar-detail-head small { font-family: var(--font-px); font-size: 9px; color: var(--accent); letter-spacing: .5px; }
.ar-name { font-size: 26px; text-shadow: 2px 2px 0 #000; }
.ar-team { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.ar-foe { display: flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; background: var(--navy-deep); box-shadow: 0 0 0 2px #000, inset 0 0 0 1px #ffffff14; }
.ar-foe img { width: 48px; height: 48px; image-rendering: pixelated; }
.ar-foe small { line-height: 1.15; color: var(--muted); }
.ar-foe b { color: #ffd9d0; }
.ar-first { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #2a221066; box-shadow: inset 0 0 0 1px #ffd04044; color: var(--text); }
.ar-first.got { opacity: .6; }
.ar-first b { color: var(--gold); }
.ar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.ar-actions .btn[disabled] { filter: grayscale(.8) brightness(.8); cursor: not-allowed; }
.ar-why { color: var(--accent); }
.ar-odds td { vertical-align: middle; }
.ar-odds-item { display: flex; align-items: center; gap: 8px; line-height: 1.1; }
.ar-pct { width: 120px; }
.ar-pct b { color: var(--gold); font-size: 21px; text-shadow: 1px 1px 0 #000; }
.ar-pct .bar { margin-top: 3px; }
#arena-pop {
  --edge: var(--rc, var(--gold)); --face: var(--navy-1); --glow: 0 0 34px 2px color-mix(in srgb, var(--rc, #ffd040) 45%, transparent);
  position: absolute; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(400px, calc(var(--vw) - 24px));
  padding: 16px 16px 14px; text-align: center; animation: popIn .25s var(--ease); zoom: var(--hud-zoom);
}
#arena-pop .ap-sub { color: var(--muted); font-size: 18px; margin-top: -2px; }
#arena-pop .ap-first { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; padding: 6px 8px; background: #2a221066; box-shadow: inset 0 0 0 1px #ffd04044; font-size: 17px; }
#arena-pop .ap-first b { color: var(--gold); }
.ap-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 14px 0 6px; padding: 12px 8px 8px; overflow: hidden; background: var(--navy-deep); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px color-mix(in srgb, var(--rc, #ffd040) 55%, transparent); }
.ap-rays {
  position: absolute; left: 50%; top: 56px; width: 340px; height: 340px; margin: -170px 0 0 -170px; pointer-events: none; opacity: .28;
  background: repeating-conic-gradient(from 0deg, var(--rc, #ffd040) 0 10deg, transparent 10deg 30deg); animation: spin 14s linear infinite;
}
.ap-ico { position: relative; width: 88px; height: 88px; animation: float 1.6s steps(4) infinite; }
.ap-name { position: relative; font-size: 24px; color: var(--rc, var(--gold)); text-shadow: 2px 2px 0 #000; }
.ap-drop .tag, .ap-drop small { position: relative; }
.ap-drop small { color: var(--text); font-size: 17px; }
.ap-note { color: var(--muted); font-size: 16px; }
.ap-note b { color: var(--gold); }
@media (max-width: 760px) {
  .ar-ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ar-pct { width: 80px; }
}
@media (prefers-reduced-motion: reduce) { .ap-rays, .ap-ico { animation: none; } }

/* ---------- Relíquias ---------- */
.relic-name { color: #ff3b3b; text-shadow: 0 0 6px #ff3b3b66, 1px 1px 0 #000; }
.relic-row .tag { margin-top: 4px; }
.tag.relic-open { color: #ffd0c8; border-color: #ff3b3b; box-shadow: 0 0 6px #ff3b3b66; }
.relic-found { margin-top: 6px; display: grid; gap: 2px; font-size: 13px; color: var(--muted, #b9c2d6); }
.relic-effect { color: #ff8a7a; margin: 6px 0; }

/* ---------- Mercado ---------- */
.mk-filters select { min-width: 150px; }
.mk-price { margin: 4px 0; }
.mk-locked { opacity: .9; border-color: var(--red, #ef5a4a); }

/* ---------- Pix ---------- */
.pix-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pix-box .pix-qr { width: 200px; height: 200px; image-rendering: auto; background: #fff; padding: 6px; }
.pix-box textarea { width: 100%; min-height: 90px; font-family: monospace; font-size: 12px; word-break: break-all; }

/* ---------- Colecionáveis: lendários, títulos, ranking e Ficha Ninja ---------- */
.legend-name { color: #ffcf4a; text-shadow: 0 0 6px #ffb03066, 1px 1px 0 #000; }
.divino-name { color: #7fe3ff; text-shadow: 0 0 6px #4fd8ff66, 1px 1px 0 #000; }
#capture-pop.legend { --edge: #ffcf4a; box-shadow: 0 0 24px 4px #ffb03055; }
.legend-marks { display: flex; gap: 6px; justify-content: center; margin: 8px 0 4px; }
.legend-marks i { width: 14px; height: 14px; transform: rotate(45deg); background: #2a2418; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #6a5a2a; }
/* Aparição relâmpago (legend_ui.js): pop-up no meio da tela, acima dos painéis e do recrutamento */
#legend-pop-wrap { position: absolute; inset: 0; z-index: 28; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, #0a102a99, #020408cc); animation: fadeIn .15s; }
#legend-pop {
  --edge: #ffcf4a; --face: var(--navy-1); --glow: 0 0 32px 6px #ffb03066; --px: 3px; zoom: var(--hud-zoom);
  width: min(420px, calc(var(--vw) - 32px)); padding: 16px; text-align: center; animation: popIn .2s var(--ease);
}
#legend-pop .lp-sprite { width: 112px; height: 112px; image-rendering: pixelated; display: block; margin: 0 auto; filter: drop-shadow(0 0 10px #ffcf4a88); }
#legend-pop .lp-name { font-weight: 700; font-size: 26px; text-shadow: 2px 2px 0 #000; }
#legend-pop .lp-name small { color: var(--muted); font-size: 18px; }
#legend-pop p { margin: 6px 0 0; line-height: 1.35; font-size: 18px; }
#legend-pop b.gold { color: var(--gold); }
/* Loja pela metade no dia do lançamento (premium.js, saleBanner) */
.launch-sale { --edge: #ff8a1e; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; padding: 10px 14px; background: linear-gradient(90deg, #3a1a00, #1f3a12); }
.launch-sale > b { font-family: var(--font-px); font-size: 12px; color: #ffb040; text-shadow: 2px 2px 0 #000; }
.launch-sale span { font-size: 16px; }
.btn s, .price s, .vip-price s, .ps-buyrow s { opacity: .6; font-size: .85em; margin-right: 3px; text-decoration-thickness: 2px; }
/* Evento de lendário (evento_lendario_ui.js): o pop-up grande da hora em que o evento começa */
#le-wrap { position: absolute; inset: 0; z-index: 32; display: grid; place-items: center; padding: 12px; overflow: hidden; background: radial-gradient(ellipse at center, #5a2c00e6, #120600f5 70%); animation: fadeIn .2s; }
#le-wrap .le-rays { position: absolute; left: 50%; top: 50%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; pointer-events: none; opacity: .34;
  background: repeating-conic-gradient(#ffb020 0 9deg, transparent 9deg 18deg); animation: leSpin 24s steps(72) infinite; }
#le-wrap .le-sparks { position: absolute; inset: 0; pointer-events: none; }
#le-wrap .le-sparks i { position: absolute; top: -12px; width: var(--s); height: var(--s); background: var(--gold); box-shadow: 0 0 0 1px #000; animation: leFall 4s steps(40) infinite; }
#le-pop {
  --edge: var(--gold); --face: #1c1030; --glow: 0 0 60px 14px #ffb02066; --px: 4px; zoom: var(--hud-zoom);
  position: relative; width: min(600px, calc(var(--vw) - 24px)); max-height: calc(var(--vh, 100vh) - 24px); overflow-y: auto;
  padding: 22px 20px 20px; text-align: center; animation: leJump .55s steps(11) both;
}
#le-pop .le-ask { font-family: var(--font-px); font-size: 15px; letter-spacing: 2px; color: #fff; text-shadow: 2px 2px 0 #000; }
#le-pop .le-take { margin-top: 10px; font-family: var(--font-px); font-size: 28px; color: #ff8a1f; text-shadow: 3px 3px 0 #000, 0 0 14px #ff5a0088; animation: leShake .5s steps(4) .55s 2; }
#le-pop .le-mult { margin: 16px 0 6px; font-family: var(--font-px); font-size: 104px; line-height: 1; color: var(--gold-hi);
  text-shadow: 0 4px 0 var(--gold), 0 8px 0 var(--gold-2), 0 12px 0 var(--gold-3), 6px 16px 0 #000, 0 0 40px #ffb020; animation: lePulse 1.2s steps(6) infinite; }
#le-pop h2 { margin: 18px 0 4px; font-family: var(--font-px); font-size: 19px; line-height: 1.4; color: var(--gold); text-shadow: 3px 3px 0 #000; }
#le-pop .le-cast { display: flex; justify-content: center; align-items: flex-end; margin: 6px 0 4px; }
#le-pop .le-cast img { width: 88px; height: 88px; margin: 0 -6px; image-rendering: pixelated; filter: drop-shadow(0 0 8px #ffcf4a); animation: leBob 1s steps(4) infinite alternate; }
#le-pop .le-cast img:nth-child(3) { width: 124px; height: 124px; }
#le-pop .le-cast img:is(:nth-child(2), :nth-child(4)) { width: 104px; height: 104px; }
#le-pop p { margin: 8px 0 0; line-height: 1.2; }
#le-pop .le-main { font-size: 22px; }
#le-pop .le-main b { color: var(--gold); }
#le-pop .le-time { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 12px; font-size: 20px; background: #0006; box-shadow: inset 0 0 0 2px var(--gold-3); }
#le-pop .le-time b { color: var(--gold); font-variant-numeric: tabular-nums; }
#le-pop .le-time small { color: var(--muted); font-size: 17px; }
#le-pop .le-seal { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; color: var(--muted); text-align: left; }
#le-pop .le-seal b { color: #fff; }
#le-pop .btn { margin-top: 14px; padding-inline: 34px; font-size: 22px; }
/* fim do evento: o total sobe contando, e o presente numa caixa dourada */
#le-pop.le-end .le-take { font-size: 34px; color: var(--gold-hi); }
#le-pop.le-end .le-count { font-size: 92px; font-variant-numeric: tabular-nums; }
#le-pop.le-end .le-main small { color: var(--muted); font-size: 18px; }
#le-pop.le-end .le-main small b { color: #fff; }
#le-pop .le-gift { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 14px; text-align: left; font-size: 18px; line-height: 1.25; background: #0007; box-shadow: inset 0 0 0 2px var(--gold), 0 0 18px #ffd04055; animation: leGlow 1.6s steps(4) infinite alternate; }
#le-pop .le-gift small { display: block; margin-bottom: 3px; font-family: var(--font-px); font-size: 10px; letter-spacing: 1px; color: var(--gold); }
#le-pop .le-gift b { color: var(--gold-hi); }
#le-pop .le-calm { margin-top: 10px; font-size: 17px; color: var(--muted); }
#le-pop .le-calm b { color: #fff; }
#le-pop .le-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#le-pop .le-btns .btn { padding-inline: 22px; }
@media (max-width: 760px) {
  #le-pop.le-end .le-take { font-size: 22px; }
  #le-pop.le-end .le-count { font-size: 60px; }
  #le-pop.le-end .le-main small { font-size: 15px; }
  #le-pop .le-gift { gap: 8px; padding: 8px 10px; font-size: 15px; }
}
@keyframes leSpin { to { rotate: 360deg; } }
@keyframes leFall { to { transform: translateY(calc(var(--vh, 100vh) + 24px)); } }
@keyframes leJump { 0% { opacity: 0; scale: .2; translate: 0 60px; } 55% { opacity: 1; scale: 1.1; translate: 0 -14px; } 80% { scale: .97; translate: 0 4px; } 100% { scale: 1; translate: 0 0; } }
@keyframes leShake { 25% { translate: -4px 0; } 50% { translate: 4px 0; } 75% { translate: -2px 0; } }
@keyframes lePulse { 50% { scale: 1.07; } }
@keyframes leBob { to { translate: 0 -5px; } }
@keyframes leGlow { to { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 30px #ffd040aa; } }
@media (max-width: 560px), (max-height: 640px) {
  #le-pop { padding: 16px 12px 14px; }
  #le-pop .le-ask { font-size: 11px; }
  #le-pop .le-take { margin-top: 6px; font-size: 20px; }
  #le-pop .le-mult { margin: 10px 0 2px; font-size: 68px; }
  #le-pop h2 { margin-top: 12px; font-size: 13px; }
  #le-pop .le-cast img { width: 60px; height: 60px; margin: 0 -5px; }
  #le-pop .le-cast img:nth-child(3) { width: 84px; height: 84px; }
  #le-pop .le-cast img:is(:nth-child(2), :nth-child(4)) { width: 72px; height: 72px; }
  #le-pop .le-main { font-size: 19px; }
  #le-pop .le-time { font-size: 17px; }
  #le-pop .le-time small { font-size: 15px; }
  #le-pop .le-seal { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { #le-wrap *, #le-wrap { animation: none !important; } }

/* Lançamento oficial (lancamento_ui.js): agradecimento da beta e o presente de Fundador, uma vez */
#launch-pop-wrap { position: absolute; inset: 0; z-index: 31; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, #0a1a0899, #020804dd); animation: fadeIn .2s; }
#launch-pop {
  --edge: #5ac83a; --face: var(--navy-1); --glow: 0 0 36px 8px #5ac83a55; --px: 3px; zoom: var(--hud-zoom);
  position: relative; width: min(460px, calc(var(--vw) - 32px)); max-height: calc(var(--vh, 100vh) - 32px); overflow-y: auto;
  padding: 26px 18px 16px; text-align: center; animation: popIn .25s var(--ease);
}
#launch-pop .lc-ribbon { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-family: var(--font-px); font-size: 9px; color: #ffe070; letter-spacing: 2px; text-shadow: 1px 1px 0 #000; }
#launch-pop h2 { margin: 6px 0 10px; font-family: var(--font-px); font-size: 20px; line-height: 1.3; color: #ffb040; text-shadow: 3px 3px 0 #000, 0 0 14px #ff8a1e88; }
#launch-pop .lc-me { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 14px 0 6px; }
#launch-pop .lc-me .portrait { width: 72px; height: 72px; image-rendering: pixelated; display: block; }
#launch-pop .lc-me b { font-size: 20px; text-shadow: 2px 2px 0 #000; }
#launch-pop p { margin: 8px 0 0; line-height: 1.35; font-size: 17px; }
#launch-pop .lc-thanks b { color: #9be86a; }
#launch-pop .lc-gift-title { margin: 14px 0 6px; font-family: var(--font-px); font-size: 10px; color: var(--gold); text-shadow: 2px 2px 0 #000; }
#launch-pop .lc-gifts { list-style: none; margin: 0; padding: 8px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; text-align: left; background: #0004; box-shadow: inset 0 0 0 2px #1f5a16; }
#launch-pop .lc-gifts li { display: flex; align-items: center; gap: 6px; font-size: 15px; line-height: 1.15; }
#launch-pop .lc-gifts li b { color: #7ad4ff; }
#launch-pop .lc-forever { font-size: 15px; color: var(--muted); }
#launch-pop .lc-tag { color: #9be86a; }
#launch-pop .lc-agenda { list-style: none; margin: 0; padding: 6px 10px; text-align: left; background: #0004; box-shadow: inset 0 0 0 2px #6a4a1a; }
#launch-pop .lc-agenda li { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; font-size: 15px; line-height: 1.2; }
#launch-pop .lc-agenda li > b { flex: none; min-width: 92px; color: var(--gold); font-variant-numeric: tabular-nums; }
#launch-pop .lc-agenda li.past { opacity: .4; }
#launch-pop .lc-agenda .lc-xp { color: #9be86a; }
@media (max-width: 420px) { #launch-pop .lc-gifts { grid-template-columns: 1fr; } }
.legend-marks i.on { background: #ffcf4a; box-shadow: 0 0 0 2px #000, 0 0 8px #ffcf4a; }
.legend-hint { --edge: #ffcf4a; }
.player-link { color: var(--gold); text-decoration: none; font-weight: 700; }
.player-link:hover, .player-link:focus-visible { text-decoration: underline; }
.player-title { color: #ffd9a0; font-style: italic; }
.player-title.big { font-size: 18px; margin-bottom: 4px; }
.relic-sale { color: #9ff0b0; }
.rank-row { align-items: center; cursor: pointer; }
.rank-row:hover { border-color: var(--gold); }
.rank-pos { min-width: 2.2em; text-align: center; font-family: var(--font-px); font-size: 11px; color: var(--muted, #b9c2d6); }
.rank-row.top1 .rank-pos { color: #ffd040; } .rank-row.top2 .rank-pos { color: #d8e0ea; } .rank-row.top3 .rank-pos { color: #e09a5a; }
.rank-score { white-space: nowrap; color: var(--gold); }
.rank-row.me { --face: #33427f; box-shadow: 0 0 0 2px #000, inset 0 0 0 3px var(--gold); }
.rank-me { position: sticky; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 8px 10px; background: #17204a; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--gold); }
.rank-me .rank-pos { color: var(--gold); font-size: 13px; }
.rank-me .grow { flex: 1; min-width: 0; }
.relic-card .name { font-size: 14px; }

/* segurar o atalho no celular abre a troca: sem menu de texto/imagem do sistema */
.hot-slot { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* luta em andamento: a oferta do canto sobe para não cobrir a barra da luta (e o "Fugir") */
html:has(#battle-bar:not(.hidden)) #offer-pop { bottom: calc(var(--bottom-h) + 76px); }
/* com painel aberto os avisos descem: no topo cobriam o X de fechar */
html:has(#panel-wrap:not(.hidden)) #toasts { top: auto; bottom: calc(var(--bottom-h) + 16px); flex-direction: column-reverse; }

/* ---------- Chat no canto (live_ui.js): a mensagem nova do global aparece e some ---------- */
#chat-peek {
  position: absolute; z-index: 15; right: 16px; bottom: calc(var(--bottom-h) + 16px); width: min(340px, calc(var(--vw) - 32px));
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none;
}
.peek-line {
  pointer-events: auto; cursor: pointer; max-width: 100%; text-align: left; border: 0; font: inherit; color: var(--text, #fff);
  background: #070a15d0; box-shadow: 0 0 0 2px #000, inset 0 0 0 1px #ffffff18; padding: 4px 10px; font-size: 16px; line-height: 1.25;
  text-shadow: 1px 1px 0 #000; animation: toastIn .25s var(--ease); transition: opacity .5s, transform .5s;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.peek-line b { margin-right: 6px; color: #9fd2ff; }
.peek-line .vip-badge { font-size: 11px; line-height: 13px; margin-right: 5px; vertical-align: 1px; }
.peek-line:hover { background: #10183ae0; }
.peek-line.out { opacity: 0; transform: translateX(16px); }
/* a oferta do canto e a barra da luta ocupam o mesmo lugar: o chat sobe; com o chat aberto, some */
html:has(#offer-pop:not(.hidden)) #chat-peek { bottom: calc(var(--bottom-h) + 120px); }
html:has(#panel-wrap:not(.hidden) #panel[data-panel="social"]) #chat-peek { display: none; }
@media (max-width: 760px) {
  #chat-peek { right: 8px; bottom: calc(var(--bottom-h) + 8px); width: min(300px, calc(var(--vw) - 16px)); }
  .peek-line { font-size: 15px; }
}
.chat-opt { display: flex; gap: 8px; align-items: center; margin: 8px 0 0; font-size: 15px; color: var(--muted); cursor: pointer; }
/* aviso de anúncios: na mesma linha dos filtros, encostado à direita (desce para a linha de baixo se faltar espaço) */
.mk-alert { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; font-size: 15px; color: var(--muted); }

/* ---------- Chat (chat_ui.js) ---------- */
.tb-chat, .tb-achv { flex: none; position: relative; }
.tb-chat .dot, .tb-achv .dot { top: -6px; right: -6px; }
.chat-log {
  --face: var(--navy-0); --edge: var(--edge-dim); --drop: transparent;
  height: min(52vh, 420px); height: min(calc(var(--vh) * .52), 420px); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 10px; margin: 10px 4px 6px; display: flex; flex-direction: column; gap: 4px;
}
.chat-log .empty-note { margin: auto 0; }
.chat-line { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; padding: 2px 4px; }
.chat-line.mine { background: #ffffff0a; }
.chat-time { color: var(--muted); font-size: 13px; margin-right: 2px; }
.chat-name { color: var(--gold); font-weight: 700; text-decoration: none; }
.chat-name::after { content: ":"; color: var(--muted); margin-right: 6px; }
.chat-lvl { color: var(--muted); font-size: 12px; margin: 0 6px 0 -2px; }
.chat-lvl + .chat-text { margin-left: 0; }
.chat-text { color: var(--text); }
.chat-form { display: flex; gap: 6px; align-items: center; }
.chat-form input { flex: 1; min-width: 0; font-size: 17px; }
.chat-err { color: #ff9a8a !important; margin: 2px 6px; font-size: 15px; }
/* mostrar no chat (chat_ui.js, cardChip): o cartão do aliado ou do anúncio, na linha da mensagem */
.chat-card { display: flex; align-items: center; gap: 8px; width: min(100%, 340px); margin: 4px 0 2px; padding: 4px 8px 4px 4px; border: 2px solid var(--edge-dim); background: var(--navy-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.chat-card:hover { border-color: var(--gold) !important; }
.chat-card > img { width: 40px; height: 40px; flex: none; image-rendering: pixelated; background: radial-gradient(#26407a, var(--navy-deep) 75%); }
.chat-card .grow { min-width: 0; display: flex; flex-direction: column; }
.chat-card b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-card small { font-size: 13px; color: var(--muted); }
.chat-card-price { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; color: var(--gold-hi); white-space: nowrap; }
.chat-share { display: flex; align-items: center; gap: 8px; margin: 0 4px 6px; padding: 6px 8px; --edge: var(--gold); font-size: 15px; }
.chat-share .grow { flex: 1; min-width: 0; }
.chat-card-buy { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; --edge: var(--gold); }
.chat-card-buy .grow { flex: 1; display: flex; flex-direction: column; }
.chat-card-buy b { font-size: 20px; }
/* canal Mercado do chat (chat_ui.js, marketTab): o lembrete no global e o botão na tela do Mercado */
.chat-tip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 4px 0; font-size: 15px; color: var(--gold-hi); }
.tabs .mk-chat-btn { margin-left: auto; align-self: center; }
.chat-rules { margin: 6px 4px 0; }
.chat-who { --edge: var(--gold); margin: 10px 4px 0; align-items: center; flex-wrap: wrap; }
.chat-who .row { flex-wrap: wrap; gap: 6px; }
.chat-conv { cursor: pointer; align-items: center; }
.chat-conv:hover { border-color: var(--gold); }
.chat-badge { background: var(--red); color: #fff; min-width: 26px; text-align: center; padding: 0 6px; box-shadow: 0 0 0 1px #000; }
.chat-thread-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 4px 0; }
.chat-thread-head b { font-size: 20px; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .chat-log { height: calc(var(--vh) - 300px); min-height: 200px; }
  .chat-line { font-size: 16px; }
}

/* ---------- Dicas do Konohamaru (konohamaru.js) ---------- */
/* Balão de fala: em cima da cabeça dele no mapa; com painel/menu/diálogo aberto, encaixado no canto de baixo com o rosto. */
#kono-bubble {
  position: fixed; z-index: 29; left: -999px; top: 0; width: min(330px, calc(100vw - 16px)); display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px 9px; cursor: pointer; color: var(--ink); background: #fff8e2; border-radius: 4px;
  box-shadow: 0 0 0 3px #1a1206, 0 0 0 5px #fff8e2, 0 0 0 7px #1a1206, 0 6px 0 4px #0008;
  animation: konoIn .22s var(--ease, ease-out); --tail: 50%;
}
#kono-bubble.hidden { display: none; }
#kono-bubble::after {
  content: ""; position: absolute; left: var(--tail); bottom: -12px; width: 14px; height: 14px; translate: -50% 0; rotate: 45deg;
  background: #fff8e2; box-shadow: 3px 3px 0 0 #1a1206; clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
#kono-bubble .kono-face { display: none; }
#kono-bubble.docked {
  left: 14px !important; top: auto !important; bottom: calc(var(--bottom-h) * var(--hud-zoom) + 16px); width: min(380px, calc(100vw - 28px));
}
#kono-bubble.docked.docked-right { left: auto !important; right: 14px; }
#kono-bubble.docked::after { display: none; }
#kono-bubble.docked .kono-face {
  display: block; flex: none; width: 58px; height: 58px; margin: -2px 0 0 -2px; background: #3a6a8a; border-radius: 3px;
  box-shadow: 0 0 0 3px #1a1206; overflow: hidden;
}
#kono-bubble .kono-face img { width: 100%; height: 100%; image-rendering: pixelated; object-fit: cover; object-position: top; }
.kono-body { min-width: 0; flex: 1; }
.kono-name { font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: #c2410c; line-height: 1; margin-bottom: 4px; }
.kono-text { font-size: 20px; line-height: 1.22; overflow-wrap: anywhere; }
.kono-rest { visibility: hidden; }
.kono-foot { display: flex; align-items: flex-end; gap: 8px; margin-top: 6px; }
.kono-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-left: auto; }
.kono-more { height: 14px; margin-left: auto; font-size: 13px; color: #c2410c; animation: arrowBob .8s steps(2) infinite; }
.kono-quit {
  padding: 2px 0; font: inherit; font-size: 15px; color: #8a7a5a; background: none; border: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}
.kono-quit:hover { color: #c2410c; }
#kono-bubble.collapsed { width: auto; padding: 0; background: none; box-shadow: none; animation: konoBounce .9s steps(3) infinite; }
#kono-bubble.collapsed::after { display: none; }
.kono-alert {
  display: grid; place-items: center; width: 30px; height: 30px; font-size: 26px; color: #1a1206; background: var(--gold);
  box-shadow: 0 0 0 3px #1a1206, 0 4px 0 2px #0008, 0 0 14px 4px #4fd8ff99;
}
/* Tela escura do passo a passo: as faixas em volta do botão da vez (konohamaru.js, placeDim). Acima dos painéis (25),
   abaixo da aura (28) e do balão (29). */
.kono-dim { position: fixed; z-index: 27; background: #03050cc4; }
.kono-dim.hidden { display: none; }
#kono-bubble.spot .kono-face {
  display: block; flex: none; width: 58px; height: 58px; margin: -2px 0 0 -2px; background: #3a6a8a; border-radius: 3px;
  box-shadow: 0 0 0 3px #1a1206; overflow: hidden;
}
#kono-bubble.spot { width: min(380px, calc(100vw - 16px)); }
#kono-bubble.spot.below::after { bottom: auto; top: -12px; rotate: 225deg; }
.partilha-note { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 10px 14px; }
.partilha-note small { display: block; }
details.faq p { margin: 8px 0 0; }
@keyframes konoIn { from { opacity: 0; translate: 0 8px; scale: .92; } }
@keyframes konoBounce { 50% { translate: 0 -4px; } }

/* Aura de chakra no botão da vez: borda girando em tons de azul, brilho pulsando e chamas subindo. */
@property --chakra-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
#chakra-ring { position: fixed; z-index: 28; pointer-events: none; border-radius: 8px; }
#chakra-ring.hidden { display: none; }
#chakra-ring::before {
  content: ""; position: absolute; inset: -6px; border-radius: 10px; padding: 4px;
  background: conic-gradient(from var(--chakra-a), #2a6bff, #4fd8ff, #e6fbff, #4fd8ff, #2a6bff, #7fe8ff, #2a6bff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: chakraSpin 1.4s linear infinite;
}
#chakra-ring::after {
  content: ""; position: absolute; inset: -9px; border-radius: 13px;
  box-shadow: 0 0 18px 6px #3ab8ffaa, inset 0 0 14px 3px #7fe8ff77; animation: chakraPulse 1.1s ease-in-out infinite;
}
#chakra-ring i {
  position: absolute; bottom: -4px; left: calc(6% + var(--i) * 9.5%); width: 6px; height: 6px; background: #7fe8ff;
  box-shadow: 0 0 6px 2px #3ab8ff; opacity: 0; animation: chakraWisp 1.5s steps(6) infinite; animation-delay: calc(var(--i) * -0.37s);
}
#chakra-ring i:nth-child(3n) { width: 4px; height: 4px; background: #e6fbff; }
#chakra-ring i:nth-child(even) { bottom: auto; top: 30%; animation-name: chakraWispUp; }
@keyframes chakraSpin { to { --chakra-a: 360deg; } }
@keyframes chakraPulse { 50% { box-shadow: 0 0 30px 11px #3ab8ffdd, inset 0 0 18px 5px #7fe8ff99; } }
@keyframes chakraWisp { 0% { opacity: 0; translate: 0 0; } 20% { opacity: 1; } 100% { opacity: 0; translate: 0 -40px; } }
@keyframes chakraWispUp { 0% { opacity: 0; translate: 0 0; } 20% { opacity: .9; } 100% { opacity: 0; translate: 0 -54px; } }
@media (prefers-reduced-motion: reduce) { #chakra-ring::before, #chakra-ring::after, #chakra-ring i, #kono-bubble.collapsed { animation: none; } }

/* ===== Loja de Diamantes: barra lateral de abas (premium.js, premiumPanel) ===== */
#panel[data-panel="premium"] { width: min(1260px, calc(var(--vw) - 40px)); }
.shop-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.shop-balance { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; --face: var(--navy-0); }
.shop-balance small { font-family: var(--font-px); font-size: 9px; color: var(--muted); }
.shop-balance b { font-size: 22px; color: var(--text); }
.shop-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 250px; gap: 18px; align-items: start; }
.shop-nav { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 4px; }
.shop-nav hr { border: 0; height: 2px; margin: 6px 0; background: repeating-linear-gradient(90deg, var(--rail) 0 6px, transparent 6px 10px); }
.shop-nav-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 16px; text-align: left; cursor: pointer;
}
.shop-nav-btn span { flex: 1; min-width: 0; }
.shop-nav-btn i { font-style: normal; font-size: 12px; color: var(--muted); background: var(--navy-3); padding: 1px 6px; }
.shop-nav-btn:hover { background: var(--navy-2); }
.shop-nav-btn.on { background: var(--navy-3); box-shadow: inset 3px 0 0 var(--gold); color: var(--gold-hi); }
/* busca da loja (premium.js, searchTab): em cima das abas */
.shop-search { width: 100%; box-sizing: border-box; margin-bottom: 6px; padding: 7px 10px; font: inherit; font-size: 15px; color: var(--text); background: var(--navy-0); border: 2px solid var(--edge-dim); border-radius: 0; }
.shop-search::placeholder { color: var(--muted); }
.shop-search:focus { outline: none; border-color: var(--gold); }
.shop-main { min-width: 0; }
.shop-main > h3:first-child { margin-top: 2px; }
.shop-side { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 14px; }
.side-box { padding: 10px 12px; --face: var(--navy-2); }
.side-box > b { display: flex; justify-content: space-between; font-size: 16px; }
.side-box > b i { font-style: normal; color: var(--gold); }
.side-box ul { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.side-box li { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.side-box p { font-size: 13px; margin: 8px 0 0; }
.side-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.side-grid span { background: var(--navy-1); padding: 6px; font-size: 15px; }
.side-grid small { display: block; font-family: var(--font-px); font-size: 9px; color: var(--muted); margin-bottom: 4px; }
.shop-hero, .item-deal, .bolsa-card, .custom-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 4px 0 16px; }
.shop-hero, .item-deal, .bolsa-card, .custom-card { flex-wrap: wrap; }
.shop-hero .grow, .item-deal .grow, .bolsa-card .grow, .custom-card .grow { min-width: 220px; flex: 1; }
.shop-hero small, .item-deal small, .bolsa-card small, .custom-card .grow > small, .combo-tag { display: block; font-family: var(--font-px); font-size: 9px; letter-spacing: .5px; color: var(--accent); margin-bottom: 6px; }
.shop-hero b, .item-deal b, .bolsa-card b { font-size: 24px; color: var(--text); }
.shop-hero p, .item-deal p, .bolsa-card p { margin: 6px 0 0; }
.shop-hero { --edge: var(--gold); --face: #221c0c; }
.item-deal { --edge: #ff6aa8; --face: #2a1028; }
.item-deal-buy, .bolsa-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.item-deal-buy .countdown { font-size: 18px; color: #fff; background: #d23a7a; padding: 2px 8px; box-shadow: 0 0 0 2px #000; }
.item-deal-buy .price, .combo-card .price { display: inline-flex; align-items: center; gap: 6px; }
.item-deal-buy s, .combo-card s { color: var(--muted); }
.bolsa-card { --edge: #a070ff; --face: #1c1238; }
.bolsa-card small { color: #c8a8ff; }
.bolsa-buy small { font-family: inherit; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.custom-card { --edge: #3fb7ff; --face: #0c2034; }
.custom-card .grow > small { color: #8fd6ff; }
.custom-card .grow > b { font-size: 20px; color: var(--text); }
.custom-card .bolsa-buy small { max-width: 190px; text-align: right; }
.custom-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.custom-row input[type="range"] { flex: 1; min-width: 140px; width: auto; }
.custom-row input[type="number"] { width: 96px; font-size: 18px; }
.custom-row span { font-size: 16px; }
.custom-row #custom-price { font-size: 22px; color: var(--gold); }
#custom-hint { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.combo-card { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
.combo-card .ribbon { left: 12px; transform: none; background: #2f9a52; }
.combo-ico { display: grid; place-items: center; padding: 6px 0; }
.combo-card > b { font-size: 18px; }
.combo-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 4px; }
.combo-list li { display: flex; align-items: center; gap: 6px; font-size: 14px; background: var(--navy-1); padding: 4px 6px; }
.combo-card .actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.egg-row { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.egg-card { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.egg-card small { font-size: 13px; color: var(--muted); }
.soon-note { text-align: center; margin-top: 18px; }
/* Skins (premium.js): prévia andando e golpeando num quadradinho azul, num palco escuro com luz azul no chão. */
.skin-prev {
  display: block; image-rendering: pixelated; max-width: 100%; height: auto; border: 2px solid var(--blue);
  background: radial-gradient(34% 8% at 50% 76%, #5fb4ff66, #5fb4ff00 100%), linear-gradient(180deg, #172452, #0c1430 78%, #0a1028);
}
.skin-stage { display: grid; place-items: center; width: fit-content; max-width: 100%; margin: 2px auto 6px; }
.skin-card { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
.skin-card .ribbon { left: 12px; transform: none; background: #c4570f; }
.skin-card.on { --edge: var(--green); }
.skin-card > b { font-size: 18px; }
.skin-card .actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Loja rotativa: a fita e a borda na cor da raridade (as do jogo, shared/data.js); o destaque do dia ocupa a linha
   inteira, com a prévia grande ao lado do texto. */
.skin-card .ribbon.tier-lendaria { background: #c47a12; }
.skin-card .ribbon.tier-epica { background: #7a3fb8; }
.skin-card .ribbon.tier-rara { background: #2f6fb8; }
.skin-card .ribbon.tier-comum { background: #5a6470; }
.skin-card.tier-lendaria { --edge: #f0a33a; --glow: 0 0 16px 0 #f0a33a40; }
.skin-card.tier-epica { --edge: #b071e8; }
.skin-day { --edge: #f0a33a; --face: #24180a; }
@media (max-width: 640px) {
}
@media (max-width: 420px) { .skin-row-famosos, .skin-row-variadas { grid-template-columns: 1fr; } }
.skin-when { color: #ffb070; }
.skin-when.soon { color: var(--gold-hi); }
.skin-event { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 4px 0 16px; flex-wrap: wrap; --edge: #ff8a1f; --face: #2a1608; }
.skin-event .grow { min-width: 220px; flex: 1; }
.skin-event small { display: block; font-family: var(--font-px); font-size: 9px; letter-spacing: .5px; color: #ffb070; margin-bottom: 6px; }
.skin-event b { font-size: 24px; color: var(--text); }
.skin-event p { margin: 6px 0 10px; }
.skin-event-row { display: flex; gap: 6px; flex-wrap: wrap; }
.wardrobe-row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wardrobe-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.wardrobe-card.on { --edge: var(--green); }
.wardrobe-card.missing .skin-stage { opacity: 0.55; filter: grayscale(0.6); }
.silhouette { filter: brightness(0) opacity(.45); }
.wardrobe-entry { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 10px 0; flex-wrap: wrap; }
.wardrobe-entry .grow { min-width: 180px; flex: 1; }
@media (max-width: 1100px) {
  .shop-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .shop-side { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 760px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* todas as seções à vista em duas colunas: na faixa que rolava de lado, quem jogava no celular só via 3 de 19 e
     nem sabia que tinha Lendários na loja (30/10). Tocar numa seção rola até ela (openPremium, ui.js). */
  .shop-nav { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .shop-nav hr { display: none; }
  .shop-nav-btn { width: auto; min-width: 0; gap: 6px; padding: 5px 6px; white-space: nowrap; background: var(--navy-2); font-size: 14px; }
  .shop-nav-btn span { overflow: hidden; text-overflow: ellipsis; }
  .shop-nav-btn .ico { --s: 20px !important; width: 20px; height: 20px; }
  .shop-nav-btn i { font-size: 11px; padding: 0 4px; }
  .shop-nav-btn[data-arg="todos"] { grid-column: 1 / -1; }
  .shop-search { grid-column: 1 / -1; margin-bottom: 0; }
  .shop-nav.searching .shop-nav-btn { display: none; } /* buscando: os resultados logo abaixo do campo */
  .shop-nav-btn.on { box-shadow: inset 0 -3px 0 var(--gold); }
  @media (max-width: 400px) { .shop-nav-btn { font-size: 13px; gap: 5px; padding: 5px 4px; } }
  .item-deal-buy, .bolsa-buy { align-items: stretch; width: 100%; }
  .custom-card .bolsa-buy small { max-width: none; text-align: left; }
}

/* ---------- Condensação: Esferas do Caminho da Verdade (condensacao_ui.js) ---------- */
.esf { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box; border: 2px solid #3a2a55; background: transparent; vertical-align: middle; }
.esf.on { border-color: #6a48a8; background: radial-gradient(circle at 35% 30%, #f1eaff 0 12%, #7f69b8 13% 22%, #0a0710 24% 70%, #2c1b4a 100%); box-shadow: 0 0 6px rgba(150, 100, 255, 0.55); }
.esf-meter { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.esf-tag { display: inline-flex; align-items: center; gap: 4px; }
.esf-tag .esf { width: 11px; height: 11px; border-width: 1px; }
.esf-bonus { color: #c9a8ff !important; }
.cond-box { padding: 10px 12px; margin: 8px 0; border: 1px solid rgba(150, 100, 255, 0.35); border-radius: 8px; background: rgba(20, 10, 36, 0.45); }
.cond-box .bar { margin: 6px 0 2px; }
.warn-text { color: #ffb36b; }
.bonus-equipe { margin: 8px 0; padding: 6px 10px; border: 1px solid var(--edge-dim); background: rgba(0, 0, 0, 0.18); }
.bonus-equipe summary { cursor: pointer; padding: 2px 0; }
.bonus-equipe ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.cond-opt { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; font-size: 15px; cursor: pointer; }
.cond-opt input { width: 16px; height: 16px; cursor: pointer; }

/* ---------- Arena Ranqueada (pvp_ui.js) ---------- */
.pvp-div { display: inline-block; padding: 0 6px; margin: 0 4px; font-size: 13px; line-height: 17px; font-weight: 700; letter-spacing: .5px; color: #111; background: var(--div); box-shadow: -1px 0 0 #000, 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000; vertical-align: 2px; text-transform: uppercase; }
.pvp-me, .pvp-fight, .pvp-defense, .pvp-join, .pvp-entry { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 10px 0; flex-wrap: wrap; }
.pvp-me .grow, .pvp-fight .grow, .pvp-defense .grow, .pvp-join .grow, .pvp-entry .grow { min-width: 200px; flex: 1; }
.pvp-me-div { display: grid; justify-items: center; min-width: 96px; }
.pvp-me-div b { font-size: 28px; color: var(--gold); line-height: 1.1; }
.pvp-team { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.pvp-mon { position: relative; display: inline-block; }
.pvp-mon small { position: absolute; right: -2px; bottom: -2px; font-size: 12px; padding: 0 3px; background: rgba(0, 0, 0, .7); color: #fff; }
.pvp-foe { align-items: center; gap: 10px; flex-wrap: wrap; }
.pvp-foe .grow { min-width: 220px; }
.pvp-top .rank-row { align-items: center; gap: 8px; }
.pvp-logs { display: grid; gap: 4px; }
.pvp-log { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 4px 8px; border-left: 3px solid var(--muted); background: rgba(0, 0, 0, .2); }
.pvp-log.won { border-left-color: #4fdc78; }
.pvp-log.lost { border-left-color: #ef5a4a; }
.pvp-log small { margin-left: auto; color: var(--muted); }
.pvp-rewards td { vertical-align: middle; }
/* bandeira do clã campeão da semana, embaixo do minimapa */
.mm-champion { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-top: 2px solid rgba(255, 207, 74, .5); background: linear-gradient(90deg, rgba(120, 70, 10, .55), rgba(20, 20, 30, .3)); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mm-champion span { display: grid; flex: 1; min-width: 0; line-height: 1.1; }
.mm-champion small { font-size: 11px; color: var(--gold); letter-spacing: .5px; text-transform: uppercase; }
.mm-champion b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-champion .clan-tag-sm { margin-left: 0; font-style: normal; }
/* Mural dos Campeões */
.champ-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.champ-card { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 12px 8px; }
.champ-card > small { color: var(--gold); letter-spacing: .5px; text-transform: uppercase; }
/* Molduras da temporada da Arena (ANBU e Kage) */
html[data-frame="arena_anbu"] #tb-avatar, html[data-frame="arena_anbu"] #panel[data-panel="perfil"] .portrait { box-shadow: 0 0 0 2px #000, 0 0 0 4px #c89aff, 0 0 0 6px #000, 0 0 14px 3px #a070e0a0; }
html[data-frame="arena_kage"] #tb-avatar, html[data-frame="arena_kage"] #panel[data-panel="perfil"] .portrait { box-shadow: 0 0 0 2px #000, 0 0 0 4px #ffcf3a, 0 0 0 6px #000, 0 0 0 8px #b8402e, 0 0 0 10px #000, 0 0 16px 4px #ffcf3aa0; }

/* Duelo do PvP (battle.js): abertura "VS" e faixa de resultado por cima da tela */
#duel-banner { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 40; display: grid; justify-items: center; gap: 6px; padding: 14px 26px; pointer-events: none; text-align: center; animation: duelIn .35s var(--ease) both; }
#duel-banner.out { animation: duelOut .3s ease-in forwards; }
#duel-banner.intro { background: linear-gradient(90deg, transparent, rgba(8, 10, 18, .88) 18%, rgba(8, 10, 18, .88) 82%, transparent); border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); min-width: min(560px, 92vw); }
#duel-banner > small { font-family: var(--font-px); color: var(--gold); letter-spacing: 2px; text-transform: uppercase; }
.duel-row { display: flex; align-items: center; gap: 22px; }
.duel-side { display: grid; justify-items: center; gap: 2px; }
.duel-side img { image-rendering: pixelated; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .35)); }
.duel-side.me { animation: duelSlideL .5s var(--ease) both; }
.duel-side.foe { animation: duelSlideR .5s var(--ease) both; }
.duel-side.foe img { transform: scaleX(-1); }
.duel-side b { font-size: 20px; text-shadow: 2px 2px 0 #000; }
.duel-vs { font-family: var(--font-px); font-size: 40px; color: #ff6a3a; text-shadow: 3px 3px 0 #000, 0 0 18px #ff6a3a; animation: duelPulse .6s ease-out .25s both; }
.duel-result { font-family: var(--font-px); font-size: 54px; letter-spacing: 3px; text-shadow: 4px 4px 0 #000; animation: duelPulse .5s ease-out both; }
#duel-banner.win .duel-result { color: var(--gold); text-shadow: 4px 4px 0 #000, 0 0 24px #ffcf3a; }
#duel-banner.lose .duel-result { color: #ef5a4a; }
#duel-banner.draw .duel-result { color: #cfd8e0; }
/* Fases do chefe gigante (battle.js, RaidView): quem entra e o nome da fase */
#duel-banner.raid .duel-team { display: flex; gap: 10px; }
#duel-banner.raid .duel-team img { image-rendering: pixelated; filter: drop-shadow(0 0 8px rgba(255, 80, 90, .5)); }
#duel-banner.raid .duel-result { font-size: 38px; color: #ffd9d0; }
@keyframes duelIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.9); } }
@keyframes duelOut { to { opacity: 0; transform: translate(-50%, -50%) scale(1.05); } }
@keyframes duelSlideL { from { opacity: 0; transform: translateX(-60px); } }
@keyframes duelSlideR { from { opacity: 0; transform: translateX(60px); } }
@keyframes duelPulse { 0% { opacity: 0; transform: scale(1.8); } 60% { opacity: 1; transform: scale(.95); } 100% { transform: scale(1); } }
@media (max-width: 520px) { .duel-row { gap: 10px; } .duel-side img { width: 64px; height: 64px; } .duel-vs { font-size: 28px; } .duel-result { font-size: 38px; } }
body.duel #kono-bubble, body.duel #chakra-ring, body.duel #quest-card, body.duel #analyzer, body.duel #minimap-box { display: none !important; }
body.raid #kono-bubble, body.raid #chakra-ring, body.raid #quest-card, body.raid #analyzer { display: none !important; }

/* Faixa do jutsu no duelo (battle.js): o rosto e o nome do golpe mais forte atravessando a tela */
.duel-cutin { position: fixed; left: 0; right: 0; top: 30%; z-index: 41; pointer-events: none; overflow: hidden; height: 150px; }
.duel-cutin-band { position: absolute; inset: 0; display: flex; align-items: center; gap: 18px; padding: 0 8vw; background: linear-gradient(100deg, transparent 0 6%, rgba(10, 12, 22, .92) 6% 94%, transparent 94%); border-top: 3px solid var(--gold); border-bottom: 3px solid var(--gold); animation: cutBand .9s cubic-bezier(.2, .9, .2, 1) both; }
.duel-cutin.foe .duel-cutin-band { flex-direction: row-reverse; border-color: #ef5a4a; animation-name: cutBandR; }
.duel-cutin.foe img { transform: scaleX(-1); }
.duel-cutin img { image-rendering: pixelated; filter: drop-shadow(0 0 10px rgba(255, 210, 120, .6)); }
.duel-cutin b { font-family: var(--font-px); font-size: clamp(20px, 4vw, 36px); color: #fff; letter-spacing: 2px; text-shadow: 3px 3px 0 #000, 0 0 16px #ff9a3c; text-transform: uppercase; }
@keyframes cutBand { 0% { transform: translateX(-100%) skewX(-12deg); } 22% { transform: translateX(0) skewX(-12deg); } 78% { transform: translateX(2%) skewX(-12deg); opacity: 1; } 100% { transform: translateX(110%) skewX(-12deg); opacity: 0; } }
@keyframes cutBandR { 0% { transform: translateX(100%) skewX(12deg); } 22% { transform: translateX(0) skewX(12deg); } 78% { transform: translateX(-2%) skewX(12deg); opacity: 1; } 100% { transform: translateX(-110%) skewX(12deg); opacity: 0; } }

/* Duelo ao vivo (duelo_ui.js): busca, convite, faixa das equipes e a escolha de quem entra, com as peças do jogo
   (caixa fbox, barra de vida, plaquinha de nível, etiqueta de natureza, título em pixel) */
#duel-teams, #duel-pick, .duel-float { zoom: var(--hud-zoom); }
.duel-team { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; max-width: 220px; }
.duel-side.foe .duel-team img { transform: scaleX(-1); }
/* shuriken girando em passos (pixel) */
.duel-spin { display: block; width: 24px; height: 24px; background: linear-gradient(135deg, var(--silver) 0 45%, var(--silver-2) 55%); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: spin .9s steps(8) infinite; }

.duel-float {
  --edge: var(--gold); position: fixed; left: 50%; top: calc(var(--top-h) + 70px); transform: translateX(-50%); z-index: 42;
  width: min(560px, calc(var(--vw) - 32px)); padding: 10px 12px 12px; animation: dfDrop .25s var(--ease) both;
}
.df-row { display: flex; align-items: center; gap: 12px; }
.duel-float .p-ico, .dp-head .p-ico { width: 46px; height: 46px; margin: 2px; }
.df-txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.df-txt small { font-family: var(--font-px); font-size: 9px; color: var(--accent); text-transform: uppercase; letter-spacing: .6px; text-shadow: 1px 1px 0 #000; }
.df-txt > b { font-size: 24px; line-height: 1.05; letter-spacing: .4px; text-shadow: 2px 2px 0 #000; }
.df-txt > b .lvl-badge { vertical-align: 3px; }
.df-txt p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.3; }
.df-txt p b { color: var(--text); }
.df-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.df-timer { height: 6px; margin-top: 10px; background: #02030a; box-shadow: 0 0 0 1px #000; overflow: hidden; }
.df-timer i { display: block; height: 100%; width: 100%; background: repeating-linear-gradient(90deg, var(--gold) 0 5px, var(--gold-2) 5px 6px); transition: width 1s linear; }
.duel-float.invite { --edge: var(--accent); --glow: 0 0 22px 0 #ff8a1f55; }
.duel-float.invite .df-timer i { background: repeating-linear-gradient(90deg, var(--accent) 0 5px, var(--accent-2) 5px 6px); }
.duel-float.sent { --edge: var(--edge-dim); top: calc(var(--top-h) + 160px); }
.duel-float.leave { --edge: var(--red); --face: #2a0c12; z-index: 60; top: 36%; }
.duel-float.leave .df-txt small { color: #ff8a7a; }
@keyframes dfDrop { from { opacity: 0; transform: translate(-50%, -10px); } }

/* Faixa das equipes no alto, como o HUD de jogo de luta: o seu lado em azul, o do outro em vermelho */
.duel-teams { position: fixed; left: 50%; top: calc(var(--top-h) + 12px); transform: translateX(-50%); z-index: 39; display: flex; align-items: center; gap: 14px; pointer-events: none; max-width: calc(var(--vw) - 16px); }
.dt-plate { --edge: var(--blue); --face: #0c1a36; padding: 6px 9px 9px; display: grid; gap: 6px; }
.dt-plate.foe { --edge: var(--red); --face: #2a0c12; justify-items: end; }
.dt-name { display: flex; align-items: center; gap: 6px; }
.dt-plate.foe .dt-name { flex-direction: row-reverse; }
.dt-name b { font-size: 19px; text-transform: uppercase; letter-spacing: .6px; text-shadow: 2px 2px 0 #000; }
.dt-plate.me .dt-name b { color: #bfe8ff; }
.dt-plate.foe .dt-name b { color: #ffd9d0; }
.dt-name .tag { margin: 0; }
.dt-slots { display: flex; gap: 7px; }
.dt-plate.foe .dt-slots { flex-direction: row-reverse; }
.dt-slot { --face: var(--navy-0); --edge: var(--el); --drop: transparent; position: relative; width: 42px; padding: 2px 3px 4px; display: grid; justify-items: center; gap: 2px; transition: transform .15s var(--ease); }
.dt-slot img { width: 34px; height: 34px; }
.dt-plate.foe .dt-slot img { transform: scaleX(-1); }
.dt-slot .bar { width: 100%; height: 5px; }
.dt-slot .bar::after { display: none; }
.dt-slot.cur { --edge: var(--gold); --glow: 0 0 12px 0 #ffd04088; transform: translateY(-3px); }
.dt-slot.cur::before { content: ""; position: absolute; top: -12px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--gold); filter: drop-shadow(0 1px 0 #000); }
.dt-slot.ko img { filter: grayscale(1) brightness(.45); }
.dt-slot.ko::after { content: "KO"; position: absolute; top: 4px; right: 3px; color: var(--red); font-family: var(--font-px); font-size: 9px; text-shadow: 1px 1px 0 #000; }
.dt-vs { font-family: var(--font-px); font-size: 20px; color: var(--accent); text-shadow: 2px 2px 0 #000, 0 0 14px #ff6a3a; }

/* Escolha de quem entra */
.duel-pick {
  --px: 3px; --edge: var(--gold); --glow: 0 0 26px 0 #ffd04030; position: fixed; left: 50%; bottom: calc(var(--bottom-h) + 16px); transform: translateX(-50%); z-index: 42;
  width: min(820px, calc(var(--vw) - 24px)); max-height: calc(var(--free-h) - 130px); overflow-y: auto; overscroll-behavior: contain; animation: dpIn .25s var(--ease) both;
}
.duel-pick.waiting { width: min(540px, calc(var(--vw) - 24px)); --edge: var(--edge-dim); --glow: 0 0 0 0 transparent; }
@keyframes dpIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.dp-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 12px; background: var(--dither), linear-gradient(180deg, #17204a, #0c1228); }
.dp-head h2 { margin: 0; font-size: 30px; line-height: 1.05; letter-spacing: .6px; text-shadow: 2px 2px 0 #000; }
.dp-clock { --face: var(--navy-0); --edge: var(--gold); --drop: transparent; display: grid; justify-items: center; min-width: 58px; padding: 3px 8px 5px; }
.dp-clock b { font-size: 32px; line-height: 1; color: var(--gold); text-shadow: 2px 2px 0 #000; font-variant-numeric: tabular-nums; }
.dp-clock small { font-family: var(--font-px); font-size: 9px; color: var(--muted); text-transform: uppercase; }
.duel-pick.hurry .dp-clock { --edge: var(--red); }
.duel-pick.hurry .dp-clock b { color: var(--red); animation: blink .5s steps(2) infinite; }
.duel-pick > .df-timer { margin: 0; height: 6px; box-shadow: 0 2px 0 #000; }
.duel-pick.hurry > .df-timer i { background: repeating-linear-gradient(90deg, var(--red) 0 5px, #b02a1c 5px 6px); }
.dp-body { padding: 10px 14px 10px; }
.dp-foe { --face: #2a0c12; --edge: var(--red); --drop: transparent; display: flex; align-items: center; gap: 12px; padding: 5px 12px 5px 5px; margin-bottom: 16px; }
.dp-foe.blind { --face: var(--navy-2); --edge: var(--edge-dim); }
.dp-face { position: relative; display: grid; place-items: center; width: 52px; height: 52px; flex: none; background: radial-gradient(#26407a, var(--navy-deep) 75%); box-shadow: inset 0 0 0 1px #000, 0 0 0 2px #000; font-family: var(--font-px); font-size: 20px; color: var(--dim); }
.dp-face.foe { background: radial-gradient(#7a2a26, #200a0a 75%); }
.dp-face.foe img { transform: scaleX(-1); }
.dp-foe-txt { display: grid; gap: 4px; flex: 1; min-width: 0; }
.dp-foe-txt small { font-family: var(--font-px); font-size: 9px; color: #ff8a7a; text-transform: uppercase; letter-spacing: .6px; text-shadow: 1px 1px 0 #000; }
.dp-foe.blind .dp-foe-txt small { color: var(--muted); }
.dp-foe-txt b { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 22px; line-height: 1.05; text-shadow: 2px 2px 0 #000; }
.dp-foe-txt b .dp-els { margin-left: 2px; }
.dp-foe-txt > span:last-child:not(.bar) { color: var(--muted); font-size: 15px; }
.dp-foe .bar { max-width: 260px; }
.dp-foe .dp-els { justify-content: flex-start; }
.dp-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 10px; padding: 8px 4px 4px; }
.dp-card { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 6px 8px; border: 0; color: var(--text); font: inherit; text-align: center; min-width: 0; }
.dp-face .lvl-badge { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); font-size: 12px; line-height: 13px; }
.dp-card .dp-name { font-size: 16px; line-height: 1.02; text-shadow: 1px 1px 0 #000; min-height: 2.05em; display: grid; place-items: center; overflow-wrap: anywhere; }
.dp-card .bar { width: 100%; margin-top: 6px; }
.dp-card.good { --edge: var(--green); --glow: 0 0 14px 0 #6be27f45; }
.dp-card.bad { --edge: #b8392e; }
.dp-card.lift:hover { --edge: var(--gold); --glow: 0 0 16px 0 #ffd04066; }
.dp-card.ko { cursor: not-allowed; }
.dp-ko { position: absolute; top: 30px; left: 50%; transform: translateX(-50%) rotate(-12deg); font-style: normal; font-family: var(--font-px); font-size: 15px; color: var(--red); text-shadow: 2px 2px 0 #000; }
.dp-rib {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-family: var(--font-px); font-size: 9px; letter-spacing: .4px;
  text-transform: uppercase; padding: 4px 7px; background: var(--navy-3); color: var(--silver); box-shadow: 0 0 0 2px #000, 0 3px 0 1px #0008; text-shadow: none;
}
.dp-rib.good { background: linear-gradient(180deg, #a8ffb6 0 2px, #3fbf62 2px 70%, #2a8a44 70%); color: #08260f; }
.dp-rib.bad { background: linear-gradient(180deg, #ffb0a6 0 2px, #e04a3a 2px 70%, #a52a20 70%); color: #fff; }
.dp-rib.mix { background: linear-gradient(180deg, #fff2a8 0 2px, #f5c242 2px 70%, #c98f1c 70%); color: var(--gold-ink); }
.dp-els { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.dp-els .tag { margin: 0; font-size: 12px; }
.dp-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.duel-pick.waiting .dp-foot { margin: 0; padding: 12px 14px 14px; }
.dp-foot small { flex: 1; color: var(--muted); font-size: 17px; }
.dp-cycle { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.dp-cycle .tag { margin: 0; font-size: 12px; }
.dp-arrow { font-style: normal; color: var(--dim); font-size: 18px; padding: 0 2px; }
.pvp-fight .btn.big { font-size: 20px; padding: 10px 18px 11px; }
.pvp-buy { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
@media (max-width: 620px) {
  .duel-teams { gap: 6px; }
  .dt-plate { padding: 4px 5px 6px; }
  .dt-slots { gap: 4px; }
  .dt-slot { width: 30px; }
  .dt-slot img { width: 24px; height: 24px; }
  .dt-name b { font-size: 14px; }
  .dt-name .lvl-badge { display: none; }
  .dt-vs { font-size: 12px; }
  .dp-head h2 { font-size: 22px; }
  .dp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
  .dp-card .dp-face { width: 44px; height: 44px; }
  .dp-card .dp-face img { width: 40px; height: 40px; }
  .dp-foot { flex-direction: column; align-items: stretch; }
  .df-row { flex-wrap: wrap; }
  .df-act { width: 100%; }
}
@media (max-width: 720px) { .dp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Exame Chunin semanal (pvp_ui.js): o troféu, a inscrição e a chave */
.exam-trophy, .exam-entry, .exam-live { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 10px 0; flex-wrap: wrap; }
.exam-trophy { --edge: var(--gold); --face: #241a06; --glow: 0 0 18px 0 #ffd04033; }
.exam-trophy .grow, .exam-entry .grow { min-width: 220px; flex: 1; }
.exam-kicker { display: block; font-family: var(--font-px); font-size: 9px; color: var(--accent); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; text-shadow: 1px 1px 0 #000; }
.exam-act { display: flex; gap: 8px; flex-wrap: wrap; }
.exam-live { --edge: var(--red); --face: #2a0c12; display: block; }
.exam-names { margin: 4px 0 12px; }
.exam-prizes td:first-child { white-space: nowrap; }
.exam-bracket { display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 12px; }
.exam-col { display: grid; align-content: space-around; gap: 10px; min-width: 150px; }
.exam-col > small { font-family: var(--font-px); font-size: 9px; color: var(--gold); text-transform: uppercase; text-align: center; }
.exam-fight { --face: var(--navy-2); --edge: var(--edge-dim); --drop: transparent; display: grid; gap: 2px; padding: 5px 8px; }
.exam-p { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-p.won { color: var(--gold); font-weight: 700; }
.exam-p.won::before { content: "▸ "; }
.exam-p.lost { color: var(--dim); text-decoration: line-through; }
.exam-p.shadow { font-style: italic; }

/* ---------- Campo de Batalha da Quarta Guerra (guerra_ui.js) ---------- */
.war-hud { position: fixed; top: calc(var(--top-h) * var(--hud-zoom, 1) + 12px); left: 50%; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 8px; padding: 6px 14px; cursor: pointer; --edge: var(--red); --face: #2a0c12; max-width: calc(100vw - 32px); }
.war-hud b { font-family: var(--font-px); font-size: 11px; color: #ffd27a; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
.war-hud small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.duel .war-hud { display: none !important; }
.war-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.war-sector h3 { margin: 0 0 6px; font-family: var(--font-px); font-size: 11px; color: var(--gold); letter-spacing: .5px; }
.war-owner { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; margin-bottom: 8px; border-radius: 4px; background: #00000033; }
.war-owner > small, .war-sub { display: block; width: 100%; font-family: var(--font-px); font-size: 9px; color: var(--muted); letter-spacing: .5px; }
.war-owner.mine { background: #2e6a3433; outline: 1px solid #3f8f4a; }
.war-mine { width: 100%; font-style: normal; color: #9fe39a; font-size: 13px; }
.war-top { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 4px; }
.war-top li { display: flex; align-items: center; gap: 6px; }
.war-top li.mine b { color: #9fe39a; }
.war-pts { margin-left: auto; font-family: var(--font-px); font-size: 10px; color: var(--text); }
.war-empty { margin: 4px 0; font-size: 13px; }
.war-minepts { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.war-minepts b { color: #9fe39a; }
.war-ban { padding: 8px 10px; border-radius: 4px; background: #5a1a1a55; color: #ffb4a8; }

/* ---------- Livro de Conquistas (conquistas_ui.js) ----------
   Livro aberto: capa de couro em volta, duas páginas de pergaminho com a lombada no meio. Esquerda: pontos e
   categorias (marcadores); direita: os quadradinhos. Moldura de cada quadradinho na cor da raridade. */
.achv-book {
  --leather: #5a2a17; --leather-hi: #8a4524; --page: #ead9b0; --page-2: #dcc48f; --page-ink: #3a2510; --page-dim: #8a7350;
  display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 0;
  padding: 10px; background: var(--leather);
  box-shadow: inset 0 0 0 2px var(--leather-hi), inset 0 0 0 4px #2b1208, 0 0 0 2px var(--outline), 4px 4px 0 2px #0008;
  image-rendering: pixelated;
}
.achv-page { background: linear-gradient(90deg, var(--page-2), var(--page) 12%, var(--page) 88%, var(--page-2)); color: var(--page-ink); padding: 14px; min-height: 380px; position: relative; }
.achv-page.left { box-shadow: inset -14px 0 14px -10px #6b4a1e88; border-right: 2px solid #b39558; }
.achv-page.right { box-shadow: inset 14px 0 14px -10px #6b4a1e88; }
.achv-page small, .achv-page .muted { color: var(--page-dim); }
.achv-sum { display: grid; gap: 8px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 2px dashed #b39558; }
.achv-pts b { font-family: var(--font-px); font-size: 20px; color: #7a3a0c; display: block; }
.achv-prog { display: grid; gap: 3px; }
.achv-page .bar { background: #b8a274; box-shadow: inset 0 0 0 1px #6b5430; }
.achv-page .bar > span { background: linear-gradient(180deg, #ffe9a0 0 2px, #e0a020 2px 60%, #a8650c 60%); }
.achv-all { justify-self: start; }
.achv-cats { display: grid; gap: 4px; }
.achv-cat { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; background: transparent; border: 0; color: var(--page-ink); font-family: var(--font-ui); font-size: 18px; text-align: left; cursor: pointer; position: relative; }
.achv-cat:hover { background: #c9ad7466; }
.achv-cat.on { background: #fff3cf; box-shadow: inset 4px 0 0 #b0491a, 0 0 0 1px #b39558; }
.achv-cat small { font-family: var(--font-px); font-size: 9px; }
.achv-dot { font-style: normal; font-family: var(--font-px); font-size: 9px; background: #c0391b; color: #fff; padding: 3px 4px; box-shadow: 0 0 0 1px #3a1008; }
.achv-ptitle { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-family: var(--font-px); font-size: 12px; color: #7a3a0c; }
.achv-ptitle small { margin-left: auto; font-size: 9px; }
.achv-grid { display: grid; grid-template-columns: repeat(auto-fill, 58px); gap: 8px; justify-content: start; }
.achv-page .achv-help { margin: 14px 0 0; font-size: 15px; color: var(--page-dim); }
.achv-step { position: absolute; right: 4px; bottom: 2px; font-style: normal; font-family: var(--font-px); font-size: 9px; color: var(--tier-lo); text-shadow: 1px 1px 0 #fff8; }
.achv-tile.locked .achv-step { color: #8a7350; }
/* raridades */
.t-bronze { --tier: #c8793a; --tier-hi: #f0b27a; --tier-lo: #7a3f14; }
.t-prata { --tier: #c9d1e2; --tier-hi: #ffffff; --tier-lo: #707a92; }
.t-ouro { --tier: #ffc93a; --tier-hi: #fff2a6; --tier-lo: #a0650a; }
.t-platina { --tier: #7fe0f2; --tier-hi: #e2fbff; --tier-lo: #2f8aa0; }
.t-lenda { --tier: #c77dff; --tier-hi: #f1dcff; --tier-lo: #6b2ea0; }
.achv-tile {
  width: 58px; height: 58px; display: grid; place-items: center; position: relative; cursor: default; padding: 0; border: 0;
  background: radial-gradient(circle at 50% 40%, #fff8e0, #e9d7a8 70%);
  box-shadow: inset 0 0 0 2px var(--tier-hi), inset 0 0 0 4px var(--tier), inset 0 0 0 5px var(--tier-lo), 0 0 0 1px #3a2510, 2px 2px 0 #6b4a1e66;
}
.achv-tile .ico, .achv-tile .achv-sp { width: 40px; height: 40px; image-rendering: pixelated; }
.achv-tile.got:hover, .achv-tile.got:focus-visible { transform: translateY(-2px); outline: none; }
.achv-tile.locked { background: #cdb88a; box-shadow: inset 0 0 0 2px #b8a274, inset 0 0 0 4px #a68f60, inset 0 0 0 5px #7d6840, 0 0 0 1px #3a2510; }
.achv-tile.locked:hover, .achv-tile.locked:focus-visible { box-shadow: inset 0 0 0 2px var(--tier-hi), inset 0 0 0 4px #a68f60, inset 0 0 0 5px #7d6840, 0 0 0 1px #3a2510; outline: none; }
.achv-shadow { display: grid; place-items: center; filter: brightness(0); opacity: .22; }
.achv-q { font-family: var(--font-px); font-size: 20px; color: #7d6840; opacity: .8; }
.achv-tile.ready { cursor: pointer; animation: achvGlow 1.2s steps(4) infinite; }
.achv-badge { position: absolute; top: -5px; right: -5px; width: 14px; height: 14px; background: url("assets/ui/icons/ryo.png") center / contain no-repeat; filter: drop-shadow(0 0 1px #3a2510); }
@keyframes achvGlow { 50% { box-shadow: inset 0 0 0 2px var(--tier-hi), inset 0 0 0 4px var(--tier), inset 0 0 0 5px var(--tier-lo), 0 0 0 1px #3a2510, 0 0 10px 3px #ffd040; } }
/* quadro de detalhes */
.achv-tip { position: fixed; z-index: 400; width: 260px; padding: 10px 12px; pointer-events: none; display: grid; gap: 6px; font-size: 16px; }
.achv-tip.hidden { display: none; }
.achv-tip p { margin: 0; color: var(--text); line-height: 1.15; }
.achv-tip-head { display: flex; gap: 10px; align-items: center; }
.achv-tip-head b { display: block; color: var(--tier-hi, var(--gold)); font-size: 18px; }
.achv-tip-ico { width: 40px; height: 40px; display: grid; place-items: center; background: #0006; box-shadow: inset 0 0 0 2px var(--tier); flex: none; }
.achv-tip-ico .ico, .achv-tip-ico .achv-sp { width: 32px; height: 32px; }
.achv-tip .achv-shadow { filter: brightness(0) invert(1); opacity: .25; }
.achv-tier { font-family: var(--font-px); font-size: 9px; color: var(--tier) !important; }
.achv-tip-n { font-family: var(--font-px); font-size: 9px; color: var(--muted); justify-self: end; margin-top: -2px; }
.achv-tip-rw { color: var(--gold); }
.achv-tip-when { color: var(--green); }
.achv-toast { display: flex; align-items: center; gap: 8px; }
.achv-toast small { display: block; opacity: .8; }
.achv-toast .achv-sp { width: 32px; height: 32px; }
@media (max-width: 760px) {
  .achv-book { grid-template-columns: 1fr; padding: 6px; }
  .achv-page { min-height: 0; padding: 10px; }
  .achv-page.left { border-right: 0; border-bottom: 2px solid #b39558; box-shadow: inset 0 -14px 14px -10px #6b4a1e88; }
  .achv-cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .achv-cat { font-size: 16px; padding: 5px 6px; }
  .achv-grid { grid-template-columns: repeat(auto-fill, 52px); gap: 6px; }
  .achv-tile { width: 52px; height: 52px; }
  .achv-tile .ico, .achv-tile .achv-sp { width: 36px; height: 36px; }
}

/* ---------- Passe Ninja (passe_ui.js) ----------
   Pegada do passe de batalha: faixa da temporada em degradê roxo/azul, o grande prêmio em destaque e a trilha de 50
   níveis rolando para o lado, com cartões no degradê da raridade (comum, raro, épico, lendário). */
.ps { display: grid; gap: 12px; }
.ps-top { display: grid; grid-template-columns: 1fr 220px; gap: 12px; }
.ps-head {
  display: grid; gap: 10px; padding: 14px 16px; color: #fff;
  background: linear-gradient(135deg, #2a0f5c 0%, #3d1a8f 45%, #1b5fbf 100%);
  box-shadow: inset 0 0 0 2px #8f6bff, inset 0 0 0 4px #1a0838, 0 0 0 2px var(--outline);
}
.ps-season small { font-family: var(--font-px); font-size: 9px; color: #c9b8ff; letter-spacing: .5px; }
.ps-season b { display: block; font-family: var(--font-px); font-size: 18px; color: #ffe46b; text-shadow: 2px 2px 0 #1a0838; margin-top: 4px; }
.ps-level { display: flex; align-items: center; gap: 12px; }
.ps-badge { width: 64px; height: 64px; flex: none; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at 50% 35%, #fff59a, #ffb81f 60%, #c26a00); color: #3a1c00; box-shadow: inset 0 0 0 2px #fff6c0, 0 0 0 2px #3a1c00, 0 0 12px #ffcf3a99; }
.ps-badge small { font-family: var(--font-px); font-size: 9px; }
.ps-badge b { font-family: var(--font-px); font-size: 22px; line-height: 1; }
.ps-xp { flex: 1; display: grid; gap: 4px; }
.ps-xp .bar { height: 14px; }
.ps-xp .bar > span { background: linear-gradient(180deg, #fff6b0 0 3px, #ffd23a 3px 60%, #e08a00 60%); }
.ps-xp small { color: #dcd2ff; font-size: 15px; }
.ps-buyrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ps-buy { font-size: 18px; padding: 8px 16px; animation: psPulse 1.6s steps(4) infinite; }
@keyframes psPulse { 50% { filter: brightness(1.18); } }
.ps-owned { display: inline-flex; align-items: center; gap: 6px; color: #9dffb0; font-size: 18px; font-weight: 700; }
.ps-pitch { margin: 0; font-size: 15px; color: #e6defc; line-height: 1.2; }
.ps-hero {
  display: grid; justify-items: center; align-content: start; gap: 2px; padding: 10px; text-align: center; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #ffcf5a 0, #e0761a 28%, #7a1d0e 62%, #2a0806 100%);
  box-shadow: inset 0 0 0 2px #ffd36b, inset 0 0 0 4px #4a1404, 0 0 0 2px var(--outline);
}
.ps-hero::before { content: ""; position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, #ffffff14 0 8deg, transparent 8deg 22deg); animation: psRays 18s linear infinite; }
@keyframes psRays { to { transform: rotate(360deg); } }
.ps-hero > * { position: relative; }
.ps-hero small { font-family: var(--font-px); font-size: 9px; color: #ffe9a8; }
.ps-hero-art img { width: 150px; height: 150px; image-rendering: pixelated; filter: drop-shadow(0 4px 0 #0008); }
.ps-hero b { font-family: var(--font-px); font-size: 14px; color: #ffe46b; text-shadow: 2px 2px 0 #3a0a00; }
.ps-hero span { font-size: 18px; font-weight: 700; }
.ps-hero em { font-style: normal; font-size: 14px; color: #ffe2c2; }
.ps-tabs { align-items: center; }
.ps-all { margin-left: auto; }
/* trilha */
.ps-track-wrap { display: grid; grid-template-columns: 64px 1fr; gap: 6px; }
.ps-rows { display: grid; grid-template-rows: 22px 84px 84px; gap: 6px; font-family: var(--font-px); font-size: 9px; }
.ps-rows span { display: grid; place-items: center; background: var(--navy-3); color: var(--silver); box-shadow: 0 0 0 1px #000; }
.ps-rows span:first-child { grid-row: 2; }
.ps-rows span.ninja { grid-row: 3; }
.ps-rows span.ninja { background: linear-gradient(135deg, #3d1a8f, #1b5fbf); color: #ffe46b; }
.ps-track { display: grid; grid-auto-flow: column; grid-auto-columns: 84px; gap: 6px; overflow-x: auto; padding-bottom: 8px; scroll-behavior: smooth; }
.ps-col { display: grid; grid-template-rows: 22px 84px 84px; gap: 6px; }
.ps-num { font-style: normal; display: grid; place-items: center; font-family: var(--font-px); font-size: 10px; color: var(--muted); background: var(--navy-2); box-shadow: 0 0 0 1px #000; }
.ps-col.done .ps-num { background: #ffcf3a; color: #3a1c00; }
.ps-col.next .ps-num { background: #fff; color: #2a0f5c; animation: psPulse 1.2s steps(2) infinite; }
.ps-col.big .ps-num { font-size: 12px; }
.r-comum { --r1: #3a4a72; --r2: #1d2644; --re: #7d93c8; }
.r-raro { --r1: #1c7fd6; --r2: #0d3a7a; --re: #7cc8ff; }
.r-epico { --r1: #a13cf0; --r2: #4a1580; --re: #e1b0ff; }
.r-lendario { --r1: #ffae24; --r2: #b0400a; --re: #ffe48a; }
.ps-cell {
  position: relative; display: grid; place-items: center; align-content: center; gap: 2px; padding: 4px; border: 0; cursor: default; color: #fff;
  background: linear-gradient(180deg, var(--r1), var(--r2)); box-shadow: inset 0 0 0 2px var(--re), 0 0 0 1px #000;
}
.ps-cell.empty { background: #0c1124; box-shadow: inset 0 0 0 1px #1b2444; }
.ps-art { display: grid; place-items: center; height: 56px; }
.ps-art .ico, .ps-art .ps-sp { image-rendering: pixelated; }
.ps-qty { font-family: var(--font-px); font-size: 9px; text-shadow: 1px 1px 0 #000; }
.ps-cell.future { filter: saturate(.55) brightness(.75); }
.ps-cell.locked .ps-art { filter: grayscale(.6) brightness(.7); }
.ps-lock { position: absolute; top: 3px; right: 3px; }
.ps-cell.ready { cursor: pointer; animation: psReady 1s steps(4) infinite; }
@keyframes psReady { 50% { box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #000, 0 0 12px 3px #ffe46b; transform: translateY(-2px); } }
.ps-cell.claimed { filter: brightness(.55); }
.ps-ok { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 30px; color: #6be27f; text-shadow: 2px 2px 0 #000; filter: brightness(1.8); }
.ps-cell.r-lendario .ps-art { height: 60px; }
/* missões */
.ps-missions { display: grid; gap: 8px; }
.ps-missions h3 { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 0; }
.ps-missions h3 small { margin-left: auto; color: var(--muted); font-size: 14px; }
.ps-mission { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--navy-2); box-shadow: inset 0 0 0 1px var(--edge-dim); }
.ps-mission .grow { display: grid; gap: 3px; flex: 1; }
.ps-mission .bar { width: 100%; }
.ps-mission small { color: var(--muted); }
.ps-mission.done { box-shadow: inset 0 0 0 2px var(--green); }
.ps-mxp { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-px); font-size: 9px; color: #ffe46b; white-space: nowrap; }
@media (max-width: 760px) {
  .ps-top { grid-template-columns: 1fr; }
  .ps-hero { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 10px; }
  .ps-hero small, .ps-hero em { grid-column: 1 / -1; }
  .ps-hero-art { grid-row: span 3; }
  .ps-hero-art img { width: 96px; height: 96px; }
  .ps-season b { font-size: 14px; }
  .ps-track-wrap { grid-template-columns: 44px 1fr; }
  .ps-rows span { font-size: 7px; }
}

/* ---------- Caixa Diária e Tigela do Ichiraku (caixa_ui.js) ---------- */
/* pilha da esquerda, logo abaixo do Hunt Analyzer (a posição sai do analyzer, no caixa_ui.js) */
#gift-stack { position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.gift-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 6px; border: 0; color: var(--text); cursor: pointer; text-align: left; }
.gift-btn span { display: flex; flex-direction: column; line-height: 1.1; }
.gift-btn small { font-family: var(--font-px); font-size: 9px; color: var(--accent); letter-spacing: .5px; margin-bottom: 3px; }
.gift-btn b { font-size: 18px; white-space: nowrap; text-shadow: 1px 1px 0 #000; }
.gift-btn.ready { --edge: var(--gold); --face: var(--gold-deep); --glow: 0 0 14px 0 #ffd04055; }
.gift-btn.ready .ico { animation: pulse 1.2s steps(2) infinite; }
.gift-btn.ready b { color: var(--gold); }
/* contador do evento (evento_lendario_ui.js): faixa com arte de fundo, como os cards do menu; antes de começar, roxa e sem dizer o que é */
.ev-card { --edge: var(--gold); --face: #1c1408; --glow: 0 0 14px 0 #ffd04066; position: fixed; left: 10px; bottom: calc(var(--bottom-h) + 12px); display: block; width: 240px; height: 52px; padding: 0; border: 0; overflow: hidden; color: var(--text); cursor: pointer; }
.ev-card.surpresa { --edge: #b070ff; --face: #1c1030; --glow: 0 0 14px 0 #b070ff77; }
.ev-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.ev-txt { position: absolute; inset: 0 0 0 34%; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; padding-right: 9px; background: linear-gradient(90deg, transparent, #0a0614d9 38%); }
.ev-card small { font-family: var(--font-px); font-size: 8px; line-height: 1.2; color: var(--gold); text-transform: uppercase; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
.ev-card.surpresa small { color: #d8b8ff; }
.ev-card b { margin-top: 3px; font-size: 22px; line-height: 1; color: var(--gold-hi); font-variant-numeric: tabular-nums; text-shadow: 2px 2px 0 #000; }
@media (max-width: 760px) {
  .ev-card { width: 196px; height: 44px; }
  .ev-card small { font-size: 7px; }
  .ev-card b { font-size: 19px; }
}
/* no toque, o canto de baixo é do joystick: a faixa sobe para cima dele */
@media (max-width: 760px), (pointer: coarse) { .ev-card { bottom: calc(var(--bottom-h) + 136px); } }

.cx { display: flex; flex-direction: column; gap: 14px; }
.cx-lead { margin: 0; color: var(--muted); }
.cx-track { display: grid; grid-template-columns: repeat(6, 1fr) 1.4fr; gap: 8px; }
.cx-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; opacity: .55; }
.cx-day b { font-size: 15px; white-space: nowrap; }
.cx-day.done { opacity: 1; --edge: var(--green); }
.cx-day.cur { opacity: 1; --edge: var(--gold); --face: var(--gold-deep); --glow: 0 0 14px 0 #ffd04055; }
.cx-day.big b { color: var(--gold); }
.cx-ok { position: absolute; top: -6px; right: -6px; }
.cx-note { margin: 0; color: var(--accent); }
.cx-wheel { position: relative; height: 112px; overflow: hidden; background: var(--navy-0); box-shadow: inset 0 0 0 2px var(--rail); }
.cx-wheel.idle { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 0 8px; }
.cx-strip { position: absolute; top: 8px; left: 50%; display: flex; gap: 8px; animation: cxSpin 4.8s cubic-bezier(.12, .7, .14, 1) forwards; }
.cx-strip.stop { animation: none; transform: translateX(var(--cx-end)); }
@keyframes cxSpin { from { transform: translateX(0); } to { transform: translateX(var(--cx-end)); } }
.cx-card { flex: none; width: 88px; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px; background: var(--navy-1); box-shadow: inset 0 0 0 2px var(--edge-dim); text-align: center; }
.cx-wheel.idle .cx-card { width: 64px; height: 72px; }
.cx-card small { font-size: 12px; line-height: 1.05; color: var(--muted); }
.cx-card.bom { box-shadow: inset 0 0 0 2px #5aa0ff; }
.cx-card.raro { box-shadow: inset 0 0 0 2px #c27bff; }
.cx-card.diamante { box-shadow: inset 0 0 0 2px var(--gold); background: var(--gold-deep); }
.cx-card.win { box-shadow: inset 0 0 0 3px var(--gold), 0 0 18px 2px #ffd04088; }
.cx-card.win small { color: var(--gold); }
.cx-mark { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1px; background: var(--gold); box-shadow: 0 0 8px var(--gold); pointer-events: none; }
.cx-wheel.idle .cx-mark { display: none; }
.cx-action { text-align: center; }
.cx-won { font-size: 20px; margin: 0; }
.cx-won b { color: var(--gold); }
.cx-odds-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cx-odds { padding: 10px; }
.cx-odds h4 { margin: 0 0 6px; font-size: 16px; }
.cx-odds ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cx-odds li { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.cx-odds li b { font-variant-numeric: tabular-nums; }
.cx-odds li.raro span { color: #d9a8ff; }
.cx-odds li.diamante span { color: var(--gold); }
@media (max-width: 760px) {
  .cx-track { grid-template-columns: repeat(4, 1fr); }
  .cx-day.big { grid-column: span 2; }
  .cx-odds-row { grid-template-columns: 1fr; }
  .cx-wheel.idle { height: auto; flex-wrap: wrap; padding: 8px; }
}

/* ---------- Pacotes de Lançamento e renovação do VIP (premium.js) ---------- */
.launch-box { padding: 12px; margin-bottom: 14px; --edge: var(--gold); --face: #1d1a10; }
.launch-head { display: flex; gap: 10px; align-items: flex-start; }
.launch-head small { font-family: var(--font-px); font-size: 9px; color: var(--accent); }
.launch-head .grow > b { display: block; font-size: 24px; color: var(--gold); margin: 2px 0; }
.launch-head p b { color: var(--gold); }
.launch-head p { margin: 0; color: var(--muted); }
.launch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.launch-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 28px 10px 10px; }
.launch-card .grow { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.launch-card .actions { display: flex; justify-content: center; }
.launch-card.t-kage { --edge: var(--gold); --glow: 0 0 16px 0 #ffd04044; }
.launch-card.t-jounin { --edge: #c27bff; }
.launch-card.done { opacity: .6; }
.renew-note { display: block; color: var(--gold); margin-top: 4px; }
@media (max-width: 760px) { .launch-grid { grid-template-columns: 1fr; } }

/* ---------- Entrar com Google e Discord (account.js) ---------- */
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 2px; background: var(--rail); }
.auth-social { display: grid; gap: 10px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 700; }
.social-btn .social-ico, .social-btn .ico { flex: none; }
.social-google { --bf: #f3f3f3; --bf-hi: #ffffff; --bf-lo: #cfcfcf; --bink: #1f1f1f; }
.social-discord { --bf: #5865f2; --bf-hi: #8a93ff; --bf-lo: #3c45c8; --bink: #fff; text-shadow: 0 1px 0 #0006; }
.social-row { align-items: center; gap: 10px; }
/* o "G" do Google no mesmo quadrado das imagens de lista (.list-item > img), como o do Discord */
.social-box { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; background: radial-gradient(circle, var(--navy-mid), var(--navy-deep) 70%); box-shadow: 0 0 0 2px #000; }
.social-box .social-ico { width: 30px; height: 30px; }

/* ---------- Versão nova e Novidades (versao_ui.js) ---------- */
#update-bar { position: absolute; z-index: 30; left: 50%; transform: translateX(-50%); top: calc(var(--top-h) + 8px); display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; background: var(--gold-deep); box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px #000, 0 6px 18px #000a; font-weight: 700; font-size: 18px; white-space: nowrap; zoom: var(--hud-zoom); animation: popIn .2s var(--ease); }
#update-bar span { color: var(--gold); text-shadow: 1px 1px 0 #000; }
.news-entry { padding: 12px 14px; margin-bottom: 12px; }
.news-entry small { color: var(--accent); font-family: var(--font-px); font-size: 9px; }
.news-entry h3 { margin: 4px 0 8px; }
.news-entry ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 520px) { #update-bar { font-size: 15px; white-space: normal; width: calc(100% - 24px); } }

/* Link do clã (?cla=SIGLA) no Criar conta (account.js) */
.auth-clan { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border: 2px solid var(--gold); border-radius: 6px; background: rgba(0, 0, 0, .3); text-align: left; }
.auth-clan b { color: var(--gold); }

/* ---------- Árvore do Ninja (arvore_ui.js) ---------- */
.arv-topo { display: flex; gap: 14px; align-items: center; padding: 10px 12px; margin-bottom: 10px; border: 1px solid #ffd04055; border-radius: 8px; background: rgba(40, 28, 6, 0.45); }
.arv-pts { display: flex; flex-direction: column; align-items: center; min-width: 86px; }
.arv-pts b { font-size: 40px; line-height: 1; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.arv-pts small { color: var(--muted); }
.arv-chakra { margin: 6px 0 4px; }
.arv-chakra .bar > span { background: linear-gradient(90deg, #4ab8ff, #b07bff); }
.arv-instrucao { margin: 10px 0; color: var(--silver-2); font-size: 15px; }
.arv-ramos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; align-items: start; }
.arv-ramo { --ramo-cor: #6be27f; padding: 12px; border-radius: 8px; background: rgba(12, 17, 36, .78); border: 1px solid color-mix(in srgb, var(--ramo-cor) 45%, transparent); }
.arv-ramo.r-guerreiro { --ramo-cor: #ff7765; }
.arv-ramo.r-sabio { --ramo-cor: #bd91ff; }
.arv-ramo h3 { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 4px; color: var(--ramo-cor); }
.arv-ramo h3 small { margin-left: auto; color: var(--muted); font: 16px var(--font-ui); text-transform: none; }
.arv-desc { margin: 0; min-height: 40px; font-size: 15px; color: var(--muted); }
.arv-diagrama { padding: 12px 2px; }
.arv-nivel { text-align: center; }
.arv-nivel-label { color: var(--ramo-cor); font-size: 11px; letter-spacing: .08em; margin-bottom: 5px; }
.arv-nivel.fechado .arv-nivel-label { color: var(--muted); }
.arv-nos { display: flex; justify-content: center; gap: 8px; }
.arv-quadrado { position: relative; width: 62px; height: 62px; flex: 0 0 62px; display: flex; justify-content: center; align-items: center; padding: 4px 4px 13px; cursor: pointer; background: #18223a; border: 2px solid #63708b; border-radius: 4px; box-shadow: inset 0 0 0 2px #0b1220, 0 3px 0 #070b14; }
.arv-quadrado:hover, .arv-quadrado:focus-visible, .arv-quadrado.selected { border-color: #ffd45b; outline: none; box-shadow: 0 0 0 2px #ffd45b55, inset 0 0 0 2px #0b1220; }
.arv-quadrado.on { background: #263448; border-color: var(--ramo-cor); }
.arv-quadrado.selected { border-color: #ffd45b; }
.arv-quadrado.full { background: #243b32; }
.arv-quadrado.lock .ico { opacity: .42; filter: grayscale(1); }
.arv-graus { position: absolute; right: 3px; bottom: 2px; font-size: 12px; line-height: 1; color: white; text-shadow: 1px 1px #000; }
.arv-cadeado { position: absolute; top: -6px; right: -6px; font-size: 13px; }
.arv-conexao { width: 50%; height: 24px; margin: 0 auto; position: relative; border-bottom: 2px solid #64758a; }
.arv-conexao::before, .arv-conexao::after { content: ""; position: absolute; width: 2px; height: 12px; background: #64758a; left: 50%; }
.arv-conexao::before { top: 0; }
.arv-conexao::after { bottom: -12px; }
.arv-conexao.simples { border: 0; height: 18px; }
.arv-conexao.simples::before { height: 18px; }
.arv-conexao.simples::after { display: none; }
.arv-detalhe { min-height: 130px; padding: 9px; border: 1px solid #44516b; border-radius: 5px; background: #10192c; }
.arv-detalhe-titulo { display: flex; align-items: center; gap: 8px; }
.arv-detalhe-titulo div { display: flex; flex-direction: column; }
.arv-detalhe-titulo small { color: var(--muted); }
.arv-efeito { display: flex; flex-direction: column; gap: 2px; margin: 7px 0; font-size: 15px; }
.arv-acoes { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.arv-bloqueio { color: #eab86e; }
.arv-rodape { margin-top: 12px; }
@media (max-width: 520px) { .arv-topo { flex-direction: column; align-items: stretch; text-align: center; } }

/* ---------- Rinne: os Seis Caminhos (rinne_ui.js, marcas.js) ---------- */
.rin-olho { vertical-align: middle; }
.rin-olho .f { fill: #231b3a; }
.rin-olho .l { fill: #54437a; }
.rin-olho.on { filter: drop-shadow(0 0 3px rgba(170, 110, 255, 0.8)); }
.rin-olho.on .f { fill: #dcc6ff; }
.rin-olho.on .l { fill: #6b2fc4; }
.marca-fila { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 4px; }
.marca-tag { display: inline-flex; align-items: center; gap: 3px; }
/* A faixa da Bandeira no alto do Campo de Batalha (guerra_ui.js, drawHud). A cor diz de quem é: verde = do seu clã,
   vermelho = de outro, dourado = livre, laranja piscando = disputada. */
.band-hud { --cor: #ffd040; gap: 10px; padding: 7px 16px 9px 10px; min-width: 250px; overflow: hidden; border: 2px solid var(--cor); border-radius: 8px; background: linear-gradient(180deg, rgba(14, 19, 38, 0.96), rgba(8, 11, 24, 0.96)); box-shadow: 0 0 0 2px #05070f, 0 4px 0 #05070f, 0 0 14px color-mix(in srgb, var(--cor) 35%, transparent); }
.band-hud.hidden { display: none; }
/* No celular o alto da tela já tem a missão, o Hunt Analyzer e o minimapa: a faixa desce para cima da barra de baixo, à direita do direcional. */
@media (max-width: 760px) { .war-hud.band-hud { top: auto; bottom: calc(var(--bottom-h) * var(--hud-zoom, 1) + 10px); left: auto; right: 10px; transform: none; min-width: 0; max-width: calc(100vw - 150px); padding: 5px 12px 7px 8px; } .band-hud .bh-emblema { width: 34px; height: 34px; flex-basis: 34px; } .band-hud .bh-cla { font-size: 20px; } .band-hud .bh-linha { font-size: 13px; } }
.band-hud.minha { --cor: #6be27f; }
.band-hud.inimiga { --cor: #ff5a4a; }
.band-hud.disputada { --cor: #ff9d2e; animation: band-pisca 0.9s steps(2, end) infinite; }
@keyframes band-pisca { 50% { box-shadow: 0 0 0 2px #05070f, 0 4px 0 #05070f, 0 0 22px color-mix(in srgb, var(--cor) 80%, transparent); } }
.band-hud .bh-emblema { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 6px; border: 2px solid var(--cor); background: color-mix(in srgb, var(--cor) 16%, #0b1020); }
.band-hud .bh-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.band-hud .bh-rotulo { font-family: var(--font-px); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: var(--cor); }
.band-hud .bh-cla { font-family: var(--font-ui); font-size: 24px; font-weight: 400; color: #fff; text-shadow: 2px 2px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band-hud .bh-cla .clan-tag-sm { color: var(--cor); }
.band-hud .bh-linha { font-size: 15px; color: var(--silver-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band-hud.minha .bh-linha, .band-hud.disputada .bh-linha { color: var(--cor); }
.band-hud .bh-barra { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #05070f; }
.band-hud .bh-barra > span { display: block; height: 100%; transition: width 0.4s linear; }
.band-hud .bh-barra.nossa > span { background: #6be27f; }
.band-hud .bh-barra.deles > span { background: #ff5a4a; }

/* A Bandeira do Campo de Batalha (guerra_ui.js) */
.band-card { display: flex; gap: 14px; align-items: center; padding: 12px; margin-bottom: 10px; border: 2px solid #ffd04088; border-radius: 8px; background: rgba(40, 28, 6, 0.5); }
.band-card.minha { border-color: #6be27f; background: rgba(10, 40, 18, 0.5); }
.band-card .grow b { font-size: 22px; }
.band-barra { margin: 8px 0 2px; }
.band-barra .bar > span { background: linear-gradient(90deg, #ffb43a, #ff5a3a); }
.band-lista { margin: 6px 0 12px; padding-left: 20px; color: var(--silver-2); }
.band-lista li { margin: 3px 0; }
/* Torre Infinita (torre_ui.js) */
.tor-topo { border-color: #7ad8ff66; background: rgba(8, 26, 44, 0.5); }
.tor-topo .arv-pts b { color: #7ad8ff; }
.tor-andar-card { padding: 12px; border-radius: 8px; border: 2px solid var(--tor); background: rgba(12, 17, 36, 0.78); }
.tor-cab { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.tor-cab b { font-size: 24px; color: var(--tor); text-shadow: 2px 2px 0 #000; }
.tor-inimigos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tor-ini { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 1px solid #44516b; border-radius: 5px; background: #10192c; text-align: center; min-width: 0; }
.tor-ini img { image-rendering: pixelated; }
.tor-ini small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.tor-rodape { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.tor-rodape > small:first-child { flex: 1 1 200px; }
.tor-tent { color: var(--silver-2); }
.rin-h.tor-h, .tor-andar { color: #7ad8ff; }
.tor-rank.me { border-color: #7ad8ff; }
.tor-saldo { margin-left: 8px; color: #ffe08a; font-size: 0.8em; }
.tor-loja { gap: 8px; align-items: center; }
.tor-loja .btn { white-space: nowrap; }
.tor-sen { gap: 10px; align-items: center; }
.tor-sen.me { border-color: #ffe08a; }
.tor-sen-n { min-width: 40px; font-size: 22px; color: #ffe08a; text-shadow: 2px 2px 0 #000; text-align: center; }
.tor-sen-time { display: inline-flex; gap: 2px; margin: 2px 6px 2px 0; vertical-align: middle; }
.tor-sen-time img { image-rendering: pixelated; }
.tor-sen-on { color: #7dff9a; }
.tag.tor-trava { color: var(--muted); background: transparent; box-shadow: none; border: 1px dashed #9aa3c155; white-space: nowrap; cursor: help; }
.tor-sen-eu { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 8px; }
.tor-sen-lutas { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
@media (max-width: 520px) { .tor-inimigos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.leg { fill: #5a4a2a; vertical-align: middle; }
.leg.on { fill: #ffb43a; filter: drop-shadow(0 0 3px rgba(255, 150, 40, 0.8)); }
.leg-topo { border-color: #ffb43a66; background: rgba(48, 28, 6, 0.5); }
.leg-regras > div { border-color: #ffb43a44; }
.rin-regras.leg-regras b, .rin-h.leg-h { color: #ffb43a; }
.rin-topo { border-color: #b07bff66; background: rgba(28, 14, 48, 0.5); }
.rin-topo .arv-pts b { color: #c79bff; }
.rin-regras { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 6px; }
.rin-regras > div { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid #b07bff44; border-radius: 6px; background: rgba(12, 17, 36, 0.78); }
.rin-regras b { font-size: 24px; color: #c79bff; text-shadow: 2px 2px 0 #000; }
.rin-regras small { color: var(--muted); }
.rin-h { margin: 14px 0 6px; color: #c79bff; }
.rin-prox { color: var(--silver-2); }
.rin-dica { font-size: 15px; }
.rin-marco { min-width: 40px; text-align: center; font-size: 24px; color: var(--muted); text-shadow: 2px 2px 0 #000; }
.rin-premio.on .rin-marco { color: #c79bff; }

/* ---------- Chefe do Clã: a Bijū da semana (bijuu_ui.js) ---------- */
.bj-card { align-items: center; }
.bj-ico { width: 64px; height: 64px; image-rendering: pixelated; }
.bj-bar { position: relative; margin: 6px 0 2px; }
.bj-bar .bar { height: 12px; }
.bj-mark { position: absolute; top: -2px; width: 2px; height: 16px; background: var(--edge-dim); transform: translateX(-1px); }
.bj-mark.on { background: var(--gold); box-shadow: 0 0 6px #ffd04088; }
.bj-marco b { min-width: 46px; color: var(--muted); }
.bj-marco.on b { color: var(--gold); }
.bj-sala { margin: 6px 0; padding: 8px 10px; border: 1px solid #ff5a4866; border-radius: 6px; background: rgba(60, 14, 10, 0.4); }
.bj-sala .tag { margin: 4px 4px 0 0; }

/* ---------- Joystick de toque (input.js) ---------- */
/* Só em tela de toque, no canto de baixo à esquerda (o chat fica à direita). Bordas em degrau, como o resto em pixel art. */
#joystick {
  --size: 116px; --round: polygon(30% 0, 70% 0, 70% 6%, 82% 6%, 82% 12%, 88% 12%, 88% 18%, 94% 18%, 94% 30%, 100% 30%, 100% 70%, 94% 70%, 94% 82%, 88% 82%, 88% 88%, 82% 88%, 82% 94%, 70% 94%, 70% 100%, 30% 100%, 30% 94%, 18% 94%, 18% 88%, 12% 88%, 12% 82%, 6% 82%, 6% 70%, 0 70%, 0 30%, 6% 30%, 6% 18%, 12% 18%, 12% 12%, 18% 12%, 18% 6%, 30% 6%);
  display: none; z-index: 14; left: 14px; bottom: calc(var(--bottom-h) + 14px); width: var(--size); height: var(--size);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  clip-path: var(--round); background: var(--outline); opacity: .72; transition: opacity .15s;
}
#joystick::before, #joystick::after { content: ""; position: absolute; inset: 3px; clip-path: var(--round); background: var(--navy-4); }
#joystick::after { inset: 6px; background: var(--dither), #0c1124; }
#joystick.on { opacity: 1; }
.joy-arrow {
  position: absolute; z-index: 1; left: 50%; top: 50%; width: 18px; height: 12px; margin: -6px 0 0 -9px; background: var(--edge-dim);
  clip-path: polygon(33% 0, 67% 0, 67% 34%, 100% 34%, 100% 100%, 0 100%, 0 34%, 33% 34%);
}
.joy-arrow.up { transform: translateY(-42px); }
.joy-arrow.down { transform: translateY(42px) rotate(180deg); }
.joy-arrow.left { transform: translateX(-42px) rotate(-90deg); }
.joy-arrow.right { transform: translateX(42px) rotate(90deg); }
#joystick[data-dir="up"] .up, #joystick[data-dir="down"] .down, #joystick[data-dir="left"] .left, #joystick[data-dir="right"] .right { background: var(--gold); }
.joy-knob {
  position: absolute; z-index: 1; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; clip-path: var(--round);
  background: var(--outline); pointer-events: none;
}
.joy-knob::after { content: ""; position: absolute; inset: 3px; clip-path: var(--round); background: linear-gradient(135deg, var(--gold-hi) 0 22%, var(--accent) 22% 66%, var(--accent-2) 66%); }
@media (pointer: coarse) { #joystick { display: block; } }
html.no-joy #joystick,
html:has(#dialog:not(.hidden), #panel-wrap:not(.hidden), #menu-drawer:not(.hidden), #creation:not(.hidden), #battle-bar:not(.hidden)) #joystick { display: none; }
@media (max-height: 520px) and (min-width: 600px) {
  #joystick { --size: 96px; left: 10px; bottom: calc(var(--bottom-h) + 10px); }
  .joy-arrow.up { transform: translateY(-34px); }
  .joy-arrow.down { transform: translateY(34px) rotate(180deg); }
  .joy-arrow.left { transform: translateX(-34px) rotate(-90deg); }
  .joy-arrow.right { transform: translateX(34px) rotate(90deg); }
}

/* ---------- Aba "Ocultar" dos painéis de cima (ui.js) ---------- */
/* Só no celular (em pé ou deitado): a missão, o Hunt Analyzer, o minimapa e as caixas tapam o alto do mapa.
   A aba fica à direita, alinhada com o minimapa e logo abaixo dele, com a mesma letra e a setinha dele;
   com os painéis escondidos, sobe para baixo da barra do topo. */
#hud-tab {
  display: none; z-index: 6; right: 12px; top: calc(var(--top-h) + 8px);
  align-items: center; gap: 6px; min-height: 28px; padding: 3px 8px; border: 0; cursor: pointer;
}
#hud-tab b { font-size: 15px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); text-shadow: 1px 1px 0 #000; white-space: nowrap; }
.hud-tab-caret { color: var(--muted); font-size: 14px; transform: rotate(180deg); transition: transform .2s; }
html.hud-off .hud-tab-caret { transform: none; }
html.hud-off #hud-tab { --edge: var(--gold); }
html.hud-off #hud-tab b, html.hud-off .hud-tab-caret { color: var(--gold); }
@media (max-width: 760px), (max-height: 520px) and (min-width: 600px) {
  #hud-tab { display: flex; }
  html.hud-off :is(#quest-card, #analyzer, #minimap-box, #gift-stack) { display: none; }
}
@media (max-width: 760px) { #hud-tab { right: 10px; } }
body.duel #hud-tab { display: none !important; }

/* Vitrine do Ferreiro e caixas de equipamento (shared/vitrine.js, CAIXAS_EQUIP) */
.forge-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 14px; margin: 8px 0 4px; --edge: var(--gold); }
.forge-head b { font-size: 20px; color: var(--gold); }
.forge-card .forge-stats { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; line-height: 1.25; }
.forge-card.lendario { box-shadow: inset 0 0 0 2px var(--gold); }
.forge-card.epico { box-shadow: inset 0 0 0 2px #c27bff; }
.cx-eq-won { display: flex; gap: 12px; align-items: center; text-align: left; padding: 8px 12px; margin-bottom: 8px; }

/* ===== Mercado RMT (rmt_ui.js): mesmo desenho da Loja de Diamantes, com cartões de anúncio em R$ ===== */
#panel[data-panel="mercadopix"] { width: min(1260px, calc(var(--vw) - 40px)); }
.tabs .mk-pix-btn + .mk-chat-btn { margin-left: 6px; }
.px-seals { display: flex; gap: 8px; flex-wrap: wrap; }
.px-seal { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 14px; color: var(--green); background: #0f2a1a; box-shadow: 0 0 0 2px #2f6b45; }
.px-sim-tag { color: var(--gold-ink); background: var(--gold); font-family: var(--font-px); font-size: 9px; padding: 4px 8px; }
.px-warn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 0 12px; --edge: var(--accent); --face: #2a1608; }
.px-warn b { display: block; color: var(--gold-hi); }
.px-warn small { display: block; color: var(--text); }
.px-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; margin-bottom: 14px; --face: var(--navy-1); }
.px-filters .px-q { flex: 1 1 180px; min-width: 140px; }
.px-filters label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.px-filters input[type="number"] { width: 72px; }
.px-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.px-card { display: flex; flex-direction: column; gap: 6px; }
.px-card-art { position: relative; display: grid; place-items: center; height: 88px; background: var(--navy-1); }
.px-card-art img, .px-ficha-art img { image-rendering: pixelated; }
.px-card-art .qty { position: absolute; right: 6px; bottom: 4px; font-style: normal; }
.px-card .name { font-size: 18px; }
.px-card .sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; align-items: center; }
.px-types { width: 100%; display: flex; justify-content: center; gap: 4px; }
.px-attrs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.px-attrs span { background: var(--navy-1); padding: 3px 4px; text-align: center; font-size: 15px; }
.px-attrs small { display: block; font-family: var(--font-px); font-size: 8px; color: var(--muted); }
.px-seller { font-size: 14px; text-align: center; }
.px-seller small { color: var(--muted); }
.px-price { font-size: 26px; color: var(--gold); text-align: center; text-shadow: 2px 2px 0 #000; }
.px-card .actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: auto; }
.px-ficha { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 14px; }
.px-ficha-art { display: grid; place-items: center; width: 140px; height: 140px; background: var(--navy-1); }
.px-ficha h3 { margin: 0 0 6px; }
.px-buybox { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; margin-top: 12px; --edge: var(--gold); --face: #221c0c; }
.px-buybox .px-price { text-align: left; }
.px-qr-sim { display: grid; place-items: center; align-content: center; gap: 6px; color: #333; }
.px-sim { padding: 10px 12px; margin-top: 10px; --edge: var(--gold); --face: #221c0c; }
.px-sim small { font-family: var(--font-px); font-size: 9px; color: var(--accent); }
.px-sim p { margin: 6px 0 8px; font-size: 14px; }
.px-ok { display: flex; align-items: center; gap: 14px; padding: 14px; margin: 12px 0; --edge: var(--green); --face: #0f2a1a; }
.px-ok b { display: block; font-size: 20px; color: var(--green); }
.px-tag-ok { color: var(--green); }
.px-cpf { padding: 14px; }
.px-cpf > b { font-size: 18px; }
.px-wallet b { display: block; font-size: 24px; color: var(--gold); }
.px-ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.px-ledger li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--navy-2); }
@media (max-width: 520px) {
  .px-filters input[type="number"] { width: 60px; }
  .px-grid { grid-template-columns: 1fr; }
}
.px-how li { flex-wrap: nowrap; align-items: flex-start; } .px-how li span { flex: 1; min-width: 0; }
.px-ficha .grow { flex: 1; min-width: 240px; } .px-ficha h3 { font-size: 22px; }
.px-ledger li > span { flex: 1; min-width: 0; } .px-ledger li > b { white-space: nowrap; }

/* Voltar no canto de cima à esquerda de toda tela (13/11/2026) e páginas das listas grandes (mercados) */
.p-back .ico { transform: translateX(-1px); }
@media (max-width: 420px) { .p-head .p-back ~ .p-ico { display: none; } }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 10px 0; }
.pager-btn { min-width: 38px; }
.pager-btn.on { --face: var(--gold); color: #1a1205; font-weight: 700; pointer-events: none; }
.pager-btn[disabled] { opacity: .45; }
.pager-gap { color: var(--muted, #9aa3c7); padding: 0 2px; }
.pager-total { flex-basis: 100%; text-align: center; margin: 2px 0 0; }
p.pager-total { margin: 6px 0 10px; }
/* Selo de negociável do aliado (negociavel_ui.js): "Vinculado" e "Só mercado de diamantes", com o motivo na Ficha */
.tag.ally-seal { display: inline-flex; align-items: center; gap: 4px; }
.tag.seal-vinculado { color: #ffb4a8; }
.tag.seal-diamantes { color: #a8dcff; }
.ally-seal-line { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 6px 10px; background: #ffffff0d; box-shadow: inset 0 0 0 1px #ffffff1c, 0 0 0 1px #000; }
.ally-seal-line > span { display: flex; flex-direction: column; line-height: 1.25; }
.ally-seal-line.seal-vinculado b { color: #ffb4a8; }
.ally-seal-line.seal-diamantes b { color: #a8dcff; }
.ally-seal-line.seal-livre b { color: var(--green); }
/* Aviso de lendário repetido (repetido.js): no recrutamento e no aviso de aparição */
.cap-repeat { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 2px; padding: 6px 10px; text-align: left; line-height: 1.25; background: #ffffff0d; box-shadow: inset 0 0 0 1px #ffffff1c, 0 0 0 1px #000; }
.cap-repeat.warn { color: #ffe0a0; background: #ff5a4826; box-shadow: inset 0 0 0 1px #ff5a4877, 0 0 0 1px #000; }
.lp-repeat { display: flex; align-items: center; justify-content: center; gap: 8px; color: #ffe0a0; }
/* Faixas do ranking (shared/cosmeticos.js, FAIXAS; dist/src/cosmeticos.js, faixaBg): a cena atrás da linha passeia de um
   lado para o outro, escurecida à esquerda para o nome continuar legível, com o efeito leve dela por cima. */
.has-faixa { overflow: hidden; isolation: isolate; }
.has-faixa:not(.rank-me) { position: relative; } /* a barra "Sua posição" já é sticky (posicionada) */
.has-faixa > :not(.faixa-bg) { position: relative; z-index: 1; }
.faixa-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; background-repeat: no-repeat; background-size: max(135%, 640px) auto;
  background-position: 0% 50%; image-rendering: pixelated; animation: faixa-pan 26s ease-in-out infinite alternate; }
.faixa-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #080a12d9 0, #080a1299 40%, #080a1220 78%, #080a1200); }
@keyframes faixa-pan { to { background-position: 100% 50%; } }
.faixa-bg.fx-brilho::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(105deg, transparent 44%, #fffff03a 50%, transparent 56%) no-repeat;
  background-size: 250% 100%; animation: faixa-brilho 6s linear infinite; }
@keyframes faixa-brilho { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.faixa-bg.fx-raio { animation: faixa-pan 26s ease-in-out infinite alternate, faixa-raio 4.4s steps(1) infinite; }
@keyframes faixa-raio { 0%, 86%, 100% { filter: none; } 88% { filter: brightness(1.9) saturate(1.3); } 90% { filter: none; } 93% { filter: brightness(1.5); } 95% { filter: none; } }
.faixa-bg.fx-pulso::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse 38% 95% at 74% 50%, #ff503c55, transparent 72%);
  animation: faixa-pulso 2.8s ease-in-out infinite; }
@keyframes faixa-pulso { 50% { opacity: .2; } }
.rank-row.has-faixa .rank-pos, .rank-me.has-faixa .rank-pos { text-shadow: 2px 2px 0 #000; }
.has-faixa .muted { color: #c9d2de; }
/* topo da Ficha Ninja: só a cena, sem texto por cima */
.ficha-faixa { height: 88px; margin: 0 0 12px; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--rail); }
.ficha-faixa .faixa-bg::after { background: linear-gradient(0deg, #080a1255, transparent 50%); }
.faixa-card .faixa-prev { margin-bottom: 10px; cursor: default; }
@media (prefers-reduced-motion: reduce) { .faixa-bg, .faixa-bg::before { animation: none; } }
.has-faixa .rank-score, .has-faixa > b:last-child { background: #080a12c0; padding: 2px 8px; box-shadow: 0 0 0 1px #000; text-shadow: 1px 1px 0 #000; }

/* Forma Final dos lendários (dist/src/cutin.js): faixa diagonal que cruza a tela com o boneco ampliado e o nome da forma.
   Passa em 1,25 s por cima da luta, sem bloquear clique. --cor: a cor da respiração do golpe. */
.cutin { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; display: flex; align-items: center; }
.cutin::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 30%, #000a 100%); animation: cutin-escuro 1.25s ease-out both; }
.cutin-faixa {
  position: relative; width: 140%; margin-left: -20%; height: clamp(92px, 20vh, 150px); transform: skewY(-7deg);
  display: flex; align-items: center; gap: clamp(10px, 3vw, 28px); padding-left: 24%;
  background: linear-gradient(90deg, #05060bf5 0%, #05060b55 36%, #05060b99 72%, #05060bf5 100%), var(--cor);
  box-shadow: 0 -4px 0 var(--cor), 0 4px 0 var(--cor), 0 -9px 0 #000, 0 9px 0 #000, 0 0 48px var(--cor);
  animation: cutin-passa 1.25s cubic-bezier(.2, .9, .2, 1) both;
}
.cutin-faixa::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 46px, #ffffff1c 46px 49px, transparent 49px 80px, #ffffff10 80px 82px); animation: cutin-linhas .35s linear infinite; }
.cutin-boneco { position: relative; z-index: 1; transform: skewY(7deg); flex: none; }
.cutin-boneco canvas { display: block; width: clamp(180px, 42vh, 340px); height: auto; image-rendering: pixelated; margin: -12% 0 -6%; filter: drop-shadow(5px 5px 0 #000) drop-shadow(0 0 18px var(--cor)); }
.cutin-txt { position: relative; z-index: 1; transform: skewY(7deg); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cutin-txt small { font-family: var(--font-px); font-size: clamp(11px, 1.6vw, 14px); letter-spacing: 2px; text-transform: uppercase; color: #fff; opacity: .85; text-shadow: 2px 2px 0 #000; }
.cutin-txt b { font-family: var(--font-ui); font-size: clamp(20px, 4.2vw, 40px); line-height: 1.05; color: #fff; text-shadow: 3px 3px 0 #000, 0 0 18px var(--cor); max-width: 62vw; }
@keyframes cutin-passa {
  0% { transform: skewY(-7deg) translateX(-110%); }
  18% { transform: skewY(-7deg) translateX(0); }
  78% { transform: skewY(-7deg) translateX(3%); opacity: 1; }
  100% { transform: skewY(-7deg) translateX(115%); opacity: .9; }
}
@keyframes cutin-escuro { 0% { opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cutin-linhas { to { background-position: -82px 0; } }
.cutin.calmo .cutin-faixa { animation: cutin-calmo 1.25s ease both; }
.cutin.calmo .cutin-faixa::after { animation: none; }
@keyframes cutin-calmo { 0%, 100% { opacity: 0; transform: skewY(-7deg); } 15%, 80% { opacity: 1; transform: skewY(-7deg); } }
