/* =====================================================================
   NTO Idle — tema "vila oculta à noite"
   ===================================================================== */
@font-face {
  font-family: "NjNaruto";
  src: url("../assets/ui/njnaruto.ttf") format("truetype");
  font-display: swap;
}

:root {
  /* paleta "vila ninja": madeira escura, pergaminho envelhecido, cobre, laranja queimado */
  --bg-0: #120c08;
  --bg-1: #1b130c;
  --bg-2: #241910;
  --bg-3: #2f2115;
  --line: #3d2a1a;
  --line-2: #5a3d24;
  --text: #f2e6cc;
  --text-2: #cdb893;
  --muted: #a08a6b;
  --orange: #c4531c;
  --orange-2: #f08a45;
  --orange-deep: #8f3514;
  --copper: #b07040;
  --copper-2: #d99a5f;
  --copper-dim: rgba(217,154,95,.28);
  --parch: #e6d3ad;
  --parch-2: #d3bb8c;
  --parch-edge: rgba(90,58,30,.45);
  --parch-ink: #3a2615;
  --parch-ink-2: #5e4127;
  --wood-edge: #0a0604;
  --wood-band: linear-gradient(180deg, #2a1c11, #1d130b);
  --wood-panel: linear-gradient(180deg, #1f150d, #170f09);
  --slot: #140d08;
  --focus: #ffcf7a;
  --chakra: #3cc7ff;
  --gold: #f2c14e;
  --hp: #ff4d5e;
  --mana: #3d8bff;
  --exp: #a970ff;
  --green: #4ade80;
  --red: #f43f5e;
  --rare: #ffd166;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --radius: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 20% -10%, #2a1b10 0%, var(--bg-0) 60%),
              var(--bg-0);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
}
button { font-family: inherit; }
input, select {
  font-family: inherit;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
input:focus, select:focus { border-color: var(--orange); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.grow { flex: 1; min-height: 0; }
.gold-text { color: var(--gold); }
.chakra-text { color: var(--chakra); }
.hp-text { color: var(--hp); }
.green { color: var(--green); }
.red { color: var(--red); }
.orange { color: var(--orange-2); }
.small { font-size: 12px; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }

/* ---------- screens ---------- */
.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: block; }

/* ---------- logo ---------- */
.logo, .logo-big {
  font-family: "NjNaruto", var(--font);
  letter-spacing: 1px;
  color: var(--text);
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(255, 122, 26, .35);
}
.logo { font-size: 26px; }
.logo-big { font-size: 56px; }
.logo span, .logo-big span { color: var(--orange); }

/* ---------- loading ---------- */
#screen-loading { display: none; place-items: center; }
#screen-loading.active { display: grid; }
.loading-box { text-align: center; width: 360px; }
.loading-bar { height: 8px; background: var(--bg-3); border-radius: 8px; overflow: hidden; margin: 22px 0 10px; }
#loading-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--gold)); transition: width .2s; }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: transform .06s, background .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
}
.btn:hover { background: #3a2a1b; border-color: var(--copper); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, var(--orange), var(--orange-deep)); border-color: var(--orange-2); color: #fff7ea; }
.btn-primary:hover { background: linear-gradient(180deg, #d8622a, #9e3c17); }
.btn-danger { background: #3a1620; border-color: #6b2333; color: #ff9aa8; }
.btn-danger:hover { background: #4d1b29; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text-2);
  white-space: nowrap;
}
.chip.orange { background: rgba(255, 122, 26, .12); border-color: rgba(255, 122, 26, .5); color: var(--orange-2); }
.chip.gold { background: rgba(242, 193, 78, .12); border-color: rgba(242, 193, 78, .5); color: var(--gold); }
.chip.green { background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .45); color: var(--green); }
.chip.red { background: rgba(244, 63, 94, .12); border-color: rgba(244, 63, 94, .5); color: #ff8a9a; }
.chip.blue { background: rgba(60, 199, 255, .12); border-color: rgba(60, 199, 255, .5); color: var(--chakra); }
.chip.purple { background: rgba(169, 112, 255, .12); border-color: rgba(169, 112, 255, .5); color: #c9a4ff; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 0 0 1px rgba(0,0,0,.35);
}
.card-title {
  font-size: 12px; color: var(--copper-2); font-weight: 700; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.panel-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.panel-sub { color: var(--text-2); margin: 0 0 16px; }

/* ---------- bars ---------- */
.bar {
  position: relative; height: 14px; background: var(--slot); border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line-2);
}
.bar > div { height: 100%; width: 0%; transition: width .25s ease; border-radius: 6px; }
.bar > span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; font-family: var(--mono); color: #fff; text-shadow: 0 1px 2px #000;
}
.bar-hp > div { background: linear-gradient(90deg, #ff2d4a, #ff6b7a); box-shadow: 0 0 10px rgba(255,45,74,.4); }
.bar-mana > div { background: linear-gradient(90deg, #2e6cff, #5ab0ff); box-shadow: 0 0 10px rgba(46,108,255,.4); }
.bar-exp > div { background: linear-gradient(90deg, #7c3aed, #b388ff); }
.bar-enemy > div { background: linear-gradient(90deg, #ff9500, #ffc94d); }
.bar-cd > div { background: var(--chakra); }
.bar.thin { height: 8px; }
.bar.thin > span { display: none; }

/* =====================================================================
   CRIAÇÃO DE PERSONAGEM
   ===================================================================== */
#screen-create { overflow: auto; }
.create-wrap { max-width: 1240px; margin: 0 auto; padding: 32px 24px 60px; }
.create-header { text-align: center; margin-bottom: 24px; }
.create-body { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.voc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.voc-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px 8px;
  cursor: pointer; text-align: center; transition: transform .12s, border-color .12s, box-shadow .12s;
  position: relative;
}
.voc-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.voc-card.selected { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255,122,26,.35), 0 8px 20px rgba(255,122,26,.15); }
.voc-card .sprite-box { margin: 0 auto 6px; }
.voc-card .voc-name { font-weight: 700; font-size: 13px; }
.voc-card .voc-sub { font-size: 10px; color: var(--muted); }
.voc-detail { position: sticky; top: 20px; align-self: start; }
.voc-detail .portrait { width: 100%; height: 160px; object-fit: contain; image-rendering: pixelated; margin-bottom: 8px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.voc-detail h3 { margin: 0 0 4px; font-size: 20px; }
.voc-detail ul { list-style: none; padding: 0; margin: 10px 0 0; }
.voc-detail li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.saga-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.create-footer { display: flex; align-items: end; gap: 14px; margin-top: 22px; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.field input, .field select { min-width: 220px; }

/* =====================================================================
   INGAME LAYOUT — madeira escura + pergaminho + cobre (UI nova, 20/10)
   desktop: topo | menu (esq.) · jogo emoldurado (centro) · abas Hunt/Status (dir.) | barra de jutsus no Hunt
   ===================================================================== */
#screen-game { display: none; flex-direction: column; }
#screen-game.active { display: flex; }
.topbar {
  height: 64px; display: grid; grid-template-columns: auto minmax(220px, 280px) minmax(160px, 1fr) auto auto; align-items: center;
  gap: 16px; padding: 0 16px; background: var(--wood-band); border-bottom: 2px solid var(--wood-edge);
  box-shadow: inset 0 -1px 0 var(--copper-dim);
}
.top-char { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-char-info { min-width: 0; }
.top-portrait { width: 46px; height: 46px; border-radius: 50%; background: var(--slot); border: 2px solid var(--copper); box-shadow: 0 0 0 2px var(--wood-edge); display: grid; place-items: center; overflow: hidden; flex: none; }
.top-name { font-weight: 800; display: flex; gap: 8px; align-items: center; min-width: 0; }
.top-name #top-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-level { font-size: 12px; color: var(--text-2); }
.top-exp .bar { height: 18px; }
.top-stats { display: flex; gap: 8px; }
.stat-pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px;
  background: var(--slot); border: 1px solid var(--line-2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); font-family: var(--mono); font-weight: 700; font-size: 13px;
}
.stat-pill i { font-style: normal; color: var(--muted); }
.stat-pill.gold { color: var(--gold); }
.stat-pill.gold i { color: var(--gold); }
.stat-pill.elo { color: #d3b4ff; }
.stat-pill.elo i { color: #d3b4ff; }
.top-actions { display: flex; gap: 4px; }

.layout { flex: 1; display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; min-height: 0; background: var(--bg-0); }
.sidenav {
  background: var(--wood-panel); border-right: 2px solid var(--wood-edge); box-shadow: inset -1px 0 0 var(--copper-dim);
  padding: 10px 8px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; scrollbar-width: thin;
}
/* desktop: o grupo "Mais" se desfaz (display: contents) e a ordem segue a do mockup */
.nav-sheet { display: contents; }
.sidenav > .nav-btn[data-panel="hunt"] { order: 1; }
.sidenav > .nav-btn[data-panel="inventory"] { order: 3; }
.sidenav > .nav-btn[data-panel="jutsus"] { order: 4; }
.nav-sheet > * { order: 5; }
.nav-sheet > .nav-btn[data-panel="char"] { order: 2; }
.nav-btn, .nav-more {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 6px;
  background: transparent; border: 1px solid transparent; color: var(--text-2); cursor: pointer; font: 600 13px var(--font);
  text-align: left; position: relative;
}
.nav-btn i, .nav-more i { font-style: normal; width: 22px; text-align: center; font-size: 16px; flex: none; }
.nav-btn .ns { display: none; }
.sidenav .nav-more { display: none; }   /* só no celular */
.nav-btn:hover, .nav-more:hover { background: var(--bg-3); color: var(--text); }
.nav-btn.active, .nav-more.active {
  background: linear-gradient(180deg, var(--orange), var(--orange-deep)); border-color: var(--orange-2); color: #fff7ea;
  box-shadow: inset 4px 0 0 var(--gold);
}
.nav-btn em, .nav-more em { margin-left: auto; font-style: normal; font-size: 10px; background: var(--orange); color: #fff7ea; border-radius: 999px; padding: 1px 6px; font-weight: 800; }
.nav-btn em:empty, .nav-more em:empty { display: none; }
.nav-btn.active em { background: #fff7ea; color: var(--orange-deep); }
.nav-spacer { flex: 1; min-height: 8px; }

.main { overflow: auto; padding: 16px 18px; }
.panel { display: none; }
.panel.active { display: block; }

.rightbar {
  background: var(--wood-panel); border-left: 2px solid var(--wood-edge); box-shadow: inset 1px 0 0 var(--copper-dim);
  padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; min-height: 0;
}
.rb-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 6px; background: linear-gradient(180deg, var(--parch), var(--parch-2)); box-shadow: inset 0 0 0 1px var(--parch-edge), 0 0 0 2px var(--wood-edge); flex: none; }
.rb-tab { flex: 1; min-height: 34px; border: 0; border-radius: 4px; background: transparent; color: var(--parch-ink-2); font: 800 13px var(--font); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.rb-tab:hover { background: rgba(90,58,30,.12); color: var(--parch-ink); }
.rb-tab.active { background: var(--wood-band); color: var(--orange-2); box-shadow: inset 0 -2px 0 var(--orange); }
.rb-pane { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.rb-pane.hidden { display: none !important; }
.rb-session { display: flex; flex-direction: column; gap: 10px; }
.rightbar .card { padding: 10px 12px; }
.rightbar .card.grow { flex: 1; min-height: 160px; display: flex; flex-direction: column; }
.rightbar .card.grow .combat-log { flex: 1; min-height: 0; }
.hunt-target .target-row { display: flex; align-items: center; gap: 10px; }
.hunt-target .sprite-box { flex: none; background: var(--slot); border: 1px solid var(--line-2); border-radius: 6px; }
.target-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.target-name { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; min-width: 0; }
.target-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.target-info .bar { height: 14px; }
.vital-label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; font-family: var(--mono); }
.vital + .vital { margin-top: 8px; }
.vital-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 10px; font-size: 12px; }
.vital-grid div { display: flex; justify-content: space-between; }
.vital-grid b { font-family: var(--mono); font-weight: 600; }

.equip-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, auto); gap: 4px; max-width: 200px; margin: 0 auto; }
.equip-slot {
  aspect-ratio: 1; background: var(--slot); border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center;
  position: relative; cursor: pointer; transition: border-color .12s;
}
.equip-slot:hover { border-color: var(--line-2); }
.equip-slot.filled { border-color: var(--line-2); background: #1c140c; }
.equip-slot.rare { border-color: var(--rare); box-shadow: 0 0 8px rgba(255,209,102,.25) inset; }
.equip-slot.rare-tank { border-color: var(--green); box-shadow: 0 0 8px rgba(74,222,128,.25) inset; }
.equip-slot.rare-dano { border-color: var(--orange); box-shadow: 0 0 8px rgba(255,122,26,.25) inset; }
.equip-slot.rare-speed { border-color: var(--chakra); box-shadow: 0 0 8px rgba(60,199,255,.25) inset; }
.equip-slot small { position: absolute; bottom: 1px; left: 0; right: 0; text-align: center; font-size: 7px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; pointer-events: none; }
.equip-slot.filled small { display: none; }
.equip-slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.equip-slot .rar { position: absolute; right: 3px; top: 1px; font-size: 10px; font-family: var(--mono); color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.slot-glyph { width: 26px; height: 26px; fill: none; stroke: #5a4430; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.equip-slot:hover .slot-glyph { stroke: #7d6044; }
.equip-corner { aspect-ratio: 1; display: grid; place-items: center; opacity: .9; }
.equip-corner img { width: 44px; height: 44px; object-fit: contain; }
.toggles { display: flex; flex-direction: column; gap: 2px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; padding: 2px 4px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.toggle:hover { background: rgba(255,255,255,.03); }
.switch { width: 34px; height: 18px; flex: none; border-radius: 999px; background: var(--slot); border: 1px solid var(--line-2); position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: left .15s, background .15s; }
.toggle.on .switch { background: rgba(224,100,31,.35); border-color: var(--orange-2); }
.toggle.on .switch::after { left: 18px; background: var(--gold); }

.combat-log { overflow: auto; height: 100%; font-family: var(--mono); font-size: 11px; display: flex; flex-direction: column; gap: 2px; }
.combat-log div { padding: 2px 4px; border-radius: 4px; color: var(--text-2); }
.combat-log .dmg { color: #ffb4bd; }
.combat-log .hit { color: #ffd9a3; }
.combat-log .heal { color: #9bf0b7; }
.combat-log .loot { color: var(--gold); }
.combat-log .exp { color: #d3b4ff; }
.combat-log .sys { color: var(--chakra); }
.combat-log .death { color: var(--red); font-weight: 700; }

/* foco visível em tudo que é clicável na tela de jogo */
#screen-game button:focus-visible, #screen-game [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* =====================================================================
   SPRITES
   ===================================================================== */
.sprite-box { position: relative; display: grid; place-items: center; }
.sprite { image-rendering: pixelated; background-repeat: no-repeat; display: block; }
.icon-item { width: 32px; height: 32px; image-rendering: pixelated; }

/* =====================================================================
   HUNT
   ===================================================================== */
.hunt-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
.zone-tier { margin-bottom: 20px; }
.zone-tier h4 { margin: 0 0 8px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; display: flex; align-items: center; gap: 10px; }
.zone-tier h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.zone-card { display: flex; gap: 12px; align-items: center; cursor: pointer; transition: transform .1s, border-color .1s; padding: 10px 12px; }
.zone-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.zone-card.locked { opacity: .45; cursor: not-allowed; }
.zone-card.active { border-color: var(--orange); box-shadow: 0 0 0 1px rgba(255,122,26,.5); }
.zone-card .zone-name { font-weight: 700; font-size: 13px; }
.zone-card .zone-meta { font-size: 11px; color: var(--muted); }
.zone-card .zone-mons { display: flex; gap: 2px; margin-top: 4px; }
.zone-spots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.zone-spots .spot { font-size: 10px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-1); color: var(--text-2); cursor: pointer; font-family: var(--mono); }
.zone-spots .spot:hover { border-color: var(--orange); color: var(--orange-2); }
.zone-spots .spot.on { background: rgba(255,122,26,.15); border-color: var(--orange); color: var(--orange-2); }
.danger { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 4px; }
.danger.d0 { color: var(--green); background: rgba(74,222,128,.1); }
.danger.d1 { color: var(--gold); background: rgba(242,193,78,.1); }
.danger.d2 { color: var(--orange-2); background: rgba(255,122,26,.12); }
.danger.d3 { color: var(--red); background: rgba(244,63,94,.12); }

/* mapa real: moldura de madeira em volta (a área de renderização não muda) */
.map-frame { container-type: inline-size; padding: 6px; border-radius: 8px; background: var(--wood-band); box-shadow: inset 0 0 0 1px var(--copper-dim), 0 0 0 2px var(--wood-edge); }
.mapview { position: relative; border-radius: 4px; overflow: hidden; border: 1px solid #000; background: #06070b; height: min(73.33cqw, calc(100vh - 252px)); min-height: 260px; }   /* 15:11 na largura toda, sem passar da tela */
.mapview.manual .mapview-canvas { cursor: crosshair; }   /* luta manual: clique escolhe o alvo */
.mapview-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }   /* fora do layout: o renderer ajusta a resolução ao tamanho exibido */
.mapview-hud { position: absolute; left: 10px; top: 8px; font-family: var(--mono); font-size: 11px; color: #f2e6cc; text-shadow: 0 1px 2px #000; background: rgba(18,11,7,.7); padding: 3px 8px; border-radius: 4px; max-width: calc(100% - 90px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* minimapa no canto do mapa */
.mapview .minimap { position: absolute; right: 8px; top: 42px; width: clamp(96px, 18%, 150px); height: auto; aspect-ratio: 1; z-index: 2; border: 2px solid var(--copper); box-shadow: 0 0 0 2px var(--wood-edge); border-radius: 4px; pointer-events: none; }
/* arena */
.arena-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
.arena {
  position: relative; height: 300px; border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(600px 200px at 50% 110%, rgba(255,122,26,.10), transparent 70%),
    linear-gradient(180deg, #0f1420 0%, #131927 55%, #1b2233 100%);
  border: 1px solid var(--line);
}
.arena::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px; opacity: .6;
  mask-image: linear-gradient(180deg, transparent, #000 40%);
}
.arena .ground { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.35)); }
.fighter { position: absolute; bottom: 70px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .12s; }
.fighter.player { left: 20%; }
.fighter.enemy { right: 20%; }
.fighter .name { font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.fighter .bar { width: 120px; height: 9px; }
.fighter .sprite-box { filter: drop-shadow(0 8px 6px rgba(0,0,0,.6)); }
.fighter.hit .sprite-box { animation: shake .25s; }
.fighter.dead .sprite-box { animation: die .5s forwards; }
.fighter.attack .sprite-box { animation: lunge .3s; }
.fighter.enemy.attack .sprite-box { animation: lungeL .3s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
@keyframes die { to { opacity: 0; transform: translateY(6px) scale(.9); } }
@keyframes lunge { 30% { transform: translateX(14px); } }
@keyframes lungeL { 30% { transform: translateX(-14px); } }
.arena .idle-msg { position: absolute; left: 0; right: 0; top: 18px; text-align: center; color: var(--muted); font-weight: 600; }
.float-dmg {
  position: absolute; font-family: var(--mono); font-weight: 800; font-size: 15px; pointer-events: none;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(0,0,0,.8); animation: floatUp 1s ease-out forwards; white-space: nowrap;
}
.float-dmg.player { color: #ffd166; }
.float-dmg.enemy { color: #ff7b8a; }
.float-dmg.heal { color: #7ff0a4; }
.float-dmg.crit { font-size: 20px; color: #ff9a3c; }
.float-dmg.miss { color: var(--muted); font-size: 12px; }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(0) scale(.8); } 15% { opacity: 1; transform: translateY(-8px) scale(1.05); } 100% { opacity: 0; transform: translateY(-44px); } }
.fx { position: absolute; pointer-events: none; image-rendering: pixelated; z-index: 3; }
.arena-side { display: flex; flex-direction: column; gap: 10px; }
.minimap { width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #06070b; position: relative; }
.minimap canvas { width: 100%; height: 100%; image-rendering: pixelated; filter: saturate(.75) brightness(.85); }
.minimap .pin { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 0 10px var(--orange); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,122,26,.0); } }
.hunt-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12px; }
.hunt-stats div { display: flex; justify-content: space-between; }
.hunt-stats b { font-family: var(--mono); font-weight: 600; }
.loot-strip { display: flex; flex-wrap: wrap; gap: 4px; min-height: 36px; }
.loot-strip .li { position: relative; width: 36px; height: 36px; background: var(--slot); border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; }
.loot-strip .li span { position: absolute; right: 1px; bottom: 0; font-size: 9px; font-family: var(--mono); color: var(--gold); text-shadow: 0 0 2px #000; }
.hunt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
/* barra de jutsus (slots 1–0) + atalhos à direita, em faixa de madeira embaixo do mapa */
.hotbar { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 6px 8px; border-radius: 8px; background: var(--wood-band); box-shadow: inset 0 0 0 1px var(--copper-dim), 0 0 0 2px var(--wood-edge); }
.jutsu-bar { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; padding: 2px; }
.jutsu-cd { position: relative; flex: none; width: 48px; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-align: center; cursor: pointer; }
button.jutsu-cd:hover .ic { border-color: var(--copper-2); }
.jutsu-cd .ic { width: 48px; height: 48px; border-radius: 6px; background: var(--slot); border: 1px solid var(--line-2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); position: relative; overflow: hidden; display: grid; place-items: center; }
.jutsu-cd.slot-empty { cursor: default; opacity: .55; }
.jutsu-cd .ic .ov { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(60,199,255,.28); pointer-events: none; }
.jutsu-cd kbd { position: absolute; right: 2px; top: 32px; min-width: 14px; padding: 0 3px; border-radius: 3px; background: rgba(18,11,7,.85); color: var(--text); font: 700 10px/14px var(--mono); pointer-events: none; }
.jutsu-cd small { font-size: 9px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.jutsu-cd.active .ic { border-color: #c9a4ff; box-shadow: 0 0 8px rgba(169,112,255,.5); }
.jutsu-cd.queued .ic { animation: slotPulse .5s ease-out; }
@keyframes slotPulse { 0% { box-shadow: 0 0 0 0 rgba(242,193,78,.9); border-color: var(--gold); } 100% { box-shadow: 0 0 0 8px rgba(242,193,78,0); } }
.hotbar-quick { display: flex; gap: 6px; flex: none; padding-left: 10px; border-left: 1px solid var(--line-2); }
.hotbar-btn { width: 44px; height: 44px; border-radius: 6px; background: var(--slot); border: 1px solid var(--line-2); color: var(--text); font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.hotbar-btn:hover { border-color: var(--copper-2); background: #2a1d12; }
@media (prefers-reduced-motion: reduce) {
  .jutsu-cd.queued .ic { animation: none; border-color: var(--gold); }
  .minimap .pin { animation: none; }
}
.spell-icon { image-rendering: pixelated; display: block; }
.jutsu-card .jdesc { font-size: 11px; color: var(--text-2); margin-top: 6px; line-height: 1.35; }
.jutsu-card .fxbox img { width: 40px; height: 40px; }

/* =====================================================================
   PERSONAGEM / INVENTÁRIO
   ===================================================================== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.stat-list { list-style: none; margin: 0; padding: 0; }
.stat-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.stat-list li:last-child { border-bottom: 0; }
.stat-list b { font-family: var(--mono); font-weight: 600; }
.stat-list .sub { font-size: 11px; color: var(--muted); }
.char-hero { display: flex; gap: 16px; align-items: center; }
.char-hero .sprite-box { width: 96px; height: 96px; background: var(--slot); border-radius: 12px; border: 1px solid var(--line); }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.inv-slot {
  aspect-ratio: 1; background: var(--slot); border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center;
  position: relative; cursor: pointer; transition: border-color .12s, transform .1s;
}
.inv-slot:hover { border-color: var(--line-2); transform: translateY(-1px); }
.inv-slot.rare { border-color: var(--rare); }
.inv-slot.equipable { border-color: #3b4560; }
.inv-slot .count { position: absolute; right: 2px; bottom: 1px; font-size: 9px; font-family: var(--mono); color: var(--gold); text-shadow: 0 0 2px #000; }
.inv-slot .lv { position: absolute; left: 3px; top: 1px; font-size: 8px; color: var(--muted); }
.inv-slot .lv.locked { color: var(--red); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.filters .btn.active, .map-ctl .btn.active { border-color: var(--orange); color: var(--orange-2); }

/* item detail (modal/tooltip) */
.item-head { display: flex; gap: 12px; align-items: center; }
.item-head .ibox { width: 48px; height: 48px; background: var(--slot); border: 1px solid var(--line-2); border-radius: 8px; display: grid; place-items: center; }
.item-head .ibox img { width: 32px; height: 32px; image-rendering: pixelated; }
.item-name { font-weight: 800; font-size: 15px; }
.item-name.rare { color: var(--rare); }
.item-stats { margin: 10px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 12px; }
.item-stats div { display: flex; justify-content: space-between; }
.item-stats b { font-family: var(--mono); font-weight: 600; }
.item-stats .up { color: var(--green); }
.item-stats .down { color: var(--red); }
.item-desc { font-size: 12px; color: var(--text-2); font-style: italic; }
.item-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none; max-width: 300px;
  background: #0d1017; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 12px;
}

/* =====================================================================
   JUTSUS / LOJA / TASKS / SAGAS / RANK
   ===================================================================== */
.jutsu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.jutsu-card { display: flex; gap: 12px; align-items: center; }
.jutsu-card.locked { opacity: .5; }
.jutsu-card .fxbox { width: 56px; height: 56px; background: var(--slot); border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.jutsu-card .jname { font-weight: 700; }
.jutsu-card .jwords { font-size: 11px; color: var(--muted); font-style: italic; }
.jutsu-card .jmeta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.shop-item { display: flex; gap: 10px; align-items: center; }
.shop-item .ibox { width: 44px; height: 44px; background: var(--slot); border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.shop-item .ibox img { width: 32px; height: 32px; image-rendering: pixelated; }
.shop-item .price { font-family: var(--mono); color: var(--gold); font-weight: 700; font-size: 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 14px; cursor: pointer; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; }
.tab.active { color: var(--orange-2); border-bottom-color: var(--orange); }

.task-list { display: grid; gap: 8px; }
.task-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.task-card.done { opacity: .55; }
.task-card .tname { font-weight: 700; }
.task-card .bar { margin-top: 6px; height: 8px; }
.task-card .bar span { display: none; }

.saga-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.boss-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; position: relative; }
.boss-card.locked { opacity: .5; }
.boss-card.done { border-color: rgba(74,222,128,.4); }
.boss-card .bname { font-weight: 800; }
.boss-card .bmeta { font-size: 11px; color: var(--muted); }
.boss-card .sprite-box { height: 96px; }
.boss-card .check { position: absolute; top: 8px; right: 8px; }

.rank-list { display: grid; gap: 8px; }
.rank-card { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; }
.rank-card img { width: 64px; height: 64px; object-fit: contain; image-rendering: auto; }
.rank-card.current { border-color: var(--orange); }
.rank-card.locked { opacity: .5; }

/* map panel */
.map-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #06070b; height: calc(100vh - 200px); }
.map-wrap canvas { position: absolute; left: 0; top: 0; image-rendering: pixelated; cursor: grab; filter: saturate(.75) brightness(.85); }
.map-ctl { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; flex-wrap: wrap; }

/* =====================================================================
   MODAL / TOASTS
   ===================================================================== */
.modal { position: fixed; inset: 0; background: rgba(4,6,10,.7); display: grid; place-items: center; z-index: 50; backdrop-filter: blur(3px); }
.modal-box { width: min(560px, 92vw); max-height: 86vh; overflow: auto; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #12161f; border: 1px solid var(--line-2); border-left: 3px solid var(--orange); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; animation: toastIn .2s; max-width: 340px; }
.toast.gold { border-left-color: var(--gold); }
.toast.green { border-left-color: var(--green); }
.toast.red { border-left-color: var(--red); }
.toast.purple { border-left-color: var(--exp); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv b { font-family: var(--mono); font-weight: 600; }
.offline-box .big { font-size: 26px; font-weight: 800; color: var(--gold); font-family: var(--mono); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* 761–1199px: menu só com ícones (o nome continua para leitores de tela e no title) */
@media (max-width: 1199px) {
  .layout { grid-template-columns: 64px minmax(0, 1fr) 280px; }
  .nav-btn { justify-content: center; padding: 8px 4px; }
  .nav-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-btn em { position: absolute; top: 2px; right: 2px; margin: 0; }
  .topbar { grid-template-columns: auto minmax(180px, 240px) minmax(120px, 1fr) auto auto; gap: 10px; }
  .topbar .logo { display: none; }
}

/* =====================================================================
   LOGIN / CONTA / PERSONAGENS
   ===================================================================== */
.login-screen { overflow: auto; }
.login-bg { position: absolute; inset: 0; background: url("../assets/ui/login-bg.jpg") center/cover no-repeat; filter: saturate(.85) brightness(.55); }
.login-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,18,.35), rgba(11,13,18,.9) 85%); }
.login-wrap { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 16px; gap: 10px; }
.login-logo { width: 190px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }
.login-title { font-family: "NjNaruto", var(--font); font-size: 44px; letter-spacing: 1px; text-shadow: 0 2px 0 #000, 0 0 24px rgba(255,122,26,.45); }
.login-title span { color: var(--orange); }
.login-title.small-title { font-size: 30px; }
.login-card { width: min(400px, 100%); padding: 18px 20px 16px; background: rgba(18,21,29,.92); backdrop-filter: blur(6px); }
.login-tabs { margin-bottom: 14px; }
.login-tabs .tab { flex: 1; text-align: center; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card .field input { min-width: 0; width: 100%; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.form-error { background: rgba(244,63,94,.12); border: 1px solid rgba(244,63,94,.45); color: #ff8a9a; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.login-mode { margin-top: 12px; text-align: center; }
.login-foot { text-align: center; max-width: 460px; }
.chars-wrap { position: relative; max-width: 860px; margin: 0 auto; padding: 30px 16px 60px; }
.chars-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.chars-list { display: grid; gap: 8px; }
.char-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .12s, transform .1s; }
.char-row:hover { border-color: var(--orange); transform: translateY(-1px); }
.char-row .cname { font-weight: 800; font-size: 15px; }
.char-row .cmeta { font-size: 12px; color: var(--text-2); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.char-row .cactions { display: flex; gap: 6px; }
.chars-empty { padding: 30px; text-align: center; color: var(--muted); }

/* depot */
.depot-list { display: grid; gap: 6px; }
.depot-card { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; }
.depot-card.here { border-color: var(--green); }
.depot-card .dname { font-weight: 700; }
.inv-slot.disabled { opacity: .6; cursor: not-allowed; }
.mapview-zoom { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; }
.mapview-zoom button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.5); color: #e6e7ec; font: 700 15px/1 var(--mono, monospace); cursor: pointer; }
.mapview-zoom button:hover { background: rgba(255,154,60,.35); }

/* qualidade dos itens acima do level 500 */
.equip-slot.rare-incomum, .inv-slot.q-incomum { border: 2px solid #7dd3fc; box-shadow: 0 0 8px rgba(125,211,252,.3) inset; }
.equip-slot.rare-raro, .inv-slot.q-raro { border: 2px solid #c084fc; box-shadow: 0 0 8px rgba(192,132,252,.35) inset; }
.equip-slot.rare-lendario, .inv-slot.q-lendario { border: 2px solid #facc15; box-shadow: 0 0 10px rgba(250,204,21,.4) inset; }

/* =====================================================================
   CELULAR (≤ 760px): menu embaixo, status vira aba, tudo em uma coluna
   ===================================================================== */
.nav-mobile, .top-vitals { display: none; }
@media (max-width: 760px) {
  .topbar { height: auto; grid-template-columns: 1fr auto; grid-template-areas: "char actions" "exp exp" "stats stats"; gap: 6px 8px; padding: 8px 16px; }
  .topbar .logo, #top-account { display: none; }
  .top-char { grid-area: char; min-width: 0; }
  .top-portrait { width: 38px; height: 38px; }
  .top-name { font-size: 13px; }
  .top-actions { grid-area: actions; }
  .top-actions .btn { min-height: 36px; }
  .top-exp { grid-area: exp; }
  .top-exp .bar { height: 14px; font-size: 10px; }
  .top-vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 5px; }
  .top-vitals .bar { height: 6px; }
  .top-stats { grid-area: stats; justify-content: space-between; gap: 6px; }
  .stat-pill { padding: 4px 8px; font-size: 12px; flex: 1; justify-content: center; }

  /* linhas: conteúdo | (Hunt compacto) | barra de baixo fixa */
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .layout.on-hunt { grid-template-rows: auto minmax(0, 1fr) auto; }
  .sidenav {
    grid-row: -2; order: 0; flex-direction: row; gap: 2px; overflow: visible; position: relative; z-index: 30;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 2px solid var(--wood-edge); box-shadow: inset 0 1px 0 var(--copper-dim);
  }
  .sidenav > .nav-btn, .nav-sheet > * { order: 0 !important; }
  .nav-btn, .nav-more { flex: 1; flex-direction: column; justify-content: center; gap: 2px; width: auto; min-width: 0; min-height: 52px; padding: 4px 2px; font-size: 11px; text-align: center; }
  .nav-btn span, .nav-more span { display: block; position: static; width: auto; height: auto; clip: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav-btn .nl { display: none; }
  .nav-btn .ns { display: block; }
  .nav-btn i, .nav-more i { font-size: 18px; width: auto; }
  .nav-btn em, .nav-more em { position: absolute; top: 2px; right: 6px; margin: 0; }
  .nav-btn.active, .nav-more.active { box-shadow: inset 0 3px 0 var(--gold); }
  .sidenav .nav-more { display: flex; }
  .nav-mobile { display: flex; }
  /* "Mais": os demais itens do menu numa folha acima da barra */
  .nav-sheet {
    display: none; position: fixed; left: 16px; right: 16px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 40;
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px; max-height: 60vh; overflow-y: auto;
    background: var(--wood-panel); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--copper-dim), 0 0 0 2px var(--wood-edge), 0 10px 30px rgba(0,0,0,.6);
  }
  .sidenav.more-open .nav-sheet { display: grid; }
  .nav-sheet .nav-btn { min-height: 64px; background: var(--slot); border-color: var(--line); }
  .nav-sheet .nav-btn span { white-space: normal; }
  .nav-spacer { display: none; }
  .main { padding: 12px 16px; grid-row: 1; }
  .layout.on-hunt .main { overflow: visible; }
  .rightbar { display: none; grid-row: 1; border-left: 0; box-shadow: none; overflow: auto; padding: 10px 16px; }
  .rb-tabs { display: none; }
  .layout.show-status .main { display: none; }
  .layout.show-status .rightbar { display: flex; }
  .layout.on-hunt .rightbar { display: flex; grid-row: 2; padding-top: 0; }
  .rightbar .card.grow { min-height: 260px; }

  .arena-wrap, .create-body, .two-col, .three-col { grid-template-columns: minmax(0, 1fr); }
  .mapview { height: min(100cqw, 42vh); min-height: 200px; }
  .mapview .minimap { width: 92px; top: 36px; }
  .hotbar-quick { display: none; }
  .hotbar { margin-top: 8px; padding: 4px 6px; }
  .jutsu-cd, .jutsu-cd .ic { width: 44px; }
  .jutsu-cd .ic { height: 44px; }
  .jutsu-cd kbd { top: 28px; }
  .jutsu-cd small { display: none; }
  .hunt-head { gap: 8px; flex-wrap: wrap; }
  .zone-grid { grid-template-columns: minmax(0, 1fr); }
  .jutsu-list, .shop-grid { grid-template-columns: minmax(0, 1fr); }
  .saga-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .inv-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
  .task-card, .rank-card { grid-template-columns: 44px 1fr auto; gap: 8px; }
  .field input, .field select { min-width: 0; }
  .modal-box { width: 96vw; max-height: 90vh; }
  .panel-title { font-size: 20px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs .tab { flex-shrink: 0; }
  #panel-hunt .panel-sub { display: none; }
  .mapview-hud { font-size: 10px; max-width: calc(100% - 80px); }
  .create-footer { flex-wrap: wrap; align-items: stretch; }
  .create-footer .field, .create-footer .btn { width: 100%; }
  .chars-head { flex-wrap: wrap; gap: 8px; }
  .char-row { grid-template-columns: 48px 1fr; }
  .char-row > :last-child { grid-column: 1 / -1; justify-self: end; }
}

/* =====================================================================
   AMIGOS / LOBBY DE BOSS MENSAL / LUTA AO VIVO
   ===================================================================== */
.toast.blue { border-left-color: var(--chakra); }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4a5368; margin-right: 6px; vertical-align: middle; flex-shrink: 0; }
.online-dot.on { background: var(--green); box-shadow: 0 0 6px rgba(74,222,128,.7); }
.friend-add { gap: 8px; }
.friend-add input { flex: 1; min-width: 0; }
.friend-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.friend-row:first-of-type { border-top: 0; }
.friend-row.off { opacity: .7; }
.friend-row .fmain { flex: 1; min-width: 0; }
.fname { font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.friend-row .factions { display: flex; gap: 6px; flex-shrink: 0; }
.lobby-wrap { display: grid; gap: 10px; margin-bottom: 6px; }
.lobby-wrap:empty { display: none; }
.lobby-box { border-color: rgba(169,112,255,.5); }
.lobby-box.raid-live { border-color: var(--orange); }
.lobby-invite { border-color: rgba(169,112,255,.5); gap: 8px; }
.lobby-title { font-weight: 800; font-size: 15px; }
.lobby-members { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.lobby-member { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.lobby-member.invited { border-style: dashed; opacity: .8; }
.lobby-member.empty-slot { border-style: dashed; justify-content: center; min-height: 50px; }
.lobby-box select { min-width: 0; max-width: 220px; }
.raid-boss { margin-bottom: 12px; }
.raid-bar { height: 18px; margin-top: 6px; }
.raid-party { display: grid; gap: 8px; }
.raid-member { display: grid; gap: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-1); }
.raid-member.me { border-color: rgba(60,199,255,.5); }
.raid-member.dead { opacity: .5; }
.raid-feed { max-height: 220px; min-height: 120px; }
.raid-result { margin-bottom: 12px; }
.raid-result.hidden { display: none; }
.raid-result-card { text-align: center; border-color: var(--gold); }
.raid-result-card.lost { border-color: var(--red); }
.raid-result-card .kv { width: max-content; margin-left: auto; margin-right: auto; text-align: left; }
.raid-result-card .btn-block { max-width: 320px; margin-left: auto; margin-right: auto; }
.raid-result-card .loot-strip { justify-content: center; }
.raid-result-title { font-size: 26px; font-weight: 800; }
@media (max-width: 760px) {
  .lobby-members { grid-template-columns: minmax(0, 1fr); }
  .lobby-box select { max-width: 100%; flex: 1; }
  .friend-row .factions .btn { padding: 5px 8px; }
  .raid-feed { max-height: 160px; }
}

/* janela larga (Loja / Depot) */
.modal-box.modal-wide { width: min(980px, 96vw); max-height: 90vh; }
.modal-body > .panel { display: block; }
