/* Folha — fixed game chrome around one continuously rendered map. */
#screen-game {
  --folha-edge:16px;
  --folha-window-top:clamp(14px,7dvh,60px);
  --folha-window-width:min(960px,calc(100vw - 32px));
  --folha-window-left:calc((100vw - var(--folha-window-width)) / 2);
  --folha-minimap:clamp(82px,8.5vw,114px);
  --folha-team-width:clamp(202px,18vw,242px);
}
#screen-game, #modal:has(.offline-box) {
  --folha-gold: #efbf7b;
  --folha-ink: #201611;
  --folha-cream: #f7e4c8;
  --folha-grain: url("../assets/ui/hud-paper-grain.svg");
  --folha-wood: linear-gradient(162deg, #553320, #2f2119 43%, #1e1613 91%);
  --folha-brass: #a97a49;
  --folha-seam: #715039;
  --folha-recess: #201610;
  --folha-muted: #d0b497;
  --folha-raised: linear-gradient(153deg, #432e21, #2b1d16 78%);
}

#modal:has(.offline-box) {
  background:#170f0bcc;
  backdrop-filter:none;
}
#modal:has(.offline-box) .modal-box {
  width:min(460px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px);
  padding:clamp(14px,4vw,22px);
  border:1px solid var(--folha-brass);
  border-radius:6px;
  color:var(--folha-cream);
  background:var(--folha-grain),var(--folha-wood);
  box-shadow:0 3px 0 #180f0a,0 10px 28px #0d0806d9,inset 0 0 0 3px #9a6a4538;
  scrollbar-color:#9b7148 #2b1c15;
}
#modal:has(.offline-box) .modal-head {
  gap:10px;
  margin:0 0 12px;
  padding-bottom:9px;
  border-bottom:1px solid var(--folha-seam);
}
#modal:has(.offline-box) #modal-title {
  color:#ffdc9e;
  font:700 clamp(19px,5vw,24px)/1.1 Georgia,serif;
  text-shadow:0 2px #1b100b;
}
#modal:has(.offline-box) #modal-close {
  flex:none;
  width:30px;
  height:30px;
  padding:0;
  border:1px solid var(--folha-seam);
  border-radius:4px;
  color:var(--folha-cream);
  background:var(--folha-raised);
}
#modal .offline-site {
  display:grid;
  gap:3px;
  margin-bottom:12px;
}
#modal .offline-site strong {
  font:700 16px/1.2 Georgia,serif;
  overflow-wrap:anywhere;
}
#modal .offline-site span,
#modal .offline-footer p {
  color:var(--folha-muted);
  font-size:12px;
}
#modal .offline-reward {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin:0;
  border:1px solid var(--folha-seam);
  border-radius:4px;
  background:var(--folha-recess);
}
#modal .offline-xp {
  grid-column:1/-1;
  padding:12px 8px;
  border-bottom:1px solid var(--folha-seam);
  text-align:center;
  background:radial-gradient(ellipse at 50% 0,#b485442b,transparent 78%);
}
#modal .offline-stat { padding:8px 10px; }
#modal .offline-stat + .offline-stat { border-left:1px solid var(--folha-seam); }
#modal .offline-reward dt { color:var(--folha-muted); font-size:11px; }
#modal .offline-reward dd { margin:3px 0 0; font-weight:700; font-variant-numeric:tabular-nums; }
#modal .offline-xp dd {
  color:#ffda98;
  font:700 clamp(23px,6vw,34px)/1.12 Georgia,serif;
  overflow-wrap:anywhere;
  text-shadow:0 2px #1b100b;
}
#modal .offline-footer {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:12px;
}
#modal .offline-footer p { margin:0; }
#modal .offline-continue {
  margin-left:auto;
  min-height:34px;
  padding:5px 18px;
  border:1px solid #d6a467;
  border-radius:4px;
  color:#25170f;
  background:linear-gradient(#e8be83,#b6824f);
  box-shadow:inset 0 1px #fff0bc70,0 2px #1b110b;
}
#modal .offline-continue:hover { background:linear-gradient(#f3cd96,#c5945b); }
#modal:has(.offline-box) button:focus-visible { outline:2px solid var(--folha-gold); outline-offset:2px; }

#ninja-hud-v2 { color: var(--folha-cream); }
#screen-game .mapview-labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}
#screen-game :is(.mapview-name,.mapview-rank,.mapview-float,.mapview-plaza-sign,.mapview-plaza-marker) {
  position: absolute;
  left: 50%;
  top: 50%;
  white-space: nowrap;
}
#screen-game :is(.mapview-plaza-sign,.mapview-plaza-marker) {
  color:#ffe4b3;
  border:1px solid #b78b52;
  background:linear-gradient(#513823,#291b14);
  box-shadow:inset 0 0 0 1px #22140b,0 2px #1c120eaa;
}
#screen-game .mapview-plaza-sign {
  padding:.23em .68em .27em;
  border-radius:4px;
  font:700 1.2em/1 Georgia,serif;
  letter-spacing:.015em;
  text-shadow:0 1px #20130b;
}
#screen-game .mapview-plaza-marker {
  display:grid;
  place-items:center;
  box-sizing:border-box;
  width:2.7em;
  height:2.4em;
  border-radius:.45em;
}
#screen-game .mapview-plaza-marker[hidden] { display:none; }
#screen-game .mapview-plaza-marker svg { width:1.85em; height:1.85em; }
#screen-game .mapview-name {
  font: 750 1em/1 Inter, sans-serif;
  color: #ffe27a;
  -webkit-text-stroke: .19em #10151b;
  paint-order: stroke fill;
  text-shadow: 0 1px 2px #000;
}
#screen-game .mapview-name[data-kind="player"] { color:#8be9fd; }
#screen-game .mapview-name[data-kind="boss"] { color:#ffb347; }
#screen-game .mapview-name[data-kind="companion"] { color:#72f1b0; }
#screen-game .mapview-float {
  z-index:2;
  font:800 1.48em/.95 "Barlow Condensed",Inter,sans-serif;
  font-variant-numeric:tabular-nums;
  letter-spacing:.02em;
  color:#ffe3a0;
  -webkit-text-stroke:.12em #1b1014;
  paint-order:stroke fill;
  text-shadow:0 1px 2px #140b08;
}
#screen-game .mapview-float[data-kind="enemy"] { color:#ff9c9f; }
#screen-game .mapview-float[data-kind="companion"] { color:#95eaff; }
#screen-game .mapview-float[data-kind="heal"] { color:#a6f093; font-size:1.25em; }
#screen-game .mapview-float[data-kind="exp"] { color:#e7c7ff; font-size:1.33em; }
#screen-game .mapview-float[data-kind="crit"] { color:#ffb66d; font-size:1.82em; }
#screen-game .mapview-float[data-kind="crit"]::before {
  content:"CRÍTICO"; position:absolute; bottom:100%; left:50%; transform:translateX(-50%);
  letter-spacing:.10em; font-size:.47em; -webkit-text-stroke:.17em #1b1014;
  color:#ffdf9c;
}
#screen-game .mapview-float:is([data-kind="miss"],[data-kind="buff"]) {
  font-size:1.14em; color:#f0d7aa;
}
#screen-game .mapview-float[data-kind="miss"] { color:#efebe3; }
#screen-game .mapview-rank {
  z-index: 1;
  image-rendering: auto;
  background-image: url("../assets/titulos/titulos_idle_hd.webp");
  background-repeat: no-repeat;
}
#ninja-hud-v2 .ni-folha-frame {
  border: 1px solid #a57544;
  border-radius: 9px;
  background: var(--folha-grain), var(--folha-wood);
  box-shadow: 0 3px 0 #180f0a, 0 7px 18px #1009039c, inset 0 0 0 3px #0c080572;
  backdrop-filter: none;
  isolation: isolate;
}
#ninja-hud-v2 .ni-folha-frame::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: 2;
  inset: -3px;
  border: 21px solid transparent;
  border-image: url("../assets/ui/folha-frame.webp") 44 / 21px stretch;
}
#ninja-hud-v2 .ni-seal {
  position: absolute;
  left: 50%;
  top: -13px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  color: #392012;
  width: 38px;
  height: 23px;
  background: linear-gradient(153deg,#e7bd7e,#a87442);
  border: 1px solid #f5c487;
  border-radius: 3px 3px 5px 5px;
  box-shadow: 0 2px 0 #432717, 0 4px 5px #120b0780;
  z-index: 3;
  pointer-events:none;
}
#ninja-hud-v2 .ni-seal::before, #ninja-hud-v2 .ni-seal::after {
  content: "";
  position: absolute;
  width: 5px; height: 15px; top: 3px;
  background: repeating-linear-gradient(135deg,#934136 0 3px,#4f221c 3px 4px);
  border: 1px solid #5c2f23;
  border-radius: 3px;
}
#ninja-hud-v2 .ni-seal::before { left: -5px; transform: rotate(27deg); }
#ninja-hud-v2 .ni-seal::after { right: -5px; transform: rotate(-27deg); }
#ninja-hud-v2 .ni-seal .ni-svg { width: 21px; height: 21px; }

#ninja-hud-v2 .ni-compass {
  position:absolute; top:var(--folha-edge); right:var(--folha-edge);
  display:grid; gap:6px; width:var(--folha-minimap);
}
#ninja-hud-v2 .ni-minimap {
  display:block; position:relative; inset:auto; width:100%; aspect-ratio:1;
  padding:5px; border:1px solid #c99359; border-radius:5px;
  background:var(--folha-grain),var(--folha-wood);
  box-shadow:0 2px #201208, inset 0 0 0 2px #422c1f;
  pointer-events:auto;
}
#ninja-hud-v2 .ni-minimap:hover { border-color:#ffe0a1; }
#ninja-hud-v2 .ni-minimap-layout {
  display:block; position:relative; width:100%; height:100%;
  background:#282c28; border:1px solid #745337; border-radius:2px;
}
#ninja-hud-v2 .ni-minimap canvas {
  display:block; width:100%; height:100%;
  border-radius:0; box-shadow:none; image-rendering:pixelated;
}
#ninja-hud-v2 .ni-minimap-fallback {
  position:absolute; inset:0; display:grid; place-items:center; color:#e1b77c;
}
#ninja-hud-v2 .ni-minimap-pin {
  position:absolute; width:8px; height:8px;
  top:50%; left:50%; transform:translate(-50%,-50%);
  border:1px solid #36210d; border-radius:50%;
  background:#ffd07d; box-shadow:0 1px 2px #291709; pointer-events:none;
}
#ninja-hud-v2 .ni-ring-actions {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px;
  position:static; transform:none; pointer-events:auto;
}
#ninja-hud-v2 .ni-ring-actions .ni-quick {
  display:grid; width:100%; height:30px; padding:0;
  border:1px solid #c99359; border-radius:4px;
  background:var(--folha-raised); color:var(--folha-gold);
  box-shadow:0 2px #24150e, inset 0 0 0 2px #130b0860;
}
#ninja-hud-v2 .ni-ring-actions .ni-quick:is(:hover,.selected,[aria-expanded="true"]) {
  border-color:#ffe0a1; color:#ffe4ab;
}
#ninja-hud-v2 .ni-counter, #ninja-hud-v2 .ni-counter[data-mode="mini"] {
  top:calc(var(--folha-edge) + var(--folha-minimap) + 48px);
  right: var(--folha-edge);
  width: clamp(205px, 17.5vw, 260px);
  padding: 10px 12px;
  max-height:calc(100dvh - var(--folha-minimap) - 124px);
}
#ninja-hud-v2 .ni-counter[data-mode="full"] { width: clamp(244px, 20vw, 292px); }
#ninja-hud-v2 .ni-counter .ni-counter-head { min-height: 26px; gap: 7px; }
#ninja-hud-v2 .ni-counter .ni-counter-symbol { display: grid; width: 24px; height: 24px; }
#ninja-hud-v2 .ni-counter .ni-counter-symbol .ni-svg { width: 15px; height: 15px; }
#ninja-hud-v2 .ni-counter .ni-counter-heading strong {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 700 15px/1.12 Georgia,serif;
  letter-spacing: 0;
}
#ninja-hud-v2 .ni-counter .ni-live {
  display: none; font-size:8px; white-space:nowrap;
}
#ninja-hud-v2 .ni-counter .ni-live.is-running { display:inline-flex; }
#ninja-hud-v2 .ni-counter .ni-counter-toggle { flex: none; width: 24px; height: 23px; }
#ninja-hud-v2 .ni-counter .ni-counter-peek {
  display:flex; align-items:center; gap: 8px;
  justify-content: space-between;
  border-top: 1px solid #a3774e71;
  padding: 6px 3px 1px;
  margin-top: 4px;
  font-size: 11px;
}
#ninja-hud-v2 .ni-counter .ni-session { display: none; }
#ninja-hud-v2 .ni-counter :is(.ni-mini-kills,.ni-mini-rate) { color:#e7c9a3; white-space:nowrap; }
#ninja-hud-v2 .ni-counter .ni-mini-rate { display:flex; gap:4px; font-size:11px; align-items:baseline; }
#ninja-hud-v2 .ni-counter .ni-mini-rate b { color: #ffe7bd; font-size: 11px; }
#ninja-hud-v2 .ni-counter .ni-counter-main { display: none; }
#ninja-hud-v2 .ni-counter .ni-counter-body { padding-top: 8px; }
#ninja-hud-v2 .ni-counter .ni-counter-quickstats { margin-bottom: 8px; }
#ninja-hud-v2 .ni-counter .ni-hunt-commands button { min-height:32px; }
#ninja-hud-v2 .ni-compass .ni-stop-hunt {
  min-height:30px; border:1px solid #ae764b !important; border-radius:4px;
  background:var(--folha-raised) !important; color:var(--folha-gold);
  font-size:12px; font-weight:700; pointer-events:auto;
}
#ninja-hud-v2 .ni-compass .ni-stop-hunt:hover { color:#fff0cd; }
#ninja-hud-v2:has(.ni-stop-hunt:not([hidden])) .ni-counter {
  top:calc(var(--folha-edge) + var(--folha-minimap) + 82px);
}
#ninja-hud-v2.ni-focus .ni-status { opacity:1; transform:none; }

#ninja-hud-v2 .ni-team {
  position:absolute; top:var(--folha-edge); left:var(--folha-edge);
  width:var(--folha-team-width); padding:9px;
  pointer-events:auto;
}
#ninja-hud-v2 .ni-team-heading {
  display:flex; align-items:center; gap:7px;
  margin-bottom:7px; padding-bottom:5px; border-bottom:1px solid var(--folha-seam);
  color:#f3d6a9; font:700 15px/1.2 Georgia,serif;
}
#ninja-hud-v2 .ni-team-heading .ni-svg { color:var(--folha-gold); width:16px; height:16px; }
#ninja-hud-v2 .ni-status {
  position:static; inset:auto; transform:none; width:auto; min-width:0; max-width:none;
  display:grid; grid-template-columns:45px minmax(0,1fr);
  grid-template-areas:"portrait meters" "xp xp";
  gap:5px 8px; align-items:center;
  padding:0; border:0; border-radius:0; background:none; box-shadow:none;
}
#ninja-hud-v2 .ni-techniques {
  position:absolute; bottom:var(--folha-edge); left:50%; transform:translateX(-50%);
  width:max-content; max-width:calc(100vw - 2 * var(--folha-edge));
  padding:7px 10px; pointer-events:auto;
}
#ni-team-allies { display:grid; gap:5px; margin-top:8px; }
#ninja-hud-v2 .ni-status-avatar {
  grid-area: portrait;
  display: grid;
  grid-template-rows:35px auto;
  place-items: stretch;
  width:43px; height:52px;
  padding: 1px;
  background: radial-gradient(ellipse at 50% 33%,#a7774d,#37241d 81%);
  border: 1px solid #e8b372;
  color: #f7d39b;
  border-radius: 9px 9px 7px 7px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px #42291d;
}
#ninja-hud-v2 .ni-status-avatar.vip-frame { border-color:#eec685; }
#ni-portrait { position:relative; display:block; overflow:hidden; }
#ni-portrait .ninja-avatar { position:absolute!important; left:50%; transform:translateX(-50%); top:-29px; pointer-events:none; }
#ni-level { font: 600 11px/15px Inter, sans-serif; text-align:center; background:#21160fd9; }
#ninja-hud-v2 .ni-status-bars { grid-area: meters; min-width:0; width:auto; display:grid; gap:4px; }
#ni-player { color: #fae3c2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:700 13px/1.1 Georgia,serif; }
#ninja-hud-v2 .ni-status .ni-bar-line { display:grid; align-items:center; gap:7px; grid-template-columns:36px minmax(0,1fr); }
#ninja-hud-v2 .ni-status .ni-bar-line label { margin:0; color:#f2d9b7; font-size:11px; letter-spacing:0; text-transform:none; }
#ninja-hud-v2 .ni-status .ni-bar { height:15px; position:relative; border-width: 1px; border-radius:4px; animation:none; }
#ninja-hud-v2 .ni-status .ni-bar :is(b,#ni-hptext,#ni-manatext) {
  position:absolute; inset:0 4px 0 auto;
  font: 700 9px/13px Inter,sans-serif; color:#fff3dd; text-shadow:0 1px #170e0c;
}
#ninja-hud-v2 .ni-status .ni-bar-hp { background:linear-gradient(#c34e3e,#8c221b)!important; }
#ninja-hud-v2 .ni-status .ni-bar-mana { background:linear-gradient(#3298ce,#16547c)!important; }
#ninja-hud-v2 .ni-status .ni-bar-exp { background:linear-gradient(#f5b946,#b77824)!important; }
#ninja-hud-v2 .ni-status .ni-exp-line {
  grid-area: xp;
  grid-template-columns:auto minmax(40px,1fr) auto;
  border-top:1px solid #a271475e;
  padding-top:6px;
}
#ninja-hud-v2 .ni-status .ni-exp-line :is(label,b) { font:600 10px/13px Inter,sans-serif; color:#e0b883; }
#ninja-hud-v2 .ni-status .ni-exp-line small { white-space:nowrap; font-size:9px; margin-left:4px; }
#ninja-hud-v2 .ni-status .ni-exp-line .ni-bar { height:6px; }
#ni-hotbar { min-width:0; }
#ni-hotbar .ni-action-bar {
  --folha-slot:42px;
  display:flex; align-items:center; gap:9px;
}
#ni-hotbar .ni-action-bar .jutsu-bar {
  display:grid; grid-auto-flow:column; grid-auto-columns:var(--folha-slot);
  justify-content:start;
}
#ni-hotbar .ni-action-bar .jutsu-cd {
  width:100%; height:var(--folha-slot); min-width:0; position:relative;
}
#ninja-hud-v2 .ni-companion-preset {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:5px;
  padding:5px 6px; border:1px solid #805b3d; border-radius:4px;
  background:#241912;
}
#ninja-hud-v2 .ni-companion-preset.is-muted .jutsu-bar { opacity:.58; }
#ninja-hud-v2 .ni-companion-preset .jutsu-cd { width:26px; height:26px; padding:1px; }
#ninja-hud-v2 .ni-companion-preset.is-empty .ni-companion-portrait {
  background:repeating-linear-gradient(135deg,#39271d 0 3px,#2d2018 3px 6px);
  border-style:dashed;
}
#ninja-hud-v2 .ni-companion-id {
  display:flex; align-items:center; gap:5px;
  color:#f7dbb0; text-align:left; padding:0; background:none; border:0;
}
#ninja-hud-v2 .ni-companion-id :is(strong,small) { display:block; white-space:nowrap; }
#ninja-hud-v2 .ni-companion-id strong { font:700 13px/1.15 Georgia,serif; }
#ninja-hud-v2 .ni-companion-id small { font:650 9px/1.2 Inter,sans-serif; color:#d8b385; }
#ninja-hud-v2 .ni-companion-portrait {
  display:block; width:34px; height:34px; border:1px solid #b88651; border-radius:5px;
  background-color:#33271e; background-size:310px 248px; background-position:-14px -7px;
  background-repeat:no-repeat; image-rendering:pixelated; flex:none;
}
#ninja-hud-v2 .ni-skill-cd-label:not(:empty) {
  position:absolute; inset:auto 1px 1px auto;
  padding:0 2px; border-radius:2px;
  color:#fff5de; background:#150e0ae6;
  font:800 10px/1.25 Inter,sans-serif; pointer-events:none;
}
#ninja-hud-v2 #ni-auto-heal {
  justify-self:start; border:0; padding:0;
  color:#c1e0a1; background:none; font:650 10px/1.1 Inter,sans-serif;
}
#ninja-hud-v2 .ni-target {
  position:absolute; top:var(--folha-edge); left:50%; transform:translateX(-50%);
  width:clamp(152px,15vw,210px); min-height:56px; padding:8px 10px;
  display:grid; align-items:center; grid-template-columns:38px minmax(0,1fr); gap:8px;
}
#ninja-hud-v2 .ni-target-portrait {
  min-height:36px; display:grid; place-items:center;
  border:1px solid #a576496e; border-radius:5px;
  background:#20150f;
}
#ninja-hud-v2 .ni-target-info { min-width:0; display:grid; gap:3px; }
#ninja-hud-v2 .ni-target-info small { font:650 9px/1 Inter,sans-serif; color:#d3ad7b; }
#ninja-hud-v2 #ni-target-name {
  font:700 13px/1.1 Georgia,serif;
  overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
}
#ninja-hud-v2 .ni-target-life {
  position:relative; height:12px;
  border:1px solid #835741; border-radius:3px; background:#20120f; overflow:hidden;
}
#ninja-hud-v2 #ni-target-fill { width:0; height:100%; background:linear-gradient(#c35240,#8a2822); }
#ninja-hud-v2 #ni-target-hp { position:absolute; inset:0 2px; text-align:center; font:750 8px/10px Inter,sans-serif; }
#ninja-hud-v2 :is(.ni-target[hidden],.ni-menu-drawer:not([hidden]) ~ .ni-target) { display:none; }
#ninja-hud-v2:is(.ni-window-open,.ni-focus) .ni-target { display:none; }
#panel-companions .ni-companion-kit { margin:10px 0 14px; padding:0; display:grid; gap:6px; list-style:none; }
#panel-companions .ni-companion-kit li { display:flex; align-items:center; gap:8px; padding:6px; background:#301f16; border:1px solid #815c3a; border-radius:5px; }
#panel-companions .ni-companion-kit small { margin-left:auto; color:#dfb987; white-space:nowrap; }
#ninja-hud-v2 .jutsu-bar { margin:0; display:flex; gap:4px; justify-content:flex-start; flex-wrap:nowrap; }
#ninja-hud-v2 .jutsu-cd {
  width:42px; height:42px;
  border:1px solid #c4935d;
  border-radius:7px;
  padding:2px;
  background: linear-gradient(148deg,#785136,#2b1c14 47%,#201510);
  color:var(--folha-cream);
  box-shadow: 0 2px #0d0805, inset 0 0 0 1px #160e0c;
}
#ninja-hud-v2 .jutsu-cd .ic { width:100%; height:100%; border:0; border-radius:4px; background:#1e1511; }
#ninja-hud-v2 .jutsu-cd .spell-icon { object-fit:contain; max-width:100%; max-height:100%; }
#ninja-hud-v2 .jutsu-slot {
  display:grid; place-items:center; color:#bb915f; font:600 18px/1 Georgia,serif;
  border-color:#835f3d; background:#231911;
}
#ninja-hud-v2 .jutsu-cd:hover, #ninja-hud-v2 .jutsu-cd.active { border-color:#ffd499; }
#ninja-hud-v2 .jutsu-cd .ov {
  position:absolute; inset:0; border-radius:inherit;
  background:conic-gradient(#efad52bd var(--cooldown,0deg), transparent 0);
  mask:radial-gradient(circle,transparent 59%,#000 63%);
  pointer-events:none;
}

#ninja-hud-v2 .ni-menu-drawer {
  left:50%; right:auto; top:var(--folha-window-top); transform:translateX(-50%);
  width:min(500px,var(--folha-window-width)); max-width:none;
  max-height:calc(100dvh - 2 * var(--folha-window-top));
  padding:14px 14px 11px;
  isolation:auto;
}
#ninja-hud-v2 .ni-menu-drawer-title {
  display:flex; align-items:center; justify-content:space-between; min-height:32px;
  padding:0 4px 7px; margin:0 0 6px;
  font: 700 20px/1 Georgia, serif; color:#f1d0a0;
  border-bottom:1px solid #98653e73;
  letter-spacing:.01em;
}
#ninja-hud-v2 .ni-window-close {
  width:28px; height:28px; border:1px solid #b58452; border-radius:5px;
  background:#2e1e16; color:#f6d39f; font-size:20px; line-height:23px; padding:0;
}
#ninja-hud-v2 .ni-menu-groups { display:grid; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); gap:4px; }
#ninja-hud-v2 :is(.ni-group,.ni-menu-entry,.ni-chat-toggle) {
  display:flex; align-items:center; justify-content:flex-start; gap:8px;
  color:#f2d8b3; border:1px solid #97694392; border-radius:5px;
  background:linear-gradient(160deg,#443024,#241914 88%); box-shadow:inset 0 1px #f3bc7124;
  text-align:left; letter-spacing:0; font:650 12px/1.2 Inter,sans-serif;
}
#ninja-hud-v2 .ni-group { width:100%; min-height:33px; padding:6px 9px; }
#ninja-hud-v2 :is(.ni-group,.ni-menu-entry,.ni-chat-toggle):is(:hover,[aria-expanded="true"],.selected) {
  border-color:#dca562; color:#ffedc8; background:linear-gradient(166deg,#6b482b,#372419);
  box-shadow:inset 0 -1px #e1b26e70;
  transform:none;
}
#ninja-hud-v2 :is(.ni-group,.ni-menu-entry,.ni-chat-toggle) .ni-svg { width:17px; height:17px; color:var(--folha-gold); }
#ninja-hud-v2 .ni-menu-drawer-grid { margin-top:9px; gap:5px; }
#ninja-hud-v2 .ni-menu-entry { min-height:33px; padding:4px 6px; }
#ninja-hud-v2 .ni-menu-entry span { min-width:0; }
#ninja-hud-v2 .ni-menu-system { display:flex; gap:6px; justify-content:flex-end; margin-top:7px; }
#ninja-hud-v2 .ni-menu-system .ni-quick { width:29px; height:27px; color:#c6a078; background:#1d140fa6; border:1px solid #8a604152; }
#ninja-hud-v2 .ni-chat {
  position:absolute; left:var(--folha-edge); bottom:var(--folha-edge);
  width:clamp(172px,18vw,258px); display:grid; gap:5px; padding:7px 9px 8px;
  grid-template-columns:minmax(0,1fr);
  font:500 11px/1.35 Inter,sans-serif; pointer-events:auto;
}
#ninja-hud-v2 .ni-chat.is-expanded {
  left:50%; top:var(--folha-window-top); bottom:var(--folha-window-top); transform:translateX(-50%);
  width:min(540px,var(--folha-window-width)); max-height:none; z-index:80;
  grid-template-rows:auto minmax(0,1fr) auto auto auto;
  box-shadow:0 0 0 100vmax #0e0907ae;
} 
#ninja-hud-v2 .ni-chat-head { display:flex; justify-content:space-between; align-items:center; }
#ninja-hud-v2 .ni-chat-head strong { font:700 13px/1 Georgia,serif; color:#ffdda7; }
#ninja-hud-v2 .ni-chat-toggle { display:grid; place-items:center; width:24px; height:22px; padding:0; font-size:14px; }
#ninja-hud-v2 .ni-chat-messages {
  height:59px; min-width:0; overflow:auto; overscroll-behavior:contain;
  background:#19120ca3; border:1px solid #92704860; border-radius:4px; padding:4px 6px;
  scrollbar-width:thin; scrollbar-color:#8a623e #261b13;
}
#ninja-hud-v2 .ni-chat.is-expanded .ni-chat-messages {
  height:auto; min-height:0; max-height:none;
}
#ninja-hud-v2 .ni-chat-message { overflow-wrap:anywhere; margin-bottom:3px; }
#ninja-hud-v2 .ni-chat-message strong { color:#f7ce8f; margin-inline-end:3px; }
#ninja-hud-v2 .ni-chat-message :is(.chip,.muted,.ni-chat-report),
#ninja-hud-v2 .ni-chat-tip { display:none; }
#ninja-hud-v2 .ni-chat.is-expanded :is(.ni-chat-message .chip,.ni-chat-message .muted,.ni-chat-report,.ni-chat-tip) { display:inline; }
#ninja-hud-v2 .ni-chat-report {
  margin-left:5px; padding:0 3px; border:1px solid #815f3e; border-radius:3px;
  color:#e8bf8a; background:#312015; font-size:10px;
}
#ninja-hud-v2 .ni-chat-form { display:flex; gap:4px; min-width:0; }
#ninja-hud-v2 .ni-chat-form :is(input,button) {
  min-height:24px; font:600 10px/1.2 Inter,sans-serif;
  padding:3px 5px; border:1px solid #9c754c; border-radius:4px;
  color:#f5dfc2; background:#24170f;
}
#ninja-hud-v2 .ni-chat-form input { flex:1; width:0; min-width:0; }
#ninja-hud-v2 .ni-chat-form button { flex:none; color:#fff0d1; background:#634027; }
#ninja-hud-v2 .ni-chat-status:empty { display:none; }
#ninja-hud-v2 :is(.ni-chat-tip,.ni-chat-status) { margin:0; color:#e2bc92; }
#ninja-hud-v2 .ni-notice { bottom:125px; left:50%; transform:translateX(-50%); }

#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active {
  left:var(--folha-window-left); right:auto; top:calc(var(--folha-window-top) + 39px);
  bottom:var(--folha-window-top); transform:none;
  width:var(--folha-window-width); max-width:none; max-height:none; padding:17px 18px 19px;
  border:1px solid var(--folha-brass); border-radius:0 0 6px 6px;
  background:linear-gradient(#21150d40,#1a110cc0),var(--folha-grain),var(--folha-wood);
  color:var(--folha-cream);
  box-shadow:0 0 0 100vmax #100b08ac,0 7px 18px #1009039c,inset 0 0 0 3px #9a6a4538;
  backdrop-filter:none;
  scrollbar-color:#9b7148 #2b1c15;
  overscroll-behavior:contain;
  container-type:inline-size;
  --pro-surface:var(--folha-recess);
  --pro-surface-2:var(--folha-recess);
  --pro-raised:#3a291e;
  --pro-line:var(--folha-seam);
  --pro-line-2:#966744;
  --pro-text:var(--folha-cream);
  --pro-muted:var(--folha-muted);
  --pro-accent:var(--folha-gold);
  --pro-accent-soft:#a7753b31;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .panel-title {
  margin:0 0 7px;
  padding:0 27px 9px 0;
  border-bottom:1px solid var(--folha-seam);
  color:#ffdc9e;
  font:700 24px/1.1 Georgia,serif;
  letter-spacing:.005em;
  text-shadow:0 2px #1b100b;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .panel-sub {
  margin:0 0 12px;
  color:var(--folha-muted);
  font-size:12px;
  line-height:1.45;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active:focus-visible { outline:2px solid var(--folha-gold); outline-offset:-6px; }
/* Apply the window materials to the existing controls inside each tab. */
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.card,.inventory-grid,.ni-panel-card,.ni-equip-box,.ni-tree-shell) {
  min-width:0;
  border:1px solid var(--folha-seam);
  border-radius:5px;
  background:var(--folha-raised);
  box-shadow:inset 0 1px #f5ca9421,0 2px #1b110c80;
  color:var(--folha-cream);
  backdrop-filter:none;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.card-title,h3,.jname,.bname,.mk-name,.eco-boss-name) {
  color:#f2d6ac;
  font-family:Georgia,serif;
  letter-spacing:0;
  text-transform:none;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .card-title {
  padding-bottom:6px;
  border-bottom:1px solid #92633c54;
  font-size:14px;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.muted,.sub,.empty,.jwords,.jdesc,.ni-equip-tip,.ni-equip-empty,.ni-equip-choice-name small,
      .ni-tree-head p,.ni-tree-branch-title small,.ni-tree-node-description,.ni-tree-footer) {
  color:var(--folha-muted);
  overflow-wrap:anywhere;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.tab,.btn:not(.btn-danger,.btn-primary),.ni-equip-choice,.origin-clan-card,.ni-tree-node) {
  border:1px solid #906341;
  border-radius:4px;
  background:var(--folha-raised);
  color:#f5dcb8;
  box-shadow:inset 0 1px #f2bf7a26,0 1px #1e120b;
  transition:none;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .btn-primary {
  border:1px solid #d6a467;
  border-radius:4px;
  color:#25170f;
  background:linear-gradient(#e8be83,#b6824f);
  box-shadow:inset 0 1px #fff0bc70,0 2px #1b110b;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .btn-danger {
  border-color:#ad6050;
  border-radius:4px;
  color:#ffdfcb;
  background:linear-gradient(#713a30,#46251f);
  box-shadow:0 2px #1b110b;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.tab,.btn:not(.btn-danger,.btn-primary),.ni-equip-choice,.origin-clan-card,.ni-tree-node.available):hover,
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.tab.active,.btn.active:not(.btn-danger),.origin-clan-card.selected) {
  border-color:#d49f61;
  color:#fff0c8;
  background:linear-gradient(#725033,#493024);
  transform:none;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.input,input:not([type="checkbox"],[type="radio"]),select,textarea) {
  min-width:0;
  color:var(--folha-cream);
  border-color:var(--folha-brass);
  border-radius:4px;
  background:var(--folha-recess);
  color-scheme:dark;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(button,input,select,a,textarea):focus-visible {
  outline:2px solid #ffd498;
  outline-offset:2px;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.tabs,.equip-grid,.jutsu-kit-slots,.ni-tree-branches,.stat-list,.mk-row,.eco-rank) {
  gap:6px;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .tabs {
  flex-wrap:wrap;
  border-color:var(--folha-seam);
  padding-bottom:7px;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .tab {
  min-height:26px;
  padding:5px 9px;
  font-size:11px;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.equip-slot,.inv-slot,.item-slot,.ibox,.fxbox,.ni-equip-stats span,.jutsu-kit-slot,
      .jutsu-kit-preset,.ni-tree-points,.ni-tree-branch,.companion-stats>div,.combat-log,.log-big,.ni-chat-messages) {
  border:1px solid var(--folha-seam);
  border-radius:4px;
  background:var(--folha-recess);
  color:var(--folha-cream);
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.equip-slot,.inv-slot,.item-slot):hover {
  border-color:var(--folha-gold);
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.equip-slot.rare,.inv-slot[class*="rarity-"],.item-slot[class*="rarity-"]) {
  border-color:var(--rarity-color,var(--folha-brass));
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.ni-tree-connector,.ni-tree-footer,.ni-tree-head,.stat-list li,.mk-row,.eco-rank) {
  border-color:var(--folha-seam);
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .ni-tree-connector {
  background:var(--folha-seam);
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  .ni-tree-node.learned {
  border-color:#7e9a60;
  background:linear-gradient(152deg,#333b26,#2a2418 84%);
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.ni-tree-node.available,.ni-tree-points) {
  border-color:var(--folha-brass);
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.jutsu-list,.shop-grid,.saga-list,.origin-clan-grid,.ni-tree-branches) {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
  :is(.jutsu-list,.shop-grid) { grid-template-columns:minmax(0,1fr); }
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .ni-equip-layout {
  grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);
  gap:10px;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .ni-equip-heading {
  align-items:center;
  flex-wrap:wrap;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .ni-equip-box { padding:11px; }
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .ni-equip-box .ni-equip-stats { margin-top:10px; }
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .char-hero .ninja-avatar {
  border:1px solid var(--folha-brass);
  border-radius:4px;
  background:radial-gradient(ellipse at center,#583e2a,#22170e 75%);
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .ni-ninja-profile {
  flex:1 1 145px;
  min-width:0;
  overflow-wrap:anywhere;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .ni-ninja-profile h3 {
  margin:0 0 5px;
  font-size:21px;
}
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .mk-row { flex-wrap:wrap; }
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .mk-wallet { flex-wrap:wrap; }
#screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .mk-name { white-space:normal; }
@container (max-width:393px) {
  #screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active
    :is(.ni-equip-layout,.two-col,.ni-skill-progress) { grid-template-columns:minmax(0,1fr); }
  #screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .jutsu-card { flex-wrap:wrap; gap:7px; }
  #screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .jutsu-card .jutsu-action { margin-left:auto; }
  #screen-game .main>.panel:not(#panel-hunt):not(#panel-map).active .char-hero { flex-wrap:wrap; }
}
#screen-game .main>#panel-map.panel.active {
  inset:calc(var(--folha-window-top) + 39px) auto var(--folha-window-top) var(--folha-window-left);
  width:var(--folha-window-width);
  max-width:none; max-height:none;
  transform:none;
  padding:13px 17px 16px;
  color:var(--folha-cream);
  border:1px solid var(--folha-brass);
  border-radius:6px;
  background:linear-gradient(#21150d40,#1a110cc0),var(--folha-grain),var(--folha-wood);
  box-shadow:0 0 0 100vmax #100b08ac,0 7px 18px #1009039c,inset 0 0 0 3px #9a6a4538;
  backdrop-filter:none;
  scrollbar-width:thin;
  scrollbar-color:#9b7148 #2b1c15;
  overscroll-behavior:contain;
}
#screen-game #panel-map .ni-world-heading {
  min-height:30px;
  margin:0;
  padding:0 32px 9px 0;
  gap:8px 11px;
  flex-wrap:wrap;
  border-bottom:1px solid var(--folha-seam);
}
#screen-game #panel-map .panel-title {
  margin:0;
  color:#ffdc9e;
  font:700 clamp(18px,2.2vw,26px)/1.1 Georgia,serif;
  letter-spacing:.005em;
  text-shadow:0 2px #1b100b;
}
#screen-game #panel-map .ni-world-tools { margin:8px 0; }
#screen-game #panel-map .ni-world-tools :is(input,select) {
  min-height:32px;
  height:auto;
  border:1px solid var(--folha-seam);
  border-radius:4px;
  color:var(--folha-cream);
  background:var(--folha-recess);
  color-scheme:dark;
}
#screen-game #panel-map .ni-world-tools input::placeholder { color:var(--folha-muted); }
#screen-game #panel-map .ni-world-chapters { gap:4px; padding:0 0 7px; scrollbar-color:#9b7148 #2b1c15; }
#screen-game #panel-map :is(.ni-world-back,.ni-world-chapter,.ni-world-region-link,.ni-region-spot,.ni-region-close) {
  border:1px solid var(--folha-seam);
  border-radius:4px;
  background:var(--folha-raised);
  color:var(--folha-cream);
  text-shadow:0 1px #1b100b;
}
#screen-game #panel-map .ni-world-back { min-height:28px; padding:4px 8px; font-size:11px; font-weight:700; }
#screen-game #panel-map .ni-world-chapter { min-height:29px; }
#screen-game #panel-map :is(.ni-world-back,.ni-world-chapter,.ni-world-region-link,.ni-region-spot,.ni-region-close):hover:not(:disabled),
#screen-game #panel-map .ni-world-chapter.current {
  border-color:var(--folha-brass);
  background:linear-gradient(160deg,#744b2c,#493021);
  color:#ffe1ac;
}
#screen-game #panel-map :is(button,input,select):focus-visible { outline:2px solid var(--folha-gold); outline-offset:-2px; }
#screen-game #panel-map :is(.ni-world-stage,.ni-region-stage) {
  border:1px solid var(--folha-brass);
  border-radius:4px;
  box-shadow:0 2px #1b100b;
}
#screen-game #panel-map :is(.ni-world-stage:not(.ni-world-stage--curated) .ni-world-region,.ni-world-empty,.ni-hunt-balloon-label) {
  border:1px solid var(--folha-brass);
  border-radius:4px;
  background:var(--folha-raised);
  color:var(--folha-cream);
}
#screen-game #panel-map .ni-world-region::after { background:#452d1e; border-color:var(--folha-brass); }
#screen-game #panel-map .ni-world-region-seal { background:#382318; }
#screen-game #panel-map .ni-world-region-count { color:var(--folha-muted); }
#screen-game #panel-map .ni-region-pins .ni-hunt-balloon-face {
  background:radial-gradient(circle at 40% 25%,#5e4430,#21150f 76%);
}
#screen-game #panel-map .ni-hunt-balloon-label strong { font-family:Georgia,serif; }
#screen-game #panel-map .ni-world-region-index {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(126px,100%),1fr));
  gap:6px;
  margin-top:9px;
}
#screen-game #panel-map .ni-region-pin.ni-hunt-balloon { pointer-events:none; }
#screen-game #panel-map .ni-region-pin :is(.ni-hunt-balloon-face,.ni-hunt-balloon-label,.ni-hunt-balloon-circle) {
  pointer-events:auto;
}
#screen-game #panel-map .ni-hunt-balloon-face .ni-atlas-hd-monster {
  width:115%;
  height:115%;
  image-rendering:auto;
}
#screen-game #panel-map .ni-region-pin:focus-visible { outline:none; }
#screen-game #panel-map .ni-region-pin:focus-visible .ni-hunt-balloon-face {
  outline:2px solid #ffe3ad;
  outline-offset:2px;
}

@media(max-width:580px){
  #screen-game #panel-map .ni-world-stage:not(.ni-world-stage--curated) .ni-world-region {
    width:clamp(66px,22vw,120px);
    min-width:0;
    padding-inline:4px;
    overflow-wrap:anywhere;
  }
  #screen-game #panel-map .ni-world-stage:not(.ni-world-stage--curated) .ni-world-region strong {
    font-size:clamp(9px,2.45vw,12px);
  }
}
#screen-game #panel-map .ni-atlas-range-label {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  font-family:Georgia,"Times New Roman",serif;
  font-weight:600;
  font-variant-numeric:lining-nums tabular-nums;
}
#screen-game #panel-map .ni-region-user-art .ni-hunt-balloon--extra .ni-hunt-balloon-circle {
  width:clamp(12px,3vw,27px);
  height:clamp(6px,1.2vw,12px);
  border:1px solid #ffe3a7;
  background:#b9784238;
  box-shadow:0 0 6px #f0c4848f;
}
#screen-game #panel-map .ni-region-wide-bracket .ni-hunt-balloon-face {
  width:clamp(30px,4.3vw,56px);
  height:clamp(30px,4.3vw,56px);
}
#screen-game #panel-map .ni-region-wide-bracket .ni-hunt-balloon-label strong {
  font-size:clamp(7px,1.2vw,10px);
  overflow-wrap:normal;
}
#screen-game #panel-map .ni-world-region-link {
  display:grid; gap:3px;
  min-width:0;
  padding:7px 8px;
  text-align:left;
}
#screen-game #panel-map .ni-world-region-link strong { font:700 13px/1.15 Georgia,serif; }
#screen-game #panel-map .ni-world-region-link small { color:var(--folha-muted); font-size:10px; }
#screen-game #panel-map .ni-region-layout { display:grid; gap:9px; align-items:start; }
#screen-game #panel-map .ni-region-layout.has-detail { grid-template-columns:minmax(0,1fr) minmax(0,215px); }
#screen-game #panel-map .ni-region-detail {
  position:static; width:auto; max-height:none;
  padding:10px;
  border:1px solid var(--folha-seam);
  border-radius:4px;
  background:var(--folha-recess);
  box-shadow:inset 0 0 0 2px #9a6a4530;
  scrollbar-color:#9b7148 #2b1c15;
}
#screen-game #panel-map .ni-region-detail-top { border-color:var(--folha-seam); }
#screen-game #panel-map .ni-region-detail-top h3 { margin:0 0 4px; color:#ffdc9e; font:700 18px/1.15 Georgia,serif; }
#screen-game #panel-map :is(.ni-region-detail-top p,.ni-region-spot small,.ni-map-locked) { color:var(--folha-muted); }
#screen-game #panel-map .ni-region-spot span { color:var(--folha-gold); }
#screen-game #panel-map .ni-region-spot:disabled { color:var(--folha-muted); cursor:default; }
#screen-game #panel-map .ni-region-spot.current { border-color:var(--folha-brass); }
#screen-game #panel-map .ni-map-locked { margin:8px 0 0; font-size:11px; }
#screen-game #panel-map .ni-map-locked[hidden] { display:none; }
@media(max-width:650px){
  #screen-game #panel-map .ni-world-tools select { flex:0 0 96px; }
  #screen-game #panel-map .ni-region-layout.has-detail { grid-template-columns:minmax(0,1fr); }
}
#ninja-hud-v2 .ni-window-navigation {
  pointer-events:auto;
  display:flex;
  align-items:center;
  gap:2px;
  overflow:auto;
  min-width:0;
  position:absolute;
  top:var(--folha-window-top);
  left:var(--folha-window-left);
  width:var(--folha-window-width);
  height:40px;
  padding:3px 38px 3px 4px;
  border:1px solid #a77749;
  border-radius:7px 7px 0 0;
  background:var(--folha-wood);
  scrollbar-width:thin;
}
#ninja-hud-v2 .ni-window-navigation .ni-menu-entry {
  display:block;
  font-size:11px;
  padding:5px 7px;
  white-space:nowrap;
  min-height:26px;
}
#ninja-hud-v2 .ni-window-navigation .ni-svg { display:none; }
#ninja-hud-v2 #ni-close-panel {
  right:auto; width:28px; height:28px; padding:0;
  left:calc(var(--folha-window-left) + var(--folha-window-width) - 34px);
  top:calc(var(--folha-window-top) + 6px);
  border:1px solid #b58452; border-radius:5px;
  background:#2e1e16; color:#f6d39f;
  font-size:20px; line-height:25px;
}
#ninja-hud-v2.ni-window-open :is(.ni-compass,.ni-counter,.ni-team,.ni-techniques,.ni-chat) {
  visibility:hidden;
}
#ninja-hud-v2 .ni-minimap canvas[hidden] { display:none; }

:is(#ninja-hud-v2 .ni-companion-portrait,#panel-bijuu .ni-bijuu-tile-art).ni-bijuu-portrait {
  background-repeat:no-repeat; background-size:contain; background-position:center;
  image-rendering:auto;
}

@media(max-width:650px) {
  #screen-game {
    --folha-edge:8px;
    --folha-window-top:14px;
    --folha-window-width:calc(100vw - 16px);
    --folha-minimap:74px;
    --folha-team-width:clamp(130px,43vw,176px);
  }
  #screen-game .main>.panel:not(#panel-hunt).active { padding:12px 10px; }
  #panel-inventory > .row.between, #panel-inventory > .row.between > .row { flex-wrap:wrap; }
  #panel-jutsus .jmeta .chip { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
  #ninja-hud-v2 .ni-team { padding:6px; }
  #ninja-hud-v2 .ni-team-heading { font-size:13px; }
  #ninja-hud-v2 .ni-status { grid-template-columns:35px minmax(0,1fr); gap:5px; }
  #ninja-hud-v2 .ni-status-avatar { width:34px; height:46px; grid-template-rows:30px auto; }
  #ni-portrait .ninja-avatar { top:-31px; }
  #ni-level { font-size:9px; white-space:nowrap; }
  #ni-player { font-size:12px; }
  #ninja-hud-v2 .ni-status .ni-bar-line { gap:3px; grid-template-columns:auto minmax(0,1fr); }
  #ninja-hud-v2 .ni-status .ni-bar-line label { font-size:9px; }
  #ninja-hud-v2 .ni-status .ni-exp-line { grid-template-columns:auto minmax(0,1fr) auto; }
  #ninja-hud-v2 #ni-exp-left { display:none; }
  #ninja-hud-v2 .ni-status .ni-bar { height:12px; }
  #ninja-hud-v2 .ni-status .ni-bar b { font-size:8px; line-height:10px; inset-inline-end:2px; }
  #ninja-hud-v2 .ni-status .ni-exp-line .ni-bar { height:5px; }
  #ninja-hud-v2 .ni-companion-id strong { font-size:12px; }
  #ninja-hud-v2 .ni-companion-portrait { width:28px; height:28px; background-position:-17px -10px; }
  #ninja-hud-v2 .ni-companion-preset .jutsu-cd { width:24px; height:24px; }
  #ninja-hud-v2 .ni-ring-actions .ni-quick { height:27px; }
  #ninja-hud-v2 .ni-counter, #ninja-hud-v2 .ni-counter[data-mode] { display:none; }
  #ninja-hud-v2 .ni-target {
    top:calc(var(--folha-edge) + var(--folha-minimap) + 75px);
    right:var(--folha-edge); left:auto; transform:none;
    width:min(145px,calc(100vw - var(--folha-team-width) - 3 * var(--folha-edge)));
    padding:6px; min-height:43px; gap:4px; grid-template-columns:28px minmax(0,1fr);
  }
  #ninja-hud-v2 .ni-target-portrait { min-height:28px; }
  #ni-hotbar .ni-action-bar { --folha-slot:clamp(28px,9vw,38px); justify-content:center; }
  #ninja-hud-v2 .ni-chat:not(.is-expanded) { width:153px; padding:5px; bottom:65px; }
  #ninja-hud-v2 .ni-chat:not(.is-expanded) .ni-chat-messages { height:40px; }
  #ninja-hud-v2 .ni-notice { bottom:69px; }
}

#panel-bijuu .ni-bijuu-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:9px;
}
#panel-bijuu .ni-bijuu-tile {
  display:flex; align-items:center; flex-direction:column; gap:5px;
  min-width:0; padding:8px 6px; text-align:center;
}
#panel-bijuu .ni-bijuu-tile.is-equipped { border-color:#d6a254; box-shadow:inset 0 0 0 1px #d6a2546b; }
#panel-bijuu .ni-bijuu-tile-art { width:min(100%,76px); aspect-ratio:1; }
#panel-bijuu .ni-bijuu-tile h3 { margin:0; font:700 15px Georgia,serif; color:#f7dbb0; }
#panel-bijuu .ni-bijuu-skill { flex:1; color:#dfb987; font-size:11px; line-height:1.25; }
#panel-bijuu .ni-bijuu-tile .btn { width:100%; margin-top:3px; padding:5px 2px; font-size:11px; }

/* Daily summons share the wooden drawer and the existing bijuu portraits. */
#panel-bijuu .ni-bijuu-tile.is-locked .ni-bijuu-portrait { filter:saturate(.4); opacity:.65; }
.ni-seal-tabs,.ni-seal-toolbar,.ni-seal-redeem { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.ni-seal-tabs { margin-bottom:9px; }
.ni-seal-toolbar { justify-content:space-between; padding:8px 12px; }
.ni-seal-toolbar .ni-seal-tabs { margin:0; }
#panel-bijuu .ni-seal-tabs .btn[aria-pressed="true"] {
  color:#fff2d0; border-color:#c28b48; background:#62401f;
}
.ni-seal-panel {
  overflow:hidden;
  border:1px solid #986234;
  border-radius:7px;
  background:#241910;
  box-shadow:inset 0 0 0 2px #3c2617;
}
.ni-seal-balance {
  display:flex; align-items:center; gap:5px;
  color:#f8dfb8; font:700 clamp(12px,2.1cqi,16px) Georgia,serif;
}
.ni-seal-balance img { width:25px; height:25px; object-fit:contain; }
.ni-seal-board { min-width:0; border-block:1px solid #895e3b; }
.ni-seal-featured {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,.66fr) minmax(0,1fr);
  align-items:end;
  gap:6px;
  padding:12px 10px 11px;
  background:#211712 url("../assets/invocation/shrine.webp") center 66%/cover no-repeat;
}
.ni-seal-secondary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  padding:5px 8px 9px;
  border-top:1px solid #795333;
  background:var(--folha-grain),#291a12;
}
.ni-seal-prize {
  display:flex; flex-direction:column; align-items:center;
  gap:4px; min-width:0; margin:0;
}
.ni-seal-prize-illustration {
  display:grid; place-items:center; width:100%;
  height:clamp(37px,9cqi,65px);
  padding:3px;
}
.ni-seal-prize-featured .ni-seal-prize-illustration {
  height:clamp(88px,min(23cqi,22dvh),168px);
}
.ni-seal-prize-art {
  display:block; width:100%; height:100%;
  min-width:0; min-height:0; object-fit:contain;
  filter:drop-shadow(0 3px 4px #160b05c0);
  animation:ni-seal-float 4.4s ease-in-out infinite;
}
.ni-seal-prize:last-child .ni-seal-prize-art { animation-delay:-1.6s; }
.ni-seal-scroll {
  width:100%; height:clamp(65px,18cqi,145px);
  object-fit:contain; align-self:center;
  filter:drop-shadow(0 0 12px #ffc06890);
}
.ni-seal-plaque {
  display:flex; align-items:center; justify-content:center; flex-wrap:wrap;
  gap:3px 7px; max-width:100%; padding:4px 8px;
  border:1px solid #78502f; border-radius:4px;
  background:#2e1d11;
  text-align:center; color:#f8dfb8;
  font:700 clamp(12px,2.2cqi,17px)/1.2 Georgia,serif;
}
.ni-seal-plaque span { min-width:0; overflow-wrap:anywhere; }
.ni-seal-chance { color:#ffcc79; font:700 .88em/1.25 system-ui,sans-serif; }
.ni-seal-actions { text-align:center; padding:8px 12px; }
#panel-bijuu .ni-seal-spin { min-width:132px; font:700 20px Georgia,serif; }
.ni-seal-actions small { display:block; color:#d9b996; margin-top:4px; }
.ni-seal-result { color:#f1ce92; }
.ni-seal-result:not(:empty) { margin-top:5px; }
.ni-seal-redeem { justify-content:center; border-top:1px solid #674829; padding:8px 10px; }
.ni-seal-redeem strong { color:#eed2a4; font-size:12px; }
@keyframes ni-seal-float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-3px); } }
@media (prefers-reduced-motion:reduce) {
  .ni-seal-prize-art { animation:none; }
}
@media (max-width:600px) {
  .ni-seal-featured { padding-inline:5px; gap:3px; }
  .ni-seal-secondary { padding-inline:4px; gap:3px; }
  .ni-seal-plaque { flex-direction:column; padding:3px 5px; gap:1px; }
}

@media(max-width:350px) {
  #screen-game .main>#panel-bijuu.panel.active:not(#panel-map) .panel-title {
    padding-inline:0;
    font-size:20px;
  }
  .ni-seal-toolbar { padding:5px 6px; gap:4px; }
  .ni-seal-toolbar .btn { padding-inline:8px; }
  .ni-seal-featured { padding-block:7px; }
  .ni-seal-prize-featured .ni-seal-prize-illustration { height:78px; }
  .ni-seal-prize-illustration { height:36px; }
  .ni-seal-plaque { padding-inline:3px; font-size:11px; }
  .ni-seal-plaque span { overflow-wrap:normal; }
}
