/* =====================================================================
   Ninja IDLE — tema "vila oculta à noite"
   ===================================================================== */
:root {
  --bg-0: #0b0d12;
  --bg-1: #12151d;
  --bg-2: #181c26;
  --bg-3: #212633;
  --line: #2a3040;
  --line-2: #364058;
  --text: #e8ebf3;
  --text-2: #a9b0c2;
  --muted: #6c7489;
  --orange: #ff7a1a;
  --orange-2: #ffa054;
  --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: 12px;
  --font: "Oxanium", 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%, #1c2233 0%, var(--bg-0) 60%),
              var(--bg-0);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
}
button { font-family: inherit; }
button, .btn, .nav-btn { -webkit-tap-highlight-color: transparent; outline: none; }
button:focus, button:focus-visible, .btn:focus, .nav-btn:focus { outline: none; box-shadow: none; }
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: 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: #2a3040; border-color: #4a5470; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #ff8a35, #ff6a00); border-color: #ff9a4d; color: #1a0d00; }
.btn-primary:hover { background: linear-gradient(180deg, #ff9b52, #ff7a1a); }
.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,.02) inset;
}
.card-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted);
  font-weight: 700; margin-bottom: 10px; 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: #111827; border-radius: 2px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.16); box-shadow: inset 0 1px 2px #000;
}
.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, #761326 0%, #b51f32 56%, #d83b3d 100%); box-shadow: 0 0 7px rgba(165,28,47,.3); }
.bar-mana > div { background: linear-gradient(90deg, #07533e 0%, #0d7957 56%, #25a06c 100%); box-shadow: 0 0 7px rgba(16,119,79,.3); }
.bar-exp > div { background: linear-gradient(90deg,#8a5b12,#d9a52e,#f6d77a); border-radius:0; }
.top-exp .bar > span { color:#090909; text-shadow:none; font-weight:800; }
.top-exp #top-exp-text { display:none; }
.float-dmg.exp { color:#fff; font-family:Tahoma,sans-serif; font-weight:700; }
.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; background:#100d0a; }
#screen-create::before {
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:linear-gradient(110deg,rgba(12,10,8,.58),rgba(12,10,8,.44) 48%,rgba(12,10,8,.68)),url("../assets/ui/konoha-character-creation.png");
  background-size:cover; background-position:center; filter:saturate(.78);
}
.create-wrap {
  position: relative; z-index:1; isolation: isolate; box-sizing: border-box;
  width: min(calc(100% - 40px), 1120px); min-height: 0;
  margin: clamp(18px,5vh,48px) auto; padding: 24px 30px 26px;
  border: 1px solid transparent; border-radius: 0;
  background: linear-gradient(145deg, rgba(35, 28, 21, .88), rgba(22, 19, 16, .91));
  box-shadow: 0 12px 36px rgba(0, 0, 0, .58);
}
.create-wrap::after {
  content: ""; position: absolute; inset: 0; z-index: 5;
  border: 12px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 12px / 0 stretch;
  pointer-events: none;
}
.create-header { text-align: center; margin-bottom: 18px; }
.create-header .logo-big { font-size:clamp(38px,5vw,58px); }
.create-header p { margin:8px 0 0; line-height:1.5; }
.create-body { display: grid; grid-template-columns: minmax(0,1fr); gap: 13px; }
.voc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; align-self: start; align-content: start; }
.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; display: flex; flex-direction: column; align-items: center; overflow: hidden;
}
.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 { flex: 0 0 64px; width: 64px; height: 64px; overflow: hidden; margin: 0 auto 8px; }
.voc-card .voc-name { font-weight: 700; font-size: 13px; line-height: 1.25; }
.voc-card .voc-sub { font-size: 10px; line-height: 1.35; color: var(--muted); }
.voc-detail { position: relative; align-self: start; display:grid; grid-template-columns:120px minmax(180px,.8fr) minmax(340px,1.5fr); grid-template-rows:auto auto auto 1fr; align-items:start; gap:4px 16px; padding:14px 16px; }
.voc-detail .portrait { grid-column:1; grid-row:1 / span 4; width:120px; height:148px; object-fit: contain; image-rendering: pixelated; margin:0; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.voc-detail h3 { grid-column:2; grid-row:1; align-self:end; margin:0 0 2px; font-size:20px; }
.voc-detail .voc-detail-description { grid-column:2; grid-row:2; line-height:1.45; }
.voc-detail .voc-spell-title { grid-column:3; grid-row:1; align-self:end; margin:0 0 2px; }
.voc-detail .voc-spell-list { grid-column:3; grid-row:2 / span 3; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 14px; margin:0; }
.voc-detail .voc-saga-title { grid-column:2; grid-row:3; margin:8px 0 0; }
.voc-detail .saga-strip { grid-column:2; grid-row:4; align-self:start; margin:0; }
.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: 0; }
.create-footer { display: grid; grid-template-columns:auto minmax(200px,1fr) minmax(180px,.7fr) auto; align-items:end; gap:12px; margin-top:14px; justify-content:stretch; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.create-footer .field { min-width:0; }
.create-footer .field input, .create-footer .field select { box-sizing:border-box; width:100%; min-width:0; min-height:42px; }
.create-footer > .btn { min-height:42px; white-space:nowrap; }

/* =====================================================================
   INGAME LAYOUT
   ===================================================================== */
#screen-game { display: none; flex-direction: column; }
#screen-game.active { display: flex; }
.topbar {
  height: 64px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center;
  gap: 18px; padding: 0 18px; background: linear-gradient(180deg, #161a24, #10131b);
  border-bottom: 1px solid var(--line);
}
.topbar > .logo { justify-self:start; }
.top-center-group { display:flex; align-items:center; justify-self:center; gap:18px; min-width:0; }
.top-char { display: flex; align-items: center; gap: 10px; }
.top-char-info { display:flex; flex-direction:column; align-items:center; min-width:0; }
.top-portrait { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; }
.top-name { width:100%; font-weight: 800; display: flex; justify-content:center; align-items:center; text-align:center; }
.vip-shop-card { border-color:#c69b34!important; box-shadow:inset 0 0 18px #c69b341c,0 0 12px #c69b3420; }
.vip-shop-mark { font-weight:900; letter-spacing:.12em; background:linear-gradient(90deg,#d99e18,#fffbd9,#f4c84b); color:transparent; background-clip:text; filter:drop-shadow(0 0 5px #e4b337aa); white-space:nowrap; }
.vip-locked { opacity:.62; cursor:not-allowed; }
@keyframes vip-tag-glow { 0%,100% { text-shadow:0 0 4px #ffc928,0 0 8px #ffc92888; } 50% { text-shadow:0 0 7px #fff2ad,0 0 13px #efb51c; } }
.top-level { font-size: 12px; color: var(--text-2); text-align:center; white-space:nowrap; }
.top-exp { transform: translateX(-10px); }
.exp-card { padding: 9px 10px; }
.exp-card .vital-label { margin-bottom: 5px; }
.exp-card .bar { height: 9px; }
.exp-card #top-exp-text { display: inline-flex; color: var(--text-2); text-shadow: none; font-size: 9px; font-weight: 700; }
.layout .exp-card { display: none; }
.layout:not(.hunt-overview-active) > .rightbar .exp-card,
.layout:not(.hunt-overview-active) > #battle-overview > .exp-card,
.layout.hunt-overview-active > .rightbar > .exp-card,
.layout.hunt-overview-active > #battle-overview > .exp-card { display: block; }
.layout > #battle-overview > .exp-card,
.layout > .rightbar > .exp-card { box-sizing: border-box; width: 100%; min-width: 0; min-height: 55px; flex: 0 0 auto; align-self: stretch; padding: 9px 10px; transform: none; }
.hunt-controls { position:absolute; z-index:6; top:10px; left:10px; display:flex; flex-direction:column; align-items:stretch; gap:5px; max-width:calc(100% - 20px); }
.hunt-controls .hunt-selector-btn, .hunt-controls .btn { width:max-content; max-width:100%; min-width:0; margin:0; box-shadow:0 3px 10px rgba(0,0,0,.55); }
.hunt-controls .btn { align-self:flex-start; }
.battle-hunt-difficulty { align-self:stretch; box-sizing:border-box; padding:10px 16px; border:1px solid rgba(201,166,91,.65); border-radius:4px; background:rgba(24,18,12,.9); color:#f0cf79; font:700 14px/1.2 "Oxanium",sans-serif; text-align:center; text-shadow:0 1px 3px #000; box-shadow:0 3px 10px rgba(0,0,0,.55); }
.pvp-exit-button { position:static; z-index:7; min-height:32px; padding:6px 10px; border:1px solid #a94b3e; border-radius:5px; color:#fff0e9; background:linear-gradient(180deg,#883b31,#59251f); box-shadow:0 2px 8px rgba(0,0,0,.55); font-size:11px; font-weight:700; cursor:pointer; }
.pvp-exit-button:hover { border-color:#e28461; background:linear-gradient(180deg,#a34938,#6e2b23); }
.pvp-exit-button:disabled { opacity:.72; cursor:wait; }
.pvp-exit-button[hidden] { display:none !important; }
.pvp-battle-control { position:static; z-index:7; display:flex; align-items:center; align-self:flex-start; gap:6px; min-height:32px; padding:5px 9px; border:1px solid #357342; border-radius:5px; background:rgba(13,35,19,.94); color:#8bec91; box-shadow:0 2px 8px rgba(0,0,0,.55); font:700 11px/1.2 "Oxanium",sans-serif; letter-spacing:.03em; cursor:pointer; }
.pvp-battle-control:hover { border-color:#69c779; background:#16391e; }
.pvp-battle-control:disabled { opacity:.9; cursor:default; }
.pvp-battle-control > span { color:#74e782; font-size:16px; line-height:1; text-shadow:0 0 7px rgba(77,232,102,.4); }
.pvp-battle-control > strong { white-space:nowrap; }
.pvp-battle-control[hidden] { display:none !important; }
.hunt-roster-badge { appearance:none; width:max-content; max-width:100%; padding:4px 9px; border:1px solid #51412d; border-radius:4px; background:rgba(22,18,14,.94); color:#b9aa90; font:600 11px/1.3 "Oxanium",sans-serif; cursor:pointer; }
.hunt-roster-badge.occupied { border-color:#a77a33; color:#f2cf79; }
.hunt-roster-badge[hidden] { display:none !important; }
.hunt-roster-badge:hover { border-color:#c79d4b; color:#ffe4a5; }
.hunt-controls .hunt-selector-btn,
.hunt-controls .battle-hunt-difficulty,
.hunt-controls .hunt-roster-badge,
.hunt-controls .hunt-stop-button {
  box-sizing:border-box; min-height:32px; padding:6px 10px; border:1px solid #6b563a; border-radius:4px;
  background:linear-gradient(180deg,#382f24,#29221b); color:#fff; font-family:"Oxanium",sans-serif;
  line-height:1.2; text-align:center; text-shadow:none; box-shadow:inset 0 1px rgba(246,220,168,.07),0 2px 8px rgba(0,0,0,.45);
}
.hunt-controls .hunt-selector-btn { font-size:14px; font-weight:700; }
.hunt-controls .battle-hunt-difficulty { align-self:stretch; padding:6px 10px; font-size:15px; font-weight:700; }
.hunt-controls .hunt-roster-badge { font-size:13px; font-weight:600; }
.hunt-controls .hunt-stop-button { align-self:flex-start; font-size:14px; font-weight:600; }
.hunt-controls .hunt-selector-btn:hover,
.hunt-controls .hunt-roster-badge:hover,
.hunt-controls .hunt-stop-button:hover:not(:disabled) { border-color:#aa8244; background:linear-gradient(180deg,#4a3a28,#33281c); color:#fff0cf; }
.hunt-controls .hunt-roster-badge:disabled,
.hunt-controls .hunt-stop-button:disabled { opacity:.68; cursor:wait; }
.hunt-controls .battle-gold-hud {
  display:flex; align-items:center; align-self:flex-start; gap:6px; min-height:24px; margin-top:4px; padding:2px 4px;
  border:0; border-radius:0; background:transparent; color:#f2c14e; font:700 16px/1.2 "Oxanium",sans-serif;
  text-shadow:0 1px 3px #000; box-shadow:none; white-space:nowrap;
}
.hunt-controls .battle-gold-hud[hidden] { display:none !important; }
.hunt-controls .battle-gold-hud .currency-icon { width:17px; height:17px; flex:0 0 17px; object-fit:contain; transform:none; }
.hunt-controls .battle-gold-value { -webkit-text-stroke:1px #090704; paint-order:stroke fill; text-shadow:-1px -1px 0 #090704,1px -1px 0 #090704,-1px 1px 0 #090704,1px 1px 0 #090704; }
.hunt-player-modal { display:grid; gap:10px; min-width:min(440px,calc(100vw - 60px)); }
.hunt-player-modal-note { margin:0; color:var(--text-2); font-size:12px; line-height:1.45; }
.hunt-player-list { display:grid; gap:6px; max-height:min(54vh,440px); overflow:auto; overscroll-behavior:contain; }
.hunt-player-row { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:10px; padding:7px 8px; border:1px solid var(--line); border-radius:6px; background:var(--bg-1); }
.hunt-player-row-info { min-width:0; display:grid; gap:2px; }
.hunt-player-row-name { overflow:hidden; color:var(--text-1); text-overflow:ellipsis; white-space:nowrap; }
.hunt-player-row-meta,.hunt-player-row-no-guild { color:var(--text-2); font-size:11px; }
.hunt-player-row-guild { overflow:hidden; color:#55aaff; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.hunt-player-row .btn { min-height:30px; padding:5px 9px; white-space:nowrap; }
.hunt-player-empty { padding:20px 12px; color:var(--text-2); text-align:center; font-size:13px; }
.hunt-stop-slot { display:none; justify-content:center; margin:0 0 3px; }
.hunt-controls .btn[hidden] { display:none !important; }
.hunt-stop-slot[hidden] { display:none; }
.hunt-stop-slot .btn-danger { min-height:24px; padding:4px 12px; font-size:11px; line-height:1; white-space:nowrap; }
.top-exp .bar { height: 14px; border-radius:2px; border-color:#8f6a1c; background:#17120a; }
.top-stats { display: flex; gap: 8px; }
.stat-pill {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); font-family: var(--mono); font-weight: 700; font-size: 13px;
}
.stat-pill i { font-style: normal; color: var(--muted); }
.stat-pill .currency-icon { display:block; width:16px; height:16px; flex:0 0 16px; object-fit:contain; image-rendering:auto; transform:translateY(-3px); }
.stat-pill.gold { color: var(--gold); }
.stat-pill.gold i { color: var(--gold); }
.stat-pill.elo { color: #c9a4ff; }
.stat-pill.elo i { color: #c9a4ff; }
.top-actions { display: flex; gap: 6px; }
.topbar > .top-actions { justify-self:end; }

.layout { flex: 1; display: grid; grid-template-columns: 200px 1fr 320px; min-height: 0; }
.layout.hunt-overview-active { min-height:0; overflow:hidden; }
.layout.hunt-overview-active .arena-wrap > .mapview { width:100%; max-width:none; margin:0; height:auto; aspect-ratio:15 / 11; }
.sidenav { background: var(--bg-1); border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--text-2); cursor: pointer; font-weight: 600; font-size: 14px;
  text-align: left; position: relative;
}
.nav-btn i { font-style: normal; width: 20px; text-align: center; font-size: 15px; }
.pvp-arena-nav i img { display: block; width: 20px; height: 20px; object-fit: contain; }
.pvp-arena-nav span { transform: translateY(2px); }
.nav-btn:hover { background: var(--bg-2); color: var(--text); }
.nav-btn.active { background: rgba(255,122,26,.12); border-color: rgba(255,122,26,.35); color: var(--orange-2); }
.nav-btn em { margin-left: auto; font-style: normal; font-size: 10px; background: var(--orange); color: #1a0d00; border-radius: 999px; padding: 1px 6px; font-weight: 800; }
.nav-btn em:empty { display: none; }
.nav-btn i img { width:20px; height:20px; object-fit:contain; vertical-align:middle; }
.helper-nav i { width:26px; flex:0 0 26px; }
.helper-nav i img { width:26px; height:26px; }
.nav-btn[data-panel="inventory"] i,
.nav-btn[data-panel="inventory"] span { transform:translateY(1px); }

.modal-box:has(.helper-shell) { width:min(820px,94vw); max-height:86vh; overflow:hidden; display:flex; flex-direction:column; }
.modal-box:has(.helper-shell) .modal-head { flex:0 0 auto; padding-bottom:9px; border-bottom:1px solid #5d4a31; }
.modal-box:has(.helper-shell) .modal-body { min-height:0; overflow:auto; }
.helper-shell { min-height:440px; display:flex; flex-direction:column; color:#e9dfcd; }
.helper-intro { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:2px 2px 13px; border-bottom:1px solid rgba(111,88,58,.55); }
.helper-intro > div { display:flex; align-items:baseline; gap:12px; min-width:0; }
.helper-intro strong { color:#f0cc73; font:700 20px Georgia,"Times New Roman",serif; letter-spacing:.5px; }
.helper-intro span { color:#a99a81; font-size:12px; }
.helper-intro .helper-save-state { color:#8fbc78; white-space:nowrap; }
.helper-layout { flex:1; min-height:300px; display:grid; grid-template-columns:150px minmax(0,1fr); gap:18px; padding:15px 2px; }
.helper-tabs { display:flex; flex-direction:column; gap:5px; padding-right:12px; border-right:1px solid rgba(111,88,58,.45); }
.helper-tab { display:flex; align-items:center; gap:10px; width:100%; min-height:38px; padding:8px 10px; border:1px solid transparent; border-radius:5px; background:transparent; color:#c8b99e; text-align:left; font:inherit; cursor:pointer; }
.helper-tab > span { width:16px; text-align:center; color:#d5ad55; }
.helper-tab:hover, .helper-tab.active { border-color:#8b6936; background:rgba(201,157,73,.15); color:#f1d384; }
.helper-content { min-width:0; overflow:auto; padding:2px 5px 4px 0; }
.helper-section-title { margin:0 0 11px; color:#e7bd62; font:700 13px Georgia,"Times New Roman",serif; letter-spacing:.45px; }
.helper-section-spaced { margin-top:23px; }
.helper-card { display:flex; align-items:center; gap:12px; min-height:74px; padding:11px; border:1px solid #59452e; border-radius:6px; background:rgba(16,13,10,.58); }
.helper-card-icon { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border:1px solid #53432e; border-radius:5px; background:#14110e; }
.helper-card-main { display:grid; gap:4px; flex:1; min-width:0; }
.helper-card-main strong, .helper-rotation-info strong { color:#f0e5d2; font-size:13px; }
.helper-auto-card .helper-muted { font-size:13px; line-height:1.35; }
.helper-loot-filter-card > .btn { flex:0 0 auto; }
.helper-muted { color:#a89b85; font-size:11px; }
.helper-toggle { display:flex; align-items:center; gap:7px; padding:7px 9px; border:1px solid #5c4930; border-radius:5px; background:#211b15; color:#c6b89f; font:inherit; font-size:11px; cursor:pointer; }
.helper-toggle.enabled { border-color:#5b8050; color:#b6dc9b; }
.helper-toggle-dot { width:8px; height:8px; border-radius:50%; background:#80776a; }
.helper-toggle.enabled .helper-toggle-dot { background:#73bb55; box-shadow:0 0 7px #73bb5580; }
.helper-setting-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; padding:11px 2px; border-bottom:1px solid rgba(111,88,58,.35); color:#c9bda8; font-size:12px; }
.helper-select { min-width:92px; min-height:34px; padding:6px 9px; border:1px solid #655136; border-radius:5px; background:#17130f; color:#eee1cc; font:inherit; }
.helper-hint { margin:11px 0 0; color:#9d927f; font-size:11px; line-height:1.55; }
.helper-choice-grid { display:grid; gap:7px; }
.helper-choice-grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.helper-choice { min-height:39px; padding:8px 11px; border:1px solid #51432f; border-radius:5px; background:#211b15; color:#cbbda4; font:inherit; font-size:12px; text-align:left; cursor:pointer; transition:background .12s,border-color .12s,color .12s; }
.helper-choice:hover { border-color:#9d7a3c; color:#f0d68f; }
.helper-choice.active { border-color:#c59a43; background:linear-gradient(180deg,#927137,#795c2c); color:#fff1cc; box-shadow:inset 0 1px rgba(255,230,170,.15); }
.helper-distance-row { justify-content:flex-start; border:0; }
.helper-rotation-list { display:grid; gap:7px; }
.helper-rotation-item { display:flex; align-items:center; gap:10px; min-height:62px; padding:8px 10px; border:1px solid #55432c; border-radius:5px; background:linear-gradient(110deg,rgba(47,37,27,.9),rgba(25,21,17,.9)); }
.helper-rotation-number { width:24px; height:24px; flex:0 0 24px; display:grid; place-items:center; border-radius:4px; background:#49391f; color:#e8c66d; font-weight:700; font-size:11px; }
.helper-rotation-item > .spell-icon { flex:0 0 34px; object-fit:contain; }
.helper-rotation-info { display:grid; gap:4px; flex:1; min-width:0; }
.helper-rotation-actions { display:flex; gap:4px; }
.helper-icon-button { width:27px; height:27px; border:1px solid #53442f; border-radius:4px; background:#211b15; color:#d2c2a7; cursor:pointer; }
.helper-icon-button:hover:not(:disabled) { border-color:#bd914c; color:#f4d484; }
.helper-icon-button:disabled { opacity:.35; cursor:default; }
.helper-icon-button.remove:hover { border-color:#a45040; color:#ffb5a1; }
.helper-empty { padding:13px; border:1px dashed #584831; border-radius:5px; color:#a89b85; font-size:12px; }
.helper-add-row { display:flex; gap:8px; }
.helper-add-select { flex:1; min-width:0; }
.helper-add-button { min-width:100px; }
.helper-learned-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(128px,1fr)); gap:7px; }
.helper-learned-spell { position:relative; display:grid; grid-template-columns:38px minmax(0,1fr); grid-template-rows:auto auto; align-items:center; gap:2px 8px; min-width:0; min-height:55px; padding:7px 22px 7px 7px; border:1px solid #55432c; border-radius:5px; background:linear-gradient(110deg,rgba(47,37,27,.9),rgba(25,21,17,.9)); color:#e9dfcd; text-align:left; cursor:pointer; }
.helper-learned-spell:hover:not(:disabled) { border-color:#c59a43; background:#34291c; }
.helper-learned-spell:disabled { opacity:.45; cursor:default; }
.helper-learned-spell > .spell-icon { grid-row:1 / span 2; width:34px; height:34px; object-fit:contain; }
.helper-learned-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:700; }
.helper-learned-spell small { color:#a89b85; font-size:10px; }
.helper-learned-add { position:absolute; right:7px; top:50%; transform:translateY(-50%); color:#e8c66d; font-size:16px; font-weight:800; }
.helper-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 2px 1px; border-top:1px solid rgba(111,88,58,.48); color:#a39782; font-size:11px; }
.helper-close { min-width:82px; }
@media (max-width:600px) {
  .modal-box:has(.helper-shell) { width:94vw; max-height:88vh; }
  .helper-shell { min-height:0; }
  .helper-intro { align-items:flex-start; flex-direction:column; gap:4px; }
  .helper-intro > div { align-items:flex-start; flex-direction:column; gap:3px; }
  .helper-layout { grid-template-columns:1fr; gap:10px; padding:11px 0; }
  .helper-tabs { flex-direction:row; padding:0 0 8px; border-right:0; border-bottom:1px solid rgba(111,88,58,.45); }
  .helper-tab { justify-content:center; padding:8px 5px; }
  .helper-footer { align-items:flex-start; }
  .helper-card { flex-wrap:wrap; }
  .helper-toggle { margin-left:auto; }
}
.nav-spacer { flex: 1; }

.main { overflow: auto; padding: 20px 22px; }
.panel { display: none; }
.panel.active { display: block; }

.rightbar { background: var(--bg-1); border-left: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overflow-x: hidden; min-height: 0; }
.rightbar > .grow { display:none; }
.mobile-nav-toggle { display:none; }
.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; }
.skill-progress { margin-top: 8px; }
.skill-progress .vital-label { margin-bottom: 4px; }
.skill-progress .bar { height: 9px; }
.skill-progress-ninjutsu .bar > div { background: linear-gradient(90deg, #673ab7, #c084fc); }
.skill-progress-taijutsu .bar > div { background: linear-gradient(90deg, #a85d16, #f4bd55); }
.skill-progress-defense .bar > div { background: linear-gradient(90deg, #b8b8b8, #fff); }
.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; }
.offline-hunt-status { margin-top: 9px; }
.offline-hunt-status .vital-label { margin-bottom: 4px; }
.offline-hunt-bar { height: 9px; }
.offline-hunt-bar > div { background: linear-gradient(90deg, #8e6424, #e8bd57); }

.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: #0c0f16; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center;
  position: relative; cursor: pointer;
}
.equip-slot.filled { border-color: #3b4560; background: #121620; }
.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; }
.slot-glyph { width: 26px; height: 26px; fill: none; stroke: #3a4258; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.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 { width:100%; min-height:25px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:3px 2px; border:0; border-bottom:1px solid rgba(112,88,55,.28); background:transparent; color:#d8cbb5; font:inherit; font-size:12px; line-height:1.2; text-align:left; cursor:pointer; }
.toggle:last-child { border-bottom:0; }
.toggle:focus-visible { outline:1px solid #d6ae53; outline-offset:1px; }
.toggle-label { min-width:0; flex:1; }
.toggle-indicator { width:42px; height:19px; flex:0 0 42px; display:grid; place-items:center; border:1px solid #68553b; border-radius:4px; background:#1c1813; color:#988b77; box-shadow:inset 0 1px 2px rgba(0,0,0,.65); }
.toggle-state { font:700 9px/1 var(--mono); letter-spacing:.35px; }
.toggle.on .toggle-indicator { border-color:#c69b43; background:linear-gradient(180deg,#e1b951,#b8872d); color:#24190b; box-shadow:inset 0 1px rgba(255,239,180,.38); }

.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: #c9a4ff; }
.combat-log .sys { color: var(--chakra); }
.combat-log .death { color: var(--red); font-weight: 700; }

/* =====================================================================
   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; }
.item-icon-animated { display:block; background-repeat:no-repeat; image-rendering:pixelated; }
.compact-inventory { display:block; }
.compact-loot-pouch-card { display:none; }
.compact-inventory-grid { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:4px; }
.compact-inventory-tabs { display:flex; gap:4px; margin:0 0 8px; }
.compact-inventory-tabs .tab { flex:1; min-width:0; padding:6px 4px; background:transparent; border:0; font-size:11px; }
.auto-threshold { display:flex; align-items:center; justify-content:flex-end; gap:5px; margin:-5px 0 4px; color:var(--muted); font-size:11px; }
.auto-threshold input { width:42px; padding:3px; text-align:center; color:var(--text); background:var(--bg-2); border:1px solid var(--line-2); border-radius:3px; }
.compact-inv-slot { min-width:0; width:auto; height:42px; position:relative; }
.compact-inv-slot .icon-item { width:30px; height:30px; }
.compact-inv-slot .item-icon-animated { width:30px; height:30px; }
.compact-inv-slot .count { position:absolute; right:3px; bottom:1px; font:11px var(--mono); color:#fff; text-shadow:0 1px 2px #000; }
.compact-pouch-actions { display:flex; gap:6px; margin-top:7px; }
.compact-pouch-actions .btn { flex:1; min-width:0; min-height:28px; padding:4px 6px; font-size:10px; }
.compact-pouch-actions .compact-pouch-sell { font-size:11px; }
.mobile-battle-loot { display:none; box-sizing:border-box; width:100%; }
.inv-slot, .inv-slot * { -webkit-tap-highlight-color:transparent; }
.inv-slot { touch-action:manipulation; user-select:none; -webkit-user-select:none; }
.inv-slot:focus, .inv-slot:focus-visible { outline:none; box-shadow:none; }
.inv-slot:active { background:#111620; }

/* =====================================================================
   HUNT
   ===================================================================== */
.hunt-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
.zone-tier { margin: 10px auto; max-width: 1080px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.015); overflow: hidden; }
.zone-tier-toggle { width:100%; min-height:52px; display:flex; align-items:center; gap:12px; padding:11px 14px; border:0; background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.zone-tier-toggle:hover, .zone-tier-toggle:focus-visible { background:rgba(255,255,255,.04); outline:none; }
.zone-tier-label { flex:1; font-size:13px; font-weight:800; letter-spacing:.2px; }
.zone-tier-count { color:var(--muted); font-size:11px; white-space:nowrap; }
.zone-tier-chevron { width:24px; height:24px; display:grid; place-items:center; border:1px solid var(--line-2); border-radius:7px; color:var(--orange-2); font-size:17px; transition:transform .16s ease; }
.zone-tier-toggle[aria-expanded="true"] .zone-tier-chevron { transform:rotate(180deg); }
.zone-tier .zone-grid { padding:0 12px 12px; }
.zone-tier .zone-grid[hidden] { display:none; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.zone-tier:first-child { margin-top: 0; }
.hunt-selector-btn { display:block; margin:0 auto 10px; min-width:220px; padding:10px 16px; border:1px solid var(--line-2); border-radius:9px; background:var(--bg-1); color:var(--text); font-weight:700; cursor:pointer; }
.hunt-selector-btn:hover { border-color:var(--orange); color:var(--orange-2); }
.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-monster-list { display:grid; gap:5px; margin-top:9px; padding-top:8px; border-top:1px solid var(--line); }
.zone-monster-row { min-width:0; display:flex; align-items:center; gap:7px; padding:4px 6px; border-radius:7px; background:rgba(0,0,0,.16); }
.zone-monster-row > .sprite-box { flex:0 0 32px; width:32px!important; height:32px!important; }
.zone-monster-name { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-2); font-size:11px; font-weight:650; }
.zone-monster-exp { flex:0 0 auto; padding:3px 6px; border:1px solid rgba(242,193,78,.25); border-radius:6px; background:rgba(242,193,78,.09); color:#ffd977; font-family:var(--mono); font-size:10px; font-weight:800; white-space:nowrap; }
.zone-drop-icons { display:flex; align-items:center; gap:3px; flex:0 0 auto; max-width:132px; overflow-x:auto; scrollbar-width:thin; }
.zone-drop-icon { width:24px; height:24px; flex:0 0 24px; object-fit:contain; image-rendering:pixelated; border:1px solid var(--line-2); border-radius:5px; background:rgba(0,0,0,.22); }
.zone-no-drops { flex:0 0 auto; color:var(--muted); font-size:9px; }
.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 */
.mapview { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #06070b; aspect-ratio: 15 / 11; }
.battle-preload-overlay { position:absolute; inset:0; z-index:30; display:grid; place-items:center; padding:16px; box-sizing:border-box; background:rgba(8,7,6,.78); }
.battle-preload-box { width:min(340px,100%); box-sizing:border-box; padding:18px 20px; border:1px solid #715b3a; border-radius:7px; background:linear-gradient(145deg,#29221b,#1d1916); color:#f0d68f; text-align:center; box-shadow:0 8px 28px rgba(0,0,0,.55); }
.battle-preload-box strong { display:block; font-size:18px; }
.battle-preload-box span { color:#d6c9b2; font-size:13px; }
.battle-preload-bar { height:8px; margin:13px 0 9px; overflow:hidden; border-radius:8px; background:#0e0c0a; }
#battle-loading-fill { width:0; height:100%; transition:width .2s; background:linear-gradient(90deg,var(--orange),var(--gold)); }
.mapview-canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.mapview-canvas { cursor: default; }
.battle-fps-hud { position:absolute; z-index:9; right:10px; bottom:10px; min-width:68px; padding:5px 8px; border:1px solid rgba(220,181,91,.48); border-radius:5px; background:rgba(13,11,9,.78); color:#f2d27b; font:700 12px var(--mono); text-align:center; text-shadow:0 1px 2px #000; pointer-events:none; }
.battle-text-canvas { position:absolute; left:50%; top:50%; z-index:2; display:block; transform:translate(-50%,-50%); image-rendering:auto; pointer-events:none; }
.mapview { contain: paint; }
.mapview-canvas { image-rendering: crisp-edges; }
.mapview-canvas { image-rendering: pixelated; }
.battle-chat-toggle, .battle-chat-window { display:none; }
.battle-chat-window[hidden] { display:none!important; }
.battle-chat-toggle {
  position:absolute; z-index:8; left:9px; bottom:12px; min-width:84px; padding:8px 13px;
  border:1px solid #8c7045; border-radius:7px; background:linear-gradient(180deg,#3a2d1d,#211910);
  color:#f4d080; font:700 12px "Oxanium",sans-serif; text-shadow:0 1px 2px #000;
  box-shadow:0 3px 10px #0009; cursor:pointer;
}
.battle-chat-toggle:hover { border-color:#e4b951; filter:brightness(1.12); }
.battle-chat-window {
  position:absolute; z-index:8; left:9px; bottom:56px; width:min(350px,calc(100% - 24px));
  height:min(340px,calc(100% - 68px)); min-height:160px; box-sizing:border-box;
  grid-template-rows:auto auto minmax(0,1fr) auto; overflow:hidden;
  border:1px solid #8c7045; border-radius:9px; color:var(--text-1,#eee5d3);
  background:linear-gradient(180deg,rgba(32,26,20,.97),rgba(17,15,13,.97));
  box-shadow:0 7px 24px #000b,inset 0 1px #ffffff12;
}
.battle-chat-window:not([hidden]) { display:grid; }
.battle-chat-header { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; border-bottom:1px solid #4f402d; color:#f2c45b; }
.battle-chat-close { width:25px; height:25px; border:1px solid #51412c; border-radius:5px; background:#17130f; color:#d7c7a9; font-size:18px; line-height:1; cursor:pointer; }
.battle-chat-tabs { display:flex; gap:3px; padding:5px 6px 0; border-bottom:1px solid #403528; }
.battle-chat-tabs button { flex:1; min-width:0; padding:5px 3px; border:1px solid transparent; border-radius:5px 5px 0 0; background:transparent; color:#aa9b83; font:600 10px "Oxanium",sans-serif; cursor:pointer; }
.battle-chat-tabs button:hover { color:#f0d38e; background:#ffffff0a; }
.battle-chat-tabs button.active { color:#f4c95c; border-color:#5c472b; border-bottom-color:#211a13; background:#302519; }
.battle-chat-log { min-height:0; overflow:auto; padding:8px; scrollbar-width:thin; scrollbar-color:#70552f #17130f; }
.battle-chat-empty { padding:14px 5px; color:#9d917e; font-size:11px; text-align:center; }
.battle-chat-message { display:flex; align-items:baseline; flex-wrap:wrap; column-gap:5px; padding:5px 6px; border-bottom:1px solid #ffffff0b; overflow-wrap:anywhere; }
.battle-chat-message-head { display:contents; }
.battle-chat-message-head strong { color:#f2c45b; font-size:11px; }
.battle-chat-message-head .battle-chat-nick-effect { display:inline-block; color:transparent; background-size:260% 100%; background-clip:text; -webkit-background-clip:text; -webkit-text-fill-color:transparent; animation:nick-style-preview 2.4s linear infinite; }
.battle-chat-message time { flex:0 0 auto; margin-left:auto; color:#827765; font:10px "Oxanium",sans-serif; }
.battle-chat-message-body { min-width:0; color:#e2d8c7; font-size:11px; line-height:1.4; white-space:pre-wrap; }
.battle-chat-identity { display:inline-flex; align-items:baseline; gap:4px; min-width:0; }
.battle-chat-hokage-tag { color:#f2c45b; font:800 10px "Oxanium",sans-serif; white-space:nowrap; text-shadow:0 1px 2px #000; }
.battle-chat-message-head strong.battle-chat-hokage-author { position:relative; top:1px; color:#ff5555; }
.battle-chat-message-body.is-filtered { color:#ad9c83; font-style:italic; }
.battle-chat-item-link { padding:0; border:0; background:none; color:#b8b8b8; font:inherit; font-weight:700; text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
.battle-chat-item-link.quality-uncommon { color:#49d17d; }
.battle-chat-item-link.quality-rare { color:#4aa8ff; }
.battle-chat-item-link.quality-epic { color:#bd72f5; }
.battle-chat-item-link.quality-legendary { color:#f0c34e; }
.battle-chat-item-link:hover { filter:brightness(1.16); }
.chat-moderation-menu { position:fixed; z-index:120; display:flex; flex-direction:column; gap:4px; width:min(280px,calc(100vw - 16px)); box-sizing:border-box; padding:7px; border:1px solid #8c7045; border-radius:6px; background:#211b16; box-shadow:0 5px 18px #000b; }
.chat-moderation-menu button { width:100%; padding:8px 9px; border:1px solid #4b3a27; border-radius:4px; background:#292117; color:#eadcc5; font:600 12px "Oxanium",sans-serif; text-align:left; cursor:pointer; }
.chat-moderation-menu button:hover { border-color:#bd9348; background:#382a1a; color:#ffe29a; }
.battle-chat-composer { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; padding:7px; border-top:1px solid #4f402d; background:#100e0c; }
.battle-chat-composer input { min-width:0; padding:7px 8px; border:1px solid #58452d; border-radius:5px; outline:none; background:#0b0a09; color:#f3ebdc; font:11px "Oxanium",sans-serif; }
.battle-chat-composer input:focus { border-color:#c39845; }
.battle-chat-send { padding:6px 10px; border:1px solid #a77d34; border-radius:5px; background:linear-gradient(#d5a843,#96671e); color:#21170a; font:700 11px "Oxanium",sans-serif; cursor:pointer; }
.battle-chat-send:disabled { opacity:.5; cursor:default; }
.battle-chat-composer.read-only { grid-template-columns:minmax(0,1fr); }
.battle-chat-composer.read-only input { text-align:center; }
.battle-chat-composer.read-only .battle-chat-send { display:none; }
.battle-dps-panel { position:absolute; z-index:5; left:10px; bottom:82px; width:min(320px,calc(100% - 20px)); box-sizing:border-box; padding:12px 14px 11px; border:1px solid rgba(193,151,76,.78); border-radius:9px; color:#eee2ca; background:linear-gradient(145deg,rgba(34,27,20,.96),rgba(14,12,11,.95)); box-shadow:0 5px 18px rgba(0,0,0,.62),inset 0 0 0 1px rgba(255,255,255,.035); font-family:"Oxanium",sans-serif; pointer-events:auto; }
.battle-dps-panel[hidden] { display:none!important; }
.battle-dps-panel header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-bottom:7px; border-bottom:1px solid rgba(190,153,91,.24); }
.battle-dps-panel header > div { display:grid; gap:1px; }
.battle-dps-panel header strong { color:#f0c45e; font-size:14px; letter-spacing:.08em; }
.battle-dps-subtitle { color:#a99a81; font-size:12px; }
.battle-dps-reset { width:25px; height:25px; padding:0; border:1px solid #665239; border-radius:5px; background:#211a13; color:#e2c27b; font:700 16px/1 "Oxanium",sans-serif; cursor:pointer; }
.battle-dps-reset:hover { border-color:#d0a34d; background:#332718; }
.battle-dps-main { display:flex; align-items:baseline; gap:7px; padding:7px 0 6px; }
.battle-dps-main strong { color:#f5d277; font-size:32px; line-height:1; font-variant-numeric:tabular-nums; }
.battle-dps-main span { color:#a89a84; font-size:12px; }
.battle-dps-stats { display:grid; grid-template-columns:1fr 1fr; gap:5px 10px; }
.battle-dps-stats > div { display:flex; justify-content:space-between; gap:7px; font-size:12px; }
.battle-dps-stats span { color:#a99c87; }
.battle-dps-stats b { color:#e9ddc6; font-variant-numeric:tabular-nums; text-align:right; }
.battle-dps-stats > .battle-dps-crit-row { grid-column:1 / -1; }
.battle-dps-last { margin-top:8px; padding-top:7px; border-top:1px solid rgba(190,153,91,.18); color:#b7a98f; font-size:12px; }
.battle-dps-stop { display:block; width:100%; margin-top:9px; padding:7px 12px; border:1px solid #a77d34; border-radius:5px; background:linear-gradient(180deg,#3a2d1d,#211910); color:#f4d080; font:700 13px "Oxanium",sans-serif; cursor:pointer; }
.battle-dps-stop:hover { border-color:#e4b951; background:linear-gradient(180deg,#4b3922,#2d2115); }
.forge-wallet { display:flex; justify-content:flex-end; margin:0 0 12px; color:#f1ce73; font-weight:700; }
.forge-title,.forge-subtitle { text-align:center; }
.forge-wallet { justify-content:center; text-align:center; margin:0 0 12px; }
.forge-wallet,.forge-gold-cost { display:flex; align-items:center; justify-content:center; gap:6px; }
.forge-currency-icon { display:block; width:20px; height:20px; flex:0 0 20px; object-fit:contain; image-rendering:pixelated; }
.forge-gold-cost { width:max-content; }
.forge-tabs { display:flex; justify-content:center; flex-wrap:wrap; gap:5px; overflow-x:auto; margin:0 0 12px; padding:0 0 5px; border-bottom:1px solid rgba(190,153,91,.25); scrollbar-width:thin; }
.forge-tab { display:flex; align-items:center; justify-content:center; gap:6px; flex:0 0 auto; min-height:36px; padding:0 11px; color:#b9aa90; background:transparent; border:0; border-bottom:2px solid transparent; cursor:pointer; font-family:inherit; font-size:12px; font-weight:600; }
.forge-tab:hover,.forge-tab.active { color:#f2ca68; }
.forge-tab.active { border-bottom-color:#d6a83f; }
.forge-tab-count { min-width:18px; padding:1px 5px; border-radius:9px; background:#30271d; color:#c6ad7b; font-size:10px; text-align:center; }
.forge-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr)); gap:12px; }
.forge-card { display:grid; grid-template-columns:54px minmax(0,1fr); gap:10px; align-items:center; padding:13px; }
.forge-product-icon { width:52px; height:52px; display:grid; place-items:center; border:1px solid #57452f; border-radius:7px; background:#100e0b; }
.forge-product-icon img { width:40px; height:40px; object-fit:contain; image-rendering:pixelated; }
.forge-product-info { display:grid; min-width:0; gap:3px; }
.forge-product-info > strong { color:#f0dfbd; font-size:15px; overflow-wrap:anywhere; }
.forge-quality { color:#a99a81; font-size:12px; }
.forge-gold-cost { color:#f2cb65; font-size:13px; }
.forge-item-stats { grid-column:1/-1; padding:8px 10px; border:1px solid rgba(190,153,91,.2); border-radius:5px; background:rgba(10,8,7,.28); }
.forge-item-stats > strong { display:block; margin-bottom:5px; color:#d8c7a7; font-size:12px; }
.forge-item-stats .item-stats { margin:0; grid-template-columns:minmax(0,1fr); gap:3px; font-size:12px; }
.forge-item-stats .item-stat-line { padding-bottom:3px; }
.forge-item-stats .item-quality-line { padding:2px 0 5px; }
.forge-item-stats .item-required-level { padding-bottom:4px; }
.forge-requirements { grid-column:1/-1; display:grid; gap:6px; padding-top:9px; border-top:1px solid rgba(190,153,91,.2); }
.forge-requirements > strong { color:#d8c7a7; font-size:12px; }
.forge-material { display:flex; align-items:center; gap:7px; color:#c9bda8; font-size:12px; }
.forge-material img { width:24px; height:24px; object-fit:contain; image-rendering:pixelated; }
.forge-craft { grid-column:1/-1; width:100%; }
.forge-empty { grid-column:1/-1; }
@media(max-width:520px) { .forge-wallet { justify-content:center; text-align:center; } .forge-grid { grid-template-columns:minmax(0,1fr); } }
@media (max-width:800px) { .battle-dps-panel { bottom:12px; width:min(320px,calc(100% - 20px)); } }
@media (min-width:801px) { .battle-chat-toggle { display:block; } }
@media (max-width:800px) { .battle-chat-toggle, .battle-chat-window { display:none!important; } }
.arena-wrap { width: min(100%, 1080px); margin: 0 auto; transform: translateX(30px); }
.mapview { max-height: 560px; }
.zone-card, .task-card, .boss-card { content-visibility:auto; contain-intrinsic-size:100px; }
@media (max-width: 700px) {
  .mapview { aspect-ratio: 4 / 3; min-height:240px; max-height:420px; }
}
.mapview-hud { position: absolute; z-index:3; left: 10px; top: 8px; font-family: var(--mono); font-size: 11px; color: #cfd6e6; text-shadow: 0 1px 2px #000; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 6px; }
.helper-rotation-hud { position:absolute; z-index:5; top:8px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:5px; padding:5px 7px; border:1px solid rgba(204,164,93,.72); border-radius:8px; background:rgba(18,15,12,.88); box-shadow:0 2px 8px rgba(0,0,0,.5); pointer-events:none; }
.helper-rotation-hud[hidden] { display:none; }
.helper-rotation-slot { position:relative; width:40px; height:40px; display:grid; place-items:center; overflow:hidden; border:1px solid #57452f; border-radius:5px; background:#100e0c; }
.helper-rotation-slot.ready { border-color:#c99e4c; }
.helper-rotation-icon { width:34px; height:34px; display:grid; place-items:center; }
.helper-rotation-fill { position:absolute; inset:auto 0 0; height:0; background:rgba(14,18,24,.8); transition:height .28s linear; }
.helper-rotation-time { position:absolute; z-index:1; inset:0; display:grid; place-items:center; color:#fff; font:700 10px/1 var(--mono); text-shadow:0 1px 3px #000,0 0 3px #000; }
.helper-rotation-slot.ready .helper-rotation-time { color:#f5d17a; }
.helper-rotation-order { position:absolute; z-index:2; top:1px; left:2px; color:#fff; font:700 8px/1 var(--mono); text-shadow:0 1px 2px #000; }
/* arena */
.arena-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.arena-side { transform: translateX(24px); }
@media (min-width: 801px) {
  .sidenav { justify-content: center; }
  .sidenav .nav-spacer { display: none !important; }
  .sidenav .nav-btn { flex: 0 0 auto; }
  .jutsu-bar { display: none !important; }
  .hunt-head { min-height: 0; margin: 0; }
  .hunt-head > div { flex: 0 0 auto; }
  .hunt-controls { top: 8px; left: 8px; }
  .hunt-controls .hunt-selector-btn { text-align: left; padding: 8px 13px; }
  .hunt-controls .btn { text-align: center; padding: 6px 11px; }
  .mapview-hud { left: auto; right: 10px; top: 10px; }
  .layout.hunt-overview-active .main { padding: 5px 8px; overflow:hidden; }
  .layout.hunt-overview-active .rightbar { gap:5px; padding-top:6px; padding-bottom:6px; }
  .layout.hunt-overview-active #battle-overview { gap:6px; padding-top:6px; padding-bottom:6px; }
}

/* Small desktop/laptop viewports: keep navigation centered without overflow. */
@media (min-width: 801px) and (max-width: 1100px) {
  .sidenav { gap: 4px; }
  .sidenav .nav-btn { flex-basis: 68px; width: 68px; }
}
@media (min-width: 801px) {
  .layout {
    grid-template-columns: minmax(270px, 300px) minmax(0, 1fr) 320px;
    grid-template-rows: 68px minmax(0, 1fr);
    column-gap: 0;
  }
  .sidenav {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    height: 68px;
    padding: 5px 10px;
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid #806746;
    scrollbar-width: thin;
  }
  .sidenav .mobile-nav-toggle { display: none; }
  .sidenav .nav-spacer { display: block; flex: 1 0 8px; }
  .sidenav .nav-btn {
    position: relative;
    display: flex;
    flex: 0 0 76px;
    width: 76px;
    min-width: 64px;
    height: 56px;
    padding: 3px 4px;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    border-radius: 4px;
    text-align: center;
  }
  .sidenav .nav-btn i { width: auto; font-size: 18px; line-height: 1.1; }
  .sidenav .nav-btn span {
    display: block;
    max-width: 100%;
    font-size: 10px;
    line-height: 1.05;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sidenav .nav-btn em { position: absolute; top: 1px; right: 3px; margin: 0; }
  #battle-overview {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    border-right: 1px solid #5d4a31;
    background: linear-gradient(180deg, #241e18, #1a1612);
  }
  #battle-overview .card { width: 100%; min-width: 0; flex: 0 0 auto; }
  .main { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; padding: 12px 14px; overflow: auto; }
  .rightbar { grid-column: 3; grid-row: 2; min-width: 0; min-height: 0; }
  .arena-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    transform: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .arena-wrap > .arena-side { display: none; }
  .arena-wrap > .mapview {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 15 / 11;
    min-height: 0;
    max-height: none;
  }
  .jutsu-bar { align-items: center; }
  .jutsu-bar > .top-exp {
    flex: 0 1 280px;
    width: 280px;
    min-width: 210px;
    margin: 0 0 0 auto;
    transform: none;
  }
}
@media (max-width: 800px) {
  .compact-loot-pouch-card { display:none !important; }
  #battle-overview { display: none; }
}
@media (min-width: 801px) and (max-width: 1100px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr) 270px; }
  .sidenav .nav-btn { flex-basis: 68px; width: 68px; }
  .main { padding: 10px; }
  .rightbar { padding: 8px; }
}
@media (min-width: 801px) {
  .compact-loot-pouch-card { display:block; }
  /* EXP fica sob Chakra no painel de status; cooldowns nao aparecem no desktop. */
  .jutsu-bar { display: none !important; }
  .sidenav { justify-content: center; }
  .sidenav .nav-spacer { display: none !important; }
  .sidenav .nav-btn { flex: 0 0 auto; }
  .hunt-head { min-height: 0; margin: 0; }
  .hunt-head > div { flex: 0 0 auto; }
  .mapview > .hunt-selector-btn {
    position: absolute;
    z-index: 5;
    top: 10px;
    left: 10px;
    width: auto;
    min-width: 0;
    max-width: calc(100% - 20px);
    margin: 0;
    padding: 8px 13px;
    text-align: left;
    box-shadow: 0 3px 10px rgba(0,0,0,.55);
  }
  .mapview-hud { left: auto; right: 10px; top: 10px; }
  .layout.hunt-overview-active .main { padding: 6px 10px; }
}
.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;
  font-family: Tahoma, sans-serif; font-weight: 700; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 4px rgba(0,0,0,.85); 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; }
.wave-battle-hud, .wave-boss-hud {
  position: absolute; z-index: 8; left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 36px));
  box-sizing: border-box; padding: 10px 14px; border: 1px solid rgba(255,205,112,.5); border-radius: 9px;
  color: #fff5dc; background: linear-gradient(135deg, rgba(25,17,14,.94), rgba(47,25,20,.9));
  box-shadow: 0 8px 26px rgba(0,0,0,.55), inset 0 0 18px rgba(245,158,58,.08); pointer-events: none;
}
.wave-battle-hud {
  top:7px; left:auto; right:10px; transform:none; width:min(112px,calc(100% - 20px)); padding:5px 8px;
  border-color:rgba(224,184,104,.78); border-radius:7px;
  background:linear-gradient(145deg,rgba(33,25,19,.96),rgba(20,15,13,.94));
  box-shadow:0 3px 10px rgba(0,0,0,.5),inset 0 0 10px rgba(245,184,76,.08);
}
.wave-hud-top { display:flex; align-items:center; justify-content:center; margin-bottom:3px; }
.wave-hud-title { color:#ffd37a; font-size:12px; letter-spacing:.07em; text-shadow:0 0 8px rgba(255,155,42,.4); }
.wave-hud-track, .wave-boss-track { overflow:hidden; border-radius:999px; background:rgba(0,0,0,.62); box-shadow:inset 0 1px 3px #000; }
.wave-hud-track { height:4px; border:1px solid rgba(130,100,55,.6); }
.wave-hud-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,#ff963d,#ffe17b); box-shadow:0 0 10px rgba(255,174,72,.55); transition:width .25s ease; }
.wave-boss-hud {
  top:64px; width:min(460px,calc(100% - 36px)); padding:0 8px;
  border:0; border-radius:0; background:transparent; box-shadow:none;
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.85));
}
.wave-boss-name {
  margin-bottom:5px; color:#f2d38b; text-align:center; font-size:12px; font-weight:900;
  letter-spacing:.16em; text-transform:uppercase; text-shadow:0 1px 2px #160b08,0 0 9px rgba(232,94,57,.5);
}
.wave-boss-track {
  position:relative; box-sizing:border-box; height:13px; padding:2px; overflow:hidden;
  border:1px solid #d7b66d; border-radius:999px;
  background:linear-gradient(180deg,#241313,#100b0d);
  box-shadow:0 0 0 1px rgba(34,17,12,.95),0 0 9px rgba(217,61,48,.35),inset 0 1px 3px #000;
}
.wave-boss-track::after {
  content:""; position:absolute; inset:1px; border-radius:inherit; pointer-events:none;
  background:linear-gradient(180deg,rgba(255,244,215,.18),transparent 48%,rgba(22,5,9,.24));
}
.wave-boss-fill {
  height:100%; width:100%; border-radius:999px;
  background:linear-gradient(180deg,#ff927f 0%,#e3454e 42%,#a51f37 100%);
  box-shadow:0 0 9px rgba(255,67,69,.62); transition:width .2s linear;
}
.wave-boss-hp { margin-top:4px; color:#e8dcc6; text-align:center; font-family:var(--mono); font-size:10px; text-shadow:0 1px 2px #000; }
.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: minmax(0,1fr) minmax(0,1fr); gap: 4px 8px; font-size: 12px; }
.hunt-stats div { display: flex; justify-content: space-between; align-items:center; gap:5px; min-width:0; white-space:nowrap; }
.hunt-stats div > span { overflow:hidden; text-overflow:ellipsis; }
.hunt-stats b { white-space:nowrap; flex:0 0 auto; }
.hunt-stats b { font-family: var(--mono); font-weight: 600; }
.hunt-stats .hunt-stat-expense b { color: #e87575; }
.loot-strip { display: flex; flex-wrap: wrap; gap: 4px; min-height: 36px; }
.loot-strip .li { position: relative; width: 36px; height: 36px; background: #0c0f16; 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; }
.hunt-head > div { flex:1; min-width:0; }
.hunt-head .panel-title, .hunt-player-status { text-align:left; }
.hunt-player-status { display:none; min-width:0; }
.hunt-desktop-subtitle { display:block; }
.hunt-player-identity { display:flex; align-items:baseline; justify-content:center; gap:5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hunt-player-guild-tag { color:#55aaff; font-weight:800; }
.hunt-player-level { display:inline-flex; align-items:center; gap:4px; padding:3px 7px; border:1px solid rgba(242,193,78,.55); border-radius:4px; background:linear-gradient(180deg,rgba(242,193,78,.16),rgba(242,193,78,.06)); color:#ffd977; white-space:nowrap; }
.hunt-player-level small { color:#f2c14e; font-size:8px; letter-spacing:.6px; }
.hunt-player-currencies { display:flex; justify-content:center; gap:6px; margin-top:5px; }
.hunt-player-currencies .hunt-currency-pill { padding:4px 9px; border-radius:8px; font-size:11px; }
.hunt-head .btn-danger { flex:0 0 auto; width:auto; min-width:0; white-space:nowrap; line-height:1; padding:5px 9px; font-size:11px; min-height:27px; }
.jutsu-bar { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.jutsu-cd { width: 44px; text-align: center; }
.jutsu-cd .ic { width: 44px; height: 44px; border-radius: 8px; background: #0c0f16; border: 1px solid var(--line); position: relative; overflow: hidden; display: grid; place-items: center; }
.jutsu-cd .ic .ov { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(60,199,255,.25); }
.jutsu-cd small { font-size: 9px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jutsu-cd.active .ic { border-color: #c9a4ff; box-shadow: 0 0 8px rgba(169,112,255,.5); }
.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: #0c0f16; 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: #0c0f16; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center;
  position: relative; cursor: pointer;
}
.inv-slot.rare { border-color: var(--rare); }
.inv-slot.equipable { border-color: #3b4560; }
.inv-slot .count { position: absolute; right: 2px; bottom: 1px; font-size: 10px; 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); }
.inv-title-row { gap: 10px; flex-wrap: wrap; }
.inv-actions { flex-wrap: wrap; justify-content: flex-end; }
.inventory-tabs { margin: 12px 0; }
.inventory-tabs .tab { background: transparent; border: 0; font: inherit; }
.loot-pouch-grid { margin-bottom: 10px; }
.loot-pouch-slot { border-color: #3b4560; }
.loot-pouch-slot .loot-rarity-mark { position: absolute; left: 3px; bottom: 1px; max-width: calc(100% - 30px); overflow: hidden; font-size: 7px; line-height: 1; font-weight: 800; text-shadow: 0 1px 2px #000; }
.loot-pouch-slot .count { z-index: 1; }
.loot-pouch-empty { opacity: .3; cursor: default; }
.loot-pouch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.loot-pouch-hint { margin: 8px 2px 0; }
.mobile-battle-loot-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; }
.mobile-battle-loot-head .card-title { margin:0; }
.mobile-battle-loot-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; }
.mobile-battle-sell { display:block; width:100%; margin-top:8px; }
.analyzer-hunt-name { margin:-2px 0 8px; color:var(--orange-2); font-size:12px; font-weight:700; }
.session-loot-box { margin-top:5px; }
.loot-filter-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.loot-filter-row img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.loot-filter-row span { min-width: 0; display: grid; gap: 2px; font-size: 13px; }
.loot-filter-row small { font-size: 10px; }
.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: #0c0f16; 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: minmax(0, 1fr); gap: 4px; font-size: 12px; }
.item-stats .item-stat-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; padding-bottom: 2px; border-bottom: 1px solid rgba(198,169,95,.12); }
.item-stats .item-stat-line > span { min-width: 0; color: var(--text-2); }
.item-stats .item-stat-line > b { flex: 0 0 auto; color: var(--text); font-family: var(--mono); font-weight: 700; text-align: right; }
.item-stats .item-stat-regen { grid-column: 1 / -1; }
.item-stats .item-rarity-line { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; min-width: 0; line-height: 1.25; }
.item-rarity-line > span { color: var(--item-rarity-color); font-weight: 800; }
.item-stats .item-rarity-line > b { max-width: 100%; color: var(--text-2); font: inherit; overflow-wrap: anywhere; white-space: normal; }
.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-sell-value { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(198,169,95,.24); color: var(--text-2); font-size: 12px; }
.item-sell-value > b { flex: 0 0 auto; color: var(--gold, #e7bd5a); font-family: var(--mono); font-weight: 800; text-align: right; }
.item-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

@media (max-width: 680px) {
  .inv-title-row { align-items: flex-start; }
  .inv-actions { width: 100%; justify-content: flex-start; }
  .inv-actions .btn { flex: 1 1 auto; }
  .loot-pouch-actions .btn { flex: 1 1 180px; }
}

.tooltip {
  position: fixed; left:0; top:0; transform:translate3d(-10000px,-10000px,0); z-index: 100; pointer-events: none; width: max-content; max-width: min(340px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; overflow-wrap: anywhere;
  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: #0c0f16; 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; }
.jutsu-upgrade-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
.jutsu-upgrade { white-space: nowrap; }
.rank-empty-icon { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 24px; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.nav-btn[hidden] { display:none!important; }
#panel-store { --store-gap:14px; }
.store-wallet-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:14px 0 22px; padding:14px 18px; border:1px solid #745b32; border-radius:8px; background:#211a13; }
.store-wallet-copy { display:flex; align-items:center; gap:12px; }
.store-wallet-copy > div { display:grid; gap:3px; }
.store-wallet-icon { width:48px; height:48px; flex:0 0 48px; object-fit:contain; image-rendering:auto; }
.store-wallet-copy strong { color:#f0d18a; font-size:17px; }
.store-wallet-copy span { color:var(--muted); font-size:14px; }
.store-wallet-value { color:#f3c64d; font:700 20px var(--mono); white-space:nowrap; }
.store-section { margin-top:22px; }
.store-section-heading { display:flex; align-items:end; justify-content:space-between; gap:12px; margin:0 0 11px; }
.store-section-heading h3 { margin:0; color:#f0d18a; font-size:19px; }
.store-section-heading p { margin:0; color:var(--muted); font-size:14px; text-align:right; }
.store-vip-card { display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:16px; align-items:center; padding:16px; border-color:#927034!important; }
.store-powerup-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:10px; }
.store-powerup-card { display:flex; flex-direction:column; align-items:stretch; gap:8px; padding:13px; background:#211a13; box-shadow:none; contain:layout paint; }
.store-powerup-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.store-powerup-heading h4 { margin:0; color:#f0d18a; font-size:16px; }
.store-powerup-price { display:inline-flex; align-items:center; gap:4px; color:#f4d080; font-weight:700; white-space:nowrap; }
.store-powerup-price img, .store-powerup-buy img { width:18px; height:18px; object-fit:contain; vertical-align:middle; }
.store-powerup-card > p { flex:1; margin:0; color:var(--muted); font-size:14px; line-height:1.35; }
.store-powerup-card .store-item-status { color:var(--muted); font-size:13px; }
.store-powerup-card .store-item-status.active { color:#6fe19a; font-weight:700; }
.store-powerup-buy { display:inline-flex; align-items:center; justify-content:center; gap:5px; width:100%; }
.store-vip-icon { width:58px; height:58px; display:grid; place-items:center; border:1px solid #b58b32; border-radius:8px; overflow:hidden; background:#18130e; }
.store-vip-icon img { width:56px; height:56px; object-fit:contain; }
.store-vip-info h3, .store-aura-details h4, .store-color-info h4 { margin:0; color:#f0d18a; font-size:17px; }
.store-vip-info p, .store-aura-details p, .store-color-info p { margin:5px 0 0; color:var(--muted); font-size:14px; line-height:1.45; }
.store-item-status { display:block; margin-top:7px; color:#d9c8a7; font-size:13px; }
.store-buy-button { min-width:150px; min-height:42px; }
.store-aura-grid, .store-color-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--store-gap); }
.store-aura-card { display:grid; grid-template-columns:58px minmax(0,1fr); grid-template-rows:minmax(58px,auto) auto auto; align-items:center; gap:8px 12px; padding:13px; }
.store-aura-card, .store-color-card, .store-vip-card { background:#211a13; box-shadow:none; contain:layout paint; }
.store-aura-preview { width:58px; height:58px; display:grid; place-items:center; }
.store-aura-details { min-width:0; }
.store-aura-details { grid-column:1/-1; text-align:center; }
.store-aura-details h4 { text-align:center; }
.store-aura-card > .btn { grid-column:1/-1; width:100%; min-height:38px; }
.store-color-card { display:grid; grid-template-columns:44px minmax(0,1fr); align-items:center; gap:8px 12px; padding:13px; }
.store-color-info { min-width:0; }
.store-color-info h4 { font-size:15px; }
.store-color-name { display:inline-block; }
.store-color-name-effect { background-size:260% 100%; background-clip:text; -webkit-background-clip:text; color:transparent!important; animation:nick-style-preview 2.4s linear infinite; }
.store-color-name[data-color="#000000"] { padding:0; border:0; border-radius:0; background:none; color:#000!important; font-weight:800; -webkit-text-stroke:0; text-shadow:0 0 1px #c4b18d; }
.store-scrolling #panel-store .store-color-name-effect { animation-play-state:paused!important; }
.store-color-info p { font-size:13px; }
.store-color-card > .btn { grid-column:1/-1; width:100%; min-height:38px; }
#panel-store .nick-color-swatch { width:42px; height:42px; border-radius:7px; box-shadow:none; animation:none!important; }
#panel-store .store-aura-grid > :last-child:nth-child(3n+1),
#panel-store .store-color-grid > :last-child:nth-child(3n+1) { grid-column:2; }
#panel-store .store-aura-grid > :last-child:nth-child(3n+2),
#panel-store .store-color-grid > :last-child:nth-child(3n+2) { grid-column:2; }
.shop-grid:not(.nick-shop-grid) > .shop-empty { grid-column: 1 / -1; width: 100%; min-height: 120px; display: grid; place-items: center; box-sizing: border-box; margin: 0; padding: 24px; text-align: center; }
.shop-grid.nick-shop-grid { display:block; }
.aura-shop-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:10px; }
#panel-shop .tabs { overflow-x: auto; }
.nick-color-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; width:100%; }
.nick-color-card { display:grid; grid-template-columns:42px minmax(0,1fr); gap:8px 12px; align-items:center; padding:12px; }
.nick-color-swatch { width:42px; height:42px; border-radius:8px; background:var(--nick-color); border:2px solid rgba(255,255,255,.68); box-shadow:0 0 14px color-mix(in srgb,var(--nick-color) 55%,transparent); }
.nick-color-name { font-weight:700; }
.nick-color-card .btn { grid-column:1 / -1; width:100%; }
.nick-color-swatch[class*="nick-effect-"] { background-size:260% 100%; animation:nick-style-preview 2.4s linear infinite; }
.nick-effect-rainbow { background-image:linear-gradient(100deg,#ff334f,#ffb52e,#fff04a,#35ed78,#26dfff,#5278ff,#d94fff,#ff334f); }
.nick-effect-gold-white { background-image:linear-gradient(100deg,#fff8be,#e5a91d,#fff,#ffc928,#fff8be); }
.nick-effect-aurora { background-image:linear-gradient(100deg,#bdff62,#22f0c3,#4a9cff,#d87cff,#bdff62); }
.nick-effect-ice-neon { background-image:linear-gradient(100deg,#fff,#62f5ff,#5a8cff,#ed72ff,#fff); }
.nick-effect-chakra-fire { background-image:linear-gradient(100deg,#fff6b0,#ffcf28,#ff7b19,#f03753,#fff6b0); }
@keyframes nick-style-preview { to { background-position:100% 50%; } }
.shop-item { display: flex; gap: 10px; align-items: center; }
.shop-grid:not(.nick-shop-grid) > .shop-item { min-width: 0; min-height: 104px; box-sizing: border-box; padding: 14px; }
.shop-grid:not(.nick-shop-grid) > .shop-item > div:nth-child(2) { overflow-wrap: anywhere; }
.shop-grid:not(.nick-shop-grid) > .shop-item > .btn { flex: 0 0 auto; }
.shop-item .ibox { width: 44px; height: 44px; background: #0c0f16; 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; }
#panel-sagas .boss-tabs { margin: 10px 0 14px; }
#panel-sagas .boss-drop-list { max-height: 76px; overflow: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; contain: content; padding: 4px; }
#panel-sagas .boss-drop-icon { flex: 0 0 32px; width: 32px; height: 32px; cursor: pointer; touch-action: manipulation; }
#panel-sagas .boss-card { contain: layout paint style; }

.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 { display: none !important; }
.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); } }

.global-announcement {
  position: fixed;
  z-index: 100;
  top: 26%;
  left: 50%;
  width: max-content;
  max-width: min(850px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 12px 20px;
  transform: translate(-50%, 8px);
  border: 2px solid #e4b951;
  border-radius: 8px;
  background: rgba(25, 19, 13, .96);
  color: #ffe08a;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 255, 255, .06);
  font: 700 clamp(16px, 1.9vw, 23px)/1.35 "Oxanium", sans-serif;
  text-align: center;
  text-shadow: 0 2px 5px #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.global-announcement[hidden] { display: none; }
.global-announcement.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 600px) {
  .global-announcement { top: 24%; padding: 10px 14px; max-width: calc(100vw - 24px); }
}

.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); }
.offline-box .offline-summary { display:block; width:100%; box-sizing:border-box; white-space:normal; overflow-wrap:anywhere; line-height:1.45; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 64px 1fr 300px; }
  .nav-btn span { display: none; }
  .topbar { grid-template-columns: minmax(0,1fr) auto; gap:10px; padding-left:12px; padding-right:12px; }
}

@media (max-width: 800px) {
  .store-section-heading { display:block; }
  .store-section-heading p { margin-top:4px; text-align:left; }
  .store-vip-card { grid-template-columns:52px minmax(0,1fr); gap:10px; }
  .store-vip-icon { width:48px; height:48px; }
  .store-vip-icon img { width:46px; height:46px; }
  .store-buy-button { grid-column:1/-1; width:100%; }
  .store-aura-grid, .store-color-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  #panel-store .store-aura-grid > :last-child:nth-child(2n+1),
  #panel-store .store-color-grid > :last-child:nth-child(2n+1) { grid-column:1/-1; width:min(100%,calc((100% - 9px)/2)); justify-self:center; }
  #panel-store .store-aura-grid > :last-child:nth-child(3n+1),
  #panel-store .store-aura-grid > :last-child:nth-child(3n+2),
  #panel-store .store-color-grid > :last-child:nth-child(3n+1),
  #panel-store .store-color-grid > :last-child:nth-child(3n+2) { grid-column:auto; width:auto; justify-self:stretch; }
  .nick-color-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .nick-color-card { grid-template-columns:32px minmax(0,1fr); gap:7px; padding:9px; }
  .aura-shop-grid { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:8px; }
  .nick-color-swatch { width:32px; height:32px; }
  #screen-game { overflow:auto; }
  .topbar { position:sticky; top:0; z-index:20; height:auto; min-height:58px; padding:8px 10px; display:grid; grid-template-columns:1fr auto; gap:6px; }
  .topbar .logo { font-size:18px; }
  .top-center-group { display:none; }
  .top-char { min-width:0; }
  .top-char { display:none; }
  .top-char-info { min-width:0; }
  .top-name { font-size:12px; }
  .top-exp { transform:none; width:100%; margin:8px 0 12px; }
  .top-stats { display:none; }
  .top-actions { grid-column:2; grid-row:1; display:flex; align-items:center; gap:3px; }
  .top-actions #top-account { display:none; }
  .layout { display:grid; grid-template-columns:1fr; grid-template-rows:auto minmax(0,1fr) auto; min-height:calc(100vh - 58px); }
  .sidenav { order:0; height:0; padding:0; display:flex; overflow:visible; gap:5px; border:0; }
  .sidenav:not(.mobile-nav-open) .nav-btn { display:none; }
  .sidenav.mobile-nav-open { position:fixed; top:58px; left:0; z-index:35; width:min(136px,52vw); height:auto; max-height:calc(100dvh - 82px); padding:38px 5px 10px; flex-direction:column; align-items:stretch; overflow-y:auto; overflow-x:hidden; background:rgba(13,16,24,.98); border-right:1px solid var(--line-2); box-shadow:12px 0 30px rgba(0,0,0,.45); }
  .mobile-nav-toggle { display:block; position:fixed; top:64px; left:8px; z-index:50; width:32px; height:25px; padding:0; border:1px solid var(--line-2); border-radius:6px; background:linear-gradient(180deg,#252c3b,#151a25); color:var(--orange-2); font-size:10px; font-weight:800; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.45); transition:transform .12s, background .12s; }
  .mobile-nav-toggle:active { transform:none; background:linear-gradient(180deg,#34291d,#1d1813); border-color:#8a6c3e; }
  .sidenav.mobile-nav-open .nav-btn { display:flex; flex:0 0 39px; width:100%; min-width:0; height:39px; gap:7px; justify-content:flex-start; padding:6px 7px; border-radius:6px; }
  .sidenav .nav-spacer { display:none; }
  .nav-btn { flex:0 0 48px; min-width:48px; height:42px; padding:3px; justify-content:center; border-radius:7px; }
  .nav-btn i { font-size:17px; }
  .nav-btn span { display:block; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .sidenav.mobile-nav-open { gap:4px; }
  .main { order:1; overflow:visible; padding:20px 10px 20px; min-width:0; position:relative; z-index:1; }
  .main { padding-bottom:calc(20px + env(safe-area-inset-bottom, 0px)); }
  .rightbar { order:2; max-height:none; border:0; border-top:1px solid var(--line); padding:8px 10px 18px; display:flex; flex-direction:column; gap:8px; overflow:visible; position:relative; z-index:1; }
  .rightbar .card { width:100%; min-width:0; flex:0 0 auto; }
  .rightbar.mobile-hunt-relocated { display:none; }
  .rightbar.mobile-panel-hidden { display:none !important; }
  .arena-wrap { width:100%; transform:none; display:flex; flex-direction:column; gap:10px; }
  .arena-wrap > .mapview { order:1; }
  .arena-wrap > .top-exp.exp-mobile-hunt { order:2; display:block; width:100%; box-sizing:border-box; margin:0; transform:none; }
  #top-exp:not(.exp-mobile-hunt) { display:none !important; }
  .arena-wrap > .mobile-battle-loot { order:3; display:block; width:100%; box-sizing:border-box; padding:10px; }
  .arena-wrap > .arena-side { order:4; width:100%; min-width:0; box-sizing:border-box; }
  .arena-side { transform:none; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .arena-side .minimap { display:none; }
  .arena-side { display:flex; flex-direction:column; gap:8px; }
  .arena-side > .card { width:100%; min-width:0; box-sizing:border-box; margin:0; }
  .arena-side .session-loot-box { margin-bottom:3px; }
  .arena-side .minimap { max-width:none; }
  .hunt-stats { grid-template-columns:1fr 1fr; }
  .hunt-selector-btn { width:100%; }
  .hunt-selector-btn { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .hunt-head .hunt-stop-slot:not([hidden]) { display:flex; position:relative; width:100%; height:24px; justify-content:center; margin:0 0 4px; }
  .hunt-head .hunt-stop-slot button { position:relative; top:-10px; transform:none; }
  .hunt-stop-slot .btn-danger { font-size:10px; padding:4px 10px; min-height:23px; }
  .hunt-controls { position:absolute; z-index:6; top:8px; left:8px; width:auto; max-width:calc(100% - 16px); align-items:flex-start; margin:0; gap:5px; }
  .hunt-controls .hunt-selector-btn { width:auto; max-width:100%; padding:5px 8px; font-size:11px; text-align:left; }
  .hunt-controls .battle-hunt-difficulty { align-self:stretch; padding:5px 8px; font-size:11px; line-height:normal; }
  .hunt-controls .battle-pip-button { display:none !important; }
  .hunt-controls .depot-open-button { display:none !important; }
  .hunt-controls .hunt-roster-badge:not([hidden]) { display:inline-flex !important; align-items:center; min-height:25px; padding:4px 7px; font-size:10px; }
  .modal-box:has(.hunt-player-modal) { width:min(480px,calc(100vw - 24px)); max-height:80dvh; padding:14px; }
  .hunt-player-modal { min-width:0; }
  .hunt-player-row { gap:7px; padding:6px; }
  .hunt-player-row-meta,.hunt-player-row-guild,.hunt-player-row-no-guild { font-size:10px; }
  .hunt-controls .btn { width:auto; min-height:23px; padding:4px 8px; font-size:10px; }
  .hunt-head > div { display:block; width:100%; }
  .hunt-head { flex-direction:column; align-items:center; justify-content:center; min-height:0; margin-bottom:6px; text-align:center; }
  .hunt-head .panel-title, .hunt-player-status { text-align:center; }
  .hunt-player-status { display:block; }
  .hunt-desktop-subtitle { display:none; }
  .hunt-player-identity { display:flex; align-items:baseline; justify-content:center; gap:5px; overflow:visible; white-space:normal; font-family:"Courier New", ui-monospace, monospace; font-size:14px; font-weight:700; letter-spacing:.2px; }
  .hunt-player-name { max-width:60vw; overflow:hidden; text-overflow:ellipsis; color:#edf2ff; }
  .hunt-player-guild-tag { color:#55aaff; flex:0 0 auto; }
  .hunt-player-level { position:relative; top:-3px; display:inline-flex; align-items:center; gap:4px; padding:3px 7px; border:1px solid rgba(242,193,78,.55); border-radius:4px; background:linear-gradient(180deg,rgba(242,193,78,.16),rgba(242,193,78,.06)); color:#fff; font-family:"Courier New", ui-monospace, monospace; font-size:12px; font-weight:800; letter-spacing:.35px; white-space:nowrap; }
  .hunt-player-level small { color:#f2c14e; font-size:8px; letter-spacing:.6px; }
  .hunt-player-currencies { justify-content:center; }
  .hunt-head .panel-title { display:none; }
  .mapview { max-height:none; min-height:0; }
  .mapview { display:block; width:100%; aspect-ratio:15 / 11; }
  .jutsu-bar { display:none !important; }
  .helper-rotation-hud { display:none !important; }
  .jutsu-bar, .mapview, .arena-side, .compact-inventory-card { touch-action:pan-y; }
  .zone-grid { grid-template-columns:1fr; }
  .compact-inventory-grid { grid-template-columns:repeat(5, minmax(0,1fr)); }
}
@media(max-width:480px) {
  .store-wallet-bar { padding:12px; }
  .store-wallet-icon { width:40px; height:40px; flex-basis:40px; }
  .store-wallet-copy strong { font-size:15px; }
  .store-wallet-value { font-size:17px; }
  .store-aura-grid, .store-color-grid { gap:7px; }
  .store-aura-card, .store-color-card { padding:9px; gap:7px; }
  .store-aura-preview { width:46px; height:46px; }
  .store-aura-details h4 { font-size:14px; }
  .store-aura-details p, .store-color-info p { font-size:12px; }
  #panel-store .nick-color-swatch { width:34px; height:34px; }
  .store-color-card { grid-template-columns:36px minmax(0,1fr); }
}

/* Depot: compactar as grades no celular sem alterar o inventário do desktop. */
@media (max-width: 800px) {
  .modal:has(.depot-modal) { padding:8px; box-sizing:border-box; }
  .modal-box:has(.depot-modal) {
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    width:calc(100vw - 8px);
    max-width:520px;
    max-height:88dvh;
    overflow:hidden;
    padding:8px;
  }
  .modal-box:has(.depot-modal) .modal-head { flex:0 0 auto; margin-bottom:8px; }
  .modal-box:has(.depot-modal) .modal-body { flex:1 1 auto; min-height:0; max-height:none; overflow:auto; overscroll-behavior:contain; }
  .depot-modal-info { padding:2px 3px 10px; font-size:13px; }
  .depot-modal-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; width:100%; box-sizing:border-box; gap:8px; padding:2px 3px 11px; }
  .depot-modal-actions .btn { flex:0 0 auto; width:auto; min-height:34px; margin-inline:auto; padding:6px 9px; font-size:12px; }
  .depot-modal-columns { grid-template-columns:minmax(0,1fr); gap:8px; padding-top:9px; }
  .depot-modal-column { padding:6px; }
  .depot-modal-column-title { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:7px; font-size:13px; }
  .depot-modal-column-title strong { min-width:0; }
  .depot-modal-column-title span { flex:0 0 auto; padding-left:5px; }
  .depot-modal-grid {
    display:grid;
    grid-auto-flow:row;
    height:auto !important;
    max-height:42dvh;
    grid-auto-rows:auto;
    gap:3px;
    overflow-y:auto;
    overflow-x:hidden;
    padding:2px 1px;
    scrollbar-gutter:auto;
  }
  .depot-modal-grid-inventory,
  .depot-modal-grid-storage { grid-template-columns:repeat(10,minmax(0,1fr)); grid-template-rows:none; }
  .depot-modal-slot {
    box-sizing:border-box;
    width:100%;
    height:auto;
    min-height:0;
    min-width:0;
    aspect-ratio:1;
    padding:2px;
    border-radius:4px;
  }
  .depot-modal-grid .depot-modal-slot { width:100%; height:auto; }
  .depot-modal-slot .icon-item,
  .depot-modal-slot .item-icon-animated { width:100%; height:100%; max-width:100%; max-height:100%; object-fit:contain; }
  .depot-modal-slot .count { right:1px; bottom:0; font-size:8px; }
}

/* =====================================================================
   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: min(300px, 78vw); max-height: 22vh; object-fit: contain; filter: none; }
.login-title { font-family: 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; -webkit-tap-highlight-color:transparent; user-select:none; -webkit-user-select:none; outline:none; }
.char-row:focus, .char-row:active { outline:none; -webkit-tap-highlight-color:transparent; }
.char-row:hover { border-color: var(--orange); transform: translateY(-1px); }
.char-row .cname { font-weight: 800; font-size: 15px; }
.char-row .char-guild-name { color:#55aaff; font-weight:800; }
.game-confirm { min-width:min(360px,calc(100vw - 56px)); padding:4px 2px 2px; }
.game-confirm-message { margin:4px 0 20px; color:var(--text-1); font-size:15px; line-height:1.55; }
.game-confirm-actions { display:flex; justify-content:flex-end; gap:9px; flex-wrap:wrap; }
@media(max-width:560px){.game-confirm{min-width:0}.game-confirm-actions{display:grid;grid-template-columns:1fr 1fr}.game-confirm-actions .btn{width:100%}}
.char-info { min-width:0; display:flex; flex-direction:column; gap:6px; }
.char-stats { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.char-hunt-row { min-width:0; }
.char-offline-row { min-width:0; color:var(--gold, #edc36e); font-size:11px; font-weight:700; line-height:1.3; }
.char-difficulty-row { align-items:center; }
.char-difficulty-change { min-height:30px; padding:3px 10px; font-size:13px; }
.character-difficulty-options { max-height:min(70vh,680px); }
.char-hunt-chip { white-space:normal; overflow-wrap:anywhere; }
.char-save-row { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:3px 10px; min-width:0; color:var(--muted); font-size:10px; line-height:1.35; }
.char-playtime { min-width:0; overflow-wrap:anywhere; }
.char-row .cactions { display: flex; gap: 6px; }
.chars-empty { padding: 30px; text-align: center; color: var(--muted); }
@media (max-width: 800px) {
  .chars-wrap { width:100%; min-width:0; padding:18px 10px 36px; }
  .chars-head { gap:8px; min-width:0; flex-wrap:wrap; }
  .chars-list { min-width:0; }
  .char-row { min-width:0; grid-template-columns:60px minmax(0,1fr); grid-template-rows:auto auto; gap:7px 9px; padding:9px; }
  .char-row > .sprite-box { grid-column:1; grid-row:1 / span 2; }
  .char-row > .char-info { grid-column:2; min-width:0; }
  .char-row .cname { min-width:0; overflow-wrap:anywhere; }
  .char-row .cmeta { min-width:0; gap:5px; }
  .char-row .char-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
  .char-row .char-stats .chip { min-width:0; justify-content:center; overflow:hidden; text-overflow:ellipsis; }
  .char-row .char-hunt-chip { display:inline-flex; width:fit-content; max-width:100%; justify-self:start; }
  .char-row .char-save-row { display:grid; grid-template-columns:minmax(0,auto) minmax(0,1fr); align-items:start; gap:3px 8px; }
  .char-row .cactions { grid-column:2; justify-content:flex-end; min-width:0; }
}

/* 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; }

/* Tema medieval aplicado apenas aos cartões laterais da batalha. */
.rightbar > .card:not(.grow) {
  --panel-bg: #211c18;
  --panel-edge: #66523a;
  background: linear-gradient(145deg, #29221b 0%, #1d1916 58%, #241e19 100%);
  border: 1px solid var(--panel-edge);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(190, 151, 94, .15), inset 0 1px 0 rgba(255, 225, 164, .08), 0 3px 9px rgba(0, 0, 0, .28);
  color: #d8c8ae;
}
.rightbar > .card:not(.grow) .card-title {
  color: #e7b84d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .45px;
  text-shadow: 0 1px 1px #000;
}
.rightbar > .card:not(.grow) .muted,
.rightbar > .card:not(.grow) .vital-label { color: #b6a58c; }
.rightbar > .card:not(.grow) .vital-grid { color: #d8c8ae; }
.rightbar > .card:not(.grow) .vital-grid b,
.rightbar > .card:not(.grow) #compact-inv-count { color: #f0cf83; }
#vitals-panel .vital-label { font-size:12px; }
#vitals-panel .vital-grid { font-size:13px; }
.rightbar > .card:not(.grow) .bar { border-color: #8c7656; box-shadow: inset 0 1px 3px #000, 0 0 0 1px rgba(0, 0, 0, .55); }
.rightbar > .card:not(.grow) .equip-slot,
.rightbar > .card:not(.grow) .inv-slot {
  background: linear-gradient(145deg, #171411, #211b16);
  border-color: #5c4c39;
  border-radius: 4px;
  box-shadow: inset 1px 1px 0 rgba(216, 186, 137, .13), inset -1px -1px 0 rgba(0, 0, 0, .8);
}
.rightbar > .card:not(.grow) .equip-slot.filled { background: linear-gradient(145deg, #29221b, #1c1814); }
.rightbar > .card:not(.grow) .slot-glyph { stroke: #796747; }
.rightbar > .card:not(.grow) .equip-slot small { color: #b49b72; }
.rightbar > .card:not(.grow) .compact-inventory-tabs { border-color: #51422f; }
.rightbar > .card:not(.grow) .compact-inventory-tabs .tab {
  color: #b9a98f;
  border-radius: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}
.rightbar > .card:not(.grow) .compact-inventory-tabs .tab.active {
  color: #f0c45f;
  background: linear-gradient(180deg, rgba(179, 130, 50, .2), rgba(93, 63, 25, .08));
  box-shadow: inset 0 -2px #bd9145;
}
.rightbar > .card:not(.grow) .toggle { color: #dccdb5; }
.rightbar > .card:not(.grow) .switch { background: #171411; border-color: #6d583a; }
.rightbar > .card:not(.grow) .toggle.on .switch { background: rgba(172, 119, 39, .42); border-color: #d39d3d; }
.rightbar > .card:not(.grow) .toggle.on .switch::after { background: #f0bb4f; }
.rightbar > .card:not(.grow) .compact-pouch-actions .btn {
  color: #e4d3b6;
  background: linear-gradient(180deg, #382f24, #29221b);
  border-color: #6b563a;
}
.rightbar > .card:not(.grow) .compact-pouch-actions .btn-primary {
  color: #21170a;
  background: linear-gradient(180deg, #f0c45f, #b9842e);
  border-color: #f2d17e;
}
.rightbar > .card:not(.grow) .compact-pouch-actions .compact-pouch-buy,
.rightbar > .card:not(.grow) .compact-pouch-actions .compact-pouch-sell { color:#fff; font-size:11px; }

/* Rework global: fantasia medieval escura e bronze, sem alterar layouts ou lógica. */
:root {
  --bg-0: #171310;
  --bg-1: #211c18;
  --bg-2: #2a231c;
  --bg-3: #352b21;
  --line: #554631;
  --line-2: #806746;
  --text: #f0e5d1;
  --text-2: #c7b79b;
  --muted: #9b896d;
  --orange: #c18b32;
  --orange-2: #efc45f;
  --gold: #f0c45f;
  --rare: #f6d477;
  --shadow: 0 12px 32px rgba(0, 0, 0, .58);
  --radius: 6px;
}
body {
  background: radial-gradient(1100px 650px at 50% -20%, #35281a 0%, #211a14 48%, var(--bg-0) 100%);
  color: var(--text);
}
::-webkit-scrollbar-thumb { background: #6c573a; border: 1px solid #8b7048; border-radius: 2px; }
input, select, textarea {
  background: linear-gradient(180deg, #171411, #201a15);
  border-color: #6a5537;
  border-radius: 4px;
  color: #f0e5d1;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .65), 0 1px rgba(230, 193, 126, .05);
}
input:focus, select:focus, textarea:focus { border-color: #d0a14c; box-shadow: 0 0 0 2px rgba(208, 161, 76, .14); }
.logo, .logo-big { text-shadow: 0 2px 0 #000, 0 0 18px rgba(215, 166, 75, .3); }
.logo span, .logo-big span, .login-title span { color: #e9b94f; }
.topbar {
  background: linear-gradient(180deg, #30261c, #1c1712);
  border-bottom: 1px solid #735a37;
  box-shadow: inset 0 -1px rgba(225, 185, 112, .12), 0 3px 12px rgba(0, 0, 0, .35);
}
.sidenav, .rightbar { background: linear-gradient(180deg, #241e18, #1a1612); }
.sidenav { border-right-color: #5d4a31; }
.rightbar { border-left-color: #5d4a31; }
.nav-btn {
  border-radius: 4px;
  color: #b9a88c;
}
.nav-btn:disabled { opacity:.42; filter:grayscale(.75); cursor:not-allowed; }
.nav-btn:disabled:hover { border-color:transparent; background:transparent; color:var(--text-2); }
.nav-btn:hover { background: linear-gradient(180deg, #382d20, #292118); color: #f1dfbd; border-color: #6c5637; }
.nav-btn.active {
  color: #f2ca69;
  background: linear-gradient(180deg, rgba(179, 130, 50, .24), rgba(93, 63, 25, .12));
  border-color: #98723b;
  box-shadow: inset 0 0 0 1px rgba(239, 196, 95, .1), 0 1px 4px rgba(0, 0, 0, .35);
}
.nav-btn em { background: #d3a246; color: #20170b; border-radius: 3px; }
.card {
  background: linear-gradient(145deg, #29221b 0%, #201a15 62%, #282119 100%);
  border: 1px solid #665238;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(190, 151, 94, .13), inset 0 1px 0 rgba(255, 225, 164, .07), 0 3px 9px rgba(0, 0, 0, .28);
}
.card-title {
  color: #e7b84d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: .5px;
  text-shadow: 0 1px 1px #000;
}
.panel-title { color: #f0d18a; font-family: Georgia, "Times New Roman", serif; }
.panel-sub, .muted { color: #ad9a7b; }
.btn {
  color: #e5d5b9;
  background: linear-gradient(180deg, #3a3024, #29221a);
  border-color: #715b3a;
  border-radius: 4px;
  box-shadow: inset 0 1px rgba(246, 220, 168, .07), 0 1px 2px rgba(0, 0, 0, .35);
}
.btn:hover { color: #fff0cf; background: linear-gradient(180deg, #4a3a28, #33281c); border-color: #aa8244; }
.btn-primary {
  color: #251b0d;
  background: linear-gradient(180deg, #f0c45f, #b9842e);
  border-color: #f1d184;
  text-shadow: 0 1px rgba(255, 236, 183, .3);
}
.btn-primary:hover { color: #1e160b; background: linear-gradient(180deg, #ffda7a, #d39c3c); border-color: #ffe19a; }
.btn-danger { color: #ffc3ad; background: linear-gradient(180deg, #54291e, #351b16); border-color: #89533a; }
.btn-ghost { color: #c8b89b; background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { color: #f0ca6b; background: rgba(185, 139, 65, .12); border-color: rgba(185, 139, 65, .32); }
.chip { border-radius: 4px; background: #31281e; border-color: #6c5738; color: #d9c6a4; }
.tabs { border-bottom-color: #5f4c32; }
.tab { color: #b7a586; }
.tab.active { color: #f2ca69; border-bottom-color: #d3a246; }
.filters .btn.active, .map-ctl .btn.active { color: #f2ca69; border-color: #c59847; background: rgba(179, 130, 50, .16); }
.zone-tier, .zone-card, .zone-monster-row, .hunt-selector-btn {
  border-color: #5d4a31;
  background-color: rgba(34, 27, 20, .88);
}
.zone-tier-toggle { color: #e9d8b7; }
.zone-tier-toggle:hover, .zone-tier-toggle:focus-visible { background: rgba(180, 132, 54, .1); }
.zone-card.active { border-color: #d0a14c; box-shadow: inset 0 0 0 1px rgba(239, 196, 95, .2), 0 0 10px rgba(175, 123, 37, .13); }
.zone-spots .spot { background: #201a15; border-color: #695438; color: #c8b795; }
.zone-spots .spot.on { background: rgba(179, 130, 50, .2); border-color: #c59847; color: #f2ca69; }
.equip-slot, .inv-slot, .shop-item .ibox, .jutsu-card .fxbox {
  background: linear-gradient(145deg, #171411, #211b16);
  border-color: #5c4c39;
  border-radius: 4px;
  box-shadow: inset 1px 1px 0 rgba(216, 186, 137, .13), inset -1px -1px 0 rgba(0, 0, 0, .8);
}
.equip-slot.filled { background: linear-gradient(145deg, #29221b, #1c1814); }
.slot-glyph { stroke: #796747; }
.login-bg { filter: sepia(.18) saturate(.72) brightness(.48); }
.login-bg::after { background: linear-gradient(180deg, rgba(22, 16, 10, .24), rgba(16, 12, 9, .93) 88%); }
.login-title { color: #f3ddb0; text-shadow: 0 2px 0 #000, 0 0 22px rgba(215, 166, 75, .32); }
.login-card, .chars-wrap > .card, .voc-detail {
  background: linear-gradient(145deg, rgba(43, 34, 25, .97), rgba(27, 22, 17, .98));
  border-color: #806746;
  box-shadow: inset 0 0 0 1px rgba(214, 174, 104, .14), 0 12px 32px rgba(0, 0, 0, .55);
}
.login-card .field, .create-footer .field { color: #d2c0a0; }
.remember { color: #c2b08f; }
.char-row, .voc-card {
  position: relative;
  isolation: isolate;
  background: linear-gradient(145deg, #30261b, #211a14);
  border-color: #6b5537;
  border-radius: 5px;
  box-shadow: inset 0 1px rgba(238, 204, 142, .06), 0 2px 6px rgba(0, 0, 0, .28);
}
.char-row:hover, .voc-card:hover { border-color: #bd914c; }
.char-row .cname, .voc-card .voc-name { color: #f0d18a; }
.voc-card.selected { border-color: #e0b44f; box-shadow: inset 0 0 0 1px rgba(240, 196, 95, .25), 0 0 14px rgba(202, 148, 55, .2); }
.char-row, .voc-card { border-color: transparent; border-radius: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .28); }
.char-row:hover, .voc-card:hover { border-color: transparent; }
.voc-card.selected { border-color: transparent; box-shadow: 0 0 14px rgba(202, 148, 55, .25); }
.char-row::after, .voc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 6px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 6px / 0 stretch;
  pointer-events: none;
}
.char-row:hover::after, .voc-card:hover::after { filter: brightness(1.15); }
.loading-box { position: relative; isolation: isolate; padding: 24px 22px; }
.loading-box::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 12px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 12px / 0 stretch;
  pointer-events: none;
}
.modal { background: rgba(10, 7, 4, .78); }
.modal-box, .tooltip {
  background: linear-gradient(145deg, #30261d, #1e1914);
  border: 1px solid #806746;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(214, 174, 104, .13), 0 16px 45px rgba(0, 0, 0, .68);
}
.modal-head { color: #f0cc73; font-family: Georgia, "Times New Roman", serif; }
.toast {
  color: #ecdfc8;
  background: linear-gradient(145deg, #30261d, #1e1914);
  border-color: #806746;
  border-radius: 5px;
}
.form-error { background: rgba(115, 39, 27, .35); border-color: #a3543a; color: #ffbba7; }
.login-foot { color: #b09c7b; }
.stat-pill { background: #2a2118; border-color: #695438; color: #dfc99f; border-radius: 4px; }
.top-portrait { background: #211a14; border-color: #705939; border-radius: 5px; }
.mobile-nav-toggle {
  color: #f0c45f;
  background: linear-gradient(180deg, #392d20, #211a14);
  border-color: #8a6c3e;
  border-radius: 4px;
}
@media (max-width: 800px) {
  .sidenav.mobile-nav-open {
    background: rgba(31, 24, 17, .98);
    border-right-color: #806746;
  }
}

/* Oxanium em toda a interface, incluindo a batalha. */
html, body, body * { font-family: "Oxanium", system-ui, sans-serif !important; }

/* Desktop: Analyzer/Loot à esquerda e batalha ocupando a coluna central. */
@media (min-width: 801px) {
  .arena-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    transform: none;
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
    align-items: start;
  }
  .arena-side { display: contents; transform: none; }
  .arena-side .minimap { display: none !important; }
  .arena-side .analyzer-card { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; }
  .arena-side .session-loot-box { grid-column: 1; grid-row: 2; width: 100%; min-width: 0; margin-top: 0; }
  .arena-wrap > .mapview {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 15 / 11;
    align-self: start;
  }
  .arena-wrap > .mobile-battle-loot { display: none; }
}

/* Layout final do desktop: navegação superior, visão à esquerda e arena ampla. */
@media (min-width: 801px) {
  .layout.hunt-overview-active {
    grid-template-columns: minmax(270px, 300px) minmax(0, 1fr) 320px;
    grid-template-rows: 68px minmax(0, 1fr);
  }
  .layout:not(.hunt-overview-active) {
    grid-template-columns: minmax(270px, 300px) minmax(0, 1fr) 320px;
    grid-template-rows: 68px minmax(0, 1fr);
  }
  .layout:not(.hunt-overview-active) .main { grid-column: 2; grid-row: 2; }
  .layout:not(.hunt-overview-active) .main { overflow-x: hidden; overflow-y: auto; }
  .layout:not(.hunt-overview-active) .rightbar { grid-column: 3; grid-row: 2; }
  .layout:not(.hunt-overview-active) #battle-overview { grid-column: 1; grid-row: 2; display: flex; }
  .layout.hunt-overview-active .sidenav,
  .layout:not(.hunt-overview-active) .sidenav { grid-column: 1 / -1; grid-row: 1; }
  .layout.hunt-overview-active #battle-overview { grid-column: 1; grid-row: 2; }
  .layout.hunt-overview-active .main { grid-column: 2; grid-row: 2; }
  .layout.hunt-overview-active .rightbar { grid-column: 3; grid-row: 2; }
  .layout.hunt-overview-active > #battle-overview > .exp-card { display:block; }
  .layout.hunt-overview-active > #battle-overview > .vitals { flex:0 0 auto; }
  .arena-wrap { width:100%; max-width:none; margin:0; transform:none; grid-template-columns:minmax(0,1fr); gap:0; }
  .arena-wrap > .arena-side { display:none; }
  .layout.hunt-overview-active .arena-wrap > .mapview { grid-column:1; grid-row:1; width:100%; max-width:none; height:85vh; margin:0; aspect-ratio:auto; min-height:0; max-height:none; }
  .jutsu-bar { align-items:center; }
}
@media (min-width: 801px) and (max-width: 1100px) {
  .layout.hunt-overview-active,
  .layout:not(.hunt-overview-active) { grid-template-columns:250px minmax(0,1fr) 270px; }
  .main { padding:10px; }
  .rightbar { padding:8px; }
  .sidenav .nav-btn { flex-basis:68px; width:68px; }
  .layout.hunt-overview-active .arena-wrap > .mapview { height:27vh; }
}
@media (min-width: 801px) {
  .layout.hunt-overview-active > #battle-overview > .exp-card { transform:none; }
  .layout > #battle-overview > .overview-auto-card { padding-bottom:11px; }
  .layout.hunt-overview-active .arena-wrap > .mapview { width:calc(100% + 4px); margin-left:-2px; }
  .sidenav { justify-content:center; }
  .sidenav .nav-spacer { display:none !important; }
  .jutsu-bar { display:none !important; }
  .hunt-head { min-height:0; margin:0; }
  .hunt-head > div { flex:0 0 auto; }
  .mapview > .hunt-selector-btn {
    position:absolute;
    z-index:5;
    top:10px;
    left:10px;
    width:auto;
    min-width:0;
    max-width:calc(100% - 20px);
    margin:0;
    padding:8px 13px;
    text-align:left;
    box-shadow:0 3px 10px rgba(0,0,0,.55);
  }
  .mapview-hud { left:auto; right:10px; top:10px; }
  .layout.hunt-overview-active .main { padding:6px 10px; }
  .layout.hunt-overview-active .arena-wrap { margin-top:2px; }
}

/* Seletor de hunts: faixas à esquerda e cards filtráveis, inspirado na referência. */
.modal-box:has(.hunt-browser) { width:min(1120px, 96vw); height:min(780px, 90vh); max-height:90vh; display:flex; flex-direction:column; overflow:hidden; }
.modal-box:has(.hunt-browser) .modal-head { flex:0 0 auto; padding:4px 2px 10px; border-bottom:1px solid #5d4a31; }
.modal-box:has(.hunt-browser) .modal-body { min-height:0; flex:1; overflow:hidden; }
.hunt-browser { height:100%; min-height:0; display:flex; flex-direction:column; gap:12px; }
.hunt-list-view { height:100%; min-height:0; display:flex; flex-direction:column; gap:12px; }
.hunt-list-view[hidden], .hunt-loot-view[hidden] { display:none!important; }
.hunt-browser-toolbar { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.hunt-search { min-width:0; flex:1; height:40px; padding:0 13px; border:1px solid #735a35; border-radius:6px; outline:none; background:#120f0c; color:#f0e6d3; }
.hunt-search:focus { border-color:#d1a449; box-shadow:0 0 0 2px rgba(209,164,73,.13); }
.hunt-filters { display:flex; gap:6px; }
.hunt-filter { min-width:56px; padding:8px 11px; border:1px solid #55432e; border-radius:6px; background:#211b15; color:#bbae99; cursor:pointer; }
.hunt-filter:hover, .hunt-filter.active { color:#f4d278; border-color:#bd914c; background:rgba(189,145,76,.13); }
.hunt-browser-body { min-height:0; flex:1; display:grid; grid-template-columns:178px minmax(0,1fr); gap:14px; }
.hunt-level-nav { min-height:0; display:flex; flex-direction:column; gap:5px; padding:2px 10px 2px 0; overflow-y:auto; border-right:1px solid #453725; }
.hunt-level-button { min-height:36px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 10px; border:1px solid transparent; border-radius:5px; background:transparent; color:#c7b99f; text-align:left; cursor:pointer; }
.hunt-level-button:hover, .hunt-level-button.active { color:#f4d278; border-color:#614c30; background:rgba(189,145,76,.12); }
.hunt-level-button small { color:#8e816d; }
.hunt-results { min-width:0; min-height:0; display:flex; flex-direction:column; gap:10px; }
.hunt-results-heading { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; color:#efcf81; }
.hunt-results-count { color:#9d907d; font-size:11px; }
.hunt-card-grid { min-height:0; flex:1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-content:start; gap:10px; padding:1px 6px 8px 1px; overflow:auto; scrollbar-width:thin; scrollbar-color:#80643c #17130f; }
.zone-card[hidden] { display:none!important; }
.zone-card { min-width:0; display:grid; grid-template-columns:48px minmax(0,1fr); align-items:start; gap:8px 10px; padding:12px; border:1px solid #56432c; border-radius:5px; background:linear-gradient(145deg,#262019,#1c1814); }
.zone-card:hover { transform:translateY(-1px); border-color:#94703d; }
.zone-card-portrait { width:48px; height:52px; display:grid; place-items:center; border:1px solid #493a27; border-radius:4px; background:#15120f; }
.zone-card-portrait .sprite-box { width:48px!important; height:48px!important; }
.zone-card-info { min-width:0; }
.zone-card-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:6px; }
.zone-card .zone-name { overflow:hidden; color:#f0e4cd; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.zone-card-title-row .danger { flex:0 0 auto; padding:0; background:none; color:#d8b45d; letter-spacing:1px; }
.zone-card .danger.d0 { color:#718d54; }
.zone-card-badges { display:flex; flex-wrap:wrap; gap:4px; margin:5px 0; }
.zone-card-badge { padding:2px 6px; border-radius:3px; background:#383027; color:#c6b79d; font-size:9px; font-weight:700; }
.zone-card-badge.exp { background:#393044; color:#c6a8e7; }
.zone-card-badge.loot { background:#493b20; color:#e0c677; }
.zone-card .zone-meta { color:#a89a83; font-size:10px; }
.zone-card .zone-mons { gap:1px; margin-top:6px; }
.zone-card-actions { display:flex; gap:6px; margin-top:8px; }
.zone-card-actions .btn { min-height:34px; padding:5px 10px; }
.zone-card-actions .hunt-card-start { flex:1; }
.hunt-card-loots { flex:0 0 auto; padding:5px 9px; border:1px solid #56432c; border-radius:4px; background:#191511; color:#c9b99c; cursor:pointer; }
.hunt-card-loots:hover { color:#f4d278; border-color:#b18846; }
.zone-rate-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:10px; }
.zone-rate { min-width:0; display:flex; flex-direction:column; gap:2px; padding:7px 8px; border:1px solid #443725; border-radius:4px; background:#15120f; }
.zone-rate span { color:#95866f; font-size:9px; letter-spacing:.4px; }
.zone-rate strong { overflow:hidden; color:#f1d07c; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.zone-rate.exp-rate strong { color:#c5a4ea; }
.zone-rate.gold-rate strong { color:#e7c469; }
.hunt-occupancy { margin-top:6px; color:#a99a80; font-size:10px; }
.hunt-empty { grid-column:1/-1; padding:32px 12px; color:#a89a83; text-align:center; }
.hunt-loot-view { min-height:0; display:flex; flex-direction:column; gap:10px; }
.hunt-loot-title { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; padding:0 2px 10px; border-bottom:1px solid #473a2b; }
.hunt-loot-title h2 { display:inline; margin:0 9px 0 0; color:#f0cc73; font-size:20px; }
.hunt-loot-title span { color:#a99a81; font-size:12px; }
.hunt-loot-grid { min-height:0; display:grid; grid-template-columns:repeat(2,minmax(260px,380px)); justify-content:center; align-content:start; align-items:start; gap:10px; overflow:auto; max-height:62vh; padding:1px 6px 8px 1px; scrollbar-width:thin; scrollbar-color:#80643c #17130f; }
.hunt-loot-monster { min-width:0; overflow:hidden; border:1px solid #4b3d2b; border-radius:5px; background:#17130f; }
.hunt-loot-monster-head { min-height:48px; display:flex; align-items:center; gap:8px; padding:7px 9px; border-bottom:1px solid #3b3023; background:linear-gradient(140deg,#272016,#1b1712); }
.hunt-loot-monster-head > .sprite-box { width:40px!important; height:40px!important; flex:0 0 40px; }
.hunt-loot-monster-head > div { min-width:0; display:flex; flex-direction:column; }
.hunt-loot-monster-head strong { overflow:hidden; color:#eee1ca; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.hunt-loot-monster-head span { color:#bd9b51; font-size:10px; }
.hunt-loot-rows { padding:4px 9px 7px; }
.hunt-loot-row { min-width:0; min-height:34px; display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:7px; border-bottom:1px solid rgba(122,101,72,.2); }
.hunt-loot-row:last-child { border-bottom:0; }
.hunt-loot-icon { width:22px; height:22px; object-fit:contain; image-rendering:pixelated; }
.hunt-loot-item-name { min-width:0; overflow:hidden; color:#d7cbb6; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.hunt-loot-amount, .hunt-loot-chance { color:#b6aa96; font-size:10px; white-space:nowrap; }
.hunt-loot-chance { display:none; }
.hunt-loot-note { padding:7px 2px; color:#bd9b51; font-size:10px; }
.hunt-loot-footer { flex:0 0 auto; display:flex; justify-content:flex-end; padding-top:9px; border-top:1px solid #473a2b; }
.hunt-loot-back { min-width:100px; }
.zone-card-info > .zone-card-actions { margin-top:10px; }
.zone-card .zone-meta { display:none; }
.modal-box:has(.hunt-browser.showing-loot) { width:min(980px, 94vw); height:auto; max-height:88vh; }
.modal-box:has(.hunt-browser.showing-loot) .modal-body { flex:0 1 auto; }
@media (max-width: 800px) {
  .modal-box:has(.hunt-browser) { width:96vw; height:min(86vh,760px); max-height:86vh; }
  .hunt-browser { gap:8px; }
  .hunt-browser-toolbar { align-items:stretch; flex-direction:column; gap:7px; }
  .hunt-filters { overflow-x:auto; }
  .hunt-filter { flex:1 0 auto; }
  .hunt-browser-body { grid-template-columns:1fr; grid-template-rows:auto minmax(0,1fr); gap:8px; }
  .hunt-level-nav { flex-direction:row; overflow-x:auto; overflow-y:hidden; padding:0 0 6px; border-right:0; border-bottom:1px solid #453725; }
  .hunt-level-button { flex:0 0 auto; min-width:80px; }
  .hunt-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hunt-list-view { gap:8px; }
  .hunt-loot-grid { grid-template-columns:minmax(0,380px); max-height:58vh; }
}
@media (max-width: 520px) {
  .hunt-card-grid { grid-template-columns:1fr; }
  .hunt-loot-grid { grid-template-columns:minmax(0,380px); width:100%; }
  .zone-card { padding:9px; }
  .hunt-loot-title h2 { font-size:16px; }
}

/* Mantém o resumo compacto e uniforme em todas as abas do desktop. */
@media (min-width: 801px) {
  .layout { min-height:0; overflow:hidden; }
  .layout.hunt-overview-active .rightbar,
  .layout:not(.hunt-overview-active) .rightbar { gap:5px; padding-top:6px; padding-bottom:6px; }
  .layout.hunt-overview-active #battle-overview,
  .layout:not(.hunt-overview-active) #battle-overview { gap:5px; padding-top:5px; padding-bottom:3px; }
}

@media (min-width: 801px) {
  .hunt-controls .depot-open-button { align-self:flex-start; min-width:132px; border-color:#c89b43; justify-content:flex-start; text-align:left; }
  .modal:has(.depot-modal) { backdrop-filter:none; }
  .modal-box:has(.depot-modal) { width:min(820px,92vw); max-height:84vh; overflow:hidden; }
  .modal-box:has(.depot-modal) .modal-head { padding-bottom:9px; border-bottom:1px solid #5d4a31; }
  .modal-box:has(.depot-modal) .modal-body { max-height:calc(84vh - 64px); overflow:auto; }
  .depot-modal-info, .depot-modal-column-title { display:flex; justify-content:space-between; align-items:center; gap:10px; }
  .depot-modal-info { color:#c8b99e; font-size:12px; padding:0 2px 12px; }
  .depot-modal-info b, .depot-modal-column-title span { color:#f0c25b; font-variant-numeric:tabular-nums; }
  .depot-modal-actions { display:flex; flex-wrap:wrap; gap:8px; padding-bottom:14px; border-bottom:1px solid #5d4a31; }
  .depot-modal-columns { display:grid; grid-template-columns:minmax(250px,.72fr) minmax(350px,1fr); gap:12px; padding-top:12px; }
  .depot-modal-column { min-width:0; padding:10px; border:1px solid #59452e; border-radius:7px; background:rgba(12,10,8,.48); }
  .depot-modal-column-title { color:#f0cc73; font-size:12px; margin-bottom:9px; }
  .depot-modal-grid { box-sizing:border-box; display:grid; grid-auto-rows:36px; gap:5px; max-height:420px; overflow:auto; padding:2px 4px 2px 2px; scrollbar-gutter:stable; }
  .depot-modal-grid-inventory { grid-template-columns:repeat(7,minmax(0,1fr)); grid-template-rows:repeat(9,minmax(0,1fr)); }
  .depot-modal-grid-storage { grid-template-columns:repeat(10,minmax(0,1fr)); }
  .depot-modal-slot { box-sizing:border-box; display:grid; place-items:center; width:100%; height:100%; min-width:0; margin:0; padding:2px; transition:none; }
  .depot-modal-slot:hover { transform:none; transition:none; }
  .depot-modal-empty { cursor:default; opacity:.38; pointer-events:none; box-shadow:none; }
  .depot-modal-slot .icon-item, .depot-modal-slot .item-icon-animated { max-width:100%; max-height:100%; }
  .depot-desktop-entry { display:grid; gap:8px; }
  .depot-desktop-entry .card-title, .depot-desktop-entry p { margin:0; }
}

/* Tema global inspirado no protótipo: bronze, carvão e molduras artesanais.
   Mantém o layout e os estados funcionais existentes; apenas repinta a interface. */
:root {
  --bg-0: #110f0d;
  --bg-1: #1b1713;
  --bg-2: #211c17;
  --bg-3: #29231c;
  --line: #40372c;
  --line-2: #5a4933;
  --text: #eee7dc;
  --text-2: #c6bcae;
  --muted: #968b7b;
  --orange: #d5aa51;
  --orange-2: #f0cb73;
  --gold: #f0cb73;
  --rare: #f4d889;
  --hp: #dc6b61;
  --mana: #72a9d8;
  --exp: #b69bec;
  --green: #7eb765;
  --red: #dc6b61;
  --shadow: 0 12px 32px rgba(0, 0, 0, .58);
}
body {
  background: radial-gradient(1100px 650px at 50% -20%, #292117 0%, #19140f 48%, var(--bg-0) 100%);
  color: var(--text);
}
input, select, textarea {
  background: linear-gradient(180deg, #15120f, #201a15);
  border-color: #5b4932;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: #d5aa51; }
.logo, .logo-big { text-shadow: 0 2px 0 #000, 0 0 18px rgba(213, 170, 81, .3); }
.logo span, .logo-big span, .login-title span { color: #e9b94f; }
.topbar {
  background: linear-gradient(180deg, #282117, #17130f);
  border-bottom-color: #685132;
  box-shadow: inset 0 -1px rgba(225, 185, 112, .12), 0 3px 12px rgba(0, 0, 0, .35);
}
.sidenav, .rightbar { background: linear-gradient(180deg, #211b15, #17130f); }
.sidenav { border-right-color: #59452d; }
.rightbar { border-left-color: #59452d; }
.nav-btn { color: #c6b58d; border-radius: 4px; }
.nav-btn:hover { background: linear-gradient(180deg, #382d20, #292118); color: #f1dfbd; border-color: #6c5637; }
.nav-btn.active {
  color: #f2ca69;
  background: linear-gradient(180deg, rgba(179, 130, 50, .24), rgba(93, 63, 25, .12));
  border-color: #98723b;
  box-shadow: inset 0 0 0 1px rgba(239, 196, 95, .1), 0 1px 4px rgba(0, 0, 0, .35);
}
.nav-btn em { background: #d3a246; color: #20170b; border-radius: 3px; }
.card {
  background: linear-gradient(145deg, #29221b 0%, #201a15 62%, #282119 100%);
  border-color: #665238;
  box-shadow: inset 0 0 0 1px rgba(190, 151, 94, .13), inset 0 1px 0 rgba(255, 225, 164, .07), 0 3px 9px rgba(0, 0, 0, .28);
}
.card-title { color: #e7b84d; text-shadow: 0 1px 1px #000; }
.panel-title { color: #f0d18a; }
.panel-sub, .muted { color: #ad9a7b; }
.btn {
  color: #e5d5b9;
  background: linear-gradient(180deg, #3a3024, #29221a);
  border-color: #715b3a;
  box-shadow: inset 0 1px rgba(246, 220, 168, .07), 0 1px 2px rgba(0, 0, 0, .35);
}
.btn:hover { color: #fff0cf; background: linear-gradient(180deg, #4a3a28, #33281c); border-color: #aa8244; }
.btn-primary {
  color: #251b0d;
  background: linear-gradient(180deg, #f0c45f, #b9842e);
  border-color: #f1d184;
  text-shadow: 0 1px rgba(255, 236, 183, .3);
}
.btn-primary:hover { color: #1e160b; background: linear-gradient(180deg, #ffda7a, #d39c3c); border-color: #ffe19a; }
.btn-danger { color: #ffc3ad; background: linear-gradient(180deg, #54291e, #351b16); border-color: #89533a; }
.btn-ghost { color: #c8b89b; }
.btn-ghost:hover { color: #f0ca6b; background: rgba(185, 139, 65, .12); border-color: rgba(185, 139, 65, .32); }
.chip { background: #31281e; border-color: #6c5738; color: #d9c6a4; }
.tabs { border-bottom-color: #5f4c32; }
.tab { color: #b7a586; }
.tab.active { color: #f2ca69; border-bottom-color: #d3a246; }
.filters .btn.active, .map-ctl .btn.active { color: #f2ca69; border-color: #c59847; background: rgba(179, 130, 50, .16); }
.zone-tier, .zone-card, .zone-monster-row, .hunt-selector-btn { border-color: #5d4a31; background-color: rgba(34, 27, 20, .88); }
.zone-tier-toggle { color: #e9d8b7; }
.zone-tier-toggle:hover, .zone-tier-toggle:focus-visible { background: rgba(180, 132, 54, .1); }
.zone-card.active { border-color: #d0a14c; box-shadow: inset 0 0 0 1px rgba(239, 196, 95, .2), 0 0 10px rgba(175, 123, 37, .13); }
.zone-spots .spot { background: #201a15; border-color: #695438; color: #c8b795; }
.zone-spots .spot.on { background: rgba(179, 130, 50, .2); border-color: #c59847; color: #f2ca69; }
.login-bg { filter: sepia(.18) saturate(.72) brightness(.48); }
.login-bg::after { background: linear-gradient(180deg, rgba(22, 16, 10, .24), rgba(16, 12, 9, .93) 88%); }
.login-title { color: #f3ddb0; text-shadow: 0 2px 0 #000, 0 0 22px rgba(215, 166, 75, .32); }
.login-card, .chars-wrap > .card, .voc-detail {
  background: linear-gradient(145deg, rgba(43, 34, 25, .97), rgba(27, 22, 17, .98));
  border-color: #806746;
  box-shadow: inset 0 0 0 1px rgba(214, 174, 104, .14), 0 12px 32px rgba(0, 0, 0, .55);
}
.login-card .field, .create-footer .field { color: #d2c0a0; }
.remember { color: #c2b08f; }
.char-row, .voc-card {
  background: linear-gradient(145deg, #30261b, #211a14);
  border-color: #6b5537;
  border-radius: 5px;
  box-shadow: inset 0 1px rgba(238, 204, 142, .06), 0 2px 6px rgba(0, 0, 0, .28);
}
.char-row:hover, .voc-card:hover { border-color: #bd914c; }
.char-row .cname, .voc-card .voc-name { color: #f0d18a; }
.voc-card.selected { border-color: #e0b44f; box-shadow: inset 0 0 0 1px rgba(240, 196, 95, .25), 0 0 14px rgba(202, 148, 55, .2); }
.modal { background: rgba(10, 7, 4, .78); }
.modal-box, .tooltip {
  background: linear-gradient(145deg, #30261d, #1e1914);
  border-color: #806746;
  box-shadow: inset 0 0 0 1px rgba(214, 174, 104, .13), 0 16px 45px rgba(0, 0, 0, .68);
}
.modal-head { color: #f0cc73; }
.modal-box:has(.pvp-entry-modal) { width:min(520px,92vw); max-height:min(84dvh,620px); padding:18px 20px; }
.pvp-entry-modal { display:grid; gap:16px; color:#e2d8c7; font-family:"Oxanium",sans-serif; }
.pvp-entry-intro { margin:0; color:#c8baa3; font-size:14px; line-height:1.55; }
.pvp-entry-count { display:grid; justify-items:center; gap:4px; padding:15px 12px; border:1px solid #59472f; background:linear-gradient(145deg,#191510,#211a13); text-align:center; }
.pvp-entry-count-label { color:#ad9a7b; font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.pvp-entry-count-value { color:#f0c45f; font-size:28px; line-height:1.15; }
.pvp-entry-count-status { color:#93836b; font-size:10px; }
.pvp-entry-rules { display:grid; gap:8px; margin:0; padding-left:20px; color:#c8baa3; font-size:12px; line-height:1.45; }
.pvp-entry-rules li::marker { color:#d3a246; }
.pvp-entry-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:12px; border-top:1px solid #4f402d; }
.pvp-entry-actions .btn { min-height:40px; }
.pvp-entry-confirm { min-width:175px; }
.toast { color: #ecdfc8; background: linear-gradient(145deg, #30261d, #1e1914); border-color: #806746; }
.form-error { background: rgba(115, 39, 27, .35); border-color: #a3543a; color: #ffbba7; }
.login-foot { color: #b09c7b; }
.stat-pill { background: #2a2118; border-color: #695438; color: #dfc99f; }
.top-portrait { background: #211a14; border-color: #705939; }
.mobile-nav-toggle { color: #f0c45f; background: linear-gradient(180deg, #392d20, #211a14); border-color: #8a6c3e; }

/* A moldura fica numa camada sem interação; não altera tamanho nem clique dos cartões. */
.login-card, .chars-wrap > .card, .voc-detail, .create-wrap, .rightbar > .card:not(.grow),
#battle-overview > .card, .main > .panel.active > .card, .modal-box {
  position: relative;
  isolation: isolate;
  border: 1px solid transparent;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .48);
}
.login-card::after, .chars-wrap > .card::after, .voc-detail::after,
.rightbar > .card:not(.grow)::after, #battle-overview > .card::after,
.main > .panel.active > .card::after, .modal-box::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 12px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 12px / 0 stretch;
  pointer-events: none;
}

/* Moldura dos slots normais: raridade e ícone continuam sendo renderizados pelo jogo. */
.equip-slot:not(.rare), .inv-slot:not(.rare):not(.equipable) {
  border: 4px solid transparent;
  border-image: url("../assets/ui/slot-frame.png") 6 / 4px / 0 stretch;
  border-radius: 0;
  background-color: #191714;
  background-image: none;
}
.equip-slot:not(.rare) {
  border: 1px solid #5c4c39;
  border-image: none;
  border-radius: 4px;
  background: linear-gradient(145deg, #171411, #211b16);
  box-shadow: inset 1px 1px 0 rgba(216, 186, 137, .13), inset -1px -1px 0 rgba(0, 0, 0, .8);
}
.equip-slot.rare, .equip-slot.rare-tank, .equip-slot.rare-dano, .equip-slot.rare-speed,
.inv-slot.rare, .inv-slot.equipable { border-radius: 4px; }

/* Moldura nos cartões aninhados das abas: atributos, magias, loja, bosses e graduações. */
#panel-char .two-col > .card, #panel-jutsus .jutsu-card, #panel-shop .shop-grid .card,
#panel-sagas .boss-card, #panel-rank .rank-card {
  position: relative;
  isolation: isolate;
  border: 1px solid transparent;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .42);
}
#panel-char .two-col > .card::after, #panel-jutsus .jutsu-card::after,
#panel-shop .shop-grid .card::after, #panel-sagas .boss-card::after,
#panel-rank .rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 12px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 12px / 0 stretch;
  pointer-events: none;
}

/* O Log conserva o cartão antigo, arredondado e sem a moldura nova. */
.main > #panel-log.active > .combat-log {
  border: 1px solid #665238;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(190, 151, 94, .13), 0 3px 9px rgba(0, 0, 0, .28);
}
.main > #panel-log.active > .combat-log::after { content: none; border: 0; }

/* Última camada intencional: remove o aro arredondado legado nas escolhas. */
#screen-chars .char-row, #screen-create .voc-card {
  border: 1px solid transparent;
  border-radius: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
}
#screen-chars .char-row:hover, #screen-create .voc-card:hover { border-color: transparent; }
#screen-create .voc-card.selected {
  border-color: transparent;
  box-shadow: 0 0 14px rgba(202, 148, 55, .25);
}

/* Seletor de hunts: cards estáticos, densidade e paleta da referência. */
.modal-box:has(.hunt-browser) .hunt-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr));
  align-content: start;
  gap: 12px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: auto;
}
.modal:has(.hunt-browser) { backdrop-filter: none; }
.modal-box:has(.hunt-browser),
.modal-box:has(.hunt-browser) * {
  scroll-behavior: auto !important;
  transition: none !important;
  animation: none !important;
}
.modal-box:has(.hunt-browser) .btn:active { transform: none !important; }
.modal-box:has(.hunt-browser) .zone-card,
.modal-box:has(.hunt-browser) .zone-card:hover,
.modal-box:has(.hunt-browser) .zone-card:focus,
.modal-box:has(.hunt-browser) .zone-card:active {
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  min-height: 208px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 5px;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  border: 8px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 8px / 0 stretch;
  border-radius: 0;
  background: #211b16;
  box-shadow: none;
}
.modal-box:has(.hunt-browser) .zone-card:hover {
  border-color: #80643c;
}
.modal-box:has(.hunt-browser) .zone-card.active {
  border-color: #d0a14c;
  box-shadow: inset 0 0 0 1px rgba(239,196,95,.18);
}
.modal-box:has(.hunt-browser) .zone-card-portrait {
  width: 100%;
  height: 54px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.modal-box:has(.hunt-browser) .zone-card-portrait .sprite-box {
  width: 56px !important;
  height: 52px !important;
}
.modal-box:has(.hunt-browser) .zone-card-info { flex: 1 1 auto; width: 100%; min-width: 0; }
.modal-box:has(.hunt-browser) .zone-card-actions {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  gap: 5px;
}
.modal-box:has(.hunt-browser) .zone-card-actions .hunt-card-start {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  padding-right: 5px;
  padding-left: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-box:has(.hunt-browser) .zone-card-actions .hunt-card-loots {
  box-sizing: border-box;
  flex: 0 0 auto;
  min-width: 52px;
}
.modal-box:has(.hunt-browser) .zone-card-badge.exp {
  background: #383027;
  color: #c6b79d;
}
.modal-box:has(.hunt-browser) .zone-rate.exp-rate strong,
.modal-box:has(.hunt-browser) .zone-rate.gold-rate strong {
  color: #e7c469;
}
.modal-box:has(.hunt-browser) .hunt-card-start,
.modal-box:has(.hunt-browser) .hunt-card-loots {
  transition: none !important;
  animation: none !important;
}

/* Acabamento final dos cards de hunt e das molduras dentro da batalha. */
.modal-box:has(.hunt-browser) .zone-card,
.modal-box:has(.hunt-browser) .zone-card:hover,
.modal-box:has(.hunt-browser) .zone-card:focus,
.modal-box:has(.hunt-browser) .zone-card:active {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: stretch;
  gap: 3px;
  min-height: 248px;
  padding: 5px;
  transform: none !important;
  filter: none !important;
}
.modal-box:has(.hunt-browser) .zone-card-title-row {
  order: 0;
  display: block;
  min-width: 0;
  text-align: left;
}
.modal-box:has(.hunt-browser) .zone-card .zone-name {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
  text-align: left;
}
.modal-box:has(.hunt-browser) .zone-card-portrait {
  order: 1;
  height: 58px;
  justify-content: center;
}
.modal-box:has(.hunt-browser) .zone-card-completed {
  display: block;
  width: 100%;
  color: #72c96a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 16px;
  text-align: center;
}
.modal-box:has(.hunt-browser) .zone-card-danger {
  order: 2;
  display: block;
  justify-self: center;
  width: max-content;
  padding: 0;
  background: transparent;
  font-size: 11px;
  letter-spacing: 2px;
  line-height: 1.2;
  text-align: center;
}
.modal-box:has(.hunt-browser) .zone-card-info {
  order: 3;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.modal-box:has(.hunt-browser) .zone-card-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}
.modal-box:has(.hunt-browser) .zone-card-actions .hunt-card-start {
  flex: 1 1 0;
}

.mapview > .hunt-selector-btn {
  box-sizing: border-box;
  border: 7px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch;
  border-radius: 0;
  padding: 5px 9px;
  box-shadow: none;
}
.battle-chat-toggle {
  box-sizing: border-box;
  border: 7px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch;
  border-radius: 0;
  padding: 4px 9px;
  box-shadow: none;
}
.battle-chat-window {
  border: 9px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 9px / 0 stretch;
  border-radius: 0;
}
.battle-chat-tabs button,
.battle-chat-tabs button:hover,
.battle-chat-tabs button.active {
  box-sizing: border-box;
  min-height: 30px;
  border: 5px solid transparent;
  border-image: url("../assets/ui/panel-frame.png") 12 / 5px / 0 stretch;
  border-radius: 0;
  padding: 3px 2px;
  background-color: #211a13;
  transition: none !important;
  animation: none !important;
}
.battle-chat-tabs button:hover { color: #f0d38e; }
.battle-chat-tabs button.active { color: #f4c95c; background-color: #302519; }

/* Layout estável para leitura e rolagem dos cards de hunt. */
.modal-box:has(.hunt-browser) .zone-card,
.modal-box:has(.hunt-browser) .zone-card:hover,
.modal-box:has(.hunt-browser) .zone-card:focus,
.modal-box:has(.hunt-browser) .zone-card:active {
  box-sizing: border-box;
  height: auto;
  min-height: 320px;
  overflow: visible;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  filter: none !important;
  box-shadow: none !important;
}
.modal-box:has(.hunt-browser) .zone-card-title-row .zone-name { font-size: 15px; }
.modal-box:has(.hunt-browser) .zone-card-badge { font-size: 11px; }
.modal-box:has(.hunt-browser) .zone-card-danger { font-size: 13px; }
.modal-box:has(.hunt-browser) .zone-rate span { font-size: 11px; }
.modal-box:has(.hunt-browser) .zone-rate strong { font-size: 15px; }
.modal-box:has(.hunt-browser) .hunt-occupancy { font-size: 12px; }
.modal-box:has(.hunt-browser) .zone-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(68px, auto);
  align-items: stretch;
  gap: 6px;
}
.modal-box:has(.hunt-browser) .zone-card-actions > .zone-card-completed {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}
.modal-box:has(.hunt-browser) .zone-card-actions .hunt-card-loots {
  align-self: end;
}
.modal-box:has(.hunt-browser) .zone-card-actions .hunt-card-start,
.modal-box:has(.hunt-browser) .zone-card-actions .hunt-card-loots {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 5px 6px;
  overflow: visible;
  font-size: 14px;
  line-height: 1.15;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}
.modal-box:has(.hunt-browser) .zone-card:hover { border-color: transparent; }

/* Página inicial de Hunts: conteúdo útil primeiro; cards pesados só após escolher. */
.hunt-home-state { overflow:hidden; }
.hunt-home { min-height:0; height:100%; overflow:auto; display:flex; flex-direction:column; gap:16px; padding:8px 10px 12px; scrollbar-width:thin; scrollbar-color:#80643c #17130f; }
.hunt-home[hidden] { display:none!important; }
.hunt-browser.hunt-home-state.showing-home { position:relative; background:url("../assets/ui/login-bg-ninja-v2.jpg") center/cover no-repeat; }
.hunt-browser.hunt-home-state.showing-home::before { content:""; position:absolute; inset:0; z-index:0; background:linear-gradient(180deg,rgba(18,13,9,.74),rgba(18,13,9,.9)); pointer-events:none; }
.hunt-browser.hunt-home-state.showing-home > .hunt-home { position:relative; z-index:1; }
.hunt-home-hero { position:relative; overflow:hidden; padding:24px 26px; border:1px solid #725531; background:linear-gradient(115deg,#33271a 0%,#241c15 58%,#1c1712 100%); }
.hunt-home-hero::after { content:""; position:absolute; width:190px; height:190px; right:7%; top:-95px; border:1px solid rgba(208,161,76,.16); border-radius:50%; box-shadow:0 0 0 22px rgba(208,161,76,.035),0 0 0 44px rgba(208,161,76,.025); pointer-events:none; }
.hunt-home-kicker { color:#c8a04d; font-size:14px; font-weight:800; letter-spacing:2px; }
.hunt-home-hero h2 { margin:8px 0 7px; color:#f1d18a; font-size:30px; }
.hunt-home-hero p { max-width:700px; margin:0 0 18px; color:#c5b69c; font-size:17px; line-height:1.55; }
.hunt-home-open { min-width:190px; min-height:46px; font-size:16px; }
.hunt-home-mobile-open { display:none; }
.hunt-difficulty-options { display:grid; grid-template-columns:1fr; align-content:start; gap:16px; max-height:min(70vh,680px); overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; scroll-behavior:auto; scrollbar-width:thin; scrollbar-color:#80643c #17130f; padding:4px 8px 28px 4px; }
.hunt-difficulty-options[hidden] { display:none!important; }
.hunt-difficulty-group { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-content:start; align-items:stretch; gap:12px; }
.hunt-difficulty-group:first-child { width:min(100%,960px); grid-template-columns:repeat(3,minmax(0,1fr)); margin-inline:auto; }
.hunt-difficulty-group h3 { grid-column:1/-1; margin:4px 0 2px; color:#c9a65b; font-size:18px; letter-spacing:.5px; }
.hunt-difficulty-group:not(:first-child) h3 { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:6px 18px; text-align:center; }
.hunt-death-penalty { flex:1 1 100%; color:#fff; font-size:14px; font-weight:500; letter-spacing:0; line-height:1.45; text-align:center; }
.hunt-death-penalty-vip { margin-top:2px; }
.hunt-difficulty-option { display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start; gap:10px; min-width:0; min-height:150px; height:auto; padding:15px 17px; border:1px solid #59442a; border-radius:4px; color:#eadcc5; text-align:left; white-space:normal; overflow-wrap:anywhere; background:#211a13; cursor:pointer; box-shadow:none; transition:none!important; transform:none!important; filter:none!important; }
.hunt-difficulty-option:hover, .hunt-difficulty-option:focus, .hunt-difficulty-option:active { border-color:#59442a; background:#211a13; box-shadow:none!important; transform:none!important; filter:none!important; }
.hunt-difficulty-option .hunt-difficulty-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.hunt-difficulty-option strong { color:#f0cf79; font-size:19px; line-height:1.35; }
.hunt-difficulty-selected { flex:0 0 auto; color:#9bdd78!important; font-size:14px!important; font-weight:700; }
.hunt-difficulty-option > span { color:#c5b79f; font-size:16px; line-height:1.5; }
.hunt-difficulty-details { display:grid; gap:4px; width:100%; }
.hunt-difficulty-stat { display:grid; grid-template-columns:minmax(0,1fr); justify-items:stretch; gap:2px; min-width:0; padding-bottom:5px; border-bottom:1px solid rgba(173,146,106,.16); color:#d2c4ac; font-size:16px; line-height:1.45; }
.hunt-difficulty-stat span { min-width:0; overflow-wrap:anywhere; }
.hunt-difficulty-stat strong { justify-self:end; color:#f0cf79; font-size:17px; line-height:1.35; white-space:nowrap; }
.hunt-difficulty-note { color:#c5b79f; font-size:14px; line-height:1.45; }
.hunt-difficulty-option.selected { border-color:#c79b4e; background:#302516; }
.hunt-difficulty-lock-note { color:#d29a78!important; }
.hunt-difficulty-option:disabled { opacity:.48; cursor:not-allowed; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:not(:first-child) .hunt-difficulty-option { text-align:center; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:not(:first-child) .hunt-difficulty-heading { flex-direction:column; justify-content:center; min-height:0; gap:3px; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:not(:first-child) .hunt-difficulty-stat { justify-items:center; text-align:center; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:not(:first-child) .hunt-difficulty-stat strong { justify-self:center; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:not(:first-child) .hunt-difficulty-note { text-align:center; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:not(:first-child) .hunt-difficulty-note { white-space:nowrap; font-size:13px; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-option { text-align:center; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child h3 { text-align:center; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-heading { flex-direction:column; justify-content:center; min-height:0; gap:3px; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-stat { justify-items:center; text-align:center; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-stat strong { justify-self:center; }
#modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-note { text-align:center; }
#modal:has(.character-difficulty-options) { backdrop-filter:none; -webkit-backdrop-filter:none; }
#modal:has(.character-difficulty-options) .modal-box { display:flex; flex-direction:column; width:min(1200px,96vw); height:min(90vh,960px); max-height:90vh; overflow:hidden; background:#211a13; box-shadow:none; }
#modal:has(.character-difficulty-options) .modal-box::after { display:none; }
#modal:has(.character-difficulty-options) .modal-head { flex:0 0 auto; font-size:20px; }
#modal:has(.character-difficulty-options) .modal-body { flex:1 1 auto; min-height:0; overflow:hidden; }
#modal:has(.character-difficulty-options) .character-difficulty-options { height:100%; max-height:none; contain:layout paint style; }
#modal:has(.character-difficulty-options) .modal-body,
#modal:has(.character-difficulty-options) .modal-body * { animation:none!important; transition:none!important; filter:none!important; }
#modal:has(.character-difficulty-options) .modal-body .hunt-difficulty-option,
#modal:has(.character-difficulty-options) .modal-body .hunt-difficulty-stat { box-shadow:none!important; }
.hunt-home-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.hunt-home-card { min-width:0; padding:14px; border:1px solid #51402a; background:linear-gradient(145deg,#292219,#1c1813); }
.hunt-home-card > span { display:block; color:#c5a35b; font-size:14px; font-weight:800; letter-spacing:.7px; }
.hunt-home-card > strong { display:block; margin:7px 0; color:#f0d18a; font:700 25px "Oxanium",sans-serif; }
.hunt-home-card p { margin:0; color:#b5a78e; font-size:15px; line-height:1.55; }
.hunt-home-tips { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 14px; padding:13px 15px; border:1px solid #403323; background:#1b1712; }
.hunt-home-tips h3 { grid-column:1/-1; margin:0 0 2px; color:#e6c779; font-size:19px; }
.hunt-home-tips > div { display:flex; flex-direction:column; gap:4px; }
.hunt-home-tips strong { color:#dfd0b7; font-size:15px; }
.hunt-home-tips span { color:#a99b84; font-size:14px; line-height:1.5; }
@media (max-width:800px) {
  .hunt-home { gap:10px; padding:4px; }
  .hunt-difficulty-group { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hunt-difficulty-group:first-child { width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hunt-difficulty-option { min-height:230px; padding:12px; }
  .hunt-home-hero { display:flex; flex-direction:column; align-items:stretch; padding:14px; text-align:center; }
  .hunt-home-kicker { order:0; display:block; width:100%; text-align:center; transform:translateY(-8px); }
  .hunt-home-hero h2 { order:1; font-size:25px; text-align:center; }
  .hunt-home-open { display:flex; align-items:center; justify-content:center; box-sizing:border-box; width:100%; min-width:0; min-height:46px; margin:0 0 4px; font-size:16px; position:relative; z-index:2; flex:0 0 auto; visibility:visible; }
  .hunt-home-open { order:4; }
  .hunt-home-hero p { order:3; margin-bottom:0; text-align:center; }
  .hunt-home-hero p { font-size:16px; }
  .hunt-home-kicker, .hunt-home-card > span { font-size:13px; }
  .hunt-home-card p { font-size:15px; }
  .hunt-home-tips strong { font-size:15px; }
  .hunt-home-tips span { font-size:14px; }
  .hunt-home-cards { grid-template-columns:1fr; }
  .hunt-home-card { padding:11px 13px; }
  .hunt-home-tips { grid-template-columns:1fr; }
  .hunt-home-tips h3 { grid-column:auto; }
}

/* Hunts no mobile: grupos ficam na lateral, e offline/dicas ficam centralizados. */
.hunt-level-nav-title { display:block; padding:7px 4px 9px; border-bottom:1px solid #59472f; color:#c9a65b; font-size:11px; line-height:1.25; text-align:center; }
.hunt-results-kicker { display:block; flex:0 0 auto; color:#c9a65b; font-size:11px; letter-spacing:.08em; }
@media (max-width:800px) {
  .hunt-home-card.hunt-home-available + .hunt-home-card { text-align:center; }
  .hunt-home-card.hunt-home-available + .hunt-home-card > strong { text-align:center; }
  .hunt-home-tips { text-align:center; }
  .hunt-home-tips > div { align-items:center; }
  .hunt-browser-toolbar { flex-direction:row; }
  .hunt-browser-body { grid-template-columns:minmax(96px,30%) minmax(0,1fr); grid-template-rows:minmax(0,1fr); gap:8px; }
  .hunt-level-nav { display:flex; flex-direction:column; align-items:stretch; min-width:0; overflow-x:hidden; overflow-y:auto; padding:0 5px 6px 0; border-right:1px solid #453725; border-bottom:0; }
  .hunt-level-nav-title { position:sticky; top:0; z-index:1; background:#211a13; text-align:center; font-size:10px; }
  .hunt-level-button { flex:0 0 auto; width:100%; min-width:0; min-height:35px; gap:3px; padding:5px 4px; font-size:11px; }
  .hunt-level-button span { min-width:0; overflow-wrap:anywhere; }
  .hunt-level-button small { flex:0 0 auto; font-size:10px; }
  .hunt-results { min-width:0; }
  .hunt-results-kicker { padding:2px 2px 0; text-align:center; }
  .hunt-results-heading { gap:5px; flex-wrap:wrap; font-size:12px; }
  .hunt-results-count { font-size:10px; }
  .hunt-card-grid { grid-template-columns:minmax(0,1fr); padding:0 2px 6px 0; }
}
@media (max-width:560px) {
  .hunt-difficulty-group { grid-template-columns:1fr; }
  .hunt-difficulty-group:not(:first-child) h3 { flex-direction:column; gap:5px; text-align:center; }
  .hunt-death-penalty { font-size:13px; }
  #modal:has(.character-difficulty-options) .modal-box { width:calc(100vw - 20px); height:88dvh; max-height:88dvh; }
  #modal:has(.character-difficulty-options) .character-difficulty-options { min-height:0; padding:4px 5px 16px 2px; }
  .hunt-difficulty-group { grid-template-columns:1fr; }
  .hunt-difficulty-option { min-height:0; height:auto; padding:13px; }
  .hunt-difficulty-option strong { font-size:18px; }
  .hunt-difficulty-stat { font-size:16px; }
}

/* Menu superior: ícones transparentes otimizados e rótulos legíveis. */
.sidenav .nav-btn i img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
  vertical-align: initial;
}
.sidenav .nav-btn i {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 25px;
  font-size: 0;
  line-height: 1;
}
.sidenav .nav-btn span,
.sidenav .nav-btn i { transform: none; }
.sidenav .nav-btn.pvp-arena-nav span,
.sidenav .nav-btn[data-panel="inventory"] span { transform: none; }
@media (min-width: 801px) {
  .sidenav .nav-btn { gap: 1px; }
  .sidenav .nav-btn[data-panel="char"] { flex-basis: 84px; width: 84px; }
  .sidenav .nav-btn span {
    display: block;
    font-size: 12px;
    line-height: 1.05;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }
  .sidenav .nav-btn[data-panel="char"] span { white-space: nowrap; }
}

/* Identidade aprovada do cabeçalho e acabamento das barras de status. */
.topbar .logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: start;
  gap: 2px;
  width: max-content;
  min-width: 0;
}
.topbar .logo img {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.logo-online-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 14px;
  color: #b9ad96;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px #000;
}
.logo-online-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #73dc91;
  box-shadow: 0 0 6px #55df7b99;
}
.logo-online-count strong {
  color: #f3cf7b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.top-currency-stats {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-5px);
}
.top-currency-stats .stat-pill {
  position: relative;
  isolation: isolate;
  z-index: 1;
  background: transparent;
  border-color: transparent;
  border-radius: 0;
}
.top-currency-stats .stat-pill::before {
  content: "";
  position: absolute;
  inset: -4px -2px;
  z-index: -1;
  background-image: url("../assets/ui/approved-skin/currency-frame.png");
  background-size: 210% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}
.top-currency-stats .stat-pill.gold {
  min-width: 132px;
  justify-content: center;
  white-space: nowrap;
}
.top-currency-stats .stat-pill.gold::before { background-position: left center; }
.top-currency-stats .stat-pill.elo {
  min-width: 72px;
  justify-content: center;
  text-align: center;
}
.top-currency-stats .stat-pill.elo::before { background-position: right center; }
.top-currency-stats .stat-pill.elo > * { left: -1px; }
.top-currency-stats .stat-pill > * { position: relative; z-index: 1; }
.vitals .bar.bar-hp,
.vitals .bar.bar-mana,
.top-exp .bar.bar-exp {
  position: relative;
  box-sizing: border-box;
  height: 18px;
  transform: translateY(-3px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.vitals .bar.bar-hp > div,
.vitals .bar.bar-mana > div,
.top-exp .bar.bar-exp > div {
  position: absolute;
  z-index: 1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  height: auto;
  border-radius: 1px;
}
.vitals .bar.bar-hp::after,
.vitals .bar.bar-mana::after,
.top-exp .bar.bar-exp::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}
.vitals .bar.bar-hp::after { left: 0; right: -3px; background-image: url("../assets/ui/approved-skin/hp-frame.png"); }
.vitals .bar.bar-mana::after { background-image: url("../assets/ui/approved-skin/chakra-frame.png"); }
.vitals .bar.bar-mana { overflow: visible; }
.vitals .bar.bar-mana > div { clip-path: inset(0 4px 0 0); }
.vitals .bar.bar-mana::after { left: -5px; right: -9px; }
.top-exp .bar.bar-exp::after { background-image: url("../assets/ui/approved-skin/exp-frame.png"); }
.top-actions .btn {
  position: relative;
  top: -1px;
  border: 7px solid transparent;
  border-image-source: url("../assets/ui/approved-skin/button-frame.png");
  border-image-slice: 115 fill;
  border-image-width: 7px;
  border-image-repeat: stretch;
  border-radius: 0;
  box-shadow: none;
  border-bottom-width: 5px;
  border-image-width: 7px 7px 5px;
}
.top-actions .btn:hover {
  border-image-source: url("../assets/ui/approved-skin/button-frame.png");
  filter: brightness(1.12);
}
#btn-refresh { display:inline-grid; place-items:center; width:34px; min-width:34px; height:34px; padding:2px !important; }
#btn-refresh svg { display:block; width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#btn-refresh[aria-busy="true"] svg { animation:refresh-button-spin .7s linear infinite; }
@keyframes refresh-button-spin { to { transform:rotate(360deg); } }
@media (max-width: 800px) {
  .topbar .logo img { width: 112px; }
  .top-actions .btn { border-width: 6px; border-bottom-width: 4px; border-image-width: 6px 6px 4px; border-image-slice: 100 fill; }
  .top-actions #btn-fullscreen { display:inline-flex !important; min-height:34px; padding:2px 5px; font-size:10px; white-space:nowrap; }
}

/* Um único visual para botões de ação: o mesmo acabamento da Loot Pouch. */
.btn, .btn-primary, .btn-danger,
.rightbar > .card:not(.grow) .compact-pouch-actions .btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #382f24, #29221b);
  border-color: #6b563a;
  text-shadow: none;
}
.btn:hover, .btn-primary:hover, .btn-danger:hover {
  color: #fff;
  background: linear-gradient(180deg, #4a3a28, #33281c);
  border-color: #aa8244;
}
.hunt-controls .hunt-selector-btn,
.hunt-controls .hunt-selector-btn:hover {
  border: 1px solid #6b563a;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(180deg, #382f24, #29221b);
}
.hunt-controls .depot-open-button { border-color: #6b563a; }

/* Chat mais largo, com tipografia legível e HUD de jogadores no tema dos botões. */
.battle-chat-window {
  width: min(410px, calc(100% - 24px));
}
.battle-chat-header > strong { font-size: 16px; }
.battle-chat-tabs button { font-size: 12px; }
.battle-chat-empty { font-size: 13px; }
.battle-chat-message-head strong { font-size: 13px; }
.battle-chat-message time { font-size: 12px; }
.battle-chat-message-body { font-size: 13px; }
.battle-chat-composer input { font-size: 13px; }
.battle-chat-send { font-size: 13px; }
.hunt-roster-badge, .hunt-roster-badge.occupied {
  padding: 5px 9px;
  border: 1px solid #6b563a;
  border-radius: 4px;
  background: linear-gradient(180deg, #382f24, #29221b);
  color: #fff;
  font: 600 12px "Oxanium", sans-serif;
  box-shadow: inset 0 1px rgba(246,220,168,.07), 0 1px 2px rgba(0,0,0,.35);
}
#modal .hunt-player-modal-note { font-size:15px; line-height:1.5; }
#modal .hunt-player-row { grid-template-columns:48px minmax(0,1fr); gap:12px; padding:10px; }
#modal .hunt-player-row-name { font-size:17px; line-height:1.35; }
#modal .hunt-player-row-meta,
#modal .hunt-player-row-guild,
#modal .hunt-player-row-no-guild { font-size:14px; line-height:1.4; }
#modal .hunt-player-row .sprite-box { width:48px; height:48px; }
@media (max-width:800px) {
  #modal .hunt-player-row-name { font-size:16px; }
  #modal .hunt-player-row-meta,
  #modal .hunt-player-row-guild,
  #modal .hunt-player-row-no-guild { font-size:13px; }
}

/* Seletor de personagem: mantém o visual parado ao passar o mouse. */
#screen-chars .char-row,
#screen-chars .char-row:hover {
  cursor:default !important;
  transform: none !important;
  transition: none !important;
  box-shadow:none !important;
}
#screen-chars, #screen-chars * { cursor:default !important; }
#screen-chars .char-row:hover { border-color: transparent !important; }
#screen-chars .char-row::after,
#screen-chars .char-row:hover::after {
  display:none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}
#screen-chars .btn,
#screen-chars .btn:hover {
  transform: none !important;
  filter: none !important;
  transition: none !important;
}
#screen-chars .btn:hover {
  color: #fff;
  background: linear-gradient(180deg, #382f24, #29221b);
  border-color: #6b563a;
}
#screen-chars .btn-ghost:hover {
  color: #c8b89b;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
#screen-chars .login-bg { filter:none !important; }
#screen-chars .login-bg::after { background:linear-gradient(180deg,rgba(22,16,10,.42),rgba(16,12,9,.82) 88%); }

/* A tela de carregamento reaproveita o fundo da Vila da Folha, sem filtros caros. */
#screen-loading { position:fixed; isolation:isolate; background:url("../assets/ui/login-bg.jpg") center/cover no-repeat; }
#screen-loading::before { content:""; position:absolute; inset:0; z-index:0; background:linear-gradient(180deg,rgba(13,10,8,.52),rgba(13,10,8,.82)); pointer-events:none; }
#screen-loading .loading-box { z-index:1; }

/* Carregamento compacto por cima da batalha durante a entrada do personagem. */
#screen-loading.entry-loading {
  z-index:10000;
  background:url("../assets/ui/login-bg.jpg") center/cover no-repeat;
}
#screen-loading.entry-loading .loading-box {
  box-sizing:border-box;
  width:min(320px,calc(100vw - 32px));
  padding:16px 20px;
  border:1px solid #715b3a;
  border-radius:6px;
  background:linear-gradient(145deg,#29221b,#1d1916);
}
#screen-loading.entry-loading .logo-big { font-size:24px; }
#screen-loading.entry-loading .loading-bar { margin:12px 0 8px; }
#screen-loading.entry-loading #loading-text { font-size:12px; }

/* Menus de item e tooltips sem sombras/efeitos caros. */
.item-icon-static { display:block; background-repeat:no-repeat; image-rendering:pixelated; }
.tooltip { box-shadow: inset 0 0 0 1px rgba(214,174,104,.12); }
.inv-slot,
.equip-slot,
.compact-pouch-buy,
.compact-pouch-sell,
.loot-pouch-buy,
.loot-pouch-sell,
.mobile-battle-sell { cursor:default !important; }
.compact-pouch-buy,
.compact-pouch-sell,
.loot-pouch-buy,
.loot-pouch-sell,
.mobile-battle-sell,
.compact-pouch-buy:hover,
.compact-pouch-sell:hover,
.loot-pouch-buy:hover,
.loot-pouch-sell:hover,
.mobile-battle-sell:hover {
  transform:none !important;
  filter:none !important;
  transition:none !important;
  animation:none !important;
}
.item-context-menu {
  position:fixed;
  z-index:110;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  gap:6px;
  width:min(285px,calc(100vw - 16px));
  max-height:calc(100vh - 16px);
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:7px;
  border:6px solid transparent;
  border-image:url("../assets/ui/panel-frame.png") 12 / 6px / 0 stretch;
  border-radius:0;
  background:#211b16;
  box-shadow:none;
  color:#e8dcc7;
}
.item-context-heading {
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:1px 3px 4px;
  border-bottom:1px solid #59462f;
  font:600 13px "Oxanium",sans-serif;
}
.item-context-heading strong { overflow:hidden; color:#f0d18a; text-overflow:ellipsis; white-space:nowrap; }
.item-context-heading span { flex:0 0 auto; color:#c6a95f; font-size:12px; }
.item-context-actions { display:flex; flex-direction:column; align-items:stretch; flex-wrap:nowrap; gap:6px; min-width:142px; }
.item-context-actions .btn,
.item-context-actions .btn:hover {
  display:block;
  box-sizing:border-box;
  width:100%;
  min-height:35px;
  padding:8px 10px;
  border-radius:3px;
  font-size:13px;
  line-height:1.25;
  text-align:left;
  white-space:normal;
  transform:none !important;
  filter:none !important;
  transition:none !important;
  animation:none !important;
}

/* Títulos consistentes nos cartões exibidos na visão de batalha. */
#battle-overview > .card .card-title {
  font-family: "Oxanium", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}
#battle-overview > .exp-card .exp-card-title {
  margin-bottom: 5px;
  text-transform: uppercase;
}
#battle-overview > .exp-card #top-exp-text {
  display: inline-flex;
  color: var(--text-2);
  font-family: "Oxanium", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}

/* Shinobi skill tree */
.modal-box:has(.skill-tree-shell) { width:min(1160px,96vw); height:min(790px,92vh); max-height:92vh; display:flex; flex-direction:column; overflow:hidden; }
.modal-box:has(.skill-tree-shell) .modal-head { flex:0 0 auto; padding-bottom:9px; border-bottom:1px solid #5d4a31; }
.modal-box:has(.skill-tree-shell) .modal-body { min-height:0; flex:1; overflow:auto; }
.skill-tree-shell { position:relative; display:flex; min-height:100%; flex-direction:column; gap:12px; overflow:hidden; padding:2px; color:#e8dcc2; }
.skill-tree-shell::before { position:absolute; inset:0; z-index:0; background:url("../assets/ui/skill-tree/shinobi-team.png") right bottom/min(70%,760px) auto no-repeat; opacity:.12; content:""; pointer-events:none; }
.skill-tree-shell > * { position:relative; z-index:1; }
.skill-tree-toolbar { display:flex; min-height:52px; align-items:center; justify-content:space-between; gap:10px; padding:7px 10px; border:1px solid #5d4930; background:linear-gradient(90deg,rgba(41,31,20,.97),rgba(20,22,25,.95)); }
.skill-points { display:flex; align-items:center; gap:8px; min-width:0; }
.skill-points img { width:34px; height:34px; object-fit:contain; }
.skill-points span { color:#c9b78f; font-size:12px; }
.skill-points b { color:#f5cf6d; font:700 22px "Oxanium",system-ui,sans-serif; }
.skill-points small { color:#b5a88f; font-size:13px; }
.skill-tree-location { color:#c78967; font-size:11px; white-space:nowrap; }
.skill-tree-location.ready { color:#8dd499; }
.skill-tree-main { display:grid; min-height:0; flex:1; grid-template-columns:minmax(0,1fr) 250px; gap:10px; }
.skill-tree-board { display:grid; min-width:0; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:8px; overflow:auto; padding:7px; border:1px solid rgba(111,87,53,.72); background:linear-gradient(180deg,rgba(19,17,15,.87),rgba(23,21,19,.77)); }
.skill-branch { min-width:150px; --branch-color:#d8a644; }
.skill-branch-head { display:flex; min-height:46px; align-items:center; gap:8px; padding:4px 7px 8px; border-bottom:1px solid color-mix(in srgb,var(--branch-color) 60%,transparent); }
.skill-branch-glyph { display:block; flex:0 0 32px; width:32px; height:32px; background-image:url("../assets/ui/skill-tree/node-icons.png"); background-repeat:no-repeat; background-size:400% 400%; }
.skill-branch-head b,.skill-branch-head small { display:block; }
.skill-branch-head b { color:var(--branch-color); font:700 12px "Oxanium",system-ui,sans-serif; }
.skill-branch-head small { margin-top:2px; color:#9e9078; font-size:9px; }
.skill-node-chain { position:relative; display:flex; flex-direction:column; gap:9px; padding:12px 4px 4px; }
.skill-node-chain::before { position:absolute; top:24px; bottom:24px; left:50%; width:2px; background:linear-gradient(var(--branch-color),rgba(190,154,92,.12)); opacity:.62; content:""; }
.skill-node { position:relative; display:grid; width:100%; min-height:64px; grid-template-columns:32px minmax(0,1fr) auto; grid-template-rows:1fr auto; align-items:center; gap:1px 7px; padding:8px; border:0; background:url("../assets/ui/skill-tree/node-frame.png") center/100% 100% no-repeat,linear-gradient(135deg,rgba(43,36,27,.94),rgba(20,19,18,.93)); color:#e9ddc4; text-align:left; cursor:pointer; transition:none; }
.skill-node:hover { outline:1px solid var(--branch-color); transform:none; }
.skill-node.learned { background-color:rgba(60,48,28,.35); }
.skill-node.selected { outline:none; box-shadow:none; }
.skill-node.locked { opacity:.57; }
.skill-node-glyph { grid-row:1/3; display:block; width:32px; height:32px; background-image:url("../assets/ui/skill-tree/node-icons.png"); background-repeat:no-repeat; background-size:400% 400%; }
.skill-detail-icon { flex:0 0 42px; width:42px; height:42px; }
.skill-upgrade-button,.skill-tree-footer .btn { min-height:38px; border:0; background:url("../assets/ui/skill-tree/node-frame.png") center/100% 100% no-repeat,linear-gradient(135deg,#574222,#302517); transition:none; }
.skill-upgrade-button:disabled,.skill-tree-footer .btn:disabled { opacity:.55; }
.skill-node-name { overflow:hidden; color:#e9dec8; font-size:10px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.skill-node-rank { color:var(--branch-color); font:700 9px "Oxanium",system-ui,sans-serif; }
.skill-node-effect { grid-column:2/4; color:#b5a789; font-size:9px; }
.skill-detail { display:flex; min-width:0; flex-direction:column; gap:10px; padding:13px; border:1px solid #655132; background:linear-gradient(155deg,rgba(39,31,23,.98),rgba(20,19,18,.98)); }
.skill-detail-kicker { font:700 10px "Oxanium",system-ui,sans-serif; letter-spacing:.09em; }
.skill-detail-title { display:flex; align-items:center; gap:9px; color:#f0d18a; font:700 17px "Oxanium",system-ui,sans-serif; }
.skill-detail-title span { display:grid; width:38px; height:38px; place-items:center; border:1px solid var(--branch-color); color:var(--branch-color); background:#171512; font-size:20px; }
.skill-detail-title .skill-node-glyph { display:block; flex:0 0 42px; width:42px; height:42px; border:0; background-color:transparent; background-image:url("../assets/ui/skill-tree/node-icons.png"); background-size:400% 400%; background-repeat:no-repeat; }
.skill-detail-description { margin:0; color:#c6b797; font-size:12px; line-height:1.5; }
.skill-detail-values { display:grid; gap:0; border-top:1px solid #493c2c; }
.skill-detail-values > div { display:flex; justify-content:space-between; gap:8px; padding:7px 0; border-bottom:1px solid rgba(109,87,56,.3); font-size:10px; }
.skill-detail-values span { color:#a99b80; }
.skill-detail-values b { color:#f0d18a; text-align:right; }
.skill-prerequisite,.skill-tree-hint { color:#e0c58f; font-size:14px; line-height:1.5; }
.skill-tree-hint { margin:0; }
.skill-upgrade-button { min-height:39px; margin-top:auto; font-size:11px; }
.passive-tree-detail .btn-primary.skill-upgrade-button:hover,
.passive-tree-detail .btn-primary.skill-upgrade-button:focus-visible {
  background:url("../assets/ui/skill-tree/node-frame.png") center/100% 100% no-repeat,linear-gradient(180deg,#69512d,#3e2e1b) !important;
  border-color:transparent !important;
  color:#fff0cf;
  filter:brightness(1.12);
}
.skill-tree-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:8px; border-top:1px solid #51412c; }
.skill-tree-footer > span { color:#96876d; font-size:10px; }
.float-dmg.gold { color:#ffd04f; }
@media(max-width:760px) {
  .modal-box:has(.skill-tree-shell) { width:96vw; height:90vh; max-height:90vh; }
  .skill-tree-main { grid-template-columns:1fr; }
  .skill-tree-board { grid-template-columns:repeat(4,minmax(165px,1fr)); max-height:43vh; }
  .skill-detail { min-height:190px; }
  .skill-tree-location { max-width:105px; overflow:hidden; text-overflow:ellipsis; }
}

/* Identidade alternativa Ninja Idle para login e seleção de personagens. */
#screen-login .login-bg { filter:none; }
#screen-chars .login-title { color:#dce5ef; text-shadow:0 2px 0 #000; }
#screen-chars .login-title span { color:#69d5cd; }
@media(max-width:760px) {
  #screen-login .login-bg { background-position:center center; }
  #screen-chars .login-bg { background-position:center center; }
}
#screen-login button,
#screen-login .tab { -webkit-tap-highlight-color:transparent; user-select:none; -webkit-user-select:none; }
#screen-login button:focus,
#screen-login button:focus-visible,
#screen-login .tab:focus,
#screen-login .tab:focus-visible { outline:none; box-shadow:none; }
#screen-login button:active { -webkit-tap-highlight-color:transparent; }

/* Árvore passiva completa: mapa em canvas, sem milhares de elementos HTML. */
.modal-box:has(.passive-tree-shell) { width:min(1400px,98vw); height:min(900px,94vh); max-height:94vh; }
.modal-box:has(.passive-tree-shell) .modal-body { min-height:0; overflow:hidden; }
.passive-tree-shell { height:100%; min-height:0; gap:8px; }
.passive-tree-toolbar { display:grid; grid-template-columns:minmax(230px,1fr) minmax(160px,260px) auto; }
.passive-tree-search { width:100%; min-width:0; height:34px; padding:6px 10px; border:1px solid #5d4930; border-radius:4px; background:#15120f; color:#eddfc4; }
.passive-tree-zoom { display:flex; gap:4px; }
.passive-tree-zoom .btn { min-width:34px; padding:4px 8px; }
.passive-tree-zoom .btn.active { border-color:#d5ad5a; color:#f5d98f; background:linear-gradient(180deg,#4a3922,#302417); }
.passive-tree-main { min-height:0; grid-template-columns:minmax(0,1fr) 270px; }
.passive-tree-viewport { position:relative; min-width:0; min-height:420px; overflow:hidden; border:1px solid rgba(111,87,53,.72); background:radial-gradient(ellipse at center,#252019 0%,#171512 63%,#11100f 100%); }
.passive-tree-canvas { display:block; width:100%; height:100%; min-height:420px; cursor:grab; touch-action:none; }
.passive-tree-canvas:active { cursor:grabbing; }
.passive-tree-start-indicator { position:absolute; z-index:2; box-sizing:border-box; border:2px solid #f2cc68; border-radius:50%; transform:translate(-50%,-50%); pointer-events:none; box-shadow:0 0 7px 1px rgba(242,204,104,.48); animation:passive-tree-start-pulse 1.15s ease-in-out infinite; }
.passive-tree-start-indicator.learned { animation:none; opacity:.88; box-shadow:0 0 5px 1px rgba(242,204,104,.45); }
@keyframes passive-tree-start-pulse { 0%,100% { opacity:.58; box-shadow:0 0 4px 1px rgba(242,204,104,.36); } 50% { opacity:1; box-shadow:0 0 12px 3px rgba(255,218,123,.82); } }
.passive-tree-selected-indicator { position:absolute; z-index:3; box-sizing:border-box; border:1px solid rgba(255,239,195,.9); border-radius:50%; transform:translate(-50%,-50%); pointer-events:none; box-shadow:0 0 5px 1px rgba(255,225,164,.28); animation:passive-tree-selection-pulse 1.7s ease-in-out infinite; }
@keyframes passive-tree-selection-pulse { 0%,100% { opacity:.62; box-shadow:0 0 3px rgba(255,225,164,.18); } 50% { opacity:1; box-shadow:0 0 7px 1px rgba(255,225,164,.42); } }
.passive-tree-loading { position:absolute; inset:0; display:grid; place-items:center; color:#d6c5a5; font-size:14px; pointer-events:none; }
.passive-tree-detail { min-height:0; max-height:100%; overflow-x:hidden; overflow-y:auto; }
.passive-tree-detail { gap:5px; padding:10px; }
.passive-tree-detail .skill-detail-title { min-width:0; align-items:flex-start; }
.passive-tree-detail .skill-detail-title b { min-width:0; overflow-wrap:anywhere; white-space:normal; }
.passive-tree-detail .passive-tree-effect b { min-width:0; overflow-wrap:anywhere; }
.passive-tree-detail .skill-upgrade-button { width:100%; min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:1.25; }
.skill-tree-info-scroll { display:grid; min-height:0; gap:8px; overflow:auto; padding-right:2px; }
.passive-tree-detail:has(.skill-tree-info-scroll) .skill-detail-title { font-size:20px; line-height:1.2; }
.skill-tree-info-scroll .passive-mastery-label { font-size:14px; line-height:1.3; }
.skill-tree-bonus-list,.skill-tree-active-list { display:grid; gap:4px; }
.skill-tree-bonus-row { display:flex; justify-content:space-between; gap:8px; padding:7px 8px; border-bottom:1px solid rgba(109,87,56,.32); color:#c8b895; font-size:13px; line-height:1.4; }
.skill-tree-bonus-row b { flex:0 0 auto; color:#f1d17f; font-size:14px; text-align:right; }
.skill-tree-active-node { display:grid; gap:2px; padding:6px 7px; border:1px solid rgba(197,159,83,.25); border-radius:4px; background:rgba(37,30,21,.65); }
.skill-tree-active-node b { color:#e8d5ad; font-size:11px; }
.skill-tree-active-node small { color:#a99b82; font-size:10px; line-height:1.35; }
.passive-tree-effects { display:grid; gap:4px; margin:3px 0 6px; }
.passive-tree-effect { display:flex; align-items:flex-start; gap:6px; padding:5px 7px; border:1px solid rgba(197,159,83,.32); border-radius:5px; background:rgba(37,30,21,.78); color:#f1dfb9; font-size:12px; line-height:1.3; }
.passive-tree-effect span { flex:0 0 auto; color:#eac36a; }
.passive-tree-effect b { font-weight:700; }
.passive-detail-icon { display:grid; width:38px; height:38px; flex:0 0 38px; place-items:center; border:1px solid #927442; color:#eac36a; background:#191613; }
.passive-detail-heading { min-height:0; }
.passive-detail-meta { display:flex; align-items:center; gap:7px; margin:5px 0 12px; }
.passive-detail-id { margin:0; color:#a99b82; font:600 11px "Oxanium",system-ui,sans-serif; letter-spacing:.04em; }
.passive-node-kind { display:inline-flex; align-items:center; min-height:20px; padding:2px 7px; border:1px solid rgba(125,170,151,.48); border-radius:4px; background:rgba(35,65,54,.45); color:#b8d9c8; font:700 10px "Oxanium",system-ui,sans-serif; }
.passive-node-kind.advanced { border-color:rgba(218,178,91,.62); background:rgba(87,63,29,.48); color:#f0d18a; }
.passive-detail-effect-label { margin:0 0 5px; color:#e4c36f; font:700 11px "Oxanium",system-ui,sans-serif; text-transform:uppercase; }
.passive-mastery-label { margin:6px 0 2px; color:#e5c16e; font-size:11px; font-weight:700; }
.passive-mastery-options { display:grid; gap:5px; max-height:32vh; overflow:auto; }
.passive-mastery-choice { padding:7px 8px; border:1px solid #51412c; background:#211c17; color:#d3c3a4; text-align:left; font:inherit; font-size:10px; cursor:pointer; }
.passive-mastery-choice.active { border-color:#c89c4d; color:#f4dc9e; background:#302517; }
.passive-mastery-choice:disabled { opacity:.55; }
.passive-tree-shell .skill-tree-footer { flex:0 0 auto; justify-content:center; }
@media(max-width:900px) {
  .modal-box:has(.passive-tree-shell) { width:97vw; height:93vh; max-height:93vh; }
  .passive-tree-toolbar { grid-template-columns:1fr auto; }
  .passive-tree-toolbar .skill-points { grid-column:1; }
  .passive-tree-search { grid-column:1; grid-row:2; }
  .passive-tree-zoom { grid-column:2; grid-row:1; }
  .passive-tree-location { grid-column:2; grid-row:2; }
  .passive-tree-main { grid-template-columns:minmax(0,1fr) 230px; }
}

/* Ficha de personagem: densidade legível no desktop e no celular. */
#panel-char.character-sheet { display:grid; align-content:start; gap:10px; min-width:0; font-size:15px; }
#panel-char.character-sheet:not(.active) { display:none; }
#panel-char.character-sheet > .card.mt { margin-top:0; }
#panel-char .panel-title { font-size:23px; }
#panel-char .character-heading { display:flex; align-items:center; justify-content:space-between; min-width:0; }
#panel-char .character-heading .panel-sub { margin:3px 0 0; font-size:14px; }
#panel-char .character-hero { display:grid; grid-template-columns:68px minmax(0,1fr) 54px; gap:12px; min-width:0; padding:10px 12px; }
#panel-char .character-hero > .sprite-box { width:68px; height:68px; border-radius:5px; }
#panel-char .character-identity { min-width:0; }
#panel-char .character-name { overflow:hidden; color:#f3dfb5; font-size:21px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
#panel-char .character-meta { margin-top:3px; color:#ad9a7b; font-size:14px; }
#panel-char .character-chips { display:flex; flex-wrap:wrap; gap:4px; margin-top:7px; }
#panel-char .character-chips .chip { min-height:26px; padding:4px 8px; font-size:12px; }
#panel-char .character-portrait { width:48px; height:60px; justify-self:end; object-fit:contain; image-rendering:pixelated; opacity:.88; }
#panel-char .character-grid { gap:9px; min-width:0; }
#panel-char .character-card { min-width:0; padding:10px 12px; }
#panel-char .character-card .card-title { margin-bottom:7px; font-size:15px; }
#panel-char .character-saga-outfits { display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); align-items:start; gap:10px; }
#panel-char .character-saga-outfit { display:flex; min-width:0; flex-direction:column; align-items:center; gap:5px; padding:7px; border:1px solid rgba(137,108,63,.42); border-radius:5px; background:rgba(20,18,16,.55); }
#panel-char .character-saga-outfit.locked { opacity:.4; }
#panel-char .character-saga-outfit.selected { border-color:#d2aa51; background:rgba(105,78,31,.2); }
#panel-char .character-saga-label { margin:0; text-align:center; }
#panel-char .character-saga-select { width:100%; min-height:30px; padding:4px 7px; }
#panel-char .character-saga-select:disabled { opacity:.7; }
#panel-char .stat-list li { min-width:0; gap:10px; padding:5px 0; font-size:15px; line-height:1.35; }
#panel-char .stat-list li > span { min-width:0; overflow-wrap:anywhere; }
#panel-char .stat-list li > b { flex:0 0 auto; max-width:48%; text-align:right; white-space:nowrap; font-size:14px; }
#panel-char .stat-list .sub { margin-top:3px; font-size:13px; line-height:1.35; }
#panel-char .character-grid > .card::after { border-width:8px; border-image-width:8px; }
#panel-char > .card.character-card { min-width:0; padding:10px 12px; }
#panel-char > .card.character-card .row.wrap { gap:6px; }
#panel-char .character-bestiary { display:grid; grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); align-items:start; justify-items:center; gap:10px 6px; min-width:0; }
#panel-char .character-bestiary-entry { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; width:100%; min-width:0; gap:2px; text-align:center; }
#panel-char .character-bestiary-entry > .sprite-box { flex:0 0 44px; width:44px !important; height:44px !important; margin:0 auto 2px; overflow:hidden; }
#panel-char .character-bestiary-entry .small { max-width:100%; overflow-wrap:anywhere; line-height:1.2; }
@media(max-width:760px) {
  #panel-char.character-sheet { gap:8px; }
  #panel-char .character-grid { grid-template-columns:minmax(0,1fr); gap:8px; }
  #panel-char .character-hero { display:grid; grid-template-columns:40px minmax(0,1fr); align-items:start; gap:8px; padding:8px; }
  #panel-char .character-hero > .sprite-box { position:relative; inset:auto; grid-column:1; grid-row:1; flex:none; width:40px !important; min-width:40px; max-width:40px; height:40px !important; min-height:40px; max-height:40px; overflow:hidden; }
  #panel-char .character-hero > .sprite-box > .sprite { transform:translateX(-3px); justify-self:center; align-self:center; }
  #panel-char .character-identity { grid-column:2; grid-row:1; }
  #panel-char .character-portrait { display:none; }
  #panel-char .panel-title { font-size:21px; }
  #panel-char .character-name { font-size:19px; }
  #panel-char .character-meta { line-height:1.3; overflow-wrap:anywhere; }
  #panel-char .character-chips { gap:3px; margin-top:5px; }
  #panel-char .character-chips .chip { min-height:24px; padding:3px 6px; font-size:11px; }
  #panel-char .character-card { padding:8px 10px; }
  #panel-char .character-bestiary { grid-template-columns:repeat(auto-fill,minmax(68px,1fr)); gap:8px 4px; }
  #panel-char .stat-list li { padding:5px 0; font-size:14px; }
  #panel-char .stat-list li > b { font-size:13px; }
  #panel-char .stat-list .sub { font-size:12px; }
  #panel-char .stat-list li > span { flex:1 1 auto; overflow-wrap:anywhere; }
  #panel-char .stat-list li > b { flex:0 1 auto; max-width:55%; white-space:normal; overflow-wrap:anywhere; }
  #panel-char .stat-list li > span:only-child { flex:1 1 100%; }
  #panel-char .character-grid > .card::after { border-width:6px; border-image-width:6px; }
}
@media(max-width:380px) {
  #panel-char .character-hero { grid-template-columns:36px minmax(0,1fr); }
  #panel-char .character-hero > .sprite-box { width:36px !important; min-width:36px; max-width:36px; height:36px !important; min-height:36px; max-height:36px; }
  #panel-char .character-chips .chip { font-size:10px; }
  #panel-char .stat-list li { font-size:13px; }
}

@media(max-width:650px) {
  .modal-box:has(.passive-tree-shell) { width:98vw; height:94vh; max-height:94vh; }
  .modal-box:has(.passive-tree-shell) .modal-body { padding:7px; }
  .passive-tree-shell { gap:6px; }
  .passive-tree-toolbar { gap:6px; }
  .passive-tree-toolbar .skill-points { min-height:34px; }
  .passive-tree-main { grid-template-columns:1fr; grid-template-rows:minmax(0,1fr) auto; }
  .passive-tree-viewport,.passive-tree-canvas { min-height:34vh; }
  .passive-tree-detail { max-height:29vh; min-height:0; gap:3px; padding:7px; }
  .passive-tree-detail .skill-detail-kicker { display:none; }
  .passive-tree-detail .skill-detail-title { gap:6px; font-size:13px; line-height:1.15; }
  .passive-tree-detail .skill-detail-title b { min-width:0; overflow-wrap:anywhere; }
  .passive-tree-detail .passive-detail-icon { width:27px; height:27px; flex-basis:27px; }
  .passive-tree-effect { padding:4px 6px; font-size:11px; line-height:1.2; }
  .passive-tree-detail .skill-upgrade-button { min-height:32px; margin-top:2px; }
  .passive-tree-shell .skill-tree-footer { align-items:center; flex-direction:row; padding-top:5px; }
  .passive-tree-footer .btn { min-width:min(220px,80vw); }
}

/* Ajustes compactos de mobile para o cabeçalho e contador da árvore. */
@media(max-width:800px) {
  body > .battle-chat-window .battle-chat-tabs { min-width:0; gap:1px; padding-right:3px; padding-left:3px; }
  body > .battle-chat-window .battle-chat-tabs button {
    box-sizing:border-box; min-width:0; padding:3px 1px; border-width:3px; border-image-width:3px;
    font-size:10px; line-height:1.1; letter-spacing:-.3px; white-space:nowrap;
  }
  .topbar { grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto; min-height:54px; padding:5px 8px; gap:3px; }
  .topbar > .logo { grid-column:1; grid-row:1; }
  .topbar > .top-actions { grid-column:2; grid-row:1; }
  .top-stats { display:flex; align-items:center; justify-content:center; gap:9px; }
  .top-currency-stats { gap:2px; transform:none; }
  .top-currency-stats .stat-pill { min-width:0 !important; padding:3px 4px; gap:3px; font-size:9px; }
  .top-currency-stats .stat-pill.elo { transform:translateX(5px); }
  .top-currency-stats .stat-pill .currency-icon { width:12px; height:12px; flex-basis:12px; transform:none; }
  .top-stats > .stat-pill { padding:4px 5px; gap:3px; font-size:9px; white-space:nowrap; }
  .topbar .logo img { width:clamp(72px,21vw,96px); }
  .top-actions { gap:2px; }
  .top-actions .btn { min-width:0; padding:1px 2px; font-size:9px; border-width:4px; border-bottom-width:3px; border-image-width:4px 4px 3px; }
  .top-actions #btn-settings, .top-actions #btn-refresh, .top-actions #btn-exit { min-height:34px; padding:2px 4px; font-size:10px; border-width:5px; border-bottom-width:4px; border-image-width:5px 5px 4px; }
  .hunt-player-currencies { display:none !important; }
  .arena-wrap > #top-exp { display:block !important; order:2; width:100%; min-width:0; box-sizing:border-box; margin:0; transform:none; visibility:visible; }
}

.fullscreen-prompt { display:grid; gap:16px; min-width:min(280px,72vw); padding:4px 2px 2px; }
.fullscreen-prompt-message { margin:0; color:#d8c9ad; font-size:14px; line-height:1.55; text-align:center; }
.fullscreen-prompt-actions { display:flex; justify-content:center; gap:12px; }
.fullscreen-prompt-actions .btn { min-width:112px; min-height:40px; }
#modal:has(.fullscreen-prompt) .fullscreen-prompt-actions .btn {
  box-sizing:border-box;
  border:7px solid transparent;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch;
  border-radius:0;
  background:linear-gradient(180deg,#3a2d1d,#211910);
  color:#f4d080;
  font-family:"Oxanium",sans-serif;
  font-weight:700;
  text-shadow:0 1px 2px #000;
  box-shadow:none;
  transition:none;
}
/* Em tela cheia nao existe a barra inferior do navegador/area reservada do modo normal. */
html.mobile-fullscreen-mode #screen-game { width:100%; height:100vh; height:100dvh; min-height:0; overflow:hidden; }
html.mobile-fullscreen-mode #screen-game > .layout { flex:1 1 0; min-height:0 !important; height:auto !important; box-sizing:border-box; overflow:hidden; }
html.mobile-fullscreen-mode .layout > .main { min-height:0; overflow-x:hidden; overflow-y:auto; padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px)) !important; }
html.mobile-fullscreen-mode .arena-wrap { width:100%; max-width:none; margin:0; transform:none; display:flex; flex-direction:column; gap:8px; }
html.mobile-fullscreen-mode .arena-wrap > .mapview { order:1; width:100%; max-width:none; height:auto; min-height:0; margin:0; aspect-ratio:15 / 11; }
html.mobile-fullscreen-mode .arena-wrap > #top-exp { display:block !important; order:2; width:100%; min-width:0; box-sizing:border-box; margin:0; transform:none; visibility:visible; }
html.mobile-fullscreen-mode .arena-wrap > .mobile-battle-loot { display:block; order:3; width:100%; box-sizing:border-box; }
html.mobile-fullscreen-mode .arena-wrap > .arena-side { display:flex; order:4; width:100%; min-width:0; flex-direction:column; }
@media(max-width:380px) {
  .top-actions #btn-save { display:none; }
  .topbar .logo img { width:72px; }
}
@media(max-width:900px) {
  .passive-tree-toolbar { grid-template-columns:minmax(0,1fr) auto; align-items:center; }
  .passive-tree-toolbar .skill-points { grid-column:1; grid-row:1; }
  .passive-tree-search { grid-column:1; grid-row:2; }
  .passive-tree-zoom { grid-column:2; grid-row:1 / span 2; flex-wrap:wrap; justify-content:flex-end; }
}
@media(max-width:650px) {
  .passive-tree-toolbar { grid-template-columns:minmax(0,1fr); gap:7px; padding:7px; }
  .passive-tree-toolbar .skill-points { grid-column:1; grid-row:1; width:100%; }
  .passive-tree-search { grid-column:1; grid-row:2; }
  .passive-tree-zoom { grid-column:1; grid-row:3; justify-content:flex-end; }
  .skill-points { display:grid; grid-template-columns:26px minmax(0,1fr) auto; grid-template-rows:auto auto; gap:1px 6px; align-items:center; }
  .skill-points img { grid-column:1; grid-row:1 / span 2; width:26px; height:26px; }
  .skill-points span { grid-column:2; grid-row:1; min-width:0; font-size:12px; line-height:1.2; white-space:normal; }
  .skill-points b { grid-column:3; grid-row:1 / span 2; font-size:18px; white-space:nowrap; }
.skill-points small { grid-column:2; grid-row:2; min-width:0; color:#b5a88f; font-size:12px; line-height:1.3; white-space:normal; overflow-wrap:anywhere; }
}

/* Guilda: painel compacto, sem sombras/transicoes pesadas e responsivo. */
#panel-guild .guild-panel { display:grid; gap:10px; min-width:0; }
#panel-guild .guild-card { min-width:0; padding:12px; border:1px solid #57442d; border-image:none !important; background:#1d1914; box-shadow:none !important; }
#panel-guild button,
#panel-guild input,
#panel-guild select { box-shadow:none !important; transition:none !important; }
#panel-guild button { border-image:none !important; }
#panel-guild .guild-section { display:grid; gap:8px; min-width:0; }
#panel-guild .guild-section + .guild-section { margin-top:12px; }
#panel-guild .guild-section h3 { margin:0; color:#e8c16c; font-size:14px; }
#panel-guild .guild-head { display:flex; align-items:center; gap:12px; min-width:0; }
#panel-guild .guild-crest { display:grid; place-items:center; width:48px; height:48px; flex:0 0 48px; overflow:hidden; border:1px solid #8a6b3b; color:#f2d68e; background:#282116; font-weight:800; }
#panel-guild .guild-logo-image { display:block; width:100%; height:100%; object-fit:contain; image-rendering:auto; }
#panel-guild .guild-logo-form,
#panel-guild .guild-create-logo { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; }
#panel-guild .guild-logo-form { margin-top:8px; }
#panel-guild .guild-logo-picker { position:relative; display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:5px 12px; cursor:pointer; white-space:nowrap; }
#panel-guild .guild-create-form .guild-logo-picker { display:inline-flex; align-items:center; justify-content:center; width:max-content; gap:6px; color:#fff; }
#panel-guild .guild-logo-picker.is-busy { opacity:.6; pointer-events:none; }
#panel-guild .guild-logo-input { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
#panel-guild .guild-logo-input:focus-visible + span { outline:2px solid #e8c16c; outline-offset:2px; }
#panel-guild .guild-logo-status { min-width:0; color:#a99a83; font-size:11px; overflow-wrap:anywhere; }
#panel-guild .guild-head-copy,
#panel-guild .guild-member-copy,
#panel-guild .guild-war-copy { display:grid; gap:3px; min-width:0; }
#panel-guild .guild-head-copy { flex:1; }
#panel-guild .guild-head-copy h3,
#panel-guild .guild-head-copy p,
#panel-guild .guild-description,
#panel-guild .guild-note { margin:0; }
#panel-guild .guild-online-count { flex:0 0 auto; color:#a8d08b; font-size:12px; }
#panel-guild .guild-member-list,
#panel-guild .guild-war-list,
#panel-guild .guild-activity-list,
#panel-guild .guild-directory-list { display:grid; gap:6px; min-width:0; }
#panel-guild .guild-member-row,
#panel-guild .guild-war-row,
#panel-guild .guild-directory-row,
#panel-guild .guild-activity-row { display:flex; align-items:center; gap:8px; min-width:0; padding:8px; border:1px solid #403426; background:#191612; }
#panel-guild .guild-member-copy,
#panel-guild .guild-war-copy { flex:1; overflow-wrap:anywhere; }
#panel-guild .guild-member-copy small,
#panel-guild .guild-war-copy small,
#panel-guild .guild-directory-row small { color:#a99a83; }
#panel-guild .guild-member-date,
#panel-guild .guild-activity-row time { color:#a99a83; font-size:11px; }
#panel-guild .guild-member-portrait { display:grid; width:42px; height:42px; flex:0 0 42px; place-items:center; overflow:hidden; border:1px solid #57442d; background:#11100e; }
#panel-guild .guild-member-portrait img { display:block; width:118%; height:118%; object-fit:cover; transform:scale(1.06); image-rendering:pixelated; }
#panel-guild .guild-member-portrait canvas { max-width:100%; max-height:100%; }
#panel-guild .guild-member-role { color:#e0bd70 !important; }
#panel-guild .guild-online-dot { width:8px; height:8px; flex:0 0 8px; border-radius:50%; background:#786d5b; }
#panel-guild .guild-online-dot.online { background:#72c77c; }
#panel-guild .guild-member-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
#panel-guild .guild-war-score { flex:0 0 auto; color:#eccb7d; white-space:nowrap; }
#panel-guild .guild-inline-form { display:flex; gap:7px; min-width:0; }
#panel-guild .guild-inline-form input { flex:1; min-width:0; }
#panel-guild .guild-edit-form { display:flex; align-items:flex-end; gap:8px; margin-top:10px; }
#panel-guild .guild-edit-form label { flex:1; }
#panel-guild .guild-create-form { display:grid; grid-template-columns:minmax(0,2fr) minmax(100px,1fr); gap:9px; align-items:end; }
#panel-guild .guild-create-form label { display:grid; gap:4px; color:#cabb9f; font-size:12px; }
#panel-guild .guild-create-form .guild-description-field { grid-column:1 / -1; }
#panel-guild .guild-create-form .guild-logo-field { grid-column:1 / -1; }
#panel-guild .guild-create-form button { justify-self:start; }
#panel-guild .guild-directory-row > div { display:grid; gap:3px; min-width:0; flex:1; }
#panel-guild .guild-directory-row > span { min-width:0; overflow-wrap:anywhere; }
#panel-guild .guild-activity-row { justify-content:space-between; flex-wrap:wrap; }
#panel-guild .guild-empty { margin:0; padding:8px; }
#panel-guild .guild-footer-actions { display:flex; justify-content:flex-end; }
@media(max-width:800px) {
  #panel-guild .guild-card { padding:9px; }
  #panel-guild .guild-head { flex-wrap:wrap; gap:8px; }
  #panel-guild .guild-online-count { margin-left:56px; }
  #panel-guild .guild-create-form { grid-template-columns:minmax(0,1fr); }
  #panel-guild .guild-create-form .guild-description-field,
  #panel-guild .guild-create-form .guild-logo-field { grid-column:auto; }
  #panel-guild .guild-inline-form,
  #panel-guild .guild-edit-form { align-items:stretch; flex-direction:column; }
  #panel-guild .guild-member-row,
  #panel-guild .guild-war-row,
  #panel-guild .guild-directory-row { align-items:flex-start; flex-wrap:wrap; }
  #panel-guild .guild-member-actions { width:100%; justify-content:flex-start; }
  #panel-guild .guild-member-date { margin-left:auto; }
  #panel-guild .guild-war-score { margin-left:auto; }
  #panel-guild .guild-inline-form button,
  #panel-guild .guild-create-form button,
  #panel-guild .guild-edit-form button { min-height:38px; }
  #panel-guild .guild-logo-form { align-items:center; }
  #panel-guild .guild-logo-picker { min-height:36px; }
}

/* Ranking: cards compactas, visual consistente com o jogo e layout mobile-first. */
#panel-ranking .ranking-panel { display:grid; gap:14px; min-width:0; }
#panel-ranking .ranking-heading { display:flex; align-items:center; justify-content:center; gap:12px; text-align:center; }
#panel-ranking .ranking-heading > div { width:100%; }
#panel-ranking .ranking-heading .panel-sub { margin-bottom:0; }
#panel-ranking .ranking-season { flex:0 0 auto; padding:6px 10px; border:1px solid #65502f; color:#e5c77d; background:#211c14; font-size:11px; }
#panel-ranking .ranking-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
#panel-ranking .ranking-tab { display:grid; gap:3px; min-width:0; min-height:56px; padding:8px 10px; text-align:left; border:1px solid #51412d; background:#1d1914; color:#e6dccb; box-shadow:none !important; transition:none !important; }
#panel-ranking .ranking-tab strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
#panel-ranking .ranking-tab small { color:#a99a83; font-size:10px; }
#panel-ranking .ranking-tab.active { border-color:#c79e51; background:#2a2115; color:#f1d38a; }
#panel-ranking .ranking-list { display:grid; gap:6px; min-width:0; }
#panel-ranking .ranking-entry { display:grid; grid-template-columns:38px 42px minmax(0,1fr) auto; align-items:center; gap:10px; min-width:0; padding:8px 10px; border:1px solid #403426; background:#191612; }
#panel-ranking .ranking-entry.is-you { border-color:#9a783f; background:#241e14; }
#panel-ranking .ranking-position { display:grid; place-items:center; width:30px; height:30px; justify-self:center; border:1px solid #514535; color:#c8b99f; font-weight:800; font-size:12px; }
#panel-ranking .ranking-position.gold { border-color:#9c7735; color:#f3cf68; background:#332814; }
#panel-ranking .ranking-position.silver { border-color:#77746b; color:#ddd9cd; background:#282722; }
#panel-ranking .ranking-position.bronze { border-color:#845d43; color:#e0a47b; background:#302117; }
#panel-ranking .ranking-face { display:grid; place-items:center; width:40px; height:40px; overflow:hidden; border:1px solid #51412d; background:#11100e; color:#e4ca8b; font-weight:800; }
#panel-ranking .ranking-face img { width:100%; height:100%; object-fit:cover; transform:scale(1.14); }
#panel-ranking .ranking-player { display:grid; gap:3px; min-width:0; }
#panel-ranking .ranking-player > strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#eee5d7; font-size:13px; }
#panel-ranking .ranking-player small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#a99a83; font-size:10px; }
#panel-ranking .ranking-you { margin-left:7px; padding:2px 5px; border:1px solid #66522f; color:#ebce84; font-size:9px; font-weight:600; }
#panel-ranking .ranking-score { display:grid; gap:2px; justify-items:end; text-align:right; }
#panel-ranking .ranking-score strong { color:#eacb83; font-size:13px; white-space:nowrap; }
#panel-ranking .ranking-score small { color:#a99a83; font-size:9px; }
#panel-ranking .ranking-footer { display:flex; justify-content:center; }
#panel-ranking .ranking-pagination { display:flex; align-items:center; justify-content:center; gap:10px; }
#panel-ranking .ranking-pagination > span { color:#b7a990; font-size:11px; }
#panel-ranking .ranking-pagination button:disabled { opacity:.45; cursor:default; }
#panel-ranking .ranking-state { display:flex; align-items:center; justify-content:center; gap:9px; min-height:100px; padding:14px; border:1px solid #403426; color:#c5b69f; background:#191612; text-align:center; }
#panel-ranking .ranking-state.error { color:#e3a18c; }
#panel-ranking .ranking-loader { width:15px; height:15px; border:2px solid #57442d; border-top-color:#e5c77d; border-radius:50%; animation:ranking-spin .8s linear infinite; }
@keyframes ranking-spin { to { transform:rotate(360deg); } }
@media(max-width:800px) {
  #panel-ranking .ranking-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  #panel-ranking .ranking-tab { min-height:48px; padding:7px 8px; }
  #panel-ranking .ranking-entry { grid-template-columns:30px 36px minmax(0,1fr) auto; gap:7px; padding:7px; }
  #panel-ranking .ranking-position { width:26px; height:26px; font-size:11px; }
  #panel-ranking .ranking-face { width:34px; height:34px; }
  #panel-ranking .ranking-player > strong { font-size:12px; }
  #panel-ranking .ranking-score strong { font-size:11px; }
  #panel-ranking .ranking-pagination { gap:6px; }
  #panel-ranking .ranking-pagination button { min-height:36px; padding-inline:8px; }
}
@media(max-width:360px) {
  #panel-ranking .ranking-entry { grid-template-columns:26px 32px minmax(0,1fr) auto; gap:5px; padding:6px; }
  #panel-ranking .ranking-face { width:30px; height:30px; }
  #panel-ranking .ranking-player small { font-size:9px; }
  #panel-ranking .ranking-score strong { font-size:10px; }
}

/* Moldura original do jogo nos painéis principais de Guilda e Ranking. */
#panel-guild .guild-card,
#panel-ranking .ranking-entry {
  position:relative;
  isolation:isolate;
  border:8px solid transparent !important;
  border-image:url("../assets/ui/panel-frame.png") 12 / 8px / 0 stretch !important;
  border-radius:0;
}
#panel-ranking .ranking-entry { padding:9px 11px; }
#panel-ranking .ranking-entry.is-you { background:#241e14; }
#panel-ranking .ranking-guild-face { position:relative; border:0; background:transparent; color:#e4ca8b; font-size:12px; }
#panel-ranking .ranking-guild-face img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; transform:none; background:transparent; }
#panel-ranking .ranking-scopes,
#panel-ranking .ranking-tabs { display:flex; gap:6px; margin:0; border-bottom:1px solid #5f4c32; }
#panel-ranking .ranking-scopes { margin-bottom:2px; }
#panel-ranking .ranking-tabs { overflow-x:auto; scrollbar-width:thin; }
#panel-ranking .ranking-tab,
#panel-ranking .ranking-scope { flex:0 0 auto; padding:9px 14px; border-bottom:2px solid transparent; color:#b7a586; font-size:14px; font-weight:700; line-height:1.3; cursor:pointer; user-select:none; }
#panel-ranking .ranking-tab { display:flex; align-items:center; justify-content:center; min-height:0; border:0; border-bottom:2px solid transparent; background:transparent; box-shadow:none !important; }
#panel-ranking .ranking-tab.active,
#panel-ranking .ranking-scope.active { color:#f2ca69; border-bottom-color:#d3a246; }
#panel-ranking .ranking-tab.active { background:transparent !important; }
#panel-ranking .ranking-tab:focus-visible,
#panel-ranking .ranking-scope:focus-visible { outline:2px solid #d3a246; outline-offset:-2px; }
#panel-ranking .ranking-player > strong { font-size:15px; }
#panel-ranking .ranking-player > strong { display:flex; align-items:center; gap:6px; min-width:0; }
#panel-ranking .ranking-character-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#panel-ranking .ranking-vip-tag { display:inline-block; flex:0 0 auto; font-size:9px; line-height:1.2; letter-spacing:.08em; }
#panel-ranking .ranking-player small { font-size:12px; }
#panel-ranking .ranking-score strong { font-size:15px; }
#panel-ranking .ranking-score small { font-size:11px; }
#panel-ranking .ranking-pagination > span { font-size:12px; }
@media(max-width:800px) {
  #panel-guild .guild-card { padding:10px; }
  #panel-ranking .ranking-entry { padding:8px; }
  #panel-ranking .ranking-tab,
  #panel-ranking .ranking-scope { padding:9px 12px; font-size:13px; }
  #panel-ranking .ranking-player > strong { font-size:14px; }
  #panel-ranking .ranking-player small { font-size:11px; }
  #panel-ranking .ranking-score strong { font-size:13px; }
}

/* Ranking com pódio fixo e classificação paginada. */
#panel-ranking .ranking-podium { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; gap:14px; min-width:0; padding:6px 0 2px; }
#panel-ranking .ranking-podium-card { position:relative; isolation:isolate; display:grid; justify-items:center; align-content:start; gap:7px; min-width:0; min-height:232px; padding:15px 10px 13px; overflow:hidden; border:1px solid #55432e; background:linear-gradient(180deg,#211c16,#151310); text-align:center; }
#panel-ranking .ranking-podium-card::before { position:absolute; inset:0; z-index:1; background:linear-gradient(180deg,rgba(20,16,12,.12),rgba(20,16,12,.32)); content:""; pointer-events:none; }
#panel-ranking .ranking-podium-backdrop { position:absolute; inset:0; z-index:0; width:100%; height:100%; object-fit:cover; object-position:center 30%; opacity:.68; filter:saturate(.96) brightness(.92); transform:scale(1.08); pointer-events:none; }
#panel-ranking .ranking-podium-card > :not(.ranking-podium-backdrop) { position:relative; z-index:2; }
#panel-ranking .ranking-podium-card.gold { min-height:268px; border-color:#c49236; background:linear-gradient(180deg,#332719,#19140f); box-shadow:inset 0 0 0 1px #77572e; }
#panel-ranking .ranking-podium-card.silver { margin-top:30px; }
#panel-ranking .ranking-podium-card.bronze { margin-top:30px; }
#panel-ranking .ranking-podium-card.is-you { box-shadow:inset 0 0 0 1px #e0bd70; }
#panel-ranking .ranking-podium-place { color:#e5ad4c; font-size:13px; font-weight:800; letter-spacing:.08em; }
#panel-ranking .ranking-podium-card.silver .ranking-podium-place { color:#c4c8d0; }
#panel-ranking .ranking-podium-card.bronze .ranking-podium-place { color:#d99161; }
#panel-ranking .ranking-podium-outfit { display:grid; place-items:center; width:120px; height:120px; }
#panel-ranking .ranking-podium-outfit .sprite { image-rendering:pixelated; }
#panel-ranking .ranking-podium-name { max-width:100%; overflow:hidden; color:#f0e6d6; font-size:16px; text-overflow:ellipsis; white-space:nowrap; }
#panel-ranking .ranking-podium-score { display:grid; place-items:center; width:min(100%,150px); min-height:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:#f0d28b; font-size:18px; font-weight:900; }
#panel-ranking .ranking-podium-meta,
#panel-ranking .ranking-podium-guild { max-width:100%; overflow:hidden; color:#c6b89f; font-size:15px; text-overflow:ellipsis; white-space:nowrap; }
#panel-ranking .ranking-podium-level { max-width:100%; padding:0; border:0!important; outline:0!important; background:transparent!important; box-shadow:none!important; color:#f0e6d6; font-size:14px; font-weight:800; }
#panel-ranking .ranking-podium-guild { color:#55aaff; font-weight:800; }
#panel-ranking .ranking-table-heading,
#panel-ranking .ranking-entry { display:grid; grid-template-columns:34px 42px minmax(110px,1.3fr) minmax(100px,1fr) minmax(86px,auto); align-items:center; gap:9px; min-width:0; }
#panel-ranking .ranking-table-heading { padding:6px 12px; border-bottom:1px solid #5f4c32; color:#dfaa4d; font-size:11px; font-weight:800; letter-spacing:.08em; }
#panel-ranking .ranking-table-heading span:last-child { text-align:right; }
#panel-ranking .ranking-table-heading.ranking-player-heading { grid-template-columns:34px 42px minmax(110px,1.3fr) minmax(100px,1fr) minmax(86px,auto); }
#panel-ranking .ranking-table-heading.ranking-player-heading span:first-child { grid-column:1 / span 3; }
#panel-ranking .ranking-table-heading.ranking-player-heading span:nth-child(2) { grid-column:4; }
#panel-ranking .ranking-table-heading.ranking-player-heading span:nth-child(3) { grid-column:5; }
#panel-ranking .ranking-table-heading.ranking-guild-heading { grid-template-columns:34px 42px minmax(0,1fr) auto; column-gap:14px; }
#panel-ranking .ranking-table-heading.ranking-guild-heading span:first-child { grid-column:1 / span 3; text-align:left; }
#panel-ranking .ranking-table-heading.ranking-guild-heading span:last-child { grid-column:4; text-align:right; }
#panel-ranking .ranking-entry { grid-template-rows:auto; }
#panel-ranking .ranking-entry .ranking-position { grid-column:1; }
#panel-ranking .ranking-entry .ranking-face { grid-column:2; }
#panel-ranking .ranking-entry .ranking-player { grid-column:3; }
#panel-ranking .ranking-entry .ranking-guild-name { grid-column:4; overflow:hidden; color:#55aaff; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
#panel-ranking .ranking-entry .ranking-player-guild { color:#55aaff; font-weight:800; }
#panel-ranking .ranking-entry .ranking-player small { display:none; }
#panel-ranking .ranking-entry .ranking-score { grid-column:5; }
#panel-ranking .ranking-entry .ranking-score small { display:none; }
#panel-ranking .ranking-guild-entry { grid-template-columns:34px 42px minmax(0,1fr) auto; }
#panel-ranking .ranking-guild-entry .ranking-player { grid-column:3; }
#panel-ranking .ranking-guild-entry .ranking-score { grid-column:4; }
@media(max-width:800px) {
  #panel-ranking .ranking-panel { gap:10px; }
  #panel-ranking .ranking-podium { gap:6px; }
  #panel-ranking .ranking-podium-card,
  #panel-ranking .ranking-podium-card.gold { min-height:210px; padding:11px 5px; }
  #panel-ranking .ranking-podium-card.silver,
  #panel-ranking .ranking-podium-card.bronze { margin-top:22px; }
  #panel-ranking .ranking-podium-outfit { position:relative; width:88px; height:88px; overflow:hidden; }
  #panel-ranking .ranking-podium-outfit > .sprite-box { position:absolute; left:50%; bottom:0; z-index:3; width:108px !important; height:108px !important; margin-left:-54px; transform:scale(.78); transform-origin:bottom center; }
  #panel-ranking .ranking-podium-name { font-size:13px; }
  #panel-ranking .ranking-podium-score { min-height:0; font-size:15px; }
  #panel-ranking .ranking-podium-meta,
  #panel-ranking .ranking-podium-guild { font-size:13px; }
  #panel-ranking .ranking-table-heading { display:none; }
  #panel-ranking .ranking-entry { grid-template-columns:26px 34px minmax(0,1fr) 52px; grid-template-rows:auto auto; gap:3px 7px; padding:8px; }
  #panel-ranking .ranking-entry .ranking-position { grid-column:1; grid-row:1 / span 2; }
  #panel-ranking .ranking-entry .ranking-face { grid-column:2; grid-row:1 / span 2; }
  #panel-ranking .ranking-entry .ranking-player { grid-column:3; grid-row:1; }
  #panel-ranking .ranking-entry .ranking-player small { display:block; font-size:10px; }
  #panel-ranking .ranking-entry .ranking-guild-name { display:none; }
  #panel-ranking .ranking-entry .ranking-score { grid-column:4; grid-row:1 / span 2; }
  #panel-ranking .ranking-entry .ranking-score strong { font-size:11px; }
  #panel-ranking .ranking-entry .ranking-score small { display:none; }
  #panel-ranking .ranking-guild-entry { grid-template-columns:26px 34px minmax(0,1fr) auto; }
  #panel-ranking .ranking-guild-entry .ranking-player { grid-column:3; grid-row:auto; }
  #panel-ranking .ranking-guild-entry .ranking-score { grid-column:4; grid-row:auto; }
}
@media(max-width:420px) {
  #panel-ranking .ranking-podium { gap:4px; }
  #panel-ranking .ranking-podium-card,
  #panel-ranking .ranking-podium-card.gold { min-height:188px; padding:9px 3px; }
  #panel-ranking .ranking-podium-place { font-size:10px; }
  #panel-ranking .ranking-podium-outfit { width:72px; height:72px; }
  #panel-ranking .ranking-podium-outfit > .sprite-box { transform:scale(.64); }
  #panel-ranking .ranking-podium-name { font-size:11px; }
  #panel-ranking .ranking-podium-meta,
  #panel-ranking .ranking-podium-guild { font-size:11px; }
}

/* Árvore de jutsus no formato ARPG da prévia: trilhas molduradas, ícones centrados e sem animações. */
#panel-jutsus .jutsu-tree-page { --jt-gold:#e5bf68; --jt-hi:#ffe09a; display:grid; gap:12px; min-width:0; color:#e8dcc3; font-family:Tahoma,Geneva,sans-serif; }
#panel-jutsus .jutsu-tree-header,
#panel-jutsus .jutsu-tree-selection { min-width:0; border:8px solid transparent; border-image:url("../assets/ui/panel-frame.png") 12 / 8px / 0 stretch; background:linear-gradient(135deg,#241a15,#17110e 55%,#201711); }
#panel-jutsus .jutsu-tree-header { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px; padding:10px 14px; }
#panel-jutsus .jutsu-tree-identity { display:grid; gap:7px; min-width:0; }
#panel-jutsus .jutsu-tree-title-row { display:flex; align-items:center; gap:11px; min-width:0; }
#panel-jutsus .jutsu-tree-title-row .sprite-box { display:grid; place-items:center; width:54px; height:54px; flex:none; overflow:hidden; background:#12100e; border:4px solid transparent; border-image:url("../assets/ui/slot-frame.png") 6 / 4px / 0 stretch; }
#panel-jutsus .jutsu-tree-identity .panel-title { margin:0; color:var(--jt-hi); font-size:24px; line-height:1.2; letter-spacing:.06em; text-transform:uppercase; overflow-wrap:anywhere; }
#panel-jutsus .jutsu-tree-identity .panel-sub { margin:3px 0 0; color:#c2b093; font-size:16px; line-height:1.3; overflow-wrap:anywhere; }
#panel-jutsus .jutsu-tree-caption { margin:0; color:#d2c2a5; font-size:15px; line-height:1.4; overflow-wrap:anywhere; }
#panel-jutsus .jutsu-tree-mobile-hint { display:none; }
#panel-jutsus .jutsu-tree-wallet { display:grid; justify-items:center; gap:6px; min-width:220px; padding:10px 14px; border:1px solid #6e5836; background:#17110e; text-align:center; }
#panel-jutsus .jutsu-tree-wallet > span { color:#d2bc8d; font-size:13px; font-weight:700; letter-spacing:.08em; }
#panel-jutsus .jutsu-tree-wallet > strong { color:#f2cf72; font-size:28px; line-height:1.1; }
#panel-jutsus .jutsu-tree-wallet > small { color:#d2c2a5; font-size:14px; line-height:1.35; overflow-wrap:anywhere; }
#panel-jutsus .jutsu-tree-reset { width:100%; min-height:40px; padding:8px 10px; border:1px solid #735832; background:#2a2118; color:#f0d58e; font:700 14px/1.3 Tahoma,Geneva,sans-serif; white-space:normal; overflow-wrap:anywhere; }
#panel-jutsus .jutsu-tree-reset:disabled { opacity:.48; }
#panel-jutsus .jutsu-tree-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:12px; min-width:0; }
#panel-jutsus .jutsu-tree-path { position:relative; isolation:isolate; display:grid; grid-template-rows:auto auto 1fr; align-content:start; gap:7px; min-width:0; padding:11px 12px 12px; border:8px solid transparent; border-image:url("../assets/ui/panel-frame.png") 12 / 8px / 0 stretch; background:linear-gradient(145deg,#1b171b,#100d12 72%); }
#panel-jutsus .jutsu-tree-watermark { position:absolute; inset:42px 7px 7px; z-index:0; background-image:url("../assets/ui/sasuke-jutsu-watermark.png"); background-size:cover; background-position:center 36%; background-repeat:no-repeat; opacity:.13; pointer-events:none; }
#panel-jutsus .jutsu-tree-path-title { position:relative; z-index:1; justify-self:center; display:grid; place-items:center; min-height:37px; max-width:100%; margin:0 0 2px; padding:4px 14px; border:3px double #725832; background:linear-gradient(#211a18,#120f11); color:var(--jt-hi); font-size:18px; line-height:1.2; letter-spacing:.08em; text-align:center; text-transform:uppercase; overflow-wrap:anywhere; }
#panel-jutsus .jutsu-tree-path-grid { position:relative; z-index:1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:136px; align-items:start; justify-items:center; gap:7px 10px; min-width:0; padding:2px 3px 4px; }
#panel-jutsus .jutsu-tree-path-raiton .jutsu-tree-path-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
#panel-jutsus .jutsu-tree-path-katon .jutsu-tree-path-grid { width:min(100%,360px); justify-self:center; }
#panel-jutsus .jutsu-tree-node { position:relative; display:grid; place-items:start center; width:min(100%,160px); min-width:0; min-height:126px; padding:5px 3px 4px; border:0; background:transparent; }
#panel-jutsus .jutsu-tree-node.locked { opacity:.72; }
#panel-jutsus .jutsu-tree-select { display:grid; grid-template-rows:70px auto; justify-items:center; align-content:start; gap:4px; width:100%; min-width:0; min-height:120px; padding:2px; border:0!important; background:transparent!important; color:#e8dcc3; text-align:center; white-space:normal; box-shadow:none!important; }
#panel-jutsus .jutsu-tree-node-frame { position:relative; display:grid; place-items:center; width:66px; height:66px; flex:none; margin:0 auto 3px; background:linear-gradient(135deg,#302a43,#171522); border:4px ridge #85809a; box-shadow:inset 0 0 0 2px #100d14,0 2px 0 #080708,0 0 0 1px #080708; }
#panel-jutsus .jutsu-tree-select.selected .jutsu-tree-node-frame { border-color:#edc36b; box-shadow:inset 0 0 0 2px #100d14,0 0 0 2px #603f1c; }
#panel-jutsus .jutsu-tree-node-frame .spell-icon { display:block; width:50px; height:50px; max-width:100%; max-height:100%; object-fit:contain; image-rendering:pixelated; }
#panel-jutsus .jutsu-tree-rank { position:absolute; top:-7px; right:-8px; display:grid; place-items:center; min-width:22px; height:22px; padding:0 4px; border:1px solid #d5bd83; background:#08090d; color:#fff5d4; font:600 12px/1 Tahoma,Geneva,sans-serif; }
#panel-jutsus .jutsu-tree-node-copy { display:grid; justify-items:center; gap:0; width:100%; min-width:0; }
#panel-jutsus .jutsu-tree-node-copy strong { display:block; width:100%; min-height:0; color:#f0e4ca; font-size:16px; font-weight:600; line-height:1.2; overflow-wrap:anywhere; }
#panel-jutsus .jutsu-tree-level,
#panel-jutsus .jutsu-tree-state { display:block; max-width:100%; color:#d0bf9e; font-size:14px; line-height:1.3; overflow-wrap:anywhere; }
#panel-jutsus .jutsu-tree-state.available { color:#9bd18c; }
#panel-jutsus .jutsu-tree-state.locked { color:#d1a47c; font-size:12px; white-space:nowrap; overflow-wrap:normal; }
#panel-jutsus .jutsu-tree-quick-add { position:absolute; z-index:3; top:52px; left:calc(50% - 39px); display:grid; place-items:center; width:23px; height:23px; padding:0; border:2px outset #c39342; background:linear-gradient(#9d722d,#61451f); color:#fff0bb; font:bold 18px/1 Tahoma,Geneva,sans-serif; text-shadow:1px 1px #35210c; }
#panel-jutsus .jutsu-tree-quick-add:disabled { opacity:.48; }
#panel-jutsus .jutsu-tree-starters { grid-column:1/-1; }
#panel-jutsus .jutsu-tree-starters .jutsu-tree-path-grid { grid-template-columns:repeat(3,minmax(0,1fr)); grid-auto-rows:minmax(132px,auto); max-width:650px; width:100%; justify-self:center; }
#panel-jutsus .jutsu-tree-support { position:relative; z-index:1; display:grid; justify-items:center; gap:3px; margin:2px 4px 0; padding:8px 2px 0; border-top:1px solid #56452f; color:#d0bd98; font-size:14px; }
#panel-jutsus .jutsu-tree-support-title { margin:0; }
#panel-jutsus .jutsu-tree-path-suporte > .jutsu-tree-path-grid { grid-template-columns:minmax(0,1fr); }
#panel-jutsus .jutsu-tree-path-suporte > .jutsu-tree-path-grid > .jutsu-tree-node { justify-self:center; }
#panel-jutsus .jutsu-tree-support-grid { display:grid; grid-template-columns:minmax(112px,1fr); justify-items:center; width:min(100%,420px); }
#panel-jutsus .jutsu-tree-support .jutsu-tree-node { width:112px; min-height:108px; }
#panel-jutsus .jutsu-tree-support .jutsu-tree-select { min-height:104px; }
#panel-jutsus .jutsu-tree-support .jutsu-tree-node-frame { width:58px; height:58px; }
#panel-jutsus .jutsu-tree-support .jutsu-tree-node-frame .spell-icon { width:44px; height:44px; }
#panel-jutsus .jutsu-tree-support .jutsu-tree-quick-add { top:43px; left:calc(50% - 30px); }
#panel-jutsus .jutsu-tree-empty { grid-column:1/-1; padding:18px; border:1px solid #51412d; color:#c7b99e; text-align:center; }
#panel-jutsus .jutsu-tree-count { color:#c9b48d; font-size:13px; text-align:right; }
.tooltip:has(.jutsu-tooltip) { width:min(320px,calc(100vw - 16px)); max-width:min(320px,calc(100vw - 16px)); padding:7px 8px; }
.jutsu-tooltip { width:100%; min-width:240px; color:#e8dcc3; font-family:Tahoma,Geneva,sans-serif; }
.jutsu-tooltip .item-head { align-items:center; gap:7px; padding-bottom:5px; border-bottom:1px solid rgba(198,169,95,.24); }
.jutsu-tooltip .item-head .ibox { width:36px; height:36px; flex:0 0 36px; border:3px ridge #9b885e; border-radius:2px; background:#17131b; }
.jutsu-tooltip .item-head .ibox .spell-icon { width:27px; height:27px; object-fit:contain; image-rendering:pixelated; }
.jutsu-tooltip .jutsu-tooltip-name { color:#f3d488; font-size:15px; line-height:1.2; overflow-wrap:anywhere; }
.jutsu-tooltip .item-stats { grid-template-columns:minmax(0,1fr); margin:4px 0 0; gap:0; }
.jutsu-tooltip .item-stat-line { align-items:flex-start; gap:6px; min-height:20px; padding:0 0 2px; line-height:1.25; font-size:13px; }
.jutsu-tooltip .item-stat-line > span { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; }
.jutsu-tooltip .item-stat-line > b { flex:0 0 auto; max-width:62%; color:#f0d68d; font-family:Tahoma,Geneva,sans-serif; font-size:13px; text-align:right; overflow-wrap:anywhere; white-space:normal; }
.jutsu-tooltip .item-stat-line.jutsu-tooltip-state { align-items:center; }
.jutsu-tooltip .item-stat-line.jutsu-tooltip-state > span { flex:1 1 auto; white-space:nowrap; }
.jutsu-tooltip .item-stat-line.jutsu-tooltip-state > b { flex:0 0 auto; max-width:62%; white-space:normal; overflow-wrap:anywhere; }
@media(max-width:820px) {
  #panel-jutsus .jutsu-tree-header { grid-template-columns:minmax(0,1fr); }
  #panel-jutsus .jutsu-tree-caption { font-size:12px; line-height:1.25; white-space:nowrap; letter-spacing:-.25px; }
  #panel-jutsus .jutsu-tree-mobile-hint { display:block; margin:0; color:#b9a783; font-size:12px; line-height:1.3; }
  #panel-jutsus .jutsu-tree-wallet { grid-template-columns:auto auto auto; justify-content:center; align-items:center; gap:8px; }
  #panel-jutsus .jutsu-tree-wallet > strong { font-size:24px; }
  #panel-jutsus .jutsu-tree-reset { grid-column:1/-1; min-height:42px; font-size:15px; }
}
@media(max-width:650px) {
  #panel-jutsus .jutsu-tree-columns { grid-template-columns:minmax(0,1fr); }
  #panel-jutsus .jutsu-tree-starters { grid-column:auto; }
  #panel-jutsus .jutsu-tree-path { padding:9px 8px 10px; }
  #panel-jutsus .jutsu-tree-path-grid { grid-auto-rows:minmax(122px,auto); }
  #panel-jutsus .jutsu-tree-starters .jutsu-tree-path-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:420px) {
  #panel-jutsus .jutsu-tree-title-row .sprite-box { width:46px; height:46px; }
  #panel-jutsus .jutsu-tree-identity .panel-title { font-size:18px; }
  #panel-jutsus .jutsu-tree-caption { font-size:12px; }
  #panel-jutsus .jutsu-tree-wallet { grid-template-columns:minmax(0,1fr); gap:2px; }
  #panel-jutsus .jutsu-tree-wallet > span { font-size:12px; }
  #panel-jutsus .jutsu-tree-wallet > strong { font-size:24px; }
  #panel-jutsus .jutsu-tree-wallet > small { font-size:13px; }
  #panel-jutsus .jutsu-tree-reset { font-size:14px; }
  #panel-jutsus .jutsu-tree-starters .jutsu-tree-path-grid { grid-template-columns:minmax(0,1fr); }
}

/* Elimina o flash azul quadrado do toque/clique em controles e áreas clicáveis. */
*, *::before, *::after { -webkit-tap-highlight-color:transparent !important; }
button, a, [role="button"], [role="tab"], [onclick] {
  -webkit-tap-highlight-color:transparent !important;
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  user-select:none;
}
button:focus:not(:focus-visible), a:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible), [role="tab"]:focus:not(:focus-visible), [onclick]:focus:not(:focus-visible) {
  outline:none !important;
  box-shadow:none !important;
}
button:focus-visible, a:focus-visible, [role="button"]:focus-visible, [role="tab"]:focus-visible {
  outline:2px solid #c99d50;
  outline-offset:2px;
}

/* Player market: compact marketplace surface, styled with the existing game palette. */
.market-currency-img { display:inline-block; flex:0 0 auto; width:20px; height:20px; max-width:20px; max-height:20px; object-fit:contain; vertical-align:middle; image-rendering:pixelated; }
.market-choice-modal .market-currency-option-icon { width:22px; height:22px; max-width:22px; max-height:22px; }
.market-dialog .market-currency-fixed { display:flex; align-items:center; gap:6px; }
.market-dialog .market-currency-amount { display:inline-flex; align-items:center; flex-wrap:wrap; gap:6px; min-width:0; vertical-align:middle; }
#panel-market .market-panel { display:grid; gap:12px; min-width:0; font-size:15px; }
#panel-market .market-heading { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; text-align:center; }
#panel-market .market-heading > div:first-child { width:100%; text-align:center; }
#panel-market .market-heading .panel-sub { margin-bottom:0; font-size:15px; line-height:1.45; }
#panel-market .market-wallet { display:grid; justify-items:center; gap:2px; min-width:115px; padding:7px 11px; border:1px solid #65502f; background:#211c14; text-align:center; }
#panel-market .market-wallet span { color:#ad9a7b; font-size:13px; }
#panel-market .market-wallet strong { color:#f0d18a; font-size:16px; }
#panel-market .market-tabs,
#panel-market .market-category-tabs { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; min-width:0; overflow-x:visible; border-bottom:1px solid #5f4c32; }
#panel-market .market-currency-tabs { display:flex; flex-wrap:wrap; justify-content:center; gap:7px; align-items:center; }
#panel-market .market-currency-filter { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:38px; padding:7px 11px; border:1px solid #59472f; background:#211b15; color:#c9b99e; font-size:14px; font-weight:700; cursor:pointer; }
#panel-market .market-currency-filter.active { border-color:#d2a34d; background:#302417; color:#f2d28b; }
#panel-market .market-currency-img { display:inline-block; flex:0 0 auto; width:20px; height:20px; object-fit:contain; vertical-align:middle; image-rendering:pixelated; }
#panel-market .market-wallet .market-currency-img { width:18px; height:18px; }
#panel-market .market-wallet > span { display:flex; align-items:center; justify-content:flex-end; gap:6px; }
#panel-market .market-currency-option-icon { width:22px; height:22px; }
#panel-market .market-currency-amount { display:inline-flex; align-items:center; flex-wrap:wrap; gap:6px; min-width:0; vertical-align:middle; }
#panel-market .market-currency-name { color:#c4ae88; font-size:.88em; font-weight:600; }
#panel-market .market-price .market-currency-amount { gap:5px; }
#panel-market .market-price .market-currency-name { font-size:13px; }
#panel-market .market-currency-icon img { width:26px; height:26px; object-fit:contain; image-rendering:pixelated; }
#panel-market .market-currency-large .market-currency-amount { justify-content:center; gap:10px; }
#panel-market .market-currency-large .market-currency-img { width:42px; height:42px; }
#panel-market .market-currency-large .market-currency-name { font-size:18px; }
#panel-market .market-return-currency .market-currency-amount { font-size:16px; }
#panel-market .market-return-currency .market-currency-img { width:26px; height:26px; }
#panel-market .market-tab,
#panel-market .market-category { flex:0 0 auto; padding:9px 13px; border:0; border-bottom:2px solid transparent; color:#b7a586; background:transparent; font-size:15px; font-weight:700; cursor:pointer; }
#panel-market .market-tab.active,
#panel-market .market-category.active { border-bottom-color:#d3a246; color:#f2ca69; }
#panel-market .market-controls { display:grid; gap:9px; }
#panel-market .market-search-row { display:flex; align-items:center; gap:7px; min-width:0; }
#panel-market .market-search-row input { flex:1; min-width:80px; }
#panel-market .market-search-row .btn-sm { min-height:40px; font-size:14px; }
#panel-market .market-search-row input.input { min-height:44px; font-size:16px; }
#panel-market .market-create-btn { flex:0 0 auto; color:#f2d38e; }
#panel-market .market-listings { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); align-items:start; gap:9px; min-width:0; }
#panel-market .market-card { display:grid; align-content:start; align-self:start; gap:9px; min-width:0; padding:10px; border:1px solid #51412d; background:#1d1914; }
#panel-market .market-card.has-rarity { border-color:var(--market-rarity); }
.market-product { display:flex; align-items:center; gap:10px; min-width:0; min-height:58px; }
.market-product-icon { position:relative; flex:0 0 54px; width:54px; height:54px; display:grid; place-items:center; border:1px solid #3b4560; border-radius:4px; background:#0c0f16; }
.market-product-icon.rare { border-color:var(--market-rarity); }
.market-product-icon .icon-item, .market-product-icon .item-icon-animated { width:42px; height:42px; }
.market-product-info { display:grid; gap:4px; min-width:0; }
.market-product-info strong { overflow:hidden; color:#eee2cf; font-size:15px; text-overflow:ellipsis; white-space:nowrap; }
.market-product-info small { color:#ad9a7b; font-size:14px; }
.market-rarity-label { font-size:14px; font-weight:800; }
.market-currency-icon { flex:0 0 54px; display:grid; place-items:center; width:54px; height:54px; border:1px solid #65502f; border-radius:4px; color:#f0d18a; background:#211c14; font-size:26px; }
#panel-market .market-currency-fixed { min-height:36px; padding:9px 10px; border:1px solid #59472f; background:#211b15; color:#f0d18a; font-weight:700; }
.market-currency-fixed[hidden], .market-choice-trigger[hidden] { display:none; }
#panel-market .market-card-footer { display:grid; gap:6px; padding-top:7px; border-top:1px solid #403426; }
#panel-market .market-card-footer small { color:#ad9a7b; font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
#panel-market .market-price { color:#f0d18a; font-weight:800; font-size:16px; }
#panel-market .market-card .btn-sm { min-height:38px; font-size:14px; }
#panel-market .market-buy-btn { justify-self:start; font-size:14px; }
#panel-market .market-currency-large { display:grid; place-items:center; min-height:82px; color:#f0d18a; font-size:24px; font-weight:800; }
#panel-market .market-empty,
#panel-market .market-loading { display:grid; place-items:center; grid-column:1/-1; min-height:110px; padding:16px; border:1px solid #403426; color:#b7a990; background:#191612; text-align:center; }
#panel-market .market-error { color:#e3a18c; }
#panel-market .market-footer { display:flex; align-items:center; justify-content:center; gap:12px; color:#b7a990; font-size:14px; }
#panel-market .market-footer .btn-sm { font-size:14px; }
#panel-market .market-footer button:disabled { opacity:.45; }
.market-form { display:grid; gap:10px; }
.modal-box:has(.market-form) {
  box-sizing:border-box;
  width:min(680px,94vw);
  max-height:min(90dvh,900px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.modal-box:has(.market-form) .modal-head { flex:0 0 auto; }
.modal-box:has(.market-form) .modal-body { min-height:0; flex:1 1 auto; overflow:auto; overscroll-behavior:contain; }
.market-form-row label { display:grid; gap:5px; color:#d7c9b0; font-size:12px; }
.market-form-row[hidden] { display:none; }
.market-choice-trigger { display:grid; grid-template-columns:minmax(0,1fr) auto 14px; align-items:center; gap:10px; width:100%; min-height:36px; padding:7px 10px; border:1px solid #665033; background:#211b14; color:#d7c9b0; text-align:left; }
.market-choice-trigger b { color:#f0d18a; font-size:13px; }
.market-choice-trigger > span:last-child { color:#bd9b60; text-align:right; }
.market-choice-overlay { position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:16px; background:rgba(4,3,2,.72); }
.market-choice-modal { position:relative; isolation:isolate; width:min(360px,100%); padding:18px; border:1px solid #806746; background:linear-gradient(145deg,#30261d,#1e1914); color:#eadcc4; box-shadow:0 12px 36px rgba(0,0,0,.62); }
.market-choice-modal::after { position:absolute; inset:0; z-index:2; border:10px solid transparent; border-image:url("../assets/ui/panel-frame.png") 12 / 10px / 0 stretch; content:""; pointer-events:none; }
.market-choice-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; color:#f0cc73; font:700 17px Georgia,"Times New Roman",serif; }
.market-choice-options { display:grid; gap:7px; }
.market-choice-option { min-height:38px; padding:8px 10px; border:1px solid #59472f; background:#211b15; color:#dfd3bf; text-align:left; }
.market-choice-option.active { border-color:#d2a34d; background:#302417; color:#f2d28b; }
.market-choice-option:has(.market-currency-option-icon) { display:flex; align-items:center; gap:10px; }
.market-note { margin:0; color:#ad9a7b; font-size:12px; line-height:1.45; }
.market-submit { width:100%; margin-top:4px; }
.market-buy-confirm { display:grid; gap:8px; }
.market-buy-confirm > p { margin:0; }
.market-price-large { color:#f0d18a; font-size:17px; font-weight:800; }
.market-confirm-dialog .market-dialog-body { font-size:16px; line-height:1.45; }
.market-confirm-dialog .item-head { align-items:center; gap:12px; }
.market-confirm-dialog .item-head .ibox { width:58px; height:58px; flex:0 0 58px; }
.market-confirm-dialog .item-head .icon-item { width:44px; height:44px; }
.market-confirm-dialog .item-name { font-size:18px; line-height:1.3; }
.market-confirm-dialog .item-head .small,
.market-confirm-dialog .item-quality-line,
.market-confirm-dialog .item-required-level,
.market-confirm-dialog .item-stat-line,
.market-confirm-dialog .item-rarity-line { font-size:15px; line-height:1.4; }
.market-confirm-dialog .item-quality-line { padding-block:5px; }
.market-confirm-dialog .item-stat-line { padding-block:4px; }
.market-confirm-dialog .item-sell-value { font-size:15px; }
.market-confirm-dialog .market-buy-confirm > p { font-size:16px; }
.market-confirm-dialog .market-price-large { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:19px; }
.market-confirm-dialog .market-price-large .market-currency-amount { gap:8px; }
#panel-market .market-product-icon { cursor:help; }
.market-returns { display:grid; gap:9px; max-height:62vh; overflow:auto; }
.market-return-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:9px; padding:8px; border:1px solid #51412d; background:#1d1914; }
.nav-btn .market-notify-badge { min-width:17px; height:17px; display:inline-grid; place-items:center; padding:0 5px; border:1px solid #ff8a83; border-radius:50%; color:#fff; background:#c93432; font-size:10px; line-height:1; }
.nav-btn .market-notify-badge:empty { display:none; }
.market-notification-feed:not(:empty) { display:grid; gap:5px; padding:8px; border:1px solid #6d382f; background:#241916; }
.market-notification { display:grid; grid-template-columns:8px minmax(0,1fr) auto; align-items:center; gap:8px; color:#f0dfce; font-size:14px; }
.market-notification-dot { width:7px; height:7px; border-radius:50%; background:#ed514b; }
.market-notification time { color:#aa9781; font-size:13px; white-space:nowrap; }
.market-field-label { color:#d7c9b0; font-size:12px; }
.market-source-tabs { display:flex; gap:5px; overflow:auto; border-bottom:1px solid #57452f; }
.market-source-tab { flex:0 0 auto; padding:7px 10px; border:0; border-bottom:2px solid transparent; color:#b7a586; background:transparent; font-size:12px; font-weight:700; }
.market-source-tab.active { color:#f2ca69; border-bottom-color:#d3a246; }
.market-item-picker { display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:6px; max-height:none; padding:3px; overflow:visible; border:1px solid #403426; background:#171411; }
.market-item-option { display:grid; justify-items:center; align-content:start; gap:4px; min-width:0; min-height:94px; padding:7px 5px; border:1px solid #40382d; background:#211c16; color:#dfd3bf; text-align:center; }
.market-item-option.active { border-color:#d2a34d; background:#2b2317; }
.market-item-option-icon { position:relative; display:grid; place-items:center; width:48px; height:48px; border:1px solid #544530; background:#11100e; }
.market-item-option-icon .icon-item { width:40px; height:40px; image-rendering:pixelated; }
.market-item-option-icon > b { position:absolute; right:1px; bottom:0; padding:0 3px; color:#fff; background:#17130f; font-size:9px; }
.market-item-option-name { width:100%; overflow:hidden; color:#eee2cf; font-size:11px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.market-item-option small { color:#ac9a82; font-size:9px; }
.market-item-preview { max-height:none; padding:8px; overflow:visible; border:1px solid #57452f; background:#201b15; }
.market-item-preview:empty { display:none; }
.market-picker-empty { grid-column:1/-1; margin:0; padding:14px; color:#ac9a82; font-size:14px; text-align:center; }
/* Subjanelas do mercado ficam sobre o modal principal sem desmontar o painel. */
.market-dialog-overlay { position:fixed; inset:0; z-index:90; display:grid; place-items:center; padding:12px; background:rgba(4,3,2,.72); }
.market-dialog { display:flex; flex-direction:column; width:min(820px,calc(100vw - 24px)); max-height:min(92dvh,900px); overflow:hidden; border:1px solid #806746; background:#211a13; color:#eadcc4; }
.market-dialog-head { display:flex; flex:0 0 auto; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid #65502f; color:#f0cc73; font-size:20px; }
.market-dialog-head button { min-width:38px; min-height:38px; font-size:20px; }
.market-dialog-body { min-height:0; padding:16px; overflow:auto; overscroll-behavior:contain; font-size:15px; line-height:1.45; }
.market-dialog-body .btn-sm { min-height:40px; font-size:14px; }
.market-dialog-body .market-form { gap:14px; }
.market-dialog-body .market-note { font-size:14px; }
.market-dialog-body .market-field-label,
.market-dialog-body .market-form-row label { font-size:15px; line-height:1.4; }
.market-dialog-body .input { min-height:44px; padding:9px 11px; font-size:16px; }
.market-dialog-body .market-choice-trigger { min-height:44px; font-size:15px; }
.market-dialog-body .market-choice-trigger b { font-size:16px; }
.market-dialog-body .market-asset-choice { min-height:50px; border-color:#c99b4e; background:linear-gradient(180deg,#4b371d,#332415); color:#ffe0a0; font-size:16px; font-weight:800; box-shadow:inset 0 0 0 1px rgba(255,218,142,.14); }
.market-dialog-body .market-asset-choice b { color:#fff0c9; font-size:17px; }
.market-dialog-body .market-asset-choice:focus-visible { outline:2px solid #f0cc73; outline-offset:2px; }
.market-dialog-body .market-source-tab { padding:10px 13px; font-size:14px; }
.market-dialog-body .market-item-picker { max-height:min(34dvh,320px); overflow:auto; overscroll-behavior:contain; contain:content; }
.market-dialog-body .market-item-option { min-height:104px; gap:6px; }
.market-dialog-body .market-item-option-icon { width:54px; height:54px; }
.market-dialog-body .market-item-option-icon .icon-item { width:46px; height:46px; }
.market-dialog-body .market-item-option-name { min-height:2.3em; font-size:14px; line-height:1.15; white-space:normal; }
.market-dialog-body .market-item-option small { font-size:12px; }
.market-dialog-body .market-item-preview { max-height:min(34dvh,320px); overflow:auto; contain:content; font-size:14px; }
.market-dialog-body .market-item-preview .item-stats { font-size:14px; line-height:1.45; }
.market-dialog-body .market-item-preview .item-stat-line { padding-block:3px; }
.market-dialog-body .market-item-preview .item-stat-line > span,
.market-dialog-body .market-item-preview .item-stat-line > b { font-size:14px; }
.market-dialog-body .market-item-preview .item-rarity-line { font-size:14px; }
.market-dialog-body .market-submit { min-height:46px; font-size:16px; font-weight:800; }
.market-dialog-body .market-price-large { font-size:19px; }
.market-choice-overlay { z-index:110; }
@media(max-width:700px) {
  .market-dialog-overlay { align-items:end; padding:8px 8px max(8px,env(safe-area-inset-bottom)); }
  .market-dialog { width:100%; max-height:92dvh; }
  .market-dialog-head { padding:10px 12px; font-size:18px; }
  .market-dialog-body { padding:12px; }
  .market-dialog-body .market-item-picker { grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); max-height:30dvh; }
  .market-dialog-body .market-item-preview { max-height:28dvh; }
}
@media(max-width:700px) {
  .modal-box:has(.market-form) { width:94vw; max-height:88dvh; }
  #panel-market .market-heading { align-items:center; }
  #panel-market .market-wallet { min-width:90px; padding:6px 8px; }
  #panel-market .market-tabs { gap:2px; }
  #panel-market .market-tab,
  #panel-market .market-category { padding:8px 10px; font-size:14px; }
  #panel-market .market-currency-filter { min-height:36px; padding:6px 9px; font-size:13px; }
  #panel-market .market-currency-amount { gap:4px; }
  #panel-market .market-listings { grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr)); }
  #panel-market .market-search-row { flex-wrap:wrap; }
  #panel-market .market-search-row input { flex-basis:100%; }
  #panel-market .market-footer { gap:6px; font-size:14px; }
  #panel-market .market-footer button { padding-inline:8px; font-size:14px; }
  .market-notification { grid-template-columns:8px minmax(0,1fr); }
  .market-notification time { grid-column:2; }
  .market-item-picker { grid-template-columns:repeat(auto-fill,minmax(88px,1fr)); max-height:none; overflow:visible; }
  .market-item-option { min-height:84px; }
  .market-item-preview { max-height:none; overflow:visible; }
}

/* Saldo compartilhado e slots da conta. */
.chars-account-bar { display:flex; align-items:center; flex-wrap:wrap; gap:10px 22px; margin:0 0 14px; padding:12px; border:1px solid #6a5435; border-radius:8px; background:linear-gradient(145deg,#282219,#1c1915); }
.chars-account-bar > div { display:grid; gap:3px; }
.chars-account-bar > div span { color:var(--muted); font-size:11px; }
.chars-account-bar > div strong { color:#f0d18a; font-size:16px; }
.chars-account-bar #btn-unlock-slot { min-height:38px; margin-left:auto; }
#btn-new-char:disabled, #btn-unlock-slot:disabled { opacity:.62; cursor:not-allowed; }
#chars-account-error { margin:0 0 12px; }
#screen-chars #chars-account-error { font-size:14px; line-height:1.4; }

/* Criação de personagem compacta e utilizável em telas touch. */
@media (max-width:800px) {
  #screen-create { min-height:100dvh; overflow-y:auto; overscroll-behavior:contain; }
  #screen-create .create-wrap { width:min(calc(100% - 16px),680px); min-height:0; margin:8px auto; padding:16px 18px calc(20px + env(safe-area-inset-bottom)); }
  #screen-create .create-wrap::after { border-width:8px; border-image-width:8px; }
  #screen-create .create-header { margin-bottom:14px; }
  #screen-create .create-header .logo-big { font-size:clamp(28px,8vw,40px); }
  #screen-create .create-header p { margin:7px 0 0; font-size:12px; line-height:1.45; }
  #screen-create .create-body { grid-template-columns:minmax(0,1fr); gap:12px; }
  #screen-create .voc-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  #screen-create .voc-card { min-width:0; padding:8px 6px; }
  #screen-create .voc-card .sprite-box { flex-basis:48px; width:48px !important; height:48px !important; margin-bottom:6px; }
  #screen-create .voc-card .sprite-box .sprite { transform:scale(.75); }
  #screen-create .voc-card .voc-name { font-size:12px; }
  #screen-create .voc-card .voc-sub { font-size:10px; }
  #screen-create .voc-detail { position:static; display:grid; grid-template-columns:76px minmax(0,1fr); grid-template-rows:auto; align-items:center; column-gap:12px; padding:12px; }
  #screen-create .voc-detail > * { grid-column:auto; grid-row:auto; }
  #screen-create .voc-detail .portrait { grid-column:1; grid-row:1 / span 3; width:76px; height:86px; margin:0; }
  #screen-create .voc-detail .voc-spell-title,
  #screen-create .voc-detail .voc-saga-title { grid-column:1 / -1; }
  #screen-create .voc-detail h3 { font-size:17px; }
  #screen-create .voc-detail p { margin:3px 0; font-size:11px; }
  #screen-create .voc-detail ul, #screen-create .voc-detail .saga-strip { grid-column:1 / -1; }
  #screen-create .voc-detail ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 10px; margin-top:8px; }
  #screen-create .voc-detail li { font-size:10px; }
  #screen-create .create-footer { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:9px; margin-top:14px; }
  #screen-create .create-footer .field { min-width:0; }
  #screen-create .create-footer .field:first-of-type { grid-column:1 / -1; }
  #screen-create .create-footer .field input,
  #screen-create .create-footer .field select { box-sizing:border-box; width:100%; min-width:0; min-height:42px; }
  #screen-create .create-footer > .btn { min-height:42px; padding:9px 8px; }
}
@media (max-width:420px) {
  #screen-chars .card-title { align-items:flex-start; gap:8px; }
  #screen-chars .chars-account-bar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:10px; }
  #screen-chars .chars-account-bar #btn-unlock-slot { grid-column:1 / -1; width:100%; margin:0; }
  #screen-create .create-wrap { padding-inline:9px; }
  #screen-create .create-footer > .btn { font-size:12px; }
}

/* Helper leve: sem blur, moldura rasterizada, sombras ou transições no modal. */
.modal:has(.helper-shell) { backdrop-filter:none; background:rgba(0,0,0,.62); }
.modal-box:has(.helper-shell) {
  border:1px solid #55452f; background:#1d1915; box-shadow:none;
}
.modal-box:has(.helper-shell)::after { display:none; }
.modal-box:has(.helper-shell) *,
.modal-box:has(.helper-shell) *::before,
.modal-box:has(.helper-shell) *::after {
  animation:none !important; transition:none !important; filter:none !important;
  box-shadow:none !important; text-shadow:none !important;
}
.modal-box:has(.helper-shell) .helper-card,
.modal-box:has(.helper-shell) .helper-rotation-item,
.modal-box:has(.helper-shell) .helper-learned-spell { background:#211c17; }
.modal-box:has(.helper-shell) .helper-choice.active { background:#735a2d; }
.modal-box:has(.helper-shell) .helper-tab:hover,
.modal-box:has(.helper-shell) .helper-learned-spell:hover:not(:disabled) { background:#30271c; }
.modal-box:has(.helper-shell) button:active { transform:none !important; }
.helper-learned-spell { content-visibility:auto; contain-intrinsic-size:55px; }
@media (max-width:600px) {
  .modal-box:has(.helper-shell) { max-height:88dvh; }
  .helper-tabs { gap:3px; }
  .helper-tab { flex:1 1 0; min-width:0; min-height:44px; flex-direction:column; gap:3px; padding:5px 2px; font-size:9px; line-height:1.15; white-space:normal; }
  .helper-tab > span { width:auto; }
}
.helper-pvp-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.helper-pvp-option { min-width:0; padding:10px 11px; border:1px solid #51432f; border-radius:5px; background:#211b15; }
.helper-pvp-option-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.helper-pvp-option-head > strong { color:#f0d68f; font-size:16px; }
.helper-pvp-option > p { margin:8px 0 0; color:#d6c9b2; font-size:15px; line-height:1.6; }
.helper-pvp-intro { font-size:15px !important; line-height:1.6 !important; }
.helper-pvp-toggle { flex:0 0 auto; min-width:76px; min-height:29px; padding:5px 10px; border:1px solid; border-radius:4px; font:700 12px/1.1 "Oxanium",sans-serif; cursor:pointer; }
.helper-pvp-toggle.is-on { border-color:#43884d; background:#24452a; color:#a5f0a4; }
.helper-pvp-toggle.is-off { border-color:#a34b42; background:#4b2421; color:#ffc0b4; }

/* Jutsus usam o painel original em um modal leve, sem parar a batalha ao fundo. */
.modal:has(.jutsu-modal-shell) { backdrop-filter:none; background:rgba(0,0,0,.62); }
.modal-box:has(.jutsu-modal-shell) {
  display:flex; flex-direction:column; width:min(1120px,96vw); height:min(900px,90dvh); max-height:90dvh;
  overflow:hidden; padding:12px; border:1px solid #55452f; border-radius:4px; background:#1d1915; box-shadow:none;
}
.modal-box:has(.jutsu-modal-shell)::after { display:none; }
.modal-box:has(.jutsu-modal-shell) .modal-head { flex:0 0 auto; margin:0; padding:0 2px 9px; border-bottom:1px solid #5d4a31; }
.modal-box:has(.jutsu-modal-shell) .modal-body { flex:1 1 auto; min-width:0; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; padding:9px 3px 3px; }
.modal-box:has(.jutsu-modal-shell) *,
.modal-box:has(.jutsu-modal-shell) *::before,
.modal-box:has(.jutsu-modal-shell) *::after { animation:none!important; transition:none!important; filter:none!important; box-shadow:none!important; text-shadow:none!important; }
.jutsu-modal-shell, .jutsu-modal-shell #panel-jutsus { display:block; width:100%; min-width:0; }
@media(max-width:800px) {
  .modal-box:has(.jutsu-modal-shell) { width:calc(100vw - 16px); height:calc(100dvh - 16px); max-height:calc(100dvh - 16px); padding:9px; }
  .modal-box:has(.jutsu-modal-shell) .modal-body { padding:7px 1px 2px; }
}

/* Ficha do personagem em modal: mesmas informações do painel, com hierarquia visual compacta. */
.modal:has(.character-modal-shell) { backdrop-filter:none; background:rgba(0,0,0,.62); }
.modal-box:has(.character-modal-shell) {
  display:flex; flex-direction:column; width:min(1120px,96vw); height:min(900px,90dvh); max-height:90dvh;
  overflow:hidden; padding:12px; border:1px solid #55452f; border-radius:4px; background:#1d1915; box-shadow:none;
}
.modal-box:has(.character-modal-shell)::after { display:none; }
.modal-box:has(.character-modal-shell) .modal-head { flex:0 0 auto; margin:0; padding:0 2px 9px; border-bottom:1px solid #5d4a31; }
.modal-box:has(.character-modal-shell) .modal-body { flex:1 1 auto; min-width:0; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; padding:9px 3px 3px; }
.modal-box:has(.character-modal-shell) *,
.modal-box:has(.character-modal-shell) *::before,
.modal-box:has(.character-modal-shell) *::after { animation:none!important; transition:none!important; filter:none!important; box-shadow:none!important; text-shadow:none!important; }
.character-modal-shell, .character-modal-shell #panel-char { display:block; width:100%; min-width:0; }
.character-modal-shell #panel-char.character-sheet { gap:11px; }
.character-modal-shell #panel-char .character-heading { display:none; }
.character-modal-shell #panel-char .character-hero {
  position:relative; isolation:isolate; display:grid; grid-template-columns:72px minmax(0,1fr) 64px; align-items:center;
  gap:12px; min-height:220px; overflow:hidden; padding:16px 20px;
  border:1px solid #5d4a31; border-radius:12px; background:linear-gradient(115deg,#2a241c,#211d18 48%,#1d1915);
}
.character-modal-shell #panel-char .character-hero > .sprite-box { position:relative; z-index:1; width:68px; height:82px; align-self:end; margin-bottom:7px; background:transparent; border:0; }
.character-modal-shell #panel-char .character-identity { position:relative; z-index:1; grid-column:2; grid-row:1; display:grid; gap:5px; }
.character-modal-shell #panel-char .character-name { font-size:clamp(21px,3vw,30px); }
.character-modal-shell #panel-char .character-meta { font-size:15px; }
.character-modal-shell #panel-char .character-chips { margin-top:1px; }
.character-modal-shell #panel-char .character-level-badge {
  position:relative; z-index:1; grid-column:3; grid-row:1; display:grid; align-content:center; justify-items:center;
  width:64px; height:64px; border:2px solid #ffd078; border-radius:50%; background:#a85218; color:#fff0c6;
}
.character-modal-shell #panel-char .character-level-badge span { font-size:9px; font-weight:800; letter-spacing:.08em; }
.character-modal-shell #panel-char .character-level-badge b { font-size:24px; line-height:1.05; }
.character-modal-shell #panel-char .character-portrait { position:absolute; z-index:0; top:0; right:12%; width:auto; height:100%; max-width:45%; object-fit:contain; opacity:.12; pointer-events:none; }
.character-modal-shell #panel-char .character-vitals { grid-column:2; grid-row:2; position:relative; z-index:1; display:grid; gap:7px; width:100%; margin-top:4px; }
.character-modal-shell #panel-char .character-vital { display:grid; gap:3px; min-width:0; }
.character-modal-shell #panel-char .character-vital-label { display:flex; justify-content:space-between; gap:8px; min-width:0; color:#d3c5b5; font-size:12px; line-height:1.2; }
.character-modal-shell #panel-char .character-vital-label b { min-width:0; color:#eee8df; text-align:right; overflow-wrap:anywhere; }
.character-modal-shell #panel-char .character-vital-track { height:7px; overflow:hidden; border:1px solid rgba(255,255,255,.2); border-radius:8px; background:#101116; }
.character-modal-shell #panel-char .character-vital-track span { display:block; height:100%; }
.character-modal-shell #panel-char .character-vital.hp .character-vital-track span { background:#db4555; }
.character-modal-shell #panel-char .character-vital.chakra .character-vital-track span { background:#3986d8; }
.character-modal-shell #panel-char .character-vital.experience .character-vital-track span { background:#d8a638; }
.character-modal-shell #panel-char .character-highlights { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; min-width:0; }
.character-modal-shell #panel-char .character-highlight { display:grid; grid-template-columns:34px minmax(0,1fr); align-content:center; gap:1px 9px; min-width:0; min-height:72px; padding:9px 12px; border:1px solid #453d32; border-radius:8px; background:#1d1915; }
.character-modal-shell #panel-char .character-highlight-icon { grid-column:1; grid-row:1/4; display:block; place-self:center; width:34px; height:34px; object-fit:contain; image-rendering:pixelated; }
.character-modal-shell #panel-char .character-highlight > span { color:#b9b9c1; font-size:11px; font-weight:800; text-transform:uppercase; }
.character-modal-shell #panel-char .character-highlight > b { min-width:0; color:#f2eee7; font-size:17px; line-height:1.15; overflow-wrap:anywhere; }
.character-modal-shell #panel-char .character-highlight > small { min-width:0; color:#a9aab4; font-size:11px; line-height:1.25; overflow-wrap:anywhere; }
.character-modal-shell #panel-char .character-highlight.regen > small { color:#f2eee7; font-size:17px; font-weight:700; line-height:1.15; }
.character-modal-shell #panel-char .character-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.character-modal-shell #panel-char .character-card,
.character-modal-shell #panel-char .character-grid > .card { padding:12px 14px; border:1px solid #403a32; border-radius:8px; background:#1d1915; }
.character-modal-shell #panel-char .character-grid > .card::after,
.character-modal-shell #panel-char > .card::after { display:none; }
@media(max-width:800px) {
  .modal-box:has(.character-modal-shell) { width:calc(100vw - 16px); height:calc(100dvh - 16px); max-height:calc(100dvh - 16px); padding:9px; }
  .modal-box:has(.character-modal-shell) .modal-body { padding:7px 1px 2px; }
  .character-modal-shell #panel-char.character-sheet { gap:8px; }
  .character-modal-shell #panel-char .character-hero { grid-template-columns:46px minmax(0,1fr) 52px; gap:8px; min-height:0; padding:10px; }
  .character-modal-shell #panel-char .character-hero > .sprite-box { grid-column:1; grid-row:1; align-self:center; width:44px !important; height:54px !important; margin:0; }
  .character-modal-shell #panel-char .character-identity { grid-column:2; grid-row:1; }
  .character-modal-shell #panel-char .character-level-badge { grid-column:3; grid-row:1; width:48px; height:48px; }
  .character-modal-shell #panel-char .character-level-badge b { font-size:19px; }
  .character-modal-shell #panel-char .character-portrait { right:16%; opacity:.08; }
  .character-modal-shell #panel-char .character-vitals { grid-column:1/-1; grid-row:2; }
  .character-modal-shell #panel-char .character-highlights { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .character-modal-shell #panel-char .character-highlight { min-height:62px; padding:7px; grid-template-columns:29px minmax(0,1fr); gap:1px 7px; }
  .character-modal-shell #panel-char .character-highlight-icon { width:28px; height:28px; }
  .character-modal-shell #panel-char .character-highlight > b { font-size:15px; }
  .character-modal-shell #panel-char .character-highlight.regen > small { font-size:15px; }
  .character-modal-shell #panel-char .character-grid { grid-template-columns:minmax(0,1fr); gap:8px; }
}
.helper-pvp-toggle:disabled { opacity:.55; cursor:not-allowed; }
.vip-shop-card { display:flex; flex-flow:row wrap; align-items:center; box-sizing:border-box; }
.vip-shop-mark { display:block; flex:0 0 100%; box-sizing:border-box; overflow:visible; text-align:center; font-size:17px; line-height:1.3; padding:2px 0; }
.vip-shop-card > div { flex:1 1 220px; min-width:0; }
.vip-shop-card > .btn { flex:0 0 100%; box-sizing:border-box; }
/* Keep Helper copy as readable as the PvP settings. */
.modal-box:has(.helper-shell) .helper-intro span,
.modal-box:has(.helper-shell) .helper-muted,
.modal-box:has(.helper-shell) .helper-setting-row,
.modal-box:has(.helper-shell) .helper-hint,
.modal-box:has(.helper-shell) .helper-choice,
.modal-box:has(.helper-shell) .helper-empty,
.modal-box:has(.helper-shell) .helper-learned-spell small { font-size:15px; line-height:1.55; }
.modal-box:has(.helper-shell) .helper-intro .helper-save-state { font-size:15px; }
.modal-box:has(.helper-shell) .helper-tab,
.modal-box:has(.helper-shell) .helper-section-title,
.modal-box:has(.helper-shell) .helper-card-main strong,
.modal-box:has(.helper-shell) .helper-rotation-info strong,
.modal-box:has(.helper-shell) .helper-toggle,
.modal-box:has(.helper-shell) .helper-select,
.modal-box:has(.helper-shell) .helper-rotation-number,
.modal-box:has(.helper-shell) .helper-icon-button,
.modal-box:has(.helper-shell) .helper-learned-name,
.modal-box:has(.helper-shell) .helper-footer,
.modal-box:has(.helper-shell) .helper-pvp-option-head > strong,
.modal-box:has(.helper-shell) .helper-pvp-toggle { font-size:15px; line-height:1.4; }
@media (max-width:600px) {
  .modal-box:has(.helper-shell) .helper-tab { white-space:normal; }
  .helper-pvp-options { grid-template-columns:minmax(0,1fr); }
  .helper-pvp-option { padding:9px 10px; }
  .helper-pvp-option > p { font-size:15px; }
}
.inv-slot.quality-uncommon,.equip-slot.quality-uncommon{border-color:#49d17d!important;box-shadow:inset 0 0 0 1px #49d17d88,0 0 8px #49d17d24}
.inv-slot.quality-rare,.equip-slot.quality-rare{border-color:#4aa8ff!important;box-shadow:inset 0 0 0 1px #4aa8ff99,0 0 9px #4aa8ff2e}
.inv-slot.quality-epic,.equip-slot.quality-epic{border-color:#bd72f5!important;box-shadow:inset 0 0 0 1px #bd72f599,0 0 10px #bd72f536}
.inv-slot.quality-legendary,.equip-slot.quality-legendary{border-color:#f0c34e!important;box-shadow:inset 0 0 0 1px #f0c34ebb,0 0 12px #f0c34e42}
.item-quality-line{display:flex;justify-content:space-between;gap:12px;padding:4px 0;font-size:12px;font-weight:700}
.item-quality-line.quality-uncommon{color:#49d17d}.item-quality-line.quality-rare{color:#4aa8ff}.item-quality-line.quality-epic{color:#bd72f5}.item-quality-line.quality-legendary{color:#f0c34e}
.item-name.quality-uncommon,.modal-head.quality-uncommon{color:#49d17d}
.item-name.quality-rare,.modal-head.quality-rare{color:#4aa8ff}
.item-name.quality-epic,.modal-head.quality-epic{color:#bd72f5}
.item-name.quality-legendary,.modal-head.quality-legendary{color:#f0c34e}
.loot-rarity-mark{position:absolute;right:2px;bottom:1px;padding:1px 4px;border-radius:3px;background:#0d0b0ad9;color:#f1f0e8;font-size:8px;font-weight:900;letter-spacing:.2px}

/* Jutsus: dados claros em linhas simples, sem chips coloridos ou texto longo. */
#panel-jutsus .jutsu-list { grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr)); }
#panel-jutsus .jutsu-card { align-items:flex-start; min-width:0; padding:14px; }
#panel-jutsus .jutsu-tree-node { -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
#panel-jutsus .jutsu-card .fxbox { flex:0 0 56px; }
#panel-jutsus .jutsu-details { flex:1; min-width:0; }
#panel-jutsus .jutsu-details .jname { overflow-wrap:anywhere; font-size:17px; line-height:1.3; }
#panel-jutsus .jutsu-detail-list { display:grid; gap:0; margin-top:7px; }
#panel-jutsus .jutsu-detail-row { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; min-width:0; padding:4px 0; border-bottom:1px solid rgba(112,88,55,.28); font-size:14px; line-height:1.4; }
#panel-jutsus .jutsu-detail-row:last-child { border-bottom:0; }
#panel-jutsus .jutsu-detail-row > span { flex:0 0 auto; color:var(--text-2); }
#panel-jutsus .jutsu-detail-row > b { min-width:0; color:var(--text-1); text-align:right; overflow-wrap:anywhere; }
#panel-jutsus .jutsu-upgrade-row { flex-direction:column; align-items:stretch; }
#panel-jutsus .jutsu-upgrade-row > span { width:100%; text-align:center; }
#panel-jutsus .jutsu-upgrade { width:100%; white-space:normal; overflow-wrap:anywhere; }
@media (max-width:520px) {
  #panel-jutsus .jutsu-list { grid-template-columns:minmax(0,1fr); }
  #panel-jutsus .jutsu-card { gap:10px; padding:11px; }
  #panel-jutsus .jutsu-card .fxbox { flex-basis:48px; width:48px; height:48px; }
  #panel-jutsus .jutsu-detail-row { font-size:13px; }
}

/* Mobile polish: keep the compact wave indicator anchored to the battle map. */
.arena-wrap > #top-exp.exp-mobile-hunt { order:3; }
.arena-wrap > .mobile-battle-loot { order:4; }
.arena-wrap > .arena-side { order:5; }
@media (max-width:800px) {
  .mapview > .wave-boss-hud {
    top:52px; width:min(260px,calc(100% - 14px)); padding:0 4px; border:0; border-radius:0; background:transparent; box-shadow:none;
  }
  .mapview > .wave-boss-hud .wave-boss-name { margin-bottom:3px; font-size:11px; letter-spacing:.06em; }
  .mapview > .wave-boss-hud .wave-boss-track { height:9px; padding:1px; }
  .mapview > .wave-boss-hud .wave-boss-hp { margin-top:2px; font-size:9px; }
}
@media (max-width:760px) {
  #panel-char .character-chips { transform:translateY(-3px); }
}
@media (max-width:800px) {
  .modal-box:has(.helper-shell) {
    width:min(560px,calc(100vw - 16px)); max-width:calc(100vw - 16px);
    max-height:calc(100dvh - 16px); padding:11px; box-sizing:border-box;
  }
  .modal-box:has(.helper-shell) .modal-body { min-width:0; overflow-x:hidden; overflow-y:auto; }
  .helper-shell { min-width:0; min-height:0; }
  .helper-intro { min-width:0; justify-content:center; padding:2px 0 9px; text-align:center; }
  .helper-intro > div { min-width:0; }
  .helper-intro > div > span, .helper-intro .helper-save-state, .helper-footer > span { display:none; }
  .helper-intro strong { display:block; width:100%; text-align:center; }
  .helper-layout { display:flex; flex-direction:column; min-width:0; min-height:0; gap:8px; padding:9px 0; }
  .helper-tabs { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; width:100%; min-width:0; padding:0 0 8px; border-right:0; border-bottom:1px solid rgba(111,88,58,.45); }
  .modal-box:has(.helper-shell) .helper-tab { display:flex; flex-direction:column; justify-content:center; gap:2px; min-width:0; min-height:48px; padding:4px 2px; font-size:11px !important; line-height:1.2; text-align:center; overflow-wrap:anywhere; }
  .helper-tab > span { width:auto; }
  .helper-content { width:100%; min-width:0; overflow:visible; padding:0; }
  .helper-section-title { margin:0 0 8px; }
  .helper-section-spaced { margin-top:15px; }
  .helper-card { display:grid; grid-template-columns:36px minmax(0,1fr); gap:8px; min-width:0; min-height:0; padding:9px; }
  .helper-card-icon { grid-column:1; grid-row:1; width:36px; height:36px; }
  .helper-card-main { grid-column:2; grid-row:1; min-width:0; }
  .helper-card-main strong, .helper-card-main span { min-width:0; overflow-wrap:anywhere; }
  .helper-potion-card { grid-template-columns:36px minmax(0,1fr) auto; align-items:center; row-gap:5px; }
  .helper-potion-card .helper-card-icon { grid-column:1; grid-row:1; }
  .helper-potion-card .helper-card-main { display:contents; }
  .helper-potion-card .helper-card-main strong { grid-column:2; grid-row:1; }
  .helper-potion-card .helper-potion-price { grid-column:1 / -1; grid-row:2; display:block; overflow:hidden; font-size:12px !important; line-height:1.2; white-space:nowrap; text-overflow:clip; }
  #modal:has(.helper-shell) .helper-potion-card > .helper-toggle { grid-column:3; grid-row:1; justify-self:end; }
  .helper-loot-filter-card > .btn { grid-column:2; justify-self:start; }
  .modal-box:has(.helper-shell) .helper-toggle { grid-column:2; justify-self:start; max-width:100%; min-height:38px; margin:0; padding:7px 9px; font-size:12px !important; line-height:1.25; white-space:normal; text-align:left; }
  .helper-setting-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; min-width:0; margin-top:8px; padding:8px 2px; }
  .helper-setting-row > span { min-width:0; overflow-wrap:anywhere; }
  .modal-box:has(.helper-shell) .helper-select { width:auto; min-width:82px; max-width:42vw; min-height:40px; padding:6px; font-size:13px !important; }
  .helper-choice-grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .modal-box:has(.helper-shell) .helper-choice { min-width:0; min-height:44px; padding:8px 6px; font-size:13px !important; line-height:1.3; overflow-wrap:anywhere; }
  .helper-add-row { flex-wrap:wrap; min-width:0; }
  .helper-add-select { flex:1 1 100%; width:100%; }
  .helper-add-button { flex:1 1 100%; min-height:42px; }
  .helper-learned-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .helper-learned-spell { grid-template-columns:30px minmax(0,1fr); gap:2px 6px; min-height:58px; padding:6px 18px 6px 5px; }
  .helper-learned-spell > .spell-icon { width:28px; height:28px; }
  .helper-learned-name, .helper-learned-spell small { min-width:0; white-space:normal; overflow-wrap:anywhere; font-size:11px !important; line-height:1.25; }
  .helper-footer { flex-wrap:wrap; align-items:center; gap:8px; padding-top:9px; }
  .helper-footer > * { min-width:0; max-width:100%; overflow-wrap:anywhere; }
  .helper-footer .helper-close { min-height:40px; }
  #panel-jutsus .jutsu-upgrade-row { align-items:center; gap:8px; }
  #panel-jutsus .jutsu-upgrade-row { width:calc(100% + 68px); margin-left:-68px; box-sizing:border-box; }
  #panel-jutsus .jutsu-upgrade-row > span { display:block; width:100%; margin:0 auto; text-align:center; line-height:1.4; overflow-wrap:anywhere; }
  #panel-jutsus .jutsu-upgrade { display:block; align-self:center; width:min(100%,320px); max-width:100%; margin:0 auto; box-sizing:border-box; text-align:center; line-height:1.35; }
}
@media (max-width:520px) {
  #panel-jutsus .jutsu-upgrade-row { width:calc(100% + 58px); margin-left:-58px; }
}
/* Keep the Helper Auto controls aligned on narrow screens. */
@media (max-width:800px) {
  .helper-content:has(> .helper-section-title:first-child) .helper-auto-card {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
    width:100%;
    box-sizing:border-box;
  }
  .helper-auto-card .helper-card-main { grid-column:1; grid-row:1; min-width:0; }
  .helper-auto-card .helper-card-main strong { font-size:14px; line-height:1.25; }
  .helper-auto-card .helper-card-main .helper-muted { font-size:12px; line-height:1.3; }
  #modal:has(.helper-shell) .helper-auto-card > .helper-toggle {
    grid-column:2;
    grid-row:1;
    justify-self:end;
    width:clamp(104px,32vw,126px);
    min-height:40px;
    margin:0;
    padding:6px 8px;
    justify-content:center;
    text-align:center;
    white-space:nowrap;
  }
  .helper-loot-filter-card {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
  }
  .helper-loot-filter-card .helper-card-main { grid-column:1; grid-row:1; }
  .helper-loot-filter-card > .btn {
    grid-column:2;
    grid-row:1;
    justify-self:end;
    min-width:104px;
    min-height:40px;
    margin:0;
    white-space:nowrap;
  }
}
html.mobile-fullscreen-mode .arena-wrap > #top-exp { order:3; }
html.mobile-fullscreen-mode .arena-wrap > .mobile-battle-loot { order:4; }
html.mobile-fullscreen-mode .arena-wrap > .arena-side { order:5; }
html.mobile-fullscreen-mode .mapview > .wave-boss-hud { top:52px; width:min(260px,calc(100% - 14px)); padding:0 4px; border:0; border-radius:0; background:transparent; box-shadow:none; }

/* Force the mobile layout when a touch device requests the browser's desktop site. */
html.mobile-desktop-site #screen-game { overflow:auto; }
html.mobile-desktop-site .topbar {
  position:sticky; top:0; z-index:20; height:auto; min-height:58px; padding:8px 10px;
  display:grid; grid-template-columns:1fr auto; gap:6px;
}
html.mobile-desktop-site .topbar .logo { font-size:18px; }
html.mobile-desktop-site .top-center-group,
html.mobile-desktop-site .top-char,
html.mobile-desktop-site .top-stats { display:none; }
html.mobile-desktop-site .top-actions { grid-column:2; grid-row:1; display:flex; align-items:center; gap:3px; }
html.mobile-desktop-site .top-actions #top-account { display:none; }
html.mobile-desktop-site .layout {
  display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto;
  min-height:calc(100vh - 58px); height:auto; flex:1 0 auto; overflow:visible;
}
html.mobile-desktop-site .sidenav {
  grid-column:1; grid-row:1; order:0; height:0; padding:0; display:flex; overflow:visible;
  flex-direction:row; gap:5px; border:0;
}
html.mobile-desktop-site .sidenav:not(.mobile-nav-open) .nav-btn { display:none; }
html.mobile-desktop-site .sidenav .nav-spacer { display:none; }
html.mobile-desktop-site .sidenav.mobile-nav-open { position:fixed; top:58px; left:0; z-index:35; width:min(136px,52vw); height:auto; max-height:calc(100dvh - 82px); padding:38px 5px 10px; flex-direction:column; align-items:stretch; overflow-y:auto; overflow-x:hidden; background:rgba(13,16,24,.98); border-right:1px solid var(--line-2); box-shadow:12px 0 30px rgba(0,0,0,.45); }
html.mobile-desktop-site .mobile-nav-toggle { display:block; position:fixed; top:64px; left:8px; z-index:50; width:32px; height:25px; padding:0; }
html.mobile-desktop-site .sidenav.mobile-nav-open .nav-btn { display:flex; flex:0 0 39px; width:100%; min-width:0; height:39px; gap:7px; justify-content:flex-start; padding:6px 7px; }
html.mobile-desktop-site .nav-btn { flex:0 0 48px; min-width:48px; height:42px; padding:3px; justify-content:center; border-radius:7px; }
html.mobile-desktop-site .nav-btn span { display:block; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html.mobile-desktop-site .main { grid-column:1; grid-row:2; order:1; overflow:visible; padding:20px 10px; min-width:0; height:auto; position:relative; z-index:1; }
html.mobile-desktop-site .rightbar { grid-column:1; grid-row:3; order:2; max-height:none; border:0; border-top:1px solid var(--line); padding:8px 10px 18px; display:flex; flex-direction:column; gap:8px; overflow:visible; position:relative; z-index:1; }
html.mobile-desktop-site .rightbar .card { width:100%; min-width:0; flex:0 0 auto; }
html.mobile-desktop-site .rightbar.mobile-hunt-relocated,
html.mobile-desktop-site .rightbar.mobile-panel-hidden { display:none !important; }
html.mobile-desktop-site .arena-wrap { width:100%; margin:0; transform:none; display:flex; flex-direction:column; gap:10px; }
html.mobile-desktop-site .arena-wrap > .mapview { order:1; display:block; width:100%; height:auto; min-height:0; max-height:none; margin:0; aspect-ratio:15 / 11; }
/* Saturação leve apenas no canvas mobile; HUD e demais painéis mantêm suas cores. */
@media (max-width: 800px) {
  .mapview > .mapview-canvas { filter: saturate(1.12); }
}
html.mobile-desktop-site .mapview > .mapview-canvas { filter: saturate(1.12); }
html.mobile-desktop-site .arena-wrap > #top-exp { order:3; display:block !important; width:100%; min-width:0; box-sizing:border-box; margin:0; transform:none; }
html.mobile-desktop-site .arena-wrap > .mobile-battle-loot { order:4; display:block; width:100%; box-sizing:border-box; padding:10px; }
html.mobile-desktop-site .arena-wrap > .arena-side { order:5; display:flex; width:100%; min-width:0; box-sizing:border-box; flex-direction:column; gap:8px; }
html.mobile-desktop-site .arena-side > .card { width:100%; min-width:0; box-sizing:border-box; margin:0; }
html.mobile-desktop-site .arena-side .minimap { display:none; }
html.mobile-desktop-site .jutsu-bar,
html.mobile-desktop-site .helper-rotation-hud { display:none !important; }
html.mobile-desktop-site .mapview > .wave-boss-hud { top:52px; width:min(260px,calc(100% - 14px)); padding:0 4px; border:0; border-radius:0; background:transparent; box-shadow:none; }

/* Preferências do cliente: controles visuais independentes e persistentes. */
.helper-rotation-hud { display:none !important; }
html.battle-cooldowns-visible .helper-rotation-hud:not([hidden]) { display:flex !important; }
.modal-box:has(.settings-panel) { width:min(560px,calc(100vw - 28px)); padding:20px; }
.modal-box:has(.settings-panel) .modal-head { padding:0 0 12px; margin:0 0 14px; border-bottom:1px solid rgba(209,174,111,.22); }
.settings-panel { display:grid; gap:16px; color:#e9dfcc; }
.settings-intro { display:flex; align-items:center; gap:12px; padding:2px 2px 14px; border-bottom:1px solid rgba(209,174,111,.17); }
.settings-intro-icon { display:grid; width:42px; height:42px; flex:0 0 42px; place-items:center; border:1px solid #7c623b; border-radius:8px; background:linear-gradient(145deg,#3b2d1d,#211a13); color:#f0ca70; font-size:20px; }
.settings-intro > div, .settings-option-copy { display:grid; gap:4px; }
.settings-intro strong { color:#f0d184; font:700 15px/1.2 "Oxanium",sans-serif; }
.settings-intro small { color:#aa9b84; font-size:12px; }
.settings-section { display:grid; gap:8px; }
.settings-section h3 { margin:0 0 2px; color:#c3a363; font:700 10px/1.2 "Oxanium",sans-serif; letter-spacing:.14em; }
.settings-option-card { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:62px; padding:11px 13px; border:1px solid #54432e; border-radius:7px; background:linear-gradient(110deg,rgba(52,41,29,.82),rgba(31,25,19,.95)); cursor:pointer; transition:border-color .16s,background .16s; }
.settings-option-card:hover { border-color:#947444; background:linear-gradient(110deg,rgba(65,49,31,.88),rgba(35,27,20,.98)); }
.settings-option-copy { min-width:0; }
.settings-option-copy strong { color:#eee3d0; font-size:13px; }
.settings-option-copy small { color:#a99a83; font-size:11px; line-height:1.35; }
.settings-switch { position:relative; display:block; width:42px; height:24px; flex:0 0 42px; }
.settings-switch input { position:absolute; inset:0; z-index:2; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.settings-switch > span { position:absolute; inset:0; border:1px solid #67563d; border-radius:99px; background:#241e17; transition:background .18s,border-color .18s; }
.settings-switch > span::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#9b8b72; box-shadow:0 1px 3px #0008; transition:transform .18s,background .18s; }
.settings-switch input:checked + span { border-color:#8b7040; background:linear-gradient(90deg,#77602f,#aa8442); }
.settings-switch input:checked + span::after { transform:translateX(18px); background:#fff0bf; }
.settings-switch input:focus-visible + span { outline:2px solid #f0ca70; outline-offset:3px; }
.settings-account { display:flex; justify-content:space-between; gap:12px; padding:11px 13px; border:1px solid rgba(98,78,49,.62); border-radius:6px; background:rgba(15,13,11,.35); color:#a99a83; font-size:12px; }
.settings-account strong { color:#ddcfb7; font-weight:600; overflow-wrap:anywhere; text-align:right; }
.settings-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:12px; border-top:1px solid rgba(209,174,111,.17); color:#8f816c; font-size:11px; }
@media (max-width:520px) {
  .modal-box:has(.settings-panel) { padding:15px; }
  .settings-option-card { min-height:58px; padding:9px 10px; }
  .settings-option-copy small { max-width:34ch; }
}

/* Seleção de personagem: cards verticais, dados legíveis e ações no rodapé. */
#screen-chars .chars-wrap { box-sizing:border-box; width:min(calc(100% - 36px),1220px); max-width:1220px; margin:0 auto; padding:24px 12px 42px; }
#screen-chars .chars-head { gap:14px; margin-bottom:14px; }
#screen-chars .chars-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); align-items:stretch; gap:14px; }
#screen-chars .char-row,
#screen-chars .char-row:hover { box-sizing:border-box; display:flex; min-width:0; flex-direction:column; align-items:stretch; gap:10px; padding:14px; cursor:default; background:linear-gradient(145deg,#30261b,#211a14); border:1px solid transparent !important; border-radius:0; box-shadow:0 2px 6px rgba(0,0,0,.28) !important; transform:none !important; filter:none !important; transition:none !important; }
#screen-chars .char-row::before,
#screen-chars .char-row:hover::before { content:none !important; display:none !important; }
#screen-chars .char-row::after,
#screen-chars .char-row:hover::after { content:"" !important; position:absolute; inset:0; z-index:2; display:block !important; border:6px solid transparent; border-image:url("../assets/ui/panel-frame.png") 12 / 6px / 0 stretch; pointer-events:none; filter:none !important; animation:none !important; transition:none !important; }

/* Bestiário: cartões estáticos para manter o scroll leve, com a moldura padrão do jogo. */
#panel-bestiary { min-width:0; }
#panel-bestiary .bestiary-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
#panel-bestiary .bestiary-heading .panel-sub { margin:0; }
#panel-bestiary .bestiary-search-wrap { display:flex; align-items:center; gap:8px; width:min(280px,42%); min-height:40px; padding:0 12px; color:#c9a95e; background:#17130f; border:1px solid #58452e; }
#panel-bestiary .bestiary-search-wrap span { font-size:22px; line-height:1; }
#panel-bestiary .bestiary-search { width:100%; min-width:0; padding:8px 0; color:#ead9b8; background:transparent; border:0; outline:0; font:inherit; }
#panel-bestiary .bestiary-search::placeholder { color:#9d8c70; }
#panel-bestiary .bestiary-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
#panel-bestiary .bestiary-summary-card,
#panel-bestiary .bestiary-card { min-width:0; background:#211a13; border:8px solid transparent; border-image:url("../assets/ui/panel-frame.png") 12 / 8px / 0 stretch; }
#panel-bestiary .bestiary-summary-card { min-height:88px; display:flex; flex-direction:column; justify-content:center; gap:4px; padding:9px 12px; }
#panel-bestiary .bestiary-summary-label { color:#c7a759; font-size:12px; font-weight:700; letter-spacing:.045em; text-transform:uppercase; }
#panel-bestiary .bestiary-summary-card strong { color:#f0cf72; font-size:19px; line-height:1.2; }
#panel-bestiary .bestiary-summary-note { color:#aa997d; font-size:12px; line-height:1.35; }
#panel-bestiary .bestiary-prize { flex-direction:row; align-items:center; justify-content:center; gap:12px; }
#panel-bestiary .bestiary-prize-copy { display:flex; flex:0 1 auto; flex-direction:column; align-items:flex-start; min-width:0; gap:3px; }
#panel-bestiary .bestiary-prize-copy .bestiary-summary-label,
#panel-bestiary .bestiary-prize-copy .bestiary-summary-note { display:block; white-space:normal; }
#panel-bestiary .bestiary-prize-copy strong { display:block; max-width:100%; white-space:nowrap; }
#panel-bestiary .bestiary-prize-icon { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; background:#17130f; border:1px solid #58452e; }
#panel-bestiary .bestiary-item-icon { width:32px; height:32px; object-fit:contain; }
#panel-bestiary .bestiary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,200px)); justify-content:center; align-items:stretch; gap:10px; }
#panel-bestiary .bestiary-card { display:flex; flex-direction:column; align-items:center; min-height:208px; padding:10px 9px 9px; text-align:center; }
#panel-bestiary .bestiary-card[hidden] { display:none; }
#panel-bestiary .bestiary-card-sprite { display:grid; place-items:center; width:78px; height:78px; margin-bottom:3px; }
#panel-bestiary .bestiary-card-sprite .sprite-box { flex:0 0 76px; width:76px !important; height:76px !important; overflow:hidden; }
#panel-bestiary .bestiary-card-name { width:100%; min-height:2.5em; display:-webkit-box; margin:2px 0 7px; overflow:hidden; color:#ead6a4; font-size:16px; line-height:1.3; overflow-wrap:anywhere; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
#panel-bestiary .bestiary-kill-count { margin-bottom:7px; color:#c2b397; font-size:15px; font-variant-numeric:tabular-nums; }
#panel-bestiary .bestiary-kill-count strong { color:#f0cf72; font-size:17px; }
#panel-bestiary .bestiary-progress-track { width:100%; height:7px; overflow:hidden; background:#100e0c; border:1px solid #493a28; }
#panel-bestiary .bestiary-progress-fill { display:block; height:100%; background:#b18738; }
#panel-bestiary .bestiary-card-status { margin-top:7px; color:#d0c0a2; font-size:14px; font-weight:600; line-height:1.3; }
#panel-bestiary .bestiary-card-status.complete { color:#83c27a; font-weight:800; }
#panel-bestiary .bestiary-claim { min-height:30px; margin-top:7px; padding:4px 10px; font-size:11px; }
#panel-bestiary .bestiary-card.is-complete { background:#201e15; }
#panel-bestiary .bestiary-card.is-complete .bestiary-progress-fill { background:#5e9b54; }
#panel-bestiary .bestiary-empty { padding:20px 10px; text-align:center; }
@media (max-width:760px) {
  #panel-bestiary .bestiary-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  #panel-bestiary .bestiary-summary-card:last-child { grid-column:1 / -1; }
  #panel-bestiary .bestiary-grid { grid-template-columns:repeat(2,minmax(0,200px)); justify-content:center; gap:8px; }
  #panel-bestiary .bestiary-card { min-height:198px; }
}
@media (max-width:520px) {
  #panel-bestiary .bestiary-heading { flex-direction:column; gap:10px; }
  #panel-bestiary .bestiary-heading > div:first-child { width:100%; text-align:center; }
  #panel-bestiary .bestiary-heading .panel-title,
  #panel-bestiary .bestiary-heading .panel-sub { text-align:center; }
  #panel-bestiary .bestiary-search-wrap { width:100%; }
  #panel-bestiary .bestiary-summary { grid-template-columns:minmax(0,1fr); }
  #panel-bestiary .bestiary-summary-card:not(.bestiary-prize) { align-items:center; text-align:center; }
  #panel-bestiary .bestiary-prize { grid-column:1; justify-content:center; min-width:0; text-align:center; }
  #panel-bestiary .bestiary-prize-icon { justify-self:center; }
  #panel-bestiary .bestiary-prize-copy { align-items:center; min-width:0; text-align:center; }
  #panel-bestiary .bestiary-prize-copy .bestiary-summary-label { white-space:nowrap; }
  #panel-bestiary .bestiary-prize-copy strong { font-size:17px; }
  #panel-bestiary .bestiary-summary-card { min-height:78px; padding:8px; }
  #panel-bestiary .bestiary-summary-card strong { font-size:16px; }
  #panel-bestiary .bestiary-summary-label { font-size:10px; }
  #panel-bestiary .bestiary-summary-note { font-size:10px; }
  #panel-bestiary .bestiary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #panel-bestiary .bestiary-card { padding-inline:7px; }
  #panel-bestiary .bestiary-card-name { font-size:15px; }
  #panel-bestiary .bestiary-kill-count { font-size:14px; }
  #panel-bestiary .bestiary-kill-count strong { font-size:16px; }
  #panel-bestiary .bestiary-card-status { font-size:13px; }
}
#screen-chars .char-row > .sprite-box { align-self:center; flex:0 0 56px; width:56px !important; height:56px !important; display:grid; place-items:center; overflow:hidden; border:0; border-radius:0; background:transparent; box-shadow:none; margin-bottom:4px; }
#screen-chars .char-row > .sprite-box > .sprite { max-width:100%; max-height:100%; }
#screen-chars .char-info { width:100%; min-width:0; align-items:center; gap:6px; }
#screen-chars .char-row .cname { max-width:100%; overflow-wrap:anywhere; text-align:center; font-size:18px; line-height:1.25; }
#screen-chars .char-row .char-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:4px 8px; width:100%; min-width:0; }
#screen-chars .char-row .char-stats .chip { box-sizing:border-box; display:flex; min-width:0; justify-content:center; gap:6px; padding:1px 0; overflow-wrap:anywhere; text-align:center; font-size:16px; line-height:1.5; white-space:normal; background:transparent !important; border:0 !important; border-radius:0; box-shadow:none !important; }
#screen-chars .char-row .char-stats .chip:last-child { grid-column:auto; }
#screen-chars .char-row .char-stat { display:flex; flex-wrap:wrap; justify-content:center; gap:4px; width:100%; min-width:0; text-align:center; font-size:14px; line-height:1.35; }
#screen-chars .char-row .char-stat-level { grid-area:1 / 1; }
#screen-chars .char-row .char-stat-gold { grid-area:1 / 2; }
#screen-chars .char-row .char-stat-class { grid-area:2 / 1; }
#screen-chars .char-row .char-stat-elo { grid-area:2 / 2; }
#screen-chars .char-row .char-stat-kills { grid-column:1 / -1; }
#screen-chars .char-row .char-stat-label { color:#cfb886; font-weight:700; }
#screen-chars .char-row .char-stat-value { color:#f0e6d3; overflow-wrap:anywhere; }
#screen-chars .char-row .char-stat-gold .char-stat-value { color:#f2ce76; }
#screen-chars .char-row .char-stat-elo .char-stat-value { color:#d3a7ff; }
#screen-chars .char-row .char-stat-icon { display:inline-block; flex:0 0 16px; width:16px; height:16px; object-fit:contain; vertical-align:middle; }
#screen-chars #chars-account-gold { display:flex; align-items:center; gap:5px; }
#screen-chars .char-account-gold-icon { flex:0 0 18px; width:18px; height:18px; object-fit:contain; }
#screen-chars .char-row .char-stat-level .char-stat-value { color:#ffcf69; }
#screen-chars .char-row .char-hunt-row .char-stat-value { color:#9bdd78; }
#screen-chars .char-row .char-hunt-row,
#screen-chars .char-row .char-offline-row,
#screen-chars .char-row .char-save-row { line-height:1.35; font-size:14px; }
#screen-chars .char-row .char-hunt-chip { display:block; width:auto; max-width:100%; padding:1px 0; color:#9bdd78; font-size:14px; background:transparent !important; border:0 !important; }
#screen-chars .char-row .char-offline-row { font-size:14px; }
#screen-chars .char-row .cactions { display:grid; grid-template-columns:minmax(0,1fr) 42px; gap:8px; margin-top:auto; }
#screen-chars .char-row .cactions .btn { min-height:40px; transition:none !important; transform:none !important; filter:none !important; }
#screen-chars .char-row .cactions .btn:hover { transition:none !important; transform:none !important; filter:none !important; box-shadow:none !important; }
#screen-chars .chars-account-bar > div span { font-size:14px; font-weight:600; }
/* Confirmações simples: sem blur, filtro ou animação para abrir sem custo visual. */
#modal:has(.game-confirm) { backdrop-filter:none; -webkit-backdrop-filter:none; }
#modal:has(.game-confirm) .modal-box { box-shadow:0 4px 12px rgba(0,0,0,.35); }
#modal:has(.game-confirm) .modal-box::after { display:none; }
#modal:has(.game-confirm) .game-confirm,
#modal:has(.game-confirm) .game-confirm * { animation:none !important; transition:none !important; filter:none !important; }
/* O resumo offline é estático; evita blur de tela e decoração cara ao abrir. */
#modal:has(.offline-box) { backdrop-filter:none; -webkit-backdrop-filter:none; }
#modal:has(.offline-box) .modal-box { box-shadow:0 4px 12px rgba(0,0,0,.35); }
#modal:has(.offline-box) .modal-box::after { display:none; }
#screen-game .compact-pouch-actions { gap:4px; }
#screen-game .compact-pouch-actions .btn,
#screen-game .rightbar > .card:not(.grow) .compact-pouch-actions .compact-pouch-buy,
#screen-game .rightbar > .card:not(.grow) .compact-pouch-actions .compact-pouch-sell { box-sizing:border-box; padding-inline:3px; font-size:12px !important; line-height:1.15; white-space:nowrap; letter-spacing:-.02em; }
@media(max-width:800px) {
  #screen-chars .chars-wrap { width:min(calc(100% - 16px),680px); padding:16px 5px 30px; }
  #screen-chars .chars-head { align-items:flex-start; flex-wrap:wrap; }
  #screen-chars .chars-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:10px; }
  #screen-chars .char-row,
  #screen-chars .char-row:hover { padding:11px; }
}
@media(max-width:500px) {
  #screen-chars .chars-list { grid-template-columns:minmax(0,1fr); }
  #screen-chars .chars-head > .row { margin-left:auto; }
}

/* Modal de boas-vindas e resgate do VIP inicial. */
#screen-chars .char-vip-time.is-active { color:#f2ce76; }
#modal:has(.welcome-modal) { backdrop-filter:none; -webkit-backdrop-filter:none; }
#modal:has(.welcome-modal) .modal-box { width:min(520px,calc(100vw - 28px)); max-height:min(88dvh,720px); overflow:auto; border-color:#80633a; box-shadow:0 8px 28px rgba(0,0,0,.5); }
#modal:has(.welcome-modal) .modal-head { justify-content:center; padding-bottom:4px; }
#modal:has(.welcome-modal) #modal-close { display:none; }
#modal:has(.welcome-modal) .modal-body { padding-top:10px; }
.welcome-modal { color:#eadfc9; text-align:center; }
.welcome-kicker { color:#e8bb58; font:700 12px Oxanium, sans-serif; letter-spacing:.12em; }
.welcome-modal h2 { margin:8px 0; color:#f5d990; font:700 clamp(22px,5vw,30px) Oxanium, sans-serif; line-height:1.2; }
.welcome-copy { max-width:420px; margin:0 auto 16px; color:#c9baa0; font-size:15px; line-height:1.55; }
.welcome-vip-reward { padding:14px 16px; border:1px solid rgba(218,174,84,.42); border-radius:8px; background:linear-gradient(145deg,rgba(88,61,29,.32),rgba(28,22,17,.75)); text-align:left; }
.welcome-vip-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; color:#f3d07b; font-size:16px; }
.welcome-vip-heading span { padding:4px 9px; border-radius:20px; background:rgba(222,176,77,.13); font-size:13px; white-space:nowrap; }
.welcome-vip-benefits { display:grid; grid-template-columns:1fr 1fr; gap:7px 18px; margin:13px 0 0; padding-left:19px; color:#e4d7bf; font-size:14px; line-height:1.4; }
.welcome-vip-benefits li::marker { color:#e5b94d; }
.welcome-receive { width:100%; min-height:44px; margin-top:15px; font-size:16px; }
.welcome-receive:disabled { opacity:.7; }
.welcome-error { margin-top:10px; color:#ff8e8e; font-size:13px; }

/* Ações de login e personagem usam a moldura e a paleta padrão do jogo. */
#screen-login .login-card button,
#screen-chars button,
#screen-create button {
  box-sizing:border-box !important;
  border:7px solid transparent !important;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
  border-radius:0 !important;
  background:linear-gradient(180deg,#3a2d1d,#211910) !important;
  color:#f4d080 !important;
  font-family:"Oxanium",sans-serif !important;
  font-weight:700 !important;
  text-shadow:0 1px 2px #000 !important;
  box-shadow:none !important;
  transition:none !important;
}
#screen-login .login-card button:hover,
#screen-chars button:hover,
#screen-create button:hover { filter:brightness(1.08); }
#screen-login .login-tabs .tab { border-radius:0; }

/* No celular, a primeira ficha fica compacta e visível sem rolagem inicial. */
@media (max-width:600px) {
  #screen-chars { min-height:100dvh; overflow-y:auto; overscroll-behavior:contain; }
  #screen-chars .chars-wrap { width:100%; min-height:100dvh; margin:0; padding:max(5px,env(safe-area-inset-top)) 6px calc(7px + env(safe-area-inset-bottom)); }
  #screen-chars .chars-head { align-items:center; flex-wrap:nowrap; gap:6px; margin-bottom:6px; }
  #screen-chars .chars-head .login-title { margin:0; font-size:19px; }
  #screen-chars .chars-head > .row { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:3px; margin-left:auto; font-size:10px; }
  #screen-chars .chars-head > .row #btn-logout { min-height:30px; padding:2px 6px; font-size:10px; }
  #screen-chars .chars-wrap > .card { padding:9px; }
  #screen-chars .chars-wrap > .card > .card-title { gap:5px; margin-bottom:6px; font-size:14px; }
  #screen-chars #btn-new-char { min-height:31px; padding:2px 7px; font-size:10px; white-space:nowrap; }
  #screen-chars .chars-account-bar { grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:5px; margin-bottom:7px; padding:7px; }
  #screen-chars .chars-account-bar > div { min-width:0; gap:1px; }
  #screen-chars .chars-account-bar > div span { font-size:10px; }
  #screen-chars .chars-account-bar > div strong { font-size:12px; overflow-wrap:anywhere; }
  #screen-chars .chars-account-bar #btn-unlock-slot { grid-column:auto; width:auto; max-width:112px; min-height:31px; margin:0; padding:2px 5px; font-size:9px; line-height:1.1; white-space:normal; }
  #screen-chars .chars-list { grid-template-columns:minmax(0,1fr); gap:6px; }
  #screen-chars .char-row,
  #screen-chars .char-row:hover { display:grid !important; grid-template-columns:50px minmax(0,1fr); grid-template-rows:auto auto; align-items:start; gap:4px 7px; padding:7px !important; }
  #screen-chars .char-row > .sprite-box { grid-column:1; grid-row:1; align-self:start; flex:0 0 52px; width:52px !important; height:52px !important; margin:1px 0 0; overflow:visible; }
  #screen-chars .char-row > .char-info { grid-column:2; grid-row:1; align-items:flex-start; width:auto; min-width:0; gap:3px; }
  #screen-chars .char-row .cname { text-align:left; font-size:15px; line-height:1.2; }
  #screen-chars .char-row .char-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:0 5px; }
  #screen-chars .char-row .char-stats .chip,
  #screen-chars .char-row .char-stat { justify-content:flex-start; gap:3px; min-width:0; text-align:left; font-size:10px; line-height:1.25; }
  #screen-chars .char-row .char-stat-label,
  #screen-chars .char-row .char-stat-value { min-width:0; overflow-wrap:anywhere; }
  #screen-chars .char-row .char-hunt-row,
  #screen-chars .char-row .char-offline-row,
  #screen-chars .char-row .char-save-row,
  #screen-chars .char-row .char-vip-row,
  #screen-chars .char-row .char-difficulty-row { gap:2px 4px; font-size:10px; line-height:1.25; }
  #screen-chars .char-row .char-hunt-chip { font-size:10px; }
  #screen-chars .char-row .char-difficulty-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; }
  #screen-chars .char-row .char-difficulty-change { min-height:25px; padding:1px 5px; font-size:9px; }
  #screen-chars .char-row .cactions { grid-column:1 / -1; grid-row:2; grid-template-columns:minmax(0,1fr) 34px; gap:5px; margin-top:0; }
  #screen-chars .char-row .cactions .btn { min-height:30px; padding:2px 6px; font-size:11px; }
}
@media (max-width:380px) {
  #screen-chars .chars-account-bar { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  #screen-chars .chars-account-bar #btn-unlock-slot { grid-column:1 / -1; width:100%; max-width:none; }
}

/* Cada atributo ocupa sua própria linha e permanece dentro da largura do card. */
#screen-chars .char-row .char-stats { display:grid !important; grid-template-columns:minmax(0,1fr) !important; grid-auto-flow:row; gap:3px; width:100%; min-width:0; }
#screen-chars .char-row .char-stats > .char-stat { box-sizing:border-box; display:flex; flex-wrap:nowrap; align-items:baseline; justify-content:flex-start; gap:5px; width:100%; min-width:0; text-align:left; }
#screen-chars .char-row .char-stats > .char-stat-level,
#screen-chars .char-row .char-stats > .char-stat-gold,
#screen-chars .char-row .char-stats > .char-stat-class,
#screen-chars .char-row .char-stats > .char-stat-elo,
#screen-chars .char-row .char-stats > .char-stat-kills { grid-area:auto; grid-column:auto; }
#screen-chars .char-row .char-stats > .char-stat > .char-stat-label { min-width:0; white-space:nowrap; }
#screen-chars .char-row .char-stats > .char-stat > .char-stat-value { min-width:0; text-align:left; overflow-wrap:anywhere; }

/* Cartões compactos no desktop; regras não alcançam o layout mobile. */
@media (min-width:601px) {
  #screen-chars .chars-wrap { width:min(calc(100% - 36px),max(430px,calc(var(--character-count,1) * 390px + 40px))); }
  #screen-chars .chars-list { grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),360px)); justify-content:start; align-items:start; gap:10px; }
  #screen-chars .char-row,
  #screen-chars .char-row:hover { display:grid; grid-template-columns:56px minmax(0,1fr); grid-template-rows:auto auto; align-items:start; align-self:start; gap:6px 10px; padding:10px; }
  #screen-chars .char-row > .sprite-box { grid-column:1; grid-row:1; align-self:start; margin:2px 0 0; }
  #screen-chars .char-row > .char-info { grid-column:2; grid-row:1; align-items:stretch; width:100%; gap:4px; }
  #screen-chars .char-row .cname { text-align:left; font-size:16px; line-height:1.2; }
  #screen-chars .char-row .char-stats { gap:2px; }
  #screen-chars .char-row .char-info > .char-stat { justify-content:flex-start; text-align:left; }
  #screen-chars .char-row .char-stats > .char-stat,
  #screen-chars .char-row .char-hunt-row,
  #screen-chars .char-row .char-offline-row,
  #screen-chars .char-row .char-save-row,
  #screen-chars .char-row .char-vip-row,
  #screen-chars .char-row .char-difficulty-row { font-size:12px; line-height:1.25; }
  #screen-chars .char-row .cactions { grid-column:1 / -1; grid-row:2; grid-template-columns:minmax(0,1fr) 36px; gap:6px; }
  #screen-chars .char-row .cactions .btn { min-height:32px; padding:3px 7px; font-size:12px; }
}

/* As três dificuldades básicas cabem em uma linha no celular. */
@media (max-width:560px) {
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child { width:100%; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child h3 { grid-column:1 / -1; }
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-option { min-width:0; min-height:0; height:auto; gap:5px; padding:8px 4px; text-align:center; overflow-wrap:anywhere; }
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-option strong,
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-option .hunt-difficulty-name { font-size:12px; line-height:1.2; }
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-stat { grid-template-columns:minmax(0,1fr); justify-items:center; gap:1px; font-size:10px; line-height:1.2; }
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-stat strong { font-size:10px; }
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-note,
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:first-child .hunt-difficulty-lock-note { font-size:9px; line-height:1.2; text-align:center; white-space:normal; overflow-wrap:anywhere; }
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:not(:first-child) { grid-template-columns:minmax(0,1fr); }
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:not(:first-child) h3 { box-sizing:border-box; display:flex; flex-direction:column; align-items:center; width:100%; max-width:100%; padding-inline:6px; text-align:center; }
  #modal:has(.character-difficulty-options) .hunt-difficulty-group:not(:first-child) .hunt-difficulty-note { max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:center; }
  #modal:has(.character-difficulty-options) .hunt-death-penalty { box-sizing:border-box; display:block; flex:0 1 auto; width:100%; max-width:100%; padding:0 5px; font-size:11px; line-height:1.3; text-align:center; white-space:normal; overflow-wrap:anywhere; }
}

/* Impede seleção por toque longo no mobile, preservando campos de digitação. */
@media (max-width:800px) and (pointer:coarse) {
  html, body, body * { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
  input, textarea, [contenteditable="true"], [contenteditable="true"] *, .battle-chat-composer input {
    -webkit-user-select:text;
    user-select:text;
    -webkit-touch-callout:default;
  }
}

/* Ações do inventário, pouch e depot: botões alinhados e com moldura única. */
.item-actions {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));
  align-items:stretch;
  gap:7px;
}
.item-actions .btn {
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:38px;
  padding:5px 7px;
  font-size:12px;
  line-height:1.2;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
}
.item-context-actions { gap:7px; }
.item-context-actions .btn { min-height:38px; padding:6px 8px; font-size:12px; }
.depot-inventory-actions {
  display:grid;
  flex:1 0 100%;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  width:100%;
  margin-top:5px;
}
.depot-inventory-actions .btn {
  min-width:0;
  min-height:36px;
  padding:4px 6px;
  font-size:11px;
  line-height:1.15;
  white-space:normal;
}

/* Controles compactos do Helper não devem herdar a moldura grossa dos botões principais. */
#modal:has(.helper-shell) .helper-tab,
#modal:has(.helper-shell) .helper-toggle,
#modal:has(.helper-shell) .helper-choice,
#modal:has(.helper-shell) .helper-pvp-toggle,
#modal:has(.helper-shell) .helper-learned-spell,
#modal:has(.helper-shell) .helper-icon-button {
  box-sizing:border-box !important;
  border:1px solid #594a34 !important;
  border-image:none !important;
  border-radius:4px !important;
  box-shadow:none !important;
  text-shadow:none !important;
}
#modal:has(.helper-shell) .helper-tab {
  min-width:0;
  padding:7px 8px;
  color:#c8b99e !important;
  font:inherit !important;
  line-height:1.25 !important;
  white-space:normal;
  overflow-wrap:normal;
  word-break:normal;
}
#modal:has(.helper-shell) .helper-tab:hover,
#modal:has(.helper-shell) .helper-tab.active {
  border-color:#8b6936 !important;
  background:rgba(201,157,73,.15) !important;
  color:#f1d384 !important;
}
#modal:has(.helper-shell) .helper-toggle {
  min-width:0;
  padding:7px 9px;
  background:#211b15 !important;
  color:#c6b89f !important;
  font:inherit !important;
  line-height:1.3 !important;
  white-space:normal;
  text-align:left;
}
#modal:has(.helper-shell) .helper-toggle.enabled { border-color:#5b8050 !important; color:#b6dc9b !important; }
#modal:has(.helper-shell) .helper-choice {
  min-width:0;
  padding:8px 10px;
  background:#211b15 !important;
  color:#cbbda4 !important;
  font:inherit !important;
  line-height:1.3 !important;
  white-space:normal;
  overflow-wrap:anywhere;
}
#modal:has(.helper-shell) .helper-choice:hover { border-color:#9d7a3c !important; color:#f0d68f !important; }
#modal:has(.helper-shell) .helper-choice.active {
  border-color:#c59a43 !important;
  background:linear-gradient(180deg,#927137,#795c2c) !important;
  color:#fff1cc !important;
}
#modal:has(.helper-shell) .helper-pvp-toggle {
  min-width:76px;
  padding:5px 8px;
  font:700 12px/1.2 "Oxanium",sans-serif !important;
  white-space:normal;
}
#modal:has(.helper-shell) .helper-pvp-toggle.is-on { border-color:#43884d !important; background:#24452a !important; color:#a5f0a4 !important; }
#modal:has(.helper-shell) .helper-pvp-toggle.is-off { border-color:#a34b42 !important; background:#4b2421 !important; color:#ffc0b4 !important; }
#modal:has(.helper-shell) .helper-learned-spell {
  padding:7px 22px 7px 7px;
  background:#211c17 !important;
  color:#e9dfcd !important;
  text-align:left;
}
#modal:has(.helper-shell) .helper-icon-button {
  display:grid !important;
  place-items:center;
  flex:0 0 30px;
  width:30px !important;
  min-width:30px;
  height:30px !important;
  min-height:30px;
  padding:0 !important;
  background:#211b15 !important;
  color:#d2c2a7 !important;
  font:700 16px/1 "Oxanium",sans-serif !important;
  overflow:visible;
}
#modal:has(.helper-shell) .helper-icon-button:hover:not(:disabled) { border-color:#bd914c !important; color:#f4d484 !important; }
#modal:has(.helper-shell) .helper-icon-button.remove:hover { border-color:#a45040 !important; color:#ffb5a1 !important; }
@media (max-width:800px) {
  #modal:has(.helper-shell) .helper-tabs { grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; }
  #modal:has(.helper-shell) .helper-tab { min-height:48px; padding:4px 3px !important; font-size:11px !important; line-height:1.2 !important; }
  #modal:has(.helper-shell) .helper-rotation-item { display:grid; grid-template-columns:22px 34px minmax(0,1fr) auto; gap:6px; padding:7px; }
  #modal:has(.helper-shell) .helper-rotation-info { grid-column:3; min-width:0; }
  #modal:has(.helper-shell) .helper-rotation-info > .helper-muted { display:none; }
  #modal:has(.helper-shell) .helper-rotation-actions { grid-column:4; display:flex; flex:0 0 auto; gap:3px; }
  #modal:has(.helper-shell) .helper-icon-button { flex-basis:28px; width:28px !important; min-width:28px; height:28px !important; min-height:28px; }
}

/* Confirmação de apagar personagem: ações com tamanho e moldura consistentes. */
#modal:has(.game-confirm) .game-confirm-actions .btn {
  box-sizing:border-box;
  flex:0 0 132px;
  min-width:132px;
  min-height:42px;
  padding:6px 10px;
  border:7px solid transparent !important;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
  border-radius:0 !important;
  font:700 14px/1.2 "Oxanium",sans-serif !important;
  text-shadow:0 1px 2px #000 !important;
  box-shadow:none !important;
  transition:none !important;
}
#modal:has(.game-confirm) .game-confirm-actions .btn-ghost {
  background:linear-gradient(180deg,#3a2d1d,#211910) !important;
  color:#f4d080 !important;
}
#modal:has(.game-confirm) .game-confirm-actions .btn-danger {
  background:linear-gradient(180deg,#71382e,#45201b) !important;
  color:#ffd4c8 !important;
}
@media (max-width:560px) {
  #modal:has(.game-confirm) .game-confirm-actions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  #modal:has(.game-confirm) .game-confirm-actions .btn { width:100%; min-width:0; min-height:40px; padding-inline:4px; font-size:12px !important; }
}

/* Store: moldura padrão substitui os contornos antigos dos painéis e cartões. */
#panel-store .store-wallet-bar,
#panel-store .store-vip-card,
#panel-store .store-aura-card,
#panel-store .store-color-card {
  box-sizing:border-box;
  border:8px solid transparent !important;
  border-image:url("../assets/ui/panel-frame.png") 12 / 8px / 0 stretch !important;
  border-radius:0 !important;
  background:#211a13;
  box-shadow:none;
}
#panel-store .store-vip-icon {
  box-sizing:border-box;
  border:0 !important;
  border-image:none !important;
  border-radius:0;
  background:transparent;
  overflow:visible;
}
#panel-store .store-vip-icon img { width:100%; height:100%; object-fit:contain; }
@media (max-width:800px) {
  #panel-store .store-aura-card {
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto auto;
    justify-items:center;
    gap:6px;
    text-align:center;
  }
  #panel-store .store-aura-preview {
    grid-column:1 / -1;
    justify-self:center;
    align-self:center;
    margin-inline:auto;
  }
  #panel-store .store-aura-details,
  #panel-store .store-aura-card > .btn { grid-column:1 / -1; justify-self:stretch; }
  #panel-store .store-aura-details { width:100%; text-align:center; }
  #panel-store .store-aura-details h4 { text-align:center; }
}
@media(max-width:600px) {
  #modal:has(.welcome-modal) .modal-box { width:calc(100vw - 20px); max-height:calc(100dvh - 24px); }
  .welcome-modal h2 { font-size:23px; }
  .welcome-copy { font-size:14px; }
  .welcome-vip-reward { padding:12px; }
  .welcome-vip-benefits { grid-template-columns:1fr; gap:6px; font-size:14px; }
}

/* Cards entram no DOM conforme o filtro. A altura estável mantém os botões
   ancorados enquanto content-visibility libera os cards durante o scroll. */
.modal-box:has(.hunt-browser) .zone-card,
.modal-box:has(.hunt-browser) .zone-card:hover,
.modal-box:has(.hunt-browser) .zone-card:focus,
.modal-box:has(.hunt-browser) .zone-card:active {
  height: 320px;
  min-height: 320px;
  grid-template-rows: minmax(18px, auto) 54px 16px minmax(0, 1fr);
  align-content: stretch;
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}
.modal-box:has(.hunt-browser) .zone-card-info {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}
.modal-box:has(.hunt-browser) .zone-card-info > .zone-card-actions {
  flex: 0 0 auto;
  margin-top: auto;
}
.modal-box:has(.hunt-browser) .hunt-card-grid {
  align-items: start;
  grid-auto-rows: 320px;
  overflow-anchor: none;
}

/* Evita mudanças de altura durante a rolagem dos cards de hunt e jutsu. */
.modal-box:has(.hunt-browser) .hunt-card-grid { contain:none; overflow-anchor:none; grid-auto-rows:auto; align-items:start; }
.modal-box:has(.hunt-browser) .zone-card,
.modal-box:has(.hunt-browser) .zone-card:hover,
.modal-box:has(.hunt-browser) .zone-card:focus,
.modal-box:has(.hunt-browser) .zone-card:active {
  height:auto;
  min-height:320px;
  max-height:none;
  content-visibility:visible;
  contain:none;
  contain-intrinsic-size:none;
  overflow:visible;
  transform:none!important;
  transition:none!important;
  animation:none!important;
}
#panel-jutsus,
#panel-jutsus .jutsu-tree-page,
#panel-jutsus .jutsu-tree-columns,
#panel-jutsus .jutsu-tree-path { overflow-anchor:none; }
#panel-jutsus .jutsu-tree-node,
#panel-jutsus .jutsu-tree-select,
#panel-jutsus .jutsu-tree-quick-add,
#panel-jutsus .jutsu-tree-node-frame { transform:none!important; transition:none!important; animation:none!important; }
#panel-jutsus .jutsu-tree-node:hover,
#panel-jutsus .jutsu-tree-select:hover,
#panel-jutsus .jutsu-tree-quick-add:hover,
#panel-jutsus .jutsu-tree-node:active,
#panel-jutsus .jutsu-tree-select:active { transform:none!important; }

/* A árvore fica dentro de .main, o contêiner que realmente rola. Desligamos
   scroll anchoring nessa combinação para os cards não saltarem ao rolar. */
.main:has(>#panel-jutsus.active) { overflow-anchor:none; scroll-behavior:auto; }
#panel-jutsus.active,
#panel-jutsus.active .jutsu-tree-page,
#panel-jutsus.active .jutsu-tree-columns,
#panel-jutsus.active .jutsu-tree-path-grid { overflow-anchor:none; }
#panel-jutsus.active .jutsu-tree-node,
#panel-jutsus.active .jutsu-tree-select,
#panel-jutsus.active .jutsu-tree-quick-add,
#panel-jutsus.active .jutsu-tree-node-frame,
#panel-jutsus.active .spell-icon { box-sizing:border-box; flex-shrink:0; transform:none!important; transition:none!important; animation:none!important; }
#panel-jutsus.active .spell-icon { width:50px; height:50px; }

/* Guilda: overrides finais para a composição em duas colunas. */
#panel-guild .guild-panel { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:14px; }
#panel-guild .guild-card { padding:15px; border:8px solid transparent !important; border-image:url("../assets/ui/panel-frame.png") 12 / 8px / 0 stretch !important; background:#1d1914; }
#panel-guild .guild-overview-card,
#panel-guild .guild-members-card,
#panel-guild .guild-activity-card,
#panel-guild .guild-footer-actions { grid-column:1 / -1; }
#panel-guild .guild-panel:has(.guild-members-card) .guild-directory-card { grid-column:1 / -1; }
#panel-guild .guild-head { gap:14px; padding-bottom:12px; border-bottom:1px solid #453724; }
#panel-guild .guild-crest { width:64px; height:64px; flex-basis:64px; font-size:18px; }
#panel-guild .guild-head-copy h3 { color:#f0d18a; font-size:20px; line-height:1.25; overflow-wrap:anywhere; }
#panel-guild .guild-head-copy p,
#panel-guild .guild-description { color:#c0b092; font-size:13px; line-height:1.5; }
#panel-guild .guild-description { margin-top:12px; }
#panel-guild .guild-online-count { padding:6px 9px; border:1px solid #405033; background:#1c2418; border-radius:3px; font-weight:700; white-space:nowrap; }
#panel-guild .guild-section h3 { padding-bottom:7px; border-bottom:1px solid #493a27; font-size:15px; }
#panel-guild .guild-member-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#panel-guild .guild-member-row { min-height:68px; padding:8px 10px; border-color:#4b3b28; }
#panel-guild .guild-member-copy strong,
#panel-guild .guild-war-copy strong,
#panel-guild .guild-directory-row strong { color:#ead6a9; }
#panel-guild .guild-member-date { white-space:nowrap; }
#panel-guild .guild-create-form { grid-template-columns:minmax(0,1.5fr) minmax(110px,.7fr); gap:12px; }
#panel-guild .guild-create-form label { gap:6px; font-size:13px; }
#panel-guild .guild-create-form input,
#panel-guild .guild-inline-form input,
#panel-guild .guild-edit-form input { min-height:40px; padding:8px 10px; }
#panel-guild .guild-create-form > button[type="submit"] { grid-column:1 / -1; justify-self:stretch; min-height:42px; }
#panel-guild .guild-create-logo { padding:10px; border:1px dashed #665033; background:#191510; }
#panel-guild .guild-note { margin-top:12px; font-size:12px; line-height:1.5; }
#panel-guild .guild-war-list,
#panel-guild .guild-activity-list,
#panel-guild .guild-directory-list { gap:8px; }
#panel-guild .guild-activity-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
#panel-guild .guild-footer-actions { padding:2px 0 4px; }
#panel-guild .guild-footer-actions button { min-width:150px; min-height:38px; }
@media(max-width:800px) {
  #panel-guild .guild-panel { grid-template-columns:minmax(0,1fr); gap:10px; }
  #panel-guild .guild-overview-card,
  #panel-guild .guild-members-card,
  #panel-guild .guild-activity-card,
  #panel-guild .guild-footer-actions { grid-column:1; }
  #panel-guild .guild-member-list,
  #panel-guild .guild-activity-list { grid-template-columns:minmax(0,1fr); }
  #panel-guild .guild-head-copy h3 { font-size:18px; }
}
@media(max-width:480px) {
  #panel-guild .guild-card { padding:10px; }
  #panel-guild .guild-head { align-items:flex-start; gap:9px; }
  #panel-guild .guild-crest { width:48px; height:48px; flex-basis:48px; }
  #panel-guild .guild-head-copy h3 { font-size:16px; }
  #panel-guild .guild-online-count { width:100%; margin-left:57px; }
  #panel-guild .guild-create-form { grid-template-columns:minmax(0,1fr); }
  #panel-guild .guild-create-form .guild-description-field,
  #panel-guild .guild-create-form .guild-logo-field,
  #panel-guild .guild-create-form > button[type="submit"] { grid-column:1; }
}
#panel-guild:has(.guild-panel-create) > .panel-title,
#panel-guild:has(.guild-panel-create) > .panel-sub { text-align:center; }
#panel-guild .guild-panel-create { grid-template-columns:minmax(0,620px); justify-content:center; }
#panel-guild .guild-create-card { width:100%; padding:22px; }
#panel-guild .guild-create-form { grid-template-columns:minmax(0,1.6fr) minmax(150px,.7fr); gap:16px; }
#panel-guild .guild-create-intro { grid-column:1 / -1; display:flex; align-items:center; justify-content:center; gap:15px; padding:4px 8px 18px; border-bottom:1px solid #493a27; }
#panel-guild .guild-create-intro > div { width:100%; text-align:center; }
#panel-guild .guild-create-intro h3 { margin:0 0 6px; color:#f0d18a; font-size:25px; }
#panel-guild .guild-create-intro p { margin:0; color:#c4b28f; font-size:16px; line-height:1.5; }
#panel-guild .guild-create-form label { display:grid; gap:8px; color:#e1cfaa; font-size:15px; font-weight:700; }
#panel-guild .guild-create-form .guild-create-name,
#panel-guild .guild-create-form .guild-create-tag { grid-column:auto; }
#panel-guild .guild-create-form input:not([type="file"]) { box-sizing:border-box; width:100%; min-height:48px; padding:10px 12px; border:1px solid #5c4930; color:#eee0c3; background:#15120f; font:inherit; font-size:15px; }
#panel-guild .guild-create-form .guild-create-logo { grid-column:1 / -1; display:flex; align-items:center; gap:12px; min-height:58px; padding:10px 12px; border:1px dashed #665033; background:#191510; }
#panel-guild .guild-create-form .guild-logo-picker { min-height:38px; flex:0 0 auto; }
#panel-guild .guild-create-form .guild-logo-picker { font-size:14px; }
#panel-guild .guild-create-form .guild-logo-status { flex:1; font-size:14px; line-height:1.45; }
#panel-guild .guild-create-form > button[type="submit"] { grid-column:1 / -1; width:100%; justify-self:stretch; min-height:50px; font-size:17px; }
#panel-guild .guild-create-card .guild-note { margin:15px 0 0; text-align:center; font-size:14px; line-height:1.5; }
@media(max-width:600px) {
  #panel-guild .guild-create-card { padding:15px; }
  #panel-guild .guild-create-form { grid-template-columns:minmax(0,1fr); gap:12px; }
  #panel-guild .guild-create-form .guild-create-intro,
  #panel-guild .guild-create-form .guild-create-name,
  #panel-guild .guild-create-form .guild-create-tag,
  #panel-guild .guild-create-form .guild-create-logo,
  #panel-guild .guild-create-form > button[type="submit"] { grid-column:1; }
  #panel-guild .guild-create-intro h3 { font-size:22px; }
  #panel-guild .guild-create-intro p { font-size:15px; }
  #panel-guild .guild-create-form .guild-create-logo { flex-wrap:wrap; }
  #panel-guild .guild-create-form .guild-logo-status { flex-basis:100%; }
}

/* Guilda: mantém o cabeçalho e os membros dentro da largura em telas pequenas. */
#panel-guild .guild-crest { box-sizing:border-box; }
#panel-guild .guild-crest > .guild-logo-image { box-sizing:border-box; display:block; width:100%; height:100%; max-width:100%; max-height:100%; object-fit:cover; object-position:center; }
@media(max-width:800px) {
  #panel-guild .guild-panel { grid-template-columns:minmax(0,1fr); }
  #panel-guild .guild-card { box-sizing:border-box; min-width:0; width:100%; }
  #panel-guild .guild-head { display:grid; grid-template-columns:48px minmax(0,1fr); align-items:start; gap:8px; min-width:0; }
  #panel-guild .guild-crest { grid-column:1; grid-row:1 / span 2; width:48px; height:48px; flex:none; }
  #panel-guild .guild-head-copy { grid-column:2; min-width:0; }
  #panel-guild .guild-online-count { grid-column:2; justify-self:start; box-sizing:border-box; width:max-content; max-width:100%; min-width:0; margin:0; white-space:nowrap; }
  #panel-guild .guild-member-row { display:grid; grid-template-columns:42px 8px minmax(0,1fr); align-items:start; min-width:0; }
  #panel-guild .guild-member-portrait { grid-column:1; grid-row:1 / span 2; }
  #panel-guild .guild-online-dot { grid-column:2; margin-top:5px; }
  #panel-guild .guild-member-copy { grid-column:3; width:auto; min-width:0; }
  #panel-guild .guild-member-date { grid-column:3; min-width:0; margin:0; white-space:normal; overflow-wrap:anywhere; }
  #panel-guild .guild-member-actions { grid-column:1 / -1; width:100%; min-width:0; justify-content:flex-start; }
  #panel-guild .guild-member-actions > * { box-sizing:border-box; min-width:0; max-width:100%; }
}

/* Graduação: títulos, requisitos e status com o mesmo padrão legível da Guilda. */
#panel-rank > .panel-title { margin-bottom:5px; font-size:24px; }
#panel-rank > .panel-sub { margin-bottom:16px; color:#c4b28f; font-size:16px; line-height:1.55; }
#panel-rank > .panel-title,
#panel-rank > .panel-sub { text-align:center; }
#panel-rank .rank-current-card { display:flex; align-items:center; gap:18px; min-height:90px; margin-bottom:18px; padding:16px 20px; border:8px solid transparent; border-image:url("../assets/ui/panel-frame.png") 12 / 8px / 0 stretch; background:#211a13; }
#panel-rank .rank-current-card > img { width:72px; height:72px; flex:0 0 72px; object-fit:contain; }
#panel-rank .rank-current-info { display:grid; align-content:center; gap:9px; min-width:0; }
#panel-rank .rank-current-info > strong { color:#f0d18a; font-size:22px; }
#panel-rank .rank-current-currencies { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; width:min(100%,520px); }
#panel-rank .rank-current-currency { display:flex; align-items:center; gap:8px; min-width:0; padding:7px 10px; border:1px solid rgba(201,166,91,.36); border-radius:5px; background:rgba(15,12,9,.42); }
#panel-rank .rank-current-currency img { width:20px; height:20px; flex:0 0 20px; object-fit:contain; }
#panel-rank .rank-current-currency > span { display:grid; gap:1px; min-width:0; color:#e1cfaa; line-height:1.1; }
#panel-rank .rank-current-currency strong { color:#f5e5c2; font-size:16px; font-weight:800; white-space:nowrap; }
#panel-rank .rank-current-currency small { color:#b9a98b; font-size:11px; font-weight:600; white-space:nowrap; }
#panel-rank .rank-list { gap:12px; }
#panel-rank .rank-card { grid-template-columns:76px minmax(0,1fr) minmax(190px,auto); gap:16px; min-height:108px; padding:14px 16px; align-items:center; background:#211a13; }
#panel-rank .rank-card > img { width:72px; height:72px; object-fit:contain; }
#panel-rank .rank-card-info { display:grid; gap:7px; min-width:0; }
#panel-rank .rank-card-name { color:#f0d18a; font-size:19px; line-height:1.25; }
#panel-rank .rank-card-bonuses { display:grid; gap:3px; min-width:0; color:#d0c0a2; font-size:15px; line-height:1.35; }
#panel-rank .rank-card-bonuses > span { display:block; min-width:0; overflow-wrap:anywhere; }
#panel-rank .rank-card-bonuses > .rank-bonus-gold,
#panel-rank .rank-card-bonuses > .rank-bonus-elo { display:flex; align-items:center; gap:5px; }
#panel-rank .rank-gold-icon { display:inline-block; width:18px; height:18px; flex:0 0 18px; object-fit:contain; vertical-align:middle; }
#panel-rank .rank-elo-icon { display:inline-block; width:17px; height:17px; flex:0 0 17px; object-fit:contain; vertical-align:middle; }
#panel-rank .rank-card-status { display:flex; align-items:center; gap:5px; color:#ead6a9; font-size:15px; font-weight:700; line-height:1.35; }
#panel-rank .rank-card.locked { opacity:1; }
#panel-rank .rank-card.locked .rank-card-status { color:#b8a78b; }
#panel-rank .rank-card.current { background:#242015; }
#panel-rank .rank-card > .rank-action { grid-column:3; justify-self:end; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; gap:6px; width:190px; min-width:190px; min-height:44px; padding:8px 12px; font-size:15px; white-space:nowrap; }
#panel-rank .rank-card > .rank-action-locked { border:1px solid #80623a; background:#302619; color:#d3bd91; font-weight:700; }
#panel-rank .rank-card > .chip { justify-self:end; padding:8px 12px; font-size:14px; }
@media(max-width:800px) {
  #panel-rank .rank-card { grid-template-columns:62px minmax(0,1fr); gap:10px 14px; padding:12px; }
  #panel-rank .rank-card > img { width:58px; height:58px; }
  #panel-rank .rank-card > .btn,
  #panel-rank .rank-card > .chip { grid-column:2; justify-self:start; }
  #panel-rank .rank-card > .btn { min-width:min(100%,240px); }
  #panel-rank .rank-card > .rank-action { grid-column:2; justify-self:start; width:min(100%,240px); min-width:0; }
}
@media(max-width:480px) {
  #panel-rank > .panel-title { font-size:22px; }
  #panel-rank > .panel-sub { font-size:15px; }
  #panel-rank .rank-current-card { gap:12px; padding:12px; }
  #panel-rank .rank-current-card > img { width:58px; height:58px; flex-basis:58px; }
  #panel-rank .rank-current-info { gap:7px; }
  #panel-rank .rank-current-info > strong { font-size:19px; }
  #panel-rank .rank-current-currencies { gap:6px; }
  #panel-rank .rank-current-currency { gap:5px; padding:6px; }
  #panel-rank .rank-current-currency img { width:17px; height:17px; flex-basis:17px; }
  #panel-rank .rank-current-currency strong { font-size:13px; }
  #panel-rank .rank-current-currency small { font-size:10px; }
  #panel-rank .rank-card-name { font-size:17px; }
  #panel-rank .rank-card-bonuses,
  #panel-rank .rank-card-status { font-size:14px; }
}

/* HUD mobile: keep the hunt picker reachable and remove the FPS counter. */
@media (max-width:800px) {
  .battle-fps-hud { display:none !important; }
  .hunt-controls { z-index:20; overflow:visible; }
  .hunt-controls .hunt-selector-btn {
    display:inline-flex !important; align-items:center; justify-content:center;
    min-height:34px; padding:7px 10px; border-color:#d0a54b;
    background:rgba(24,18,12,.96); color:#ffe09a; font-size:12px;
    line-height:1.2; visibility:visible; opacity:1; pointer-events:auto;
  }
  /* No celular, o acesso às hunts fica dentro do card de Hunts Disponíveis. */
  .hunt-browser.hunt-home-state.showing-home .hunt-home-hero .hunt-home-open { display:none !important; }
  .hunt-browser.hunt-home-state.showing-home .hunt-home-available { text-align:center; }
  .hunt-browser.hunt-home-state.showing-home .hunt-home-mobile-open {
    display:flex !important; align-items:center; justify-content:center;
    box-sizing:border-box; width:min(100%,240px); min-height:44px;
    margin:12px auto 2px; position:relative; z-index:3;
    visibility:visible !important; opacity:1 !important; pointer-events:auto !important;
  }
}
html.mobile-desktop-site .battle-fps-hud { display:none !important; }

/* No mobile, os controles ficam entre a identificação do jogador e a arena. */
.hunt-head.mobile-hunt-header { width:100%; flex-direction:column; align-items:stretch; gap:5px; margin:0 0 7px; }
.hunt-head.mobile-hunt-header > div { display:flex; flex-direction:column; align-items:stretch; width:100%; gap:5px; }
.hunt-head.mobile-hunt-header .hunt-player-status { display:none !important; }
.hunt-head.mobile-hunt-header .hunt-controls {
  position:relative; inset:auto; z-index:2; display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch; width:100%; max-width:none; box-sizing:border-box; gap:5px;
  margin:0; padding:5px; border:1px solid rgba(201,166,91,.45); border-radius:6px;
  background:rgba(18,15,12,.9); overflow:visible;
}
.hunt-head.mobile-hunt-header .hunt-controls .hunt-selector-btn,
.hunt-head.mobile-hunt-header .hunt-controls .battle-hunt-difficulty,
.hunt-head.mobile-hunt-header .hunt-controls .hunt-roster-badge:not([hidden]),
.hunt-head.mobile-hunt-header .hunt-controls > .btn:not([hidden]) {
  display:flex !important; align-items:center; justify-content:center; box-sizing:border-box;
  width:100% !important; min-width:0; max-width:none; min-height:32px; margin:0; padding:5px 7px;
  overflow:hidden; border:1px solid #6b563a; border-radius:4px; background:linear-gradient(180deg,#382f24,#29221b);
  color:#fff; font-size:11px; line-height:1.15; font-family:"Oxanium",sans-serif;
  text-align:center; text-overflow:ellipsis; white-space:nowrap;
}
.hunt-head.mobile-hunt-header .hunt-controls .hunt-stop-button:not([hidden]) { grid-column:1 / -1; justify-self:center; width:max-content !important; min-width:148px; }
.hunt-head.mobile-hunt-header .hunt-controls .hunt-selector-btn,
.hunt-head.mobile-hunt-header .hunt-controls .battle-hunt-difficulty { font-size:12px; }
.hunt-head.mobile-hunt-header .hunt-controls .battle-pip-button,
.hunt-head.mobile-hunt-header .hunt-controls .depot-open-button,
.hunt-head.mobile-hunt-header .hunt-controls .hunt-roster-badge,
.hunt-head.mobile-hunt-header .hunt-controls > .btn:not(.hunt-selector-btn) { display:none !important; }
.hunt-head.mobile-hunt-header .hunt-controls .battle-gold-hud:not([hidden]) {
  grid-column:1 / -1; justify-self:start; width:auto !important; min-height:24px; padding:1px 4px;
  margin-top:4px; border:0; background:transparent; box-shadow:none; color:#f2c14e; font-size:15px; text-align:left;
}
.arena-wrap.mobile-hunt-wave > .wave-battle-hud {
  position:relative; inset:auto; z-index:1; transform:none; display:grid; grid-template-columns:auto minmax(0,1fr);
  align-items:center; gap:9px; width:100%; box-sizing:border-box; margin:0; padding:5px 9px;
  border:1px solid rgba(224,184,104,.55); border-radius:5px; background:rgba(27,21,16,.94);
  box-shadow:inset 0 0 9px rgba(245,184,76,.06); pointer-events:none;
}
.arena-wrap.mobile-hunt-wave > .wave-battle-hud[hidden] { display:none !important; }
.arena-wrap.mobile-hunt-wave .wave-hud-top { justify-content:flex-start; margin:0; }
.arena-wrap.mobile-hunt-wave .wave-hud-title { font-size:10px; white-space:nowrap; }
.arena-wrap.mobile-hunt-wave .wave-hud-track { height:5px; min-width:0; }
@media(max-width:800px) {
  body > .battle-chat-window,
  body > .battle-chat-window * { -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
  body > .battle-chat-window .battle-chat-composer input { -webkit-user-select:text; user-select:text; }
  body > .battle-chat-toggle:not([hidden]) {
    position:fixed; left:5px; bottom:calc(12px + env(safe-area-inset-bottom, 0px)); z-index:40;
    display:block !important;
  }
  body > .battle-chat-toggle[hidden] { display:none !important; }
  body > .battle-chat-window:not([hidden]) {
    position:fixed; left:5px; bottom:calc(54px + env(safe-area-inset-bottom, 0px)); z-index:45;
    display:grid !important; width:min(360px,calc(100vw - 16px)); height:min(52dvh,420px); min-height:190px;
  }
  body > .battle-chat-window[hidden] { display:none !important; }
  .mobile-battle-loot > .battle-gold-hud:not([hidden]) { display:flex !important; align-self:center; justify-content:center; width:max-content; max-width:100%; margin:8px auto 0; padding:1px 4px; text-align:center; }
  .mobile-battle-loot > .battle-gold-hud .currency-icon { display:block; width:17px !important; height:17px !important; min-width:17px; max-width:17px; flex:0 0 17px; object-fit:contain; }
  .mobile-battle-loot > .battle-gold-hud[hidden] { display:none !important; }
}
.mapview > .depot-open-button.mobile-depot-corner { position:absolute; top:8px; left:8px; z-index:12; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; width:max-content !important; min-width:0 !important; max-width:calc(100% - 16px); min-height:28px; padding:4px 8px !important; border-radius:4px; font-size:11px !important; line-height:1.1; white-space:nowrap; }
.mapview > .depot-open-button.mobile-depot-corner[hidden] { display:none !important; }
.mapview > .hunt-stop-button.mobile-stop-corner { position:absolute; top:8px; left:8px; z-index:12; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; width:max-content !important; min-width:0 !important; max-width:calc(100% - 16px); min-height:28px; margin:0; padding:4px 8px !important; border-radius:4px; font-size:11px !important; line-height:1.1; white-space:nowrap; }
.mapview > .hunt-stop-button.mobile-stop-corner[hidden] { display:none !important; }

/* Navegação mobile: atalho flutuante e painel leve com os menus do jogo. */
@media(max-width:800px) {
  .mobile-nav-toggle {
    position:fixed; top:auto; right:5px; bottom:calc(12px + env(safe-area-inset-bottom, 0px)); left:auto; z-index:40;
    display:block; box-sizing:border-box; width:auto; min-width:84px; height:auto; min-height:0; padding:4px 9px;
    border:7px solid transparent; border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch; border-radius:0;
    background:linear-gradient(180deg,#3a2d1d,#211910);
    color:#f4d080; font:700 12px "Oxanium",sans-serif; text-shadow:0 1px 2px #000;
    box-shadow:none; cursor:pointer;
  }
}
html.mobile-desktop-site .mobile-nav-toggle {
  position:fixed; top:auto; right:5px; bottom:calc(12px + env(safe-area-inset-bottom, 0px)); left:auto; z-index:40;
  display:block; box-sizing:border-box; width:auto; min-width:84px; height:auto; min-height:0; padding:4px 9px;
  border:7px solid transparent; border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch; border-radius:0;
  background:linear-gradient(180deg,#3a2d1d,#211910); color:#f4d080;
  font:700 12px "Oxanium",sans-serif; text-shadow:0 1px 2px #000; box-shadow:none;
}
html.mobile-desktop-site body > .battle-chat-window:not([hidden]) { z-index:45; }
#modal.mobile-menu-open { background:rgba(8,6,4,.56); backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); }
#modal.mobile-menu-open .modal-box {
  display:flex; flex-direction:column; box-sizing:border-box; width:min(460px,calc(100vw - 28px));
  max-height:min(76dvh,660px); overflow:hidden; padding:14px; border:0;
  border-radius:0; background:rgba(35,28,21,.94); box-shadow:none;
}
#modal.mobile-menu-open .modal-head { flex:0 0 auto; margin:0 0 10px; padding-bottom:9px; border-bottom:1px solid rgba(201,166,91,.28); }
#modal.mobile-menu-open .modal-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
#modal.mobile-menu-open .mobile-menu-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#modal.mobile-menu-open .mobile-menu-grid .nav-btn {
  position:relative; display:flex !important; flex:0 0 auto; flex-direction:row; align-items:center; justify-content:flex-start;
  box-sizing:border-box; width:100%; min-width:0; min-height:48px; height:auto; gap:9px; padding:8px 10px;
  border:1px solid rgba(126,97,57,.58); border-radius:5px; background:rgba(22,18,14,.72); color:#e8d4ad;
  text-align:left;
}
#modal.mobile-menu-open .mobile-menu-grid .nav-btn.active { border-color:#c79b4b; background:rgba(121,83,29,.3); color:#f5d27f; }
#modal.mobile-menu-open .mobile-menu-grid .nav-btn:disabled { opacity:.48; }
#modal.mobile-menu-open .mobile-menu-grid .nav-btn i { display:grid; place-items:center; flex:0 0 26px; width:26px; }
#modal.mobile-menu-open .mobile-menu-grid .nav-btn i img { width:24px; height:24px; object-fit:contain; }
#modal.mobile-menu-open .mobile-menu-grid .nav-btn span { display:block; min-width:0; overflow:hidden; font-size:13px; line-height:1.15; text-overflow:ellipsis; white-space:nowrap; }
#modal.mobile-menu-open .mobile-menu-grid .nav-btn em { position:absolute; top:2px; right:3px; margin:0; }
@media(max-width:380px) {
  #modal.mobile-menu-open .modal-box { padding:10px; }
  #modal.mobile-menu-open .mobile-menu-grid { gap:6px; }
  #modal.mobile-menu-open .mobile-menu-grid .nav-btn { min-height:44px; gap:6px; padding:6px; }
  #modal.mobile-menu-open .mobile-menu-grid .nav-btn span { font-size:12px; }
}

/* Modal de Opções: camada opaca e enxuta para não repintar a arena por trás. */
#modal:has(.settings-panel) {
  z-index:10000; background:rgba(7,6,5,.96); backdrop-filter:none; -webkit-backdrop-filter:none;
  pointer-events:auto; isolation:isolate;
}
#modal:has(.settings-panel) .modal-box {
  width:min(580px,calc(100vw - 24px)); max-height:min(88dvh,720px); overflow:auto;
  padding:20px; border:1px solid #735a36; border-radius:5px; background:#211a13;
  box-shadow:0 5px 16px rgba(0,0,0,.48); animation:none; transition:none; filter:none;
}
#modal:has(.settings-panel) .modal-box::after { display:none; }
#modal:has(.settings-panel) .modal-head {
  margin:0 0 16px; padding:0 0 12px; border-bottom:1px solid #55432d;
  color:#f0cc73; font:700 21px/1.2 "Oxanium",sans-serif;
}
#modal:has(.settings-panel) #modal-close { min-width:38px; min-height:36px; font-size:18px; }
#modal:has(.settings-panel) .modal-body,
#modal:has(.settings-panel) .modal-body * { animation:none!important; transition:none!important; filter:none!important; }
#modal:has(.settings-panel) .modal-body { font-size:15px; }
#modal:has(.settings-panel) .settings-panel { gap:18px; font-size:15px; }
#modal:has(.settings-panel) .settings-intro { gap:14px; padding-bottom:16px; }
#modal:has(.settings-panel) .settings-intro-icon { width:46px; height:46px; flex-basis:46px; font-size:23px; }
#modal:has(.settings-panel) .settings-intro strong { font-size:18px; }
#modal:has(.settings-panel) .settings-intro small { font-size:14px; line-height:1.4; }
#modal:has(.settings-panel) .settings-section { gap:10px; }
#modal:has(.settings-panel) .settings-section h3 { font-size:12px; }
#modal:has(.settings-panel) .settings-option-card {
  min-height:70px; padding:13px 15px; border-color:#5e4a31; border-radius:5px; background:#2c231a;
  cursor:pointer;
}
#modal:has(.settings-panel) .settings-option-card:hover { border-color:#80663d; background:#32271c; }
#modal:has(.settings-panel) .settings-option-copy { gap:6px; }
#modal:has(.settings-panel) .settings-option-copy strong { font-size:16px; line-height:1.25; }
#modal:has(.settings-panel) .settings-option-copy small { font-size:13px; line-height:1.4; }
#modal:has(.settings-panel) .settings-switch { width:46px; height:26px; flex-basis:46px; }
#modal:has(.settings-panel) .settings-switch > span::after { width:18px; height:18px; }
#modal:has(.settings-panel) .settings-switch input:checked + span::after { transform:translateX(20px); }
#modal:has(.settings-panel) .settings-account { padding:13px 15px; font-size:14px; }
#modal:has(.settings-panel) .settings-footer { padding-top:14px; font-size:13px; }
#modal:has(.settings-panel) .settings-footer .btn { min-height:38px; padding-inline:13px; font-size:13px; }
@media(max-width:520px) {
  #modal:has(.settings-panel) .modal-box { width:calc(100vw - 20px); max-height:88dvh; padding:15px; }
  #modal:has(.settings-panel) .settings-option-card { min-height:66px; padding:11px 12px; }
  #modal:has(.settings-panel) .settings-option-copy strong { font-size:15px; }
  #modal:has(.settings-panel) .settings-option-copy small { font-size:12px; }
}
.modal:has(.battle-menu-modal-shell) { backdrop-filter:none; background:rgba(0,0,0,.62); }
.modal-box:has(.battle-menu-modal-shell) {
  display:flex; flex-direction:column; width:min(1180px,96vw); height:min(900px,92dvh); max-height:92dvh;
  overflow:hidden; padding:12px; border:1px solid #55452f; border-radius:4px; background:#1d1915; box-shadow:none;
}
.modal-box:has(.battle-menu-modal-shell)::after { display:none; }
.modal-box:has(.battle-menu-modal-shell) .modal-head { flex:0 0 auto; margin:0; padding:0 2px 9px; border-bottom:1px solid #5d4a31; }
.modal-box:has(.battle-menu-modal-shell) .modal-body { flex:1 1 auto; min-width:0; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; padding:10px 4px 4px; }
.battle-menu-modal-shell,.battle-menu-modal-shell > .panel { display:block; width:100%; min-width:0; min-height:100%; }
.battle-menu-modal-shell > .panel { padding:clamp(8px,1.3vw,18px); }
@media(min-width:801px) {
  .modal-box:has(.battle-menu-modal-shell #panel-rank) { width:min(900px,92vw); height:min(860px,88dvh); max-height:88dvh; }
  .battle-menu-modal-shell #panel-rank > .panel-title { font-size:21px; }
  .battle-menu-modal-shell #panel-rank > .panel-sub { max-width:680px; margin-left:auto; margin-right:auto; font-size:14px; line-height:1.4; }
  #panel-rank .rank-card { grid-template-columns:66px minmax(0,1fr) 176px; gap:12px; min-height:96px; padding:12px 14px; }
  #panel-rank .rank-card > .rank-action { width:176px; min-width:176px; }
}
@media(max-width:800px) {
  .modal-box:has(.battle-menu-modal-shell) { width:calc(100vw - 12px); height:calc(100dvh - 12px); max-height:calc(100dvh - 12px); padding:9px; }
  .modal-box:has(.battle-menu-modal-shell) .modal-body { padding:7px 1px 2px; }
  .battle-menu-modal-shell > .panel { padding:7px 4px; }
}
@media(min-width:801px) {
  .modal-box:has(.battle-menu-modal-shell #panel-forge) { width:min(1080px,94vw); height:min(860px,90dvh); max-height:90dvh; }
  .battle-menu-modal-shell #panel-forge > .forge-title { font-size:25px; margin-bottom:8px; }
  .battle-menu-modal-shell #panel-forge > .forge-subtitle { max-width:760px; margin:0 auto 18px; font-size:16px; line-height:1.45; }
  .battle-menu-modal-shell #panel-forge .forge-wallet { margin-bottom:16px; font-size:17px; }
  .battle-menu-modal-shell #panel-forge .forge-tabs { gap:8px; margin-bottom:16px; }
  .battle-menu-modal-shell #panel-forge .forge-tab { min-height:42px; padding:0 15px; font-size:15px; }
  .battle-menu-modal-shell #panel-forge .forge-tab-count { min-width:22px; font-size:12px; }
  .battle-menu-modal-shell #panel-forge .forge-grid { gap:14px; }
  .battle-menu-modal-shell #panel-forge .forge-card { grid-template-columns:62px minmax(0,1fr); gap:12px; padding:16px; }
  .battle-menu-modal-shell #panel-forge .forge-product-icon { width:60px; height:60px; }
  .battle-menu-modal-shell #panel-forge .forge-product-icon img { width:46px; height:46px; }
  .battle-menu-modal-shell #panel-forge .forge-product-info > strong { font-size:18px; }
  .battle-menu-modal-shell #panel-forge .forge-quality { font-size:14px; }
  .battle-menu-modal-shell #panel-forge .forge-gold-cost { font-size:16px; }
  .battle-menu-modal-shell #panel-forge .forge-item-stats { padding:10px 12px; }
  .battle-menu-modal-shell #panel-forge .forge-item-stats > strong,
  .battle-menu-modal-shell #panel-forge .forge-item-stats .item-stats { font-size:14px; }
  .battle-menu-modal-shell #panel-forge .forge-requirements,
  .battle-menu-modal-shell #panel-forge .forge-material { font-size:14px; }
  .battle-menu-modal-shell #panel-forge .forge-material img { width:28px; height:28px; }
  .battle-menu-modal-shell #panel-forge .forge-craft { min-height:42px; font-size:15px; }
}

/* Ações dos painéis usam a mesma moldura leve dos atalhos Chat e Menus. */
.mobile-battle-sell,
.hunt-home-open,
.hunt-home-mobile-open,
.hunt-card-start,
.hunt-card-loots,
.hunt-loot-back,
.game-standard-button,
.rank-action,
#panel-guild button,
#panel-guild .guild-logo-picker,
#panel-sagas button,
#panel-store button,
#panel-market button,
.market-dialog-body button,
#panel-forge button,
#panel-jutsus .jutsu-tree-reset,
.helper-shell button {
  box-sizing:border-box !important;
  border:7px solid transparent !important;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
  border-radius:0 !important;
  background:linear-gradient(180deg,#3a2d1d,#211910) !important;
  color:#f4d080 !important;
  font-family:"Oxanium",sans-serif !important;
  font-weight:700 !important;
  text-shadow:0 1px 2px #000 !important;
  box-shadow:none !important;
  transition:none !important;
}
.item-context-actions .btn,
.item-actions .btn,
.loot-pouch-actions .btn,
.depot-modal-actions .btn {
  box-sizing:border-box !important;
  border:7px solid transparent !important;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
  border-radius:0 !important;
  background:linear-gradient(180deg,#3a2d1d,#211910) !important;
  color:#f4d080 !important;
  font-family:"Oxanium",sans-serif !important;
  font-weight:700 !important;
  text-shadow:0 1px 2px #000 !important;
  box-shadow:none !important;
  transition:none !important;
}
#panel-rank .rank-card > .rank-action-locked {
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:7px solid transparent;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch;
  border-radius:0;
  background:linear-gradient(180deg,#3a2d1d,#211910);
  color:#f4d080;
  font-family:"Oxanium",sans-serif;
  font-weight:700;
  text-shadow:0 1px 2px #000;
  box-shadow:none;
}
.mobile-battle-sell:hover,
.hunt-home-open:hover,
.hunt-home-mobile-open:hover,
.hunt-card-start:hover,
.hunt-card-loots:hover,
.hunt-loot-back:hover,
.game-standard-button:hover,
.rank-action:hover,
#panel-guild button:hover,
#panel-guild .guild-logo-picker:hover,
#panel-sagas button:hover,
#panel-store button:hover,
#panel-market button:hover,
.market-dialog-body button:hover,
#panel-forge button:hover,
#panel-jutsus .jutsu-tree-reset:hover,
.helper-shell button:hover,
.item-context-actions .btn:hover,
.item-actions .btn:hover,
.loot-pouch-actions .btn:hover,
.depot-modal-actions .btn:hover,
#panel-rank .rank-card > .rank-action-locked:hover {
  filter:brightness(1.12);
}
.mobile-battle-sell:disabled,
.hunt-home-open:disabled,
.hunt-home-mobile-open:disabled,
.hunt-card-start:disabled,
.hunt-card-loots:disabled,
.hunt-loot-back:disabled,
.game-standard-button:disabled,
.rank-action:disabled,
#panel-guild button:disabled,
#panel-sagas button:disabled,
#panel-store button:disabled,
#panel-market button:disabled,
.market-dialog-body button:disabled,
#panel-forge button:disabled,
#panel-jutsus .jutsu-tree-reset:disabled,
.helper-shell button:disabled {
  opacity:.55;
  filter:none;
}
.item-context-actions .btn:disabled,
.item-actions .btn:disabled,
.loot-pouch-actions .btn:disabled,
.depot-modal-actions .btn:disabled { opacity:.55; filter:none; }
@media(max-width:800px) {
  #panel-market .market-tabs,
  #panel-market .market-category-tabs {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:stretch;
    gap:5px;
    border-bottom:0;
  }
  #panel-market .market-tab,
  #panel-market .market-category {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-width:0;
    min-height:40px;
    padding:4px 5px;
    font-size:clamp(11px,3.2vw,14px);
    line-height:1.15;
    text-align:center;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  #panel-market .market-currency-tabs {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:stretch;
    gap:6px;
    width:100%;
  }
  #panel-market .market-currency-filter {
    display:flex;
    width:100%;
    min-width:0;
    min-height:40px;
    gap:5px;
    padding:4px 6px;
    font-size:clamp(11px,3.2vw,14px);
    line-height:1.15;
    white-space:normal;
  }
  #panel-market .market-currency-filter .market-currency-img { width:18px; height:18px; }
  #panel-market .market-search-row {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
  }
  #panel-market .market-search-row > input { grid-column:1 / -1; width:100%; min-width:0; }
  #panel-market .market-search-row > button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-width:0;
    min-height:40px;
    padding:4px 6px;
    font-size:clamp(11px,3.2vw,14px);
    line-height:1.15;
    text-align:center;
    white-space:normal;
  }
  #panel-market .market-search-row > button:last-child { grid-column:1 / -1; width:min(100%,220px); justify-self:center; }
  #panel-market .market-buy-btn { justify-self:stretch; width:100%; }
  #panel-market .market-footer { flex-wrap:wrap; justify-content:center; }
  #panel-market .market-footer .btn-sm { min-width:84px; min-height:38px; padding:4px 6px; }
  .market-dialog-head button { flex:0 0 38px; width:38px; min-width:38px; min-height:38px; padding:3px; }
  .market-dialog-body .market-submit { min-height:42px; padding:5px 8px; font-size:14px; }
}

/* HUD da hunt e cartões da batalha com a moldura padrão do jogo. */
@media(max-width:800px) {
  .hunt-head.mobile-hunt-header .hunt-controls .hunt-selector-btn,
  .hunt-head.mobile-hunt-header .hunt-controls .battle-hunt-difficulty {
    box-sizing:border-box;
    min-width:0;
    min-height:38px;
    padding:3px 7px;
    border:7px solid transparent !important;
    border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
    border-radius:0 !important;
    background:linear-gradient(180deg,#3a2d1d,#211910) !important;
    color:#f4d080 !important;
    font-family:"Oxanium",sans-serif !important;
    font-weight:700 !important;
    text-shadow:0 1px 2px #000 !important;
    box-shadow:none !important;
  }
}
#top-exp,
.mobile-battle-loot,
#vitals-panel,
.analyzer-card,
.session-loot-box,
.card:has(#equip-grid),
.compact-inventory-card,
.compact-loot-pouch-card {
  box-sizing:border-box;
  border:8px solid transparent !important;
  border-image:url("../assets/ui/panel-frame.png") 12 / 8px / 0 stretch !important;
  border-radius:0 !important;
}
#top-exp::after,
.mobile-battle-loot::after,
#vitals-panel::after,
.analyzer-card::after,
.session-loot-box::after,
.card:has(#equip-grid)::after,
.compact-inventory-card::after,
.compact-loot-pouch-card::after {
  content:none !important;
  display:none !important;
}
/* Modo de foco para gravação vertical no celular: mantém os HUDs na arena e
   usa toda a área útil da tela para o mapa, ocultando apenas os painéis abaixo. */
html.mobile-battle-focus #screen-game {
  width:100%; height:100vh; height:100dvh; min-height:0; overflow:hidden;
}
html.mobile-battle-focus #screen-game > .layout {
  display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:0 minmax(0,1fr) 0;
  flex:1 1 0; height:0; min-height:0; overflow:hidden;
}
html.mobile-battle-focus #screen-game > .layout > .sidenav { grid-column:1; grid-row:1; height:0; }
html.mobile-battle-focus #screen-game > .layout > #battle-overview { display:none !important; }
html.mobile-battle-focus #screen-game > .layout > .main {
  grid-column:1; grid-row:2; width:100%; height:100%; min-width:0; min-height:0;
  box-sizing:border-box; overflow:hidden; padding:0 !important;
}
html.mobile-battle-focus #screen-game > .layout > .rightbar { display:none !important; }
html.mobile-battle-focus #panel-hunt.active {
  display:flex; flex-direction:column; width:100%; height:100%; min-height:0; overflow:hidden;
}
html.mobile-battle-focus #panel-hunt > .hunt-head,
html.mobile-battle-focus #panel-hunt > .jutsu-bar,
html.mobile-battle-focus .arena-wrap > #top-exp,
html.mobile-battle-focus .arena-wrap > .mobile-battle-loot,
html.mobile-battle-focus .arena-wrap > .arena-side { display:none !important; }
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls:not([hidden]) {
  position:relative; z-index:22; display:grid; flex:0 0 auto; grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch; gap:5px; box-sizing:border-box; width:100%; margin:0; padding:4px 6px;
  background:rgba(18,15,12,.94);
}
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls[hidden] { display:none !important; }
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .hunt-selector-btn,
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .battle-hunt-difficulty,
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .depot-open-button,
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .pvp-battle-control,
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .pvp-exit-button {
  position:relative; display:flex !important; align-items:center; justify-content:center; box-sizing:border-box;
  width:100% !important; min-width:0; max-width:none; min-height:34px; margin:0; padding:3px 6px !important;
  border:7px solid transparent !important; border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
  border-radius:0 !important; background:linear-gradient(180deg,#3a2d1d,#211910) !important;
  color:#f4d080 !important; font:700 12px/1.1 "Oxanium",sans-serif !important;
  text-align:center; text-shadow:0 1px 2px #000 !important; box-shadow:none !important; white-space:nowrap;
}
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > [hidden] { display:none !important; }
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls {
  position:absolute; top:8px; right:auto; bottom:auto; left:8px; z-index:20; display:flex; visibility:visible;
  width:max-content; max-width:calc(100% - 16px); padding:0; border:0; background:transparent;
}
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls > .hunt-stop-button:not([hidden]) {
  position:static; display:inline-flex !important; min-height:34px; padding:3px 9px !important;
  border:7px solid transparent !important; border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
  border-radius:0 !important; background:linear-gradient(180deg,#3a2d1d,#211910) !important;
  color:#f4d080 !important; font:700 12px/1.1 "Oxanium",sans-serif !important; text-align:center;
  text-shadow:0 1px 2px #000 !important; box-shadow:none !important; white-space:nowrap;
}
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls > .hunt-stop-button[hidden],
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls > .depot-open-button[hidden] { display:none !important; }
html.mobile-battle-focus #panel-hunt .mapview > .wave-battle-hud:not([hidden]) {
  position:absolute; top:8px; right:8px; bottom:auto; left:auto; z-index:20; display:block; transform:none;
  width:104px; max-width:calc(100% - 120px); margin:0; padding:3px 6px; border-width:1px; border-radius:5px;
  box-shadow:0 2px 6px rgba(0,0,0,.5);
}
html.mobile-battle-focus #panel-hunt .mapview > .wave-battle-hud[hidden] { display:none !important; }
html.mobile-battle-focus #panel-hunt .mapview > .wave-battle-hud .wave-hud-top { margin:0; }
html.mobile-battle-focus #panel-hunt .mapview > .wave-battle-hud .wave-hud-title { font-size:9px; }
html.mobile-battle-focus #panel-hunt .mapview > .wave-battle-hud .wave-hud-track { height:3px; }
/* Compatibilidade: botões de mapa ocultos nunca devem ser mostrados pelo layout de foco. */
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls > .depot-open-button[hidden] { display:none !important; }
html.mobile-battle-focus #panel-hunt > .arena-wrap {
  position:relative; display:flex; flex:1 1 auto; flex-direction:column; gap:0;
  width:100%; height:100%; min-width:0; min-height:0; max-width:none; margin:0; overflow:hidden;
}
html.mobile-battle-focus .arena-wrap > .mapview {
  position:relative; flex:1 1 auto; order:1; width:100%; height:100%; min-width:0; min-height:0;
  max-width:none; max-height:none; margin:0; aspect-ratio:auto;
}
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls > .wave-battle-hud {
  position:relative; inset:auto; top:auto; right:auto; bottom:auto; left:auto; z-index:auto; transform:none; align-self:flex-start;
  display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:4px;
  width:112px; max-width:100%; margin:2px 0 0; padding:3px 5px;
  border-width:1px; border-radius:4px; box-shadow:none;
}
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls {
  position:absolute; top:8px; left:8px; z-index:20; display:flex; visibility:visible;
}
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls .hunt-selector-btn,
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls .battle-hunt-difficulty {
  box-sizing:border-box; min-width:0; min-height:38px; padding:3px 7px;
  border:7px solid transparent !important;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
  border-radius:0 !important; background:linear-gradient(180deg,#3a2d1d,#211910) !important;
  color:#f4d080 !important; font:700 12px/1.1 "Oxanium",sans-serif !important;
  text-align:center; text-shadow:0 1px 2px #000 !important; box-shadow:none !important;
}
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls .hunt-selector-btn { width:max-content; text-align:left; }
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls .depot-open-button,
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls .hunt-stop-button {
  position:static; z-index:auto; display:inline-flex !important; align-items:center; justify-content:center;
  box-sizing:border-box; width:max-content !important; min-width:0 !important; max-width:100%; min-height:38px;
  margin:0; padding:3px 9px !important; border:7px solid transparent !important;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
  border-radius:0 !important; background:linear-gradient(180deg,#3a2d1d,#211910) !important;
  color:#f4d080 !important; font:700 12px/1.1 "Oxanium",sans-serif !important;
  text-align:center; text-shadow:0 1px 2px #000 !important; box-shadow:none !important; white-space:nowrap;
}
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls > .wave-battle-hud .wave-hud-top { margin:0; }
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls > .wave-battle-hud .wave-hud-title { font-size:9px; }
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls > .wave-battle-hud .wave-hud-track { height:3px; }
html.mobile-battle-focus #panel-hunt .mapview > .hunt-controls > .wave-battle-hud[hidden] { display:none !important; }
html.mobile-battle-focus .mobile-battle-focus-toggle:not([hidden]) {
  position:fixed; top:auto; right:5px; bottom:calc(52px + env(safe-area-inset-bottom, 0px)); left:auto;
  z-index:41; display:block; box-sizing:border-box; width:auto; min-width:84px; height:auto; min-height:0;
  padding:4px 9px; border:7px solid transparent;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch; border-radius:0;
  background:linear-gradient(180deg,#3a2d1d,#211910); color:#f4d080;
  font:700 12px "Oxanium",sans-serif; text-shadow:0 1px 2px #000; box-shadow:none; cursor:pointer;
}
html.mobile-battle-focus .mobile-battle-focus-toggle[hidden] { display:none !important; }
.mobile-battle-focus-toggle[hidden] { display:none !important; }
.mobile-battle-focus-toggle:not([hidden]) {
  position:fixed; top:auto; right:5px; bottom:calc(52px + env(safe-area-inset-bottom, 0px)); left:auto;
  z-index:41; display:block !important; box-sizing:border-box; width:auto; min-width:84px; height:auto; min-height:0;
  padding:4px 9px; border:7px solid transparent;
  border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch; border-radius:0;
  background:linear-gradient(180deg,#3a2d1d,#211910); color:#f4d080;
  font:700 12px "Oxanium",sans-serif; text-shadow:0 1px 2px #000; box-shadow:none; cursor:pointer;
}
/* Mantém os dois controles no mesmo nó durante o modo expandido para evitar
   que Dificuldade pisque ao ser reparentado a cada atualização da interface. */
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls:not([hidden]) {
  display:block !important; flex:0 0 auto; width:100%; box-sizing:border-box; padding:4px 6px;
  background:rgba(18,15,12,.94);
}
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .hunt-controls {
  position:static !important; inset:auto !important; z-index:auto; display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:5px;
  width:100%; max-width:none; box-sizing:border-box; margin:0; padding:0;
  border:0; background:transparent; overflow:visible;
}
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .hunt-controls > .hunt-selector-btn,
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .hunt-controls > .battle-hunt-difficulty,
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .hunt-controls > .pvp-battle-control,
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .hunt-controls > .pvp-exit-button,
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .hunt-controls > .counter-attack-battle-button {
  position:relative; display:flex !important; align-items:center; justify-content:center; box-sizing:border-box;
  width:100% !important; min-width:0; max-width:none; min-height:34px; margin:0; padding:3px 6px !important;
  border:7px solid transparent !important; border-image:url("../assets/ui/panel-frame.png") 12 / 7px / 0 stretch !important;
  border-radius:0 !important; background:linear-gradient(180deg,#3a2d1d,#211910) !important;
  color:#f4d080 !important; font:700 12px/1.1 "Oxanium",sans-serif !important;
  text-align:center; text-shadow:0 1px 2px #000 !important; box-shadow:none !important; white-space:nowrap;
}
html.mobile-battle-focus #panel-hunt > .mobile-focus-controls > .hunt-controls > [hidden] { display:none !important; }

/* Aumenta em 2 px as fontes da seleção de personagens no PC e no mobile. */
#screen-chars .chars-head .login-title { font-size:46px; }
#screen-chars .chars-account-bar > div span { font-size:16px; }
#screen-chars .chars-account-bar > div strong { font-size:18px; }
#screen-chars #btn-new-char,
#screen-chars .chars-head > .row #btn-logout,
#screen-chars .chars-account-bar #btn-unlock-slot,
#screen-chars .char-row .cactions .btn,
#screen-chars .char-row .char-difficulty-change { font-size:14px; }
@media (min-width:601px) {
  #screen-chars .char-row .cname { font-size:18px; }
  #screen-chars .char-row .char-stats > .char-stat,
  #screen-chars .char-row .char-info > .char-stat,
  #screen-chars .char-row .char-hunt-chip,
  #screen-chars .char-row .cactions .btn { font-size:14px; }
}
@media (max-width:600px) {
  #screen-chars .chars-head .login-title { font-size:21px; }
  #screen-chars .chars-head > .row { font-size:12px; }
  #screen-chars .chars-head > .row #btn-logout,
  #screen-chars #btn-new-char { font-size:12px; }
  #screen-chars .chars-wrap > .card > .card-title { font-size:16px; }
  #screen-chars .chars-account-bar > div span { font-size:12px; }
  #screen-chars .chars-account-bar > div strong { font-size:14px; }
  #screen-chars .chars-account-bar #btn-unlock-slot { font-size:11px; }
  #screen-chars .char-row .cname { font-size:17px; }
  #screen-chars .char-row .char-stats > .char-stat,
  #screen-chars .char-row .char-info > .char-stat,
  #screen-chars .char-row .char-hunt-chip { font-size:12px; }
  #screen-chars .char-row .cactions .btn { font-size:13px; }
  #screen-chars .char-row .char-difficulty-change { font-size:11px; }
  #screen-chars .char-row .char-stat-icon { flex-basis:14px; width:14px; height:14px; }
  #screen-chars .char-account-gold-icon { flex-basis:16px; width:16px; height:16px; }
}
