/* ============================================================================
 * RO Kaizen Pokémon 3D — High-Fantasy Obsidian & Burnished Gold RPG UI
 * ============================================================================ */

:root {
  --gold-hi: #f7df99;
  --gold-mid: #c9a252;
  --gold-deep: #856327;
  --gold-dark: #4f3914;
  --obs-top: rgba(23, 31, 45, 0.94);
  --obs-mid: rgba(15, 21, 32, 0.95);
  --obs-bot: rgba(10, 14, 22, 0.97);
  --text-main: #f3ead3;
  --text-soft: #b8c2d4;
  --text-muted: #7f8ca3;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #070a10;
  color: var(--text-main);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.rpg-font {
  font-family: "Cinzel", "Palatino Linotype", Georgia, serif;
  letter-spacing: 0.3px;
}

#viewport {
  position: fixed;
  inset: 0;
  z-index: 1;
}

#viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-muted);
  font-size: 11px;
}

/* ============================================================================
 * Ornate Gold & Obsidian Surface Primitives
 * ============================================================================ */
.ornate-panel {
  background: linear-gradient(180deg, var(--obs-top), var(--obs-bot));
  border: 1.5px solid var(--gold-mid);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(247, 223, 153, 0.28),
    inset 0 0 0 1px rgba(10, 14, 22, 0.85),
    0 10px 30px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.ornate-pill {
  background: linear-gradient(180deg, rgba(22, 30, 44, 0.95), rgba(11, 16, 26, 0.96));
  border: 1.5px solid var(--gold-mid);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(247, 223, 153, 0.25),
    0 6px 20px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}

.ornate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: linear-gradient(180deg, rgba(44, 38, 28, 0.62), rgba(20, 26, 38, 0.45));
  border-bottom: 1px solid rgba(201, 162, 82, 0.42);
  border-radius: 6px 6px 0 0;
  color: var(--gold-hi);
  font-size: 13px;
  font-weight: 700;
}

.gold-ico-sm {
  width: 16px;
  height: 16px;
  color: var(--gold-hi);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.gold-mini-btn {
  background: linear-gradient(180deg, rgba(42, 48, 62, 0.92), rgba(20, 26, 38, 0.96));
  color: var(--gold-hi);
  border: 1px solid rgba(201, 162, 82, 0.62);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
  box-shadow: inset 0 1px 0 rgba(247, 223, 153, 0.2);
}

.gold-mini-btn:hover {
  background: linear-gradient(180deg, rgba(72, 60, 36, 0.95), rgba(38, 32, 20, 0.96));
  border-color: var(--gold-hi);
  color: #fff6db;
}

.gold-mini-btn.active {
  background: linear-gradient(180deg, rgba(164, 121, 41, 0.42), rgba(92, 65, 19, 0.55));
  border-color: var(--gold-hi);
  color: #fff7d6;
  box-shadow: 0 0 10px rgba(201, 162, 82, 0.35), inset 0 1px 0 rgba(255, 240, 190, 0.35);
}

.gold-mini-btn.heal {
  border-color: rgba(74, 222, 128, 0.65);
  color: #86efac;
  padding: 3px 7px;
  font-size: 10.5px;
}

.gold-mini-btn.heal:hover {
  background: rgba(22, 101, 52, 0.55);
  border-color: #4ade80;
  color: #dcfce7;
}

.gold-mini-btn.claim {
  background: linear-gradient(180deg, #d6a947, #8f671e);
  color: #161108;
  border-color: #fff0b8;
  box-shadow: 0 0 12px rgba(242, 213, 139, 0.45);
}

.gold-mini-btn.claim:hover {
  filter: brightness(1.12);
}

.collapse-chevron {
  background: transparent;
  border: none;
  color: var(--gold-mid);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.collapse-chevron:hover {
  color: var(--gold-hi);
}

/* ============================================================================
 * Loading Overlay & Zone Banner
 * ============================================================================ */
#transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at center, rgba(18, 24, 38, 0.88), rgba(6, 9, 16, 0.96));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

#transition-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.transition-card {
  text-align: center;
  padding: 28px 40px;
}

.transition-card h2 {
  font-size: 20px;
  margin-top: 14px;
  color: var(--gold-hi);
}

.transition-card p {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 6px;
}

.spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border: 3px solid rgba(201, 162, 82, 0.25);
  border-top-color: var(--gold-hi);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#zone-banner {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  text-align: center;
  pointer-events: none;
  padding: 10px 44px;
  background: linear-gradient(90deg, transparent, rgba(14, 19, 30, 0.9) 22%, rgba(14, 19, 30, 0.9) 78%, transparent);
  border-top: 1px solid rgba(201, 162, 82, 0.65);
  border-bottom: 1px solid rgba(201, 162, 82, 0.65);
  animation: zoneFade 3.4s ease forwards;
}

.zone-banner-sub {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-mid);
}

.zone-banner-main {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-hi);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

@keyframes zoneFade {
  0% { opacity: 0; transform: translate(-50%, -8px); }
  14% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}

#stream-status {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  background: rgba(14, 19, 30, 0.88);
  border: 1px solid rgba(201, 162, 82, 0.45);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  color: var(--gold-hi);
  pointer-events: none;
}

/* ============================================================================
 * TOP-LEFT: Trainer Medallion & Pointed Gilded Ribbon
 * ============================================================================ */
#hud-trainer {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 32;
  display: flex;
  align-items: center;
  gap: 0;
}

.trainer-medallion {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #2a374f, #0d131f 75%);
  border: 3px solid var(--gold-mid);
  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.85),
    0 0 0 2px #261c0b,
    0 6px 20px rgba(0, 0, 0, 0.78);
  overflow: hidden;
  flex-shrink: 0;
  z-index: 3;
}

#trainer-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.ui-ico-head {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85));
}

.ui-ico-quest {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(247, 223, 153, 0.5));
}

.stance-ico-sm {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: -3px;
  margin-right: 3px;
}

.stance-art-btn {
  width: 26px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.36;
  filter: saturate(0.28) brightness(0.8);
  transition: transform 0.14s ease, opacity 0.14s ease, filter 0.14s ease;
}

.stance-art-btn img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  pointer-events: none;
}

.stance-art-btn:hover {
  opacity: 0.88;
  filter: saturate(0.95) brightness(1.06);
  transform: scale(1.08);
}

.stance-art-btn.active {
  opacity: 1;
  filter: saturate(1.12) brightness(1.08) drop-shadow(0 0 7px rgba(247, 223, 153, 0.65));
  transform: scale(1.14);
}

.dock-art {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  transition: transform 0.12s ease, filter 0.12s ease;
}

.dock-tile:hover .dock-art {
  transform: scale(1.08);
  filter: drop-shadow(0 0 8px rgba(247, 223, 153, 0.55));
}

.medallion-ring {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px solid rgba(247, 223, 153, 0.55);
  pointer-events: none;
}

.trainer-ribbon-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-left: -14px;
  z-index: 2;
}

.trainer-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 24px 5px 22px;
  background: linear-gradient(90deg, rgba(22, 29, 43, 0.96) 0%, rgba(16, 22, 34, 0.94) 84%, rgba(28, 36, 52, 0.88) 100%);
  border-top: 1.5px solid var(--gold-mid);
  border-bottom: 1.5px solid var(--gold-mid);
  border-right: 1.5px solid var(--gold-mid);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.65);
  min-width: 230px;
}

.trainer-lv {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-hi);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.trainer-name {
  font-size: 14px;
  font-weight: 700;
  color: #f8f2e4;
}

.trainer-loc-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 20px;
  font-size: 11px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.loc-name-inline {
  font-weight: 700;
  color: #f1e6c8;
  max-width: 155px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loc-id-inline {
  font-family: Consolas, monospace;
  font-size: 10px;
  color: #93a3ba;
}

.loc-coords-inline {
  font-family: Consolas, monospace;
  font-size: 10px;
  color: #7dd3fc;
}

.badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}

.badge-town     { background: rgba(201, 162, 82, 0.22); color: var(--gold-hi); border: 1px solid rgba(201, 162, 82, 0.5); }
.badge-field    { background: rgba(34, 197, 94, 0.2);   color: #86efac;        border: 1px solid rgba(74, 222, 128, 0.45); }
.badge-dungeon  { background: rgba(239, 68, 68, 0.22);  color: #fca5a5;        border: 1px solid rgba(248, 113, 113, 0.45); }
.badge-indoor   { background: rgba(168, 85, 247, 0.22); color: #e9d5ff;        border: 1px solid rgba(192, 132, 252, 0.45); }
.badge-instance { background: rgba(56, 189, 248, 0.2);  color: #7dd3fc;        border: 1px solid rgba(56, 189, 248, 0.45); }
.badge-special  { background: rgba(236, 72, 153, 0.22); color: #f9a8d4;        border: 1px solid rgba(244, 114, 182, 0.45); }

.loc-ecology {
  margin-left: 20px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.loc-ecology.safe      { background: rgba(16, 48, 34, 0.88); color: #86efac; border: 1px solid rgba(74, 222, 128, 0.45); }
.loc-ecology.wild-low  { background: rgba(24, 52, 34, 0.88); color: #bbf7d0; border: 1px solid rgba(134, 239, 172, 0.45); }
.loc-ecology.wild-mid  { background: rgba(62, 42, 14, 0.9);  color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.5); }
.loc-ecology.wild-high { background: rgba(68, 18, 22, 0.92); color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.55); }

/* ============================================================================
 * MID-LEFT: Ornate Collapsible Equipe (3/3) Panel (Reference Style!)
 * ============================================================================ */
#hud-party {
  position: fixed;
  top: 102px;
  left: 14px;
  z-index: 30;
  width: 336px;
  max-height: none !important;
  overflow: visible !important;
}

#hud-party.collapsed .party-active-list {
  display: none;
}

.party-head-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.party-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.party-active-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.party-row-card {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 6px 7px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(24, 33, 48, 0.85), rgba(14, 19, 30, 0.92));
  border: 1px solid rgba(201, 162, 82, 0.3);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
  cursor: pointer;
}

.party-row-card:hover {
  border-color: rgba(247, 223, 153, 0.6);
}

.party-row-card.selected {
  border-color: var(--gold-hi);
  box-shadow: inset 0 0 12px rgba(201, 162, 82, 0.16), 0 0 10px rgba(201, 162, 82, 0.25);
}

.party-portrait-box {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 5px;
  background: radial-gradient(circle at 50% 45%, #2a374e, #0f1624 85%);
  border: 1.5px solid var(--gold-mid);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  align-self: center;
}

.party-portrait-box canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.party-slot-tag {
  position: absolute;
  bottom: 1px;
  left: 2px;
  font-size: 8.5px;
  font-weight: 900;
  font-family: Consolas, monospace;
  color: var(--gold-hi);
  background: rgba(8, 12, 20, 0.82);
  padding: 0 3px;
  border-radius: 3px;
}

.party-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.party-row-top {
  display: flex;
  align-items: center;
  gap: 5px;
}

.party-mon-name {
  font-size: 13px;
  font-weight: 700;
  color: #f6eedb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.party-mon-lv {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-hi);
  font-family: "Cinzel", Georgia, serif;
}

.party-pts-pill {
  font-size: 9.5px;
  font-weight: 900;
  color: #161108;
  background: linear-gradient(180deg, #fce599, #c99a32);
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid #fff4c6;
  cursor: pointer;
  animation: pulseGold 1.9s ease-in-out infinite;
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 4px rgba(247, 223, 153, 0.4); }
  50% { box-shadow: 0 0 11px rgba(247, 223, 153, 0.9); }
}

.party-gear-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--gold-mid);
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.party-gear-btn:hover {
  color: var(--gold-hi);
  transform: rotate(35deg);
}

.party-bars-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.party-hp-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.party-hp-bar {
  flex: 1;
  height: 5px;
  background: rgba(5, 8, 15, 0.92);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 82, 0.22);
}

.party-hp-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.party-hp-num {
  font-size: 9.5px;
  font-family: Consolas, monospace;
  color: #cbd5e1;
  min-width: 44px;
  text-align: right;
}

.party-xp-bar {
  width: 100%;
  height: 3px;
  background: rgba(5, 8, 15, 0.85);
  border-radius: 999px;
  overflow: hidden;
}

.party-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #f7df99);
  transition: width 0.25s ease;
}

/* Iconic Row: 3 Stance Shields + 4 Nano Banana Skill Icons (Auto-Use Toggles) */
.party-controls-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 5px;
  margin-top: 2px;
}

.party-stances-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.stance-ico-btn {
  width: 24px;
  height: 26px;
  border-radius: 4px 4px 10px 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(16, 22, 34, 0.9);
  color: #94a3b8;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.stance-ico-btn:hover {
  border-color: var(--gold-hi);
  color: #fff;
}

.stance-ico-btn.st-aggressive.active {
  background: linear-gradient(180deg, #991b1b, #571010);
  border-color: #f87171;
  color: #fecaca;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

.stance-ico-btn.st-defensive.active {
  background: linear-gradient(180deg, #1d4ed8, #1e3a8a);
  border-color: #93c5fd;
  color: #dbeafe;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.45);
}

.stance-ico-btn.st-passive.active {
  background: linear-gradient(180deg, #15803d, #14532d);
  border-color: #86efac;
  color: #dcfce7;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
}

.party-skills-strip {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 3px;
  margin-left: auto;
  flex-shrink: 0;
}

.party-skill-tile {
  position: relative;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border-radius: 5px;
  border: 1.5px solid rgba(201, 162, 82, 0.72);
  background: #0d1320;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.party-skill-tile.auto-off {
  filter: grayscale(0.45) brightness(0.75);
  border-color: rgba(148, 163, 184, 0.45) !important;
}

.party-skill-tile:hover {
  transform: translateY(-1px);
  border-color: var(--gold-hi);
  box-shadow: 0 0 9px rgba(247, 223, 153, 0.45);
}

.party-skill-tile.on-cd {
  opacity: 0.62;
}

.party-skill-tile.on-gcd,
.touch-skill-btn.on-gcd {
  opacity: 0.78;
  box-shadow: inset 0 0 0 1.5px rgba(56, 189, 248, 0.8);
}

.party-gcd-bar {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  overflow: hidden;
  margin-top: 2px;
}

.party-gcd-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #bae6fd);
  border-radius: 999px;
  transition: width 0.08s linear;
}

.party-skill-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.pst-key {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: 8.5px;
  font-weight: 900;
  font-family: Consolas, monospace;
  color: #fff;
  text-shadow: 0 1px 3px #000, 0 0 4px #000;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.pst-auto-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(10, 14, 24, 0.86);
  color: #94a3b8;
  font-size: 7.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  padding: 0;
}

.pst-auto-dot.on {
  background: linear-gradient(180deg, #22c55e, #15803d);
  border-color: #bbf7d0;
  color: #fff;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.7);
}

.pst-cd-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  font-family: Consolas, monospace;
  color: var(--gold-hi);
  z-index: 3;
  pointer-events: none;
}

/* ============================================================================
 * TOP-CENTER: Field Effects Pill & Wild Target Card
 * ============================================================================ */
#hud-field {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-hi);
  display: flex;
  align-items: center;
  gap: 8px;
}

#hud-target {
  position: fixed;
  top: 106px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 31;
  width: 316px;
  padding: 8px 12px;
}

.target-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.target-name-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.target-crosshair {
  color: #f87171;
  font-size: 15px;
  font-weight: 900;
}

#target-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-hi);
}

.target-lv-pill {
  font-size: 10px;
  font-weight: 800;
  font-family: Consolas, monospace;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.55);
  border: 1px solid rgba(245, 158, 11, 0.6);
  border-radius: 4px;
  padding: 1px 5px;
}

.target-lv-pill.legendary {
  background: linear-gradient(90deg, rgba(161, 98, 7, 0.85), rgba(202, 138, 4, 0.85));
  color: #fffbeb;
  border-color: #fde047;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.55);
}

.target-nature-pill {
  font-size: 9.5px;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(201, 162, 82, 0.35);
  border-radius: 4px;
  padding: 1px 5px;
}

.target-types {
  display: inline-flex;
  gap: 3px;
}

.target-hp-text {
  font-size: 11px;
  font-family: Consolas, monospace;
  font-weight: 700;
  color: #f1e6c8;
  white-space: nowrap;
}

.target-hp-bar {
  margin-top: 6px;
  height: 8px;
  background: rgba(6, 9, 16, 0.92);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 82, 0.35);
}

.target-hp-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.target-moves-line {
  margin-top: 5px;
  font-size: 10.5px;
  color: #a8b5ca;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combat-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.combat-chip {
  font-size: 9.5px;
  font-weight: 800;
  font-family: Consolas, monospace;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.combat-chip.pos { background: rgba(20, 83, 45, 0.88); color: #bbf7d0; border-color: #4ade80; }
.combat-chip.neg { background: rgba(127, 29, 29, 0.88); color: #fecaca; border-color: #f87171; }

/* ============================================================================
 * TOP-RIGHT: Ornate Circular Golden Compass Minimap + Rim Buttons
 * ============================================================================ */
#hud-minimap-wrap {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 32;
  display: flex;
  align-items: center;
  gap: 6px;
}

.minimap-rim-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-right: -4px;
  margin-top: 10px;
}

.rim-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b3447, #0e1420 80%);
  border: 2px solid var(--gold-mid);
  color: var(--gold-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(247, 223, 153, 0.35);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.rim-circle-btn svg {
  width: 17px;
  height: 17px;
}

.rim-circle-btn:hover {
  transform: scale(1.08);
  border-color: var(--gold-hi);
  color: #fff9e0;
}

.rim-circle-btn.active {
  background: radial-gradient(circle at 35% 30%, #7c5c20, #38280b 85%);
  border-color: var(--gold-hi);
  box-shadow: 0 0 12px rgba(247, 223, 153, 0.45);
}

.minimap-rim-actions .rim-circle-btn:nth-child(1) { transform: translateX(8px); }
.minimap-rim-actions .rim-circle-btn:nth-child(2) { transform: translateX(0px); }
.minimap-rim-actions .rim-circle-btn:nth-child(3) { transform: translateX(8px); }
.minimap-rim-actions .rim-circle-btn:nth-child(1):hover { transform: translateX(8px) scale(1.08); }
.minimap-rim-actions .rim-circle-btn:nth-child(3):hover { transform: translateX(8px) scale(1.08); }

.compass-frame {
  position: relative;
  width: 184px;
  height: 184px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minimap-circle-clip {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  background: #0b111c;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.78), 0 8px 24px rgba(0, 0, 0, 0.72);
  z-index: 2;
}

.compass-bezel-img {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  object-fit: contain;
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.82));
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.compass-north {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 22px;
  background: linear-gradient(180deg, #f8e29f, #b08534);
  color: #1a1306;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  z-index: 5;
  pointer-events: none;
}

.compass-gem {
  position: absolute;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #fff1be, #a4792a);
  border: 1px solid #2a1e09;
  transform: rotate(45deg);
  z-index: 4;
  pointer-events: none;
}

.compass-gem.gem-e { right: -4px; top: calc(50% - 5px); }
.compass-gem.gem-s { bottom: -4px; left: calc(50% - 5px); }
.compass-gem.gem-w { left: -4px; top: calc(50% - 5px); }

.compass-zoom-stack {
  position: absolute;
  right: 6px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 6;
}

.zoom-circle-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a3346, #0d131f 80%);
  border: 1.5px solid var(--gold-mid);
  color: var(--gold-hi);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.zoom-circle-btn:hover {
  border-color: var(--gold-hi);
  color: #fff;
}

#minimap-tooltip {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 15, 26, 0.96);
  border: 1px solid var(--gold-mid);
  color: var(--gold-hi);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

/* ============================================================================
 * MID-RIGHT: Ornate Quest & Exits Tracker Card (Reference Style!)
 * ============================================================================ */
#hud-quest {
  position: fixed;
  top: 204px;
  right: 16px;
  z-index: 28;
  width: 244px;
}

#hud-quest.collapsed .quest-body {
  display: none;
}

.quest-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.quest-diamond {
  color: var(--gold-hi);
  font-size: 12px;
}

.quest-body {
  padding: 8px 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quest-obj-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: #ebe2cc;
  line-height: 1.3;
}

.quest-checkbox {
  color: var(--gold-mid);
  font-size: 13px;
  line-height: 1.1;
}

.quest-checkbox.done {
  color: #4ade80;
}

.quest-reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.quest-reward-text {
  font-size: 10px;
  color: #93c5fd;
  line-height: 1.25;
}

.quest-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 82, 0.42), transparent);
  margin: 2px 0;
}

.exits-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--gold-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#exits-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 120px;
  overflow-y: auto;
}

.exit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(18, 25, 38, 0.72);
  border: 1px solid rgba(201, 162, 82, 0.16);
  cursor: pointer;
  font-size: 11px;
  transition: all 0.12s ease;
}

.exit-item:hover {
  background: rgba(54, 44, 24, 0.65);
  border-color: rgba(247, 223, 153, 0.5);
}

.exit-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e6ddc7;
}

.exit-coord {
  font-family: Consolas, monospace;
  font-size: 9.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================================
 * Portal Proximity Prompt & Move Preview Pill
 * ============================================================================ */
#portal-hint {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-hi);
}

.portal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

#move-preview-pill {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 29;
  width: 320px;
  padding: 8px 11px;
}

.mp-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

#mp-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-hi);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-stats {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--text-soft);
  font-family: Consolas, monospace;
}

.mp-desc {
  margin-top: 4px;
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.3;
}

/* ============================================================================
 * BOTTOM-LEFT: Gilded Combat Log & Chat/Command Bar (Reference Style!)
 * ============================================================================ */
#hud-chat-dock {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 30;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.combat-log {
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.combat-log-item {
  background: linear-gradient(90deg, rgba(11, 16, 26, 0.88), rgba(11, 16, 26, 0.55));
  border-left: 2.5px solid var(--gold-mid);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  color: #f0e7d1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  line-height: 1.3;
}

.chat-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(22, 30, 44, 0.95), rgba(11, 16, 25, 0.97));
  border: 1.5px solid var(--gold-mid);
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(247, 223, 153, 0.25), 0 6px 18px rgba(0, 0, 0, 0.7);
}

.chat-ico {
  font-size: 13px;
  opacity: 0.9;
}

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f3ead3;
  font-size: 12px;
  user-select: text;
}

#chat-input::placeholder {
  color: #8b96ab;
  font-style: italic;
}

.chat-send-btn {
  background: transparent;
  border: none;
  color: var(--gold-mid);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.chat-send-btn:hover {
  color: var(--gold-hi);
}

/* ============================================================================
 * BOTTOM-RIGHT: Ornate Fantasy RPG Menu Dock + Config Popover (Reference Style!)
 * ============================================================================ */
#hud-dock-wrap {
  position: fixed;
  bottom: 14px;
  right: 16px;
  z-index: 32;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

#hud-dock {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-tile {
  position: relative;
  width: 72px;
  height: 58px;
  border-radius: 7px;
  background: linear-gradient(180deg, #1d2638 0%, #101624 100%);
  border: 1.5px solid var(--gold-mid);
  box-shadow:
    inset 0 1px 0 rgba(247, 223, 153, 0.34),
    inset 0 0 0 1px rgba(10, 14, 22, 0.85),
    0 6px 18px rgba(0, 0, 0, 0.72);
  color: var(--gold-hi);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.dock-tile:hover {
  transform: translateY(-2px);
  border-color: var(--gold-hi);
  background: linear-gradient(180deg, #2d3446 0%, #161d2c 100%);
  box-shadow: 0 0 14px rgba(247, 223, 153, 0.35), 0 8px 20px rgba(0, 0, 0, 0.78);
}

.dock-tile.active {
  background: linear-gradient(180deg, #523e19 0%, #271d0c 100%);
  border-color: var(--gold-hi);
}

.dock-svg {
  width: 22px;
  height: 22px;
  color: var(--gold-hi);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.75));
}

.dock-tile span.rpg-font {
  font-size: 10px;
  font-weight: 700;
  color: #efe2be;
  line-height: 1;
}

.dock-badge {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fce599, #c99a32);
  color: #161108;
  border: 1px solid #fff7d6;
  font-size: 9.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* Config Popover */
#config-popover {
  width: 288px;
}

.config-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}

#job-select,
.pd-sort-select {
  background: #0d1421;
  color: var(--gold-hi);
  border: 1px solid rgba(201, 162, 82, 0.55);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.config-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.config-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(201, 162, 82, 0.22);
  font-size: 10.5px;
  color: var(--text-muted);
}

kbd {
  display: inline-block;
  padding: 1px 4px;
  font-size: 9.5px;
  font-family: Consolas, monospace;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.45);
  border-radius: 3px;
  color: var(--gold-hi);
}

/* ============================================================================
 * MODALS (Unified Ornate Obsidian & Antique Gold Styling)
 * ============================================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: blur(5px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  max-width: 94vw;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  background: linear-gradient(180deg, rgba(46, 38, 24, 0.65), rgba(16, 22, 34, 0.72));
  border-bottom: 1.5px solid rgba(201, 162, 82, 0.5);
}

.modal-header h2 {
  font-size: 17px;
  color: var(--gold-hi);
}

.modal-sub {
  font-size: 11.5px;
  color: var(--text-soft);
  margin-top: 2px;
}

.close-btn {
  background: rgba(24, 31, 46, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.55);
  color: var(--gold-hi);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.close-btn:hover {
  background: rgba(127, 29, 29, 0.75);
  border-color: #f87171;
  color: #fff;
}

/* ============================================================================
 * Bag / Reserva Modal
 * ============================================================================ */
.bag-dialog {
  width: 780px;
}

.bag-modal-body {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.bag-section-title {
  font-size: 12.5px;
  color: var(--gold-hi);
  letter-spacing: 0.4px;
}

.bag-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.bag-mon-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(25, 34, 50, 0.9), rgba(13, 18, 29, 0.95));
  border: 1.5px solid rgba(201, 162, 82, 0.35);
  cursor: pointer;
  transition: all 0.14s ease;
}

.bag-mon-card:hover {
  border-color: var(--gold-hi);
}

.bag-mon-card.selected {
  border-color: var(--gold-hi);
  box-shadow: 0 0 14px rgba(247, 223, 153, 0.28);
}

.bag-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bag-card-info {
  flex: 1;
  min-width: 0;
}

.bag-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-hi);
}

.bag-card-meta {
  font-size: 10.5px;
  color: var(--text-soft);
}

.bag-card-actions {
  display: flex;
  gap: 5px;
  margin-top: 2px;
}

.bag-card-actions .gold-mini-btn {
  flex: 1;
  text-align: center;
}

/* ============================================================================
 * World Map Modal
 * ============================================================================ */
.worldmap-dialog {
  width: 960px;
}

.worldmap-stage {
  position: relative;
  padding: 14px;
  display: flex;
  justify-content: center;
  background: #070b14;
}

#worldmap-canvas {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 6px;
  border: 1.5px solid rgba(201, 162, 82, 0.45);
  cursor: pointer;
}

#worldmap-hover {
  position: absolute;
  pointer-events: none;
  background: rgba(11, 16, 26, 0.96);
  border: 1.5px solid var(--gold-mid);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.78);
  z-index: 5;
}

/* ============================================================================
 * Areas, Pokédex & Grimório Shared Toolbars & Grids
 * ============================================================================ */
.areas-dialog {
  width: 940px;
  height: 82vh;
}

.areas-toolbar {
  padding: 11px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-bottom: 1px solid rgba(201, 162, 82, 0.28);
  background: rgba(14, 19, 30, 0.7);
}

.areas-toolbar input,
.pd-moves-filters input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid rgba(201, 162, 82, 0.48);
  background: rgba(9, 13, 22, 0.92);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  user-select: text;
}

.areas-toolbar input:focus,
.pd-moves-filters input:focus {
  border-color: var(--gold-hi);
}

.areas-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tab-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 82, 0.32);
  background: rgba(20, 27, 41, 0.85);
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn:hover {
  border-color: var(--gold-hi);
  color: var(--gold-hi);
}

.tab-btn.active {
  background: linear-gradient(180deg, rgba(166, 124, 42, 0.42), rgba(92, 65, 19, 0.52));
  border-color: var(--gold-hi);
  color: #fff6d6;
}

#areas-grid {
  padding: 12px 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 9px;
  align-content: start;
}

.area-card {
  background: linear-gradient(180deg, rgba(24, 32, 47, 0.9), rgba(13, 18, 29, 0.95));
  border: 1px solid rgba(201, 162, 82, 0.28);
  border-radius: 7px;
  padding: 9px 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.14s ease;
}

.area-card:hover {
  border-color: var(--gold-hi);
  transform: translateY(-1px);
}

.area-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.area-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.area-card-sub {
  font-size: 11px;
  color: var(--text-soft);
}

.area-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: Consolas, monospace;
}

/* Pokédex Grid */
.poke-quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.poke-grid {
  padding: 12px 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  align-content: start;
}

.poke-card {
  background: linear-gradient(180deg, rgba(25, 34, 50, 0.9), rgba(13, 18, 29, 0.95));
  border: 1px solid rgba(201, 162, 82, 0.28);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.14s ease;
}

.poke-card:hover {
  border-color: var(--gold-hi);
  transform: translateY(-2px);
}

.poke-card.active {
  border-color: var(--gold-hi);
  box-shadow: 0 0 14px rgba(247, 223, 153, 0.28);
}

.poke-card-num {
  font-size: 10px;
  font-family: Consolas, monospace;
  color: var(--gold-mid);
  align-self: flex-start;
}

.poke-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #f6eedb;
  text-align: center;
}

.poke-card-actions {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-top: 3px;
}

.poke-card-actions .gold-mini-btn {
  flex: 1;
  font-size: 10px;
  padding: 3px 4px;
}

/* Type Badges & Category Pills */
.type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.type-badge,
.move-type-pill {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #0b101b;
}

.cat-filter-row {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.cat-filter-btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.32);
  background: rgba(18, 25, 38, 0.9);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.cat-filter-btn.active {
  background: rgba(201, 162, 82, 0.28);
  border-color: var(--gold-hi);
  color: #fff6d6;
}

.cat-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.cat-pill.cat-physical { background: rgba(239, 68, 68, 0.22); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.45); }
.cat-pill.cat-special  { background: rgba(56, 189, 248, 0.2);  color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.45); }
.cat-pill.cat-status   { background: rgba(168, 85, 247, 0.22); color: #d8b4fe; border: 1px solid rgba(192, 132, 252, 0.45); }

.desc-src-tag {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  font-family: Consolas, monospace;
}

.desc-src-tag.src-sv     { background: rgba(234, 88, 12, 0.28); color: #fdba74; border: 1px solid rgba(251, 146, 60, 0.45); }
.desc-src-tag.src-legacy { background: rgba(71, 85, 105, 0.4);  color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }

.skill-icon-sm {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid rgba(201, 162, 82, 0.55);
  object-fit: cover;
  flex-shrink: 0;
}

.skill-icon-md {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.6);
  object-fit: cover;
  flex-shrink: 0;
}

/* ============================================================================
 * DETAILS MODAL: Level, EXP, Nature, +3/Lv Stat Distributor & Moves
 * ============================================================================ */
.pd-dialog {
  width: 1020px;
  height: 88vh;
}

.pd-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-squad-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 8px 16px;
  background: rgba(12, 17, 27, 0.85);
  border-bottom: 1px solid rgba(201, 162, 82, 0.3);
}

.pd-squad-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(22, 30, 45, 0.85);
  border: 1px solid rgba(201, 162, 82, 0.28);
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
}

.pd-squad-pill:hover {
  border-color: var(--gold-hi);
}

.pd-squad-pill.active-view {
  background: linear-gradient(180deg, rgba(114, 84, 28, 0.42), rgba(38, 28, 12, 0.65));
  border-color: var(--gold-hi);
  box-shadow: 0 0 10px rgba(247, 223, 153, 0.25);
}

.pd-sp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
  font-family: Consolas, monospace;
  color: var(--gold-mid);
}

.pd-sp-name {
  font-size: 12px;
  font-weight: 700;
  color: #f6eedb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 355px 1fr;
  overflow: hidden;
}

.pd-left {
  padding: 12px 14px;
  border-right: 1px solid rgba(201, 162, 82, 0.3);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(11, 16, 26, 0.65);
}

.pd-stage {
  background: radial-gradient(circle at 50% 45%, rgba(45, 58, 82, 0.65), rgba(10, 14, 22, 0.94));
  border: 1.5px solid rgba(201, 162, 82, 0.48);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#pd-preview-canvas {
  width: 124px;
  height: 124px;
  image-rendering: pixelated;
}

.pd-stage-controls {
  display: flex;
  gap: 4px;
}

.pd-identity {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pd-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--gold-hi);
}

.pd-level-badge {
  font-size: 12px;
  font-weight: 800;
  font-family: Consolas, monospace;
  color: #161108;
  background: linear-gradient(180deg, #fce599, #c99a32);
  padding: 2px 7px;
  border-radius: 5px;
}

.pd-dex {
  margin-left: auto;
  font-family: Consolas, monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.pd-nature-box {
  font-size: 11px;
  font-weight: 700;
  color: #fde68a;
  background: rgba(36, 30, 18, 0.78);
  border: 1px solid rgba(201, 162, 82, 0.45);
  border-radius: 6px;
  padding: 5px 8px;
}

.pd-xp-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pd-xp-head {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-soft);
  font-family: Consolas, monospace;
}

.pd-xp-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(5, 8, 15, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.3);
  overflow: hidden;
}

.pd-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #f7df99);
  transition: width 0.25s ease;
}

.pd-phys {
  font-size: 11px;
  color: var(--text-muted);
}

.pd-section {
  background: rgba(18, 25, 38, 0.72);
  border: 1px solid rgba(201, 162, 82, 0.32);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-hi);
}

.pd-pts-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pd-unspent-badge {
  font-size: 11px;
  font-weight: 900;
  font-family: Consolas, monospace;
  color: #161108;
  background: linear-gradient(180deg, #fce599, #c99a32);
  padding: 2px 7px;
  border-radius: 999px;
}

.pd-unspent-badge.zero {
  background: rgba(30, 41, 59, 0.9);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.pd-formula-note {
  font-size: 10px;
  color: var(--text-muted);
}

.pd-stance-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.stance-pick-btn {
  padding: 5px 4px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(12, 18, 30, 0.9);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.stance-pick-btn.st-aggressive.active { background: rgba(153, 27, 27, 0.75); border-color: #f87171; color: #fecaca; }
.stance-pick-btn.st-defensive.active  { background: rgba(29, 78, 216, 0.75); border-color: #93c5fd; color: #dbeafe; }
.stance-pick-btn.st-passive.active    { background: rgba(21, 128, 61, 0.75); border-color: #86efac; color: #dcfce7; }

/* Interactive Stat Point Allocator Rows */
.pd-stats-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-alloc-row {
  display: grid;
  grid-template-columns: 74px 42px 1fr auto;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.stat-lbl {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #e2d9c3;
  font-weight: 700;
  font-size: 11px;
}

.stat-nat-up   { color: #4ade80; font-size: 10px; }
.stat-nat-down { color: #f87171; font-size: 10px; }

.stat-val {
  font-family: Consolas, monospace;
  font-weight: 800;
  color: var(--gold-hi);
  text-align: right;
  font-size: 12px;
}

.stat-bar-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(6, 10, 18, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.22);
  overflow: hidden;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.stat-alloc-btns {
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-pts-tag {
  font-size: 9.5px;
  font-family: Consolas, monospace;
  color: #86efac;
  min-width: 24px;
  text-align: right;
}

.stat-add-btn {
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(201, 162, 82, 0.65);
  background: linear-gradient(180deg, rgba(164, 121, 41, 0.35), rgba(82, 58, 18, 0.55));
  color: var(--gold-hi);
  font-size: 10px;
  font-weight: 900;
  font-family: Consolas, monospace;
  cursor: pointer;
}

.stat-add-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #e0b452, #9c7222);
  color: #161108;
  border-color: #fff3c4;
}

.stat-add-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

/* Equipped 4 Slots inside Details */
.pd-equipped-slots {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pd-eq-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(12, 18, 30, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.3);
}

.pd-eq-key {
  font-family: Consolas, monospace;
  font-size: 10.5px;
  font-weight: 900;
  color: var(--gold-hi);
  background: rgba(34, 42, 60, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.45);
  border-radius: 4px;
  padding: 2px 6px;
}

.pd-eq-name {
  flex: 1;
  font-size: 11.5px;
  font-weight: 700;
  color: #f3ead3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auto-pill-btn {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
}

.auto-pill-btn.on {
  background: rgba(21, 128, 61, 0.85);
  border-color: #4ade80;
  color: #dcfce7;
}

/* Right Column: Unlocked Elemental Moves */
.pd-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.pd-moves-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(201, 162, 82, 0.28);
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(14, 19, 30, 0.65);
}

.pd-moves-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.pd-moves-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-hi);
}

.pd-moves-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pd-filter-bars {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pd-moves-list,
.moves-grid {
  padding: 10px 14px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 9px;
  align-content: start;
}

.moves-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.move-card {
  background: linear-gradient(180deg, rgba(24, 32, 47, 0.9), rgba(12, 17, 28, 0.96));
  border: 1px solid rgba(201, 162, 82, 0.3);
  border-radius: 7px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.move-card:hover {
  border-color: var(--gold-hi);
}

.move-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.move-card-titles {
  flex: 1;
  min-width: 0;
}

.move-card-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #f7efda;
}

.move-card-en {
  font-size: 10px;
  color: var(--text-muted);
}

.move-card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.move-card-stats {
  display: flex;
  gap: 10px;
  font-size: 10.5px;
  font-family: Consolas, monospace;
  color: var(--text-soft);
}

.move-card-effects {
  font-size: 10px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.28);
  border: 1px solid rgba(201, 162, 82, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
}

.move-card-desc {
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.32;
}

.move-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(8, 12, 20, 0.7);
}
::-webkit-scrollbar-thumb {
  background: rgba(201, 162, 82, 0.45);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(247, 223, 153, 0.72);
}

/* ============================================================================
 * Complementary Ornate Classes (Moves, Details Rows, Cards & Exits)
 * ============================================================================ */
.hud-btn {
  background: linear-gradient(180deg, rgba(42, 48, 62, 0.92), rgba(20, 26, 38, 0.96));
  color: var(--gold-hi);
  border: 1px solid rgba(201, 162, 82, 0.62);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.hud-btn.small {
  padding: 3px 7px;
  font-size: 10.5px;
}

.hud-btn:hover {
  border-color: var(--gold-hi);
  background: linear-gradient(180deg, rgba(74, 60, 34, 0.95), rgba(38, 30, 18, 0.96));
}

.skill-icon-card {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1.5px solid rgba(201, 162, 82, 0.6);
  object-fit: cover;
  flex-shrink: 0;
}

.move-card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.move-name-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.move-en-name {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

.move-vfx-tag {
  font-size: 9.5px;
  font-family: Consolas, monospace;
  color: var(--text-muted);
}

.move-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.move-effects-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.move-effect-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(120, 53, 15, 0.35);
  color: #fde68a;
  border: 1px solid rgba(201, 162, 82, 0.42);
}

.pd-move-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(24, 32, 47, 0.9), rgba(12, 17, 28, 0.96));
  border: 1px solid rgba(201, 162, 82, 0.28);
}

.pd-move-row:hover {
  border-color: var(--gold-hi);
}

.pd-move-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-move-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.pd-move-name {
  font-size: 13px;
  font-weight: 800;
  color: #f7efda;
}

.pd-move-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 10.5px;
  font-family: Consolas, monospace;
  color: var(--text-soft);
}

.pd-move-desc {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.32;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.pd-move-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.slot-pick-btn {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid rgba(201, 162, 82, 0.45);
  background: rgba(14, 20, 32, 0.92);
  color: var(--text-soft);
  font-family: Consolas, monospace;
  font-size: 10.5px;
  font-weight: 900;
  cursor: pointer;
}

.slot-pick-btn:hover {
  border-color: var(--gold-hi);
  color: var(--gold-hi);
}

.slot-pick-btn.equipped {
  background: linear-gradient(180deg, #e0b452, #9c7222);
  border-color: #fff4c6;
  color: #161108;
}

.pd-eq-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(12, 18, 30, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.35);
}

.pd-eq-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.skill-key {
  font-family: Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  color: var(--gold-hi);
  background: rgba(34, 42, 60, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.5);
  border-radius: 4px;
  padding: 1px 5px;
}

.pd-eq-chip-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #f3ead3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poke-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.poke-card-bst {
  font-size: 9.5px;
  font-family: Consolas, monospace;
  color: var(--text-muted);
}

.exit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  flex-shrink: 0;
}

.exit-dot.port    { background: #fbbf24; }
.exit-dot.airship { background: #38bdf8; }
.exit-dot.rift    { background: #c084fc; }

.exit-pos {
  font-family: Consolas, monospace;
  font-size: 9.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================================
 * City NPCs: Proximity Prompt, Enfermeira Joy Healer & Kafra Storage Modals
 * ============================================================================ */
.npc-hint-btn {
  position: fixed;
  bottom: 118px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 33;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gold-hi);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.14s ease;
}

.npc-hint-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 0 16px rgba(247, 223, 153, 0.45), 0 8px 22px rgba(0, 0, 0, 0.75);
}

.npc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
}

.npc-dot.storage {
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

/* Enfermeira Joy Healer Modal */
.healer-dialog {
  width: 560px;
}

.healer-body {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.npc-dialogue-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(16, 26, 40, 0.85);
  border: 1px solid rgba(201, 162, 82, 0.35);
}

.npc-badge-emblem {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  flex-shrink: 0;
}

.npc-badge-emblem.heal {
  background: radial-gradient(circle at 35% 30%, #22c55e, #14532d);
  border: 2px solid #86efac;
  color: #ecfdf5;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.45);
}

.npc-dialogue-text {
  font-size: 12.5px;
  color: #ebe2cc;
  line-height: 1.42;
}

.healer-party-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.healer-mon-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(16, 22, 34, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.28);
}

.healer-mon-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-hi);
}

.healer-mon-sub {
  font-size: 10.5px;
  font-family: Consolas, monospace;
  color: var(--text-soft);
}

.healer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.healer-main-btn {
  padding: 8px 16px;
  font-size: 12.5px;
}

/* Kafra Storage Modal */
#modal-pokemon-details {
  z-index: 130;
}

#modal-evolve {
  z-index: 135;
}

.storage-dialog {
  width: min(1100px, calc(100vw - 24px));
  height: min(88vh, 840px);
}

.storage-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 16px;
  overflow: hidden;
}

.storage-top-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.storage-col {
  background: rgba(14, 20, 32, 0.78);
  border: 1px solid rgba(201, 162, 82, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.storage-col-head {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-hi);
}

.storage-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.storage-slot-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 7px;
  border-radius: 7px;
  background: rgba(21, 29, 44, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.28);
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.storage-slot-card.is-shiny {
  border-color: rgba(250, 204, 21, 0.72);
  box-shadow: inset 0 0 12px rgba(250, 204, 21, 0.14);
}

.storage-slot-card:hover {
  border-color: var(--gold-hi);
}

.storage-slot-card.selected {
  border-color: var(--gold-hi);
  box-shadow: 0 0 10px rgba(247, 223, 153, 0.32);
}

.storage-slot-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.storage-slot-sprite-box {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.storage-slot-sprite-box.is-shiny {
  border-color: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.42);
}

.storage-slot-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.storage-slot-name {
  font-size: 11px;
  font-weight: 700;
  color: #f6eedb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.storage-slot-meta {
  font-size: 9.5px;
  font-family: Consolas, monospace;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.storage-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.storage-toolbar input {
  flex: 1;
  min-width: 210px;
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid rgba(201, 162, 82, 0.48);
  background: rgba(9, 13, 22, 0.92);
  color: var(--text-main);
  font-size: 12.5px;
  outline: none;
  user-select: text;
}

.storage-toolbar input:focus,
.storage-sort-select:focus {
  border-color: var(--gold-hi);
}

.storage-sort-select {
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(201, 162, 82, 0.48);
  background: rgba(9, 13, 22, 0.94);
  color: var(--gold-hi);
  font-size: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.storage-count-pill {
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-hi);
  background: rgba(34, 42, 60, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.55);
  border-radius: 6px;
  padding: 6px 10px;
  white-space: nowrap;
}

.storage-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 10px;
  align-content: start;
  padding-right: 4px;
}

.storage-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(25, 34, 50, 0.94), rgba(13, 18, 29, 0.98));
  border: 1.5px solid rgba(201, 162, 82, 0.34);
  transition: border-color 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}

.storage-card.is-shiny {
  border-color: rgba(250, 204, 21, 0.78);
  box-shadow: inset 0 0 18px rgba(250, 204, 21, 0.13);
}

.storage-card:hover {
  border-color: var(--gold-hi);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.storage-card-top {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.storage-sprite-stage {
  position: relative;
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1.5px solid rgba(201, 162, 82, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.storage-sprite-stage.is-shiny {
  border-color: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.42);
}

.storage-sprite-canvas {
  display: block;
  image-rendering: pixelated;
}

.storage-sprite-dex {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  color: rgba(241, 245, 249, 0.86);
  background: rgba(2, 6, 23, 0.72);
  padding: 0 3px;
  border-radius: 3px;
  line-height: 1.25;
}

.storage-shiny-tag {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 10px;
  line-height: 1;
  text-shadow: 0 0 6px rgba(250, 204, 21, 0.9);
}

.storage-card-header-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.storage-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

.storage-card-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--gold-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.storage-card-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.storage-card-lv {
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.52);
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 4px;
  padding: 1px 6px;
}

.storage-evo-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #fef08a;
  background: rgba(133, 77, 14, 0.65);
  border: 1px solid rgba(250, 204, 21, 0.75);
  border-radius: 4px;
  padding: 1px 5px;
}

.storage-ko-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.72);
  border: 1px solid rgba(248, 113, 113, 0.65);
  border-radius: 4px;
  padding: 1px 5px;
}

.storage-card-info {
  font-size: 10.5px;
  color: #cbd5e1;
  line-height: 1.25;
}

.storage-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  font-family: Consolas, monospace;
  color: #cbd5e1;
}

.storage-bst-pill {
  color: #93c5fd;
  font-weight: 800;
}

.storage-pts-pill {
  color: #fde047;
  font-weight: 800;
  background: rgba(161, 98, 7, 0.35);
  border: 1px solid rgba(250, 204, 21, 0.45);
  padding: 0 5px;
  border-radius: 4px;
}

.storage-xp-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.storage-xp-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.storage-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.storage-xp-lbl {
  font-family: Consolas, monospace;
  font-size: 9.5px;
  color: #94a3b8;
  white-space: nowrap;
}

.storage-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.storage-stat-cell {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(8, 13, 24, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.storage-stat-lbl {
  color: #94a3b8;
  font-weight: 700;
}

.storage-stat-val {
  color: #f1f5f9;
  font-weight: 800;
}

.storage-stat-cell.stat-up {
  border-color: rgba(74, 222, 128, 0.38);
}

.storage-stat-cell.stat-up .storage-stat-lbl,
.storage-stat-cell.stat-up .storage-stat-val {
  color: #86efac;
}

.storage-stat-cell.stat-down {
  border-color: rgba(248, 113, 113, 0.32);
}

.storage-stat-cell.stat-down .storage-stat-lbl,
.storage-stat-cell.stat-down .storage-stat-val {
  color: #fca5a5;
}

.storage-stat-alloc {
  font-size: 8.5px;
  color: #fde047;
  margin-left: 1px;
}

.storage-moves-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.storage-move-chip {
  font-size: 9.5px;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.storage-card-btns {
  display: flex;
  gap: 4px;
  margin-top: auto;
  padding-top: 2px;
}

.storage-card-btns .gold-mini-btn {
  flex: 1;
  font-size: 10px;
  padding: 5px 5px;
  text-align: center;
}

.storage-card-btns .st-det-btn {
  flex: 0.9;
  background: linear-gradient(180deg, rgba(30, 58, 95, 0.92), rgba(15, 29, 52, 0.96));
  border-color: rgba(56, 189, 248, 0.55);
  color: #bae6fd;
}

.storage-card-btns .st-det-btn:hover {
  border-color: #7dd3fc;
  color: #f0f9ff;
}

/* ============================================================================
 * MMO Online Status Pill, Friends Popover & Ornate Login Modal
 * ============================================================================ */
.trainer-eco-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 20px;
}

.trainer-eco-row .loc-ecology {
  margin-left: 0;
}

.mmo-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(14, 24, 38, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #bae6fd;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.mmo-online-pill:hover {
  border-color: var(--gold-hi);
  color: #fff;
}

.mmo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

.mmo-online-pill.offline {
  border-color: rgba(148, 163, 184, 0.45);
  color: #94a3b8;
}

.mmo-online-pill.offline .mmo-dot {
  background: #94a3b8;
  box-shadow: none;
}

#mmo-online-popover {
  position: absolute;
  top: 84px;
  left: 62px;
  width: 274px;
  z-index: 45;
}

.mmo-online-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.mmo-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(18, 26, 40, 0.88);
  border: 1px solid rgba(201, 162, 82, 0.28);
}

.mmo-player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mmo-player-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-hi);
}

.mmo-player-map {
  font-size: 10px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mmo-online-foot {
  padding: 8px;
  border-top: 1px solid rgba(201, 162, 82, 0.25);
  display: flex;
  justify-content: flex-end;
}

/* Ornate Login / Register Modal */
.login-dialog {
  width: 420px;
  padding: 18px 20px;
  gap: 12px;
}

.login-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-emblem {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-mid);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(201, 162, 82, 0.35);
}

.login-emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.login-hero h2 {
  font-size: 17px;
  color: var(--gold-hi);
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.login-tabs .tab-btn {
  padding: 7px 10px;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
}

.login-field input {
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid rgba(201, 162, 82, 0.5);
  background: rgba(9, 13, 22, 0.94);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  user-select: text;
}

.login-field input:focus {
  border-color: var(--gold-hi);
}

.login-error {
  font-size: 11.5px;
  font-weight: 700;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.6);
  border: 1px solid #f87171;
  border-radius: 6px;
  padding: 6px 10px;
}

.login-submit-btn {
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 2px;
}

.login-foot {
  display: flex;
  justify-content: center;
  padding-top: 6px;
  border-top: 1px solid rgba(201, 162, 82, 0.22);
}


/* ============================================================================
 * Money Pill, Capture Prompt, Pokéball Bar, Starter Pick, Auto-Capture & Shop
 * ============================================================================ */
.trainer-money-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(66, 46, 12, 0.92), rgba(32, 22, 6, 0.96));
  border: 1px solid rgba(250, 204, 21, 0.72);
  color: #fde047;
  font-size: 10.5px;
  font-weight: 800;
  font-family: Consolas, monospace;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.trainer-money-pill.lg {
  font-size: 13px;
  padding: 4px 11px;
}

.npc-dot.shop {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

.capture-hint-btn {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 36;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(46, 26, 10, 0.96), rgba(20, 14, 10, 0.98));
  border: 2px solid #f59e0b;
  color: #fef08a;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.55), 0 6px 18px rgba(0, 0, 0, 0.75);
  animation: capPulse 1.1s ease-in-out infinite;
}

.capture-hint-btn:hover {
  border-color: #fef08a;
  transform: translateX(-50%) scale(1.03);
}

.capture-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ef4444 48%, #1e293b 48%, #1e293b 56%, #f8fafc 56%);
  border: 1.5px solid #fef08a;
  box-shadow: 0 0 10px #f59e0b;
}

@keyframes capPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.45), 0 6px 16px rgba(0, 0, 0, 0.7); }
  50% { box-shadow: 0 0 28px rgba(250, 204, 21, 0.8), 0 6px 18px rgba(0, 0, 0, 0.8); }
}

/* Bottom-Center Equipped Pokéball Bar */
#hud-pokeball-bar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 26, 38, 0.94), rgba(10, 14, 22, 0.97));
  border: 1.5px solid rgba(201, 162, 82, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
}

.pokeball-slots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pokeball-slot-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 50px;
  padding: 3px;
  border-radius: 7px;
  background: rgba(15, 22, 35, 0.9);
  border: 1.5px solid rgba(148, 163, 184, 0.28);
  cursor: pointer;
  transition: all 0.12s ease;
  color: #e2e8f0;
}

.pokeball-slot-btn:hover {
  border-color: var(--gold-hi);
  transform: translateY(-2px);
}

.pokeball-slot-btn.equipped {
  background: linear-gradient(180deg, rgba(120, 86, 24, 0.55), rgba(40, 28, 10, 0.85));
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

.pokeball-slot-btn.empty {
  opacity: 0.45;
}

.pb-orb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
  position: relative;
  box-shadow: inset -3px -3px 5px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.pb-orb::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #f8fafc;
  border: 1.5px solid #0f172a;
}

.pb-badge {
  font-size: 8.5px;
  font-weight: 800;
  color: var(--gold-hi);
  margin-top: 2px;
  font-family: Consolas, monospace;
}

.pb-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #0f172a;
  border: 1px solid rgba(201, 162, 82, 0.7);
  color: #fef08a;
  font-size: 9.5px;
  font-weight: 900;
  font-family: Consolas, monospace;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pokeball-auto-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 7px;
  border-left: 1px solid rgba(201, 162, 82, 0.3);
}

.auto-cap-btn.active {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.85), rgba(15, 92, 46, 0.92));
  border-color: #4ade80;
  color: #dcfce7;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.35);
}

/* Bag Potions Section */
.bag-potions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 8px;
}

.bag-potion-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(16, 24, 38, 0.88);
  border: 1px solid rgba(201, 162, 82, 0.32);
}

.bag-potion-card.empty {
  opacity: 0.45;
}

.bag-pot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.bag-pot-name {
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
}

.bag-pot-qty {
  font-size: 11px;
  font-family: Consolas, monospace;
  font-weight: 900;
  color: #fde047;
}

.bag-pot-desc {
  font-size: 10px;
  color: var(--text-soft);
}

/* Kanto Starter Selection Modal */
.starter-dialog {
  width: 780px;
  max-width: 95vw;
  padding: 22px 24px;
  gap: 16px;
}

.starter-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.starter-kicker {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--gold-mid);
}

.starter-header h2 {
  font-size: 22px;
  color: var(--gold-hi);
}

.starter-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.starter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(24, 34, 52, 0.94), rgba(10, 15, 25, 0.98));
  border: 1.5px solid rgba(201, 162, 82, 0.45);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.starter-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-hi);
  box-shadow: 0 10px 26px rgba(201, 162, 82, 0.25);
}

.starter-canvas-wrap {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 2px solid rgba(201, 162, 82, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.starter-canvas-wrap canvas {
  width: 108px;
  height: 108px;
  image-rendering: pixelated;
}

.starter-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold-hi);
}

.starter-blurb {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.35;
  min-height: 30px;
}

.starter-stats-mini {
  font-size: 10px;
  font-family: Consolas, monospace;
  color: #cbd5e1;
  background: rgba(8, 12, 22, 0.8);
  border: 1px solid rgba(201, 162, 82, 0.25);
  border-radius: 6px;
  padding: 4px 8px;
}

.starter-pick-btn {
  width: 100%;
  padding: 8px 12px;
  font-size: 12.5px;
  margin-top: 4px;
}

/* Auto-Capture Filter Modal */
.autocap-dialog {
  width: 760px;
  max-width: 95vw;
  max-height: 88vh;
}

.autocap-body {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.autocap-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(14, 21, 34, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.35);
}

.autocap-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
  cursor: pointer;
}

.autocap-check.shiny {
  color: #fde047;
}

.autocap-ball-pick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-soft);
}

.autocap-ball-pick select {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.55);
  background: rgba(8, 13, 24, 0.95);
  color: var(--gold-hi);
  font-weight: 700;
}

.autocap-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(14, 20, 32, 0.72);
  border: 1px solid rgba(201, 162, 82, 0.25);
}

.autocap-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--gold-hi);
}

.autocap-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ac-chip {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.88);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.1s ease;
}

.ac-chip:hover {
  border-color: var(--gold-hi);
  color: #fff;
}

.ac-chip.selected {
  background: linear-gradient(180deg, rgba(164, 121, 41, 0.55), rgba(88, 60, 14, 0.8));
  border-color: #fde047;
  color: #fef08a;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.3);
}

.autocap-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid rgba(201, 162, 82, 0.3);
  background: rgba(11, 16, 26, 0.85);
}

/* Poké Mart NPC Shop Modal */
.shop-dialog {
  width: 780px;
  max-width: 95vw;
  max-height: 88vh;
}

.shop-body {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.npc-badge-emblem.shop {
  background: linear-gradient(180deg, #f59e0b, #b45309);
  color: #fffbeb;
  border-color: #fde047;
}

.shop-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-hi);
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(201, 162, 82, 0.28);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 9px;
}

.shop-item-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 31, 46, 0.94), rgba(12, 17, 27, 0.98));
  border: 1px solid rgba(201, 162, 82, 0.35);
}

.shop-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-pot-orb {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.shop-item-name {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
}

.shop-item-owned {
  margin-left: auto;
  font-size: 10.5px;
  font-family: Consolas, monospace;
  color: #93c5fd;
}

.shop-item-desc {
  font-size: 10.5px;
  color: var(--text-soft);
  line-height: 1.3;
}

.shop-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.shop-price {
  font-size: 12px;
  font-weight: 900;
  font-family: Consolas, monospace;
  color: #fde047;
}

.shop-buy-btns {
  display: flex;
  gap: 4px;
}

/* Prevent Pokéball Bar from overlapping Menu Principal or Chat on narrower screens */
@media (max-width: 1520px) {
  #hud-pokeball-bar {
    left: auto;
    right: 16px;
    transform: none;
    bottom: 92px;
  }
  .capture-hint-btn {
    bottom: 162px;
  }
}

.pb-sprite-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

.pb-sprite-img.sm {
  width: 24px;
  height: 24px;
}


/* ============================================================================
 * Player Level (1-500) EXP Bar, 5-Tab Chat, Auto-Potion & Mobile Touch UI
 * ============================================================================ */
.player-xp-bar {
  margin-left: 20px;
  height: 4px;
  width: 210px;
  border-radius: 999px;
  background: rgba(6, 10, 18, 0.88);
  border: 1px solid rgba(201, 162, 82, 0.45);
  overflow: hidden;
  margin-top: -1px;
}

.player-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #fde047);
  transition: width 0.25s ease;
}

/* 5-Tab Chat Header (Geral, Global, Grupo, Clan, Sistema) */
.chat-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  background: rgba(10, 15, 25, 0.86);
  border: 1px solid rgba(201, 162, 82, 0.42);
  border-bottom: none;
  border-radius: 7px 7px 0 0;
}

.chat-tab {
  flex: 1;
  padding: 4px 6px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
}

.chat-tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.chat-tab.active {
  background: linear-gradient(180deg, rgba(164, 121, 41, 0.55), rgba(82, 56, 14, 0.82));
  color: #fef08a;
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.6);
}

#hud-chat-dock .combat-log {
  max-height: 122px;
  overflow-y: auto;
  border-radius: 0;
  min-height: 54px;
}

.chat-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 900;
  padding: 0 4px;
  border-radius: 3px;
  margin-right: 4px;
}

.chat-tag.ch-global { background: rgba(14, 116, 144, 0.65); color: #bae6fd; }
.chat-tag.ch-group  { background: rgba(21, 128, 61, 0.65); color: #bbf7d0; }
.chat-tag.ch-clan   { background: rgba(126, 34, 206, 0.65); color: #e9d5ff; }
.chat-tag.ch-system { background: rgba(146, 64, 14, 0.65); color: #fde68a; }

/* Auto-Potion Config Section inside #modal-autocapture */
.autopotion-box {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(10, 24, 22, 0.55);
}

.ap-thresholds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ap-slot-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(12, 18, 30, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.3);
}

.ap-slot-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
}

.ap-slot-pct {
  font-family: Consolas, monospace;
  color: #4ade80;
}

.ap-slot-card input[type="range"] {
  width: 100%;
  accent-color: #4ade80;
  cursor: pointer;
}

/* ============================================================================
 * Party / Group Pill, Popover & Incoming Invite Banner
 * ============================================================================ */
.mmo-party-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(14, 24, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}

.mmo-party-pill:hover {
  border-color: var(--gold-hi);
  color: #fef08a;
}

.mmo-party-pill.in-party {
  background: linear-gradient(180deg, rgba(21, 128, 61, 0.85), rgba(14, 72, 38, 0.95));
  border-color: #4ade80;
  color: #dcfce7;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.35);
}

#mmo-party-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 56px;
  width: 295px;
  z-index: 44;
  overflow: hidden;
}

.party-bonus-note {
  padding: 6px 10px;
  font-size: 10px;
  line-height: 1.35;
  color: #bbf7d0;
  background: rgba(16, 48, 32, 0.65);
  border-bottom: 1px solid rgba(74, 222, 128, 0.25);
}

.party-invite-form {
  display: flex;
  gap: 5px;
  padding: 7px 8px;
  border-top: 1px solid rgba(201, 162, 82, 0.24);
  background: rgba(10, 15, 26, 0.72);
}

.party-invite-form input {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 5px;
  border: 1px solid rgba(201, 162, 82, 0.42);
  background: rgba(6, 10, 18, 0.95);
  color: #f8fafc;
  font-size: 11px;
  outline: none;
  user-select: text;
}

.party-pop-foot {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.mmo-player-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.party-prox {
  font-size: 9px;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 4px;
  margin-left: 3px;
}

.party-prox.near {
  background: rgba(21, 128, 61, 0.45);
  color: #86efac;
}

.party-prox.far {
  background: rgba(51, 65, 85, 0.55);
  color: #94a3b8;
}

.gold-mini-btn.danger {
  background: linear-gradient(180deg, rgba(153, 27, 27, 0.85), rgba(88, 16, 16, 0.95));
  border-color: rgba(248, 113, 113, 0.7);
  color: #fecaca;
}

.party-invite-banner {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #fef08a;
  max-width: calc(100vw - 20px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.8), 0 0 18px rgba(74, 222, 128, 0.35);
}

.party-invite-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ============================================================================
 * Login Remember-Me, Google Sign-In, RO Character Creation & Transmog Styles
 * ============================================================================ */
.dock-drawer-toggle {
  display: none;
}

.npc-dot.transmog {
  background: #f472b6;
  box-shadow: 0 0 10px #ec4899;
}

.login-remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
  cursor: pointer;
  margin-top: -2px;
  user-select: none;
}

.login-remember-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #eab308;
  cursor: pointer;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 8px;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(201, 162, 82, 0.25);
}

.google-login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.google-login-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1f2937;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.google-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(255, 255, 255, 0.22);
}

/* Ragnarok Character Creation / Transmog Modal */
.cc-dialog {
  width: 820px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.cc-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 14px;
  padding: 14px;
  overflow-y: auto;
}

.cc-stage-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cc-ro-stage {
  position: relative;
  height: 290px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(201, 162, 82, 0.65);
  background: #0d1526;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.65);
}

.cc-ro-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  pointer-events: none;
}

#cc-preview-canvas {
  position: relative;
  z-index: 2;
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.72));
}

.cc-turn-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid rgba(201, 162, 82, 0.55);
}

.cc-ro-icon-btn {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}

.cc-ro-icon-btn:hover {
  transform: scale(1.18);
}

.cc-ro-icon-btn img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.cc-stage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cc-summary-tag {
  font-size: 11px;
  font-weight: 700;
  color: #fde68a;
  font-family: Consolas, monospace;
}

.cc-controls-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.cc-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(14, 21, 35, 0.82);
  border: 1px solid rgba(201, 162, 82, 0.28);
}

.cc-group label {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-hi);
}

.cc-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cc-val-pill {
  font-size: 10.5px;
  font-family: Consolas, monospace;
  color: #93c5fd;
  font-weight: 700;
}

.cc-group input[type="text"],
.cc-group select {
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.45);
  background: rgba(7, 11, 20, 0.96);
  color: #f8fafc;
  font-size: 12px;
  outline: none;
  user-select: text;
}

.cc-gender-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cc-gender-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  background: rgba(12, 18, 30, 0.9);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.cc-gender-btn.active {
  border-color: #fde047;
  background: linear-gradient(180deg, rgba(130, 94, 24, 0.45), rgba(44, 30, 10, 0.85));
  color: #fef08a;
}

.cc-gender-btn img {
  height: 22px;
  width: auto;
  image-rendering: pixelated;
}

.cc-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-stepper input[type="range"] {
  flex: 1;
  accent-color: #eab308;
  cursor: pointer;
}

.cc-swatches-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
}

.cc-swatch-btn {
  height: 22px;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s ease;
}

.cc-swatch-btn:hover {
  transform: scale(1.12);
  border-color: #ffffff;
}

.cc-swatch-btn.active {
  border-color: #fde047;
  box-shadow: 0 0 0 2px #0f172a, 0 0 10px #fde047;
  transform: scale(1.14);
}

.cc-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(201, 162, 82, 0.3);
  background: rgba(10, 15, 26, 0.88);
}

.cc-confirm-btn {
  padding: 8px 18px;
  font-size: 12.5px;
}

/* ============================================================================
 * Mobile Touch Controls & Ultra-Clean Scaled Mobile UI (Portrait + Landscape)
 * ============================================================================ */
#mobile-controls {
  display: none;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 28;
}

.mobile-left-pills {
  pointer-events: none;
  position: fixed;
  left: 5px;
  top: 84px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mobile-pill-btn {
  pointer-events: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 22, 36, 0.9);
  border: 1.5px solid rgba(201, 162, 82, 0.72);
  color: #fef08a;
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

.mobile-pill-btn.fs-btn {
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1.1;
}

.mobile-pill-btn.fs-btn.active {
  background: linear-gradient(180deg, rgba(164, 121, 41, 0.65), rgba(82, 56, 14, 0.9));
  border-color: #fde047;
  color: #fffbeb;
}

.touch-joystick {
  pointer-events: auto;
  position: fixed;
  left: 10px;
  bottom: 10px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  touch-action: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.touch-joy-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 28, 44, 0.3), rgba(10, 14, 24, 0.7));
  border: 2px solid rgba(201, 162, 82, 0.6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.touch-joy-knob {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f7df99, #a47929 75%);
  border: 2px solid #fffbeb;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
  transform: translate(0px, 0px);
  will-change: transform;
}

.touch-actions {
  pointer-events: none;
  position: fixed;
  right: 8px;
  bottom: 46px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.touch-skills-row {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.touch-skill-btn {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 9px;
  border: 2px solid rgba(201, 162, 82, 0.85);
  background: #0d1320;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.72);
  flex-shrink: 0;
  transition: transform 0.08s ease, opacity 0.12s ease;
}

.touch-skill-btn:active {
  transform: scale(0.92);
}

.touch-skill-btn.on-cd {
  opacity: 0.68;
}

.touch-skill-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.touch-skill-tag {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 8px;
  font-weight: 900;
  font-family: Consolas, monospace;
  color: #fff;
  text-shadow: 0 1px 3px #000, 0 0 4px #000;
  pointer-events: none;
  z-index: 2;
}

.touch-cd-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  font-family: Consolas, monospace;
  color: #fde047;
  z-index: 3;
  pointer-events: none;
}

.touch-main-btns {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.touch-btn {
  border-radius: 999px;
  border: 1.5px solid rgba(201, 162, 82, 0.78);
  background: linear-gradient(180deg, rgba(28, 38, 56, 0.92), rgba(12, 18, 30, 0.96));
  color: #fef08a;
  font-weight: 800;
  touch-action: manipulation;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  cursor: pointer;
}

.touch-btn.sm {
  padding: 5px 7px;
  font-size: 9.5px;
}

.touch-btn.attack {
  padding: 6px 10px;
  font-size: 10px;
  background: linear-gradient(180deg, rgba(194, 88, 12, 0.94), rgba(110, 44, 8, 0.98));
  border-color: #fde047;
  color: #fffbeb;
}

.touch-btn.attack:active {
  transform: scale(0.94);
}

.touch-btn.capture {
  padding: 6px 10px;
  font-size: 10px;
  background: linear-gradient(180deg, rgba(160, 42, 32, 0.92), rgba(76, 18, 16, 0.96));
  border-color: #fde047;
}

.touch-btn.capture.ready {
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.85);
}

/* Shared Mobile / Touch / Narrow / Short-Landscape Overrides (Reduced Scale + Drawer + Compact Target!) */
@media (pointer: coarse), (max-width: 900px), (max-height: 520px) {
  #mobile-controls {
    display: block;
  }

  #hud-quest,
  .compass-zoom-stack,
  .trainer-loc-strip,
  .loc-ecology {
    display: none !important;
  }

  /* Scaled-down top-left trainer header */
  #hud-trainer {
    top: max(4px, env(safe-area-inset-top));
    left: max(5px, env(safe-area-inset-left));
    max-width: calc(100vw - 102px);
  }
  .trainer-medallion {
    width: 34px;
    height: 34px;
    border-width: 2px;
  }
  .trainer-ribbon-col {
    margin-left: -9px;
    gap: 2px;
    min-width: 0;
  }
  .trainer-ribbon {
    padding: 1px 7px 1px 12px;
    font-size: 9.5px;
    gap: 3px;
    min-height: 0;
  }
  .trainer-lv,
  .trainer-name {
    font-size: 9.5px;
  }
  .admin-badge {
    font-size: 8px;
    padding: 0 4px;
  }
  .badge {
    font-size: 7.5px;
    padding: 0 4px;
  }
  .player-xp-bar {
    margin-left: 10px;
    width: 104px;
    height: 2.5px;
  }
  .trainer-eco-row {
    margin-left: 8px;
    gap: 3px;
    flex-wrap: wrap;
  }
  .trainer-money-pill,
  .mmo-online-pill,
  .mmo-party-pill {
    font-size: 8.8px;
    padding: 1px 5px;
  }

  /* Scaled-down top-right minimap */
  #hud-minimap-wrap {
    top: max(4px, env(safe-area-inset-top));
    right: max(5px, env(safe-area-inset-right));
    gap: 2px;
  }
  .minimap-rim-actions {
    gap: 2px;
  }
  .rim-circle-btn {
    width: 21px;
    height: 21px;
  }
  .rim-circle-btn svg {
    width: 11px;
    height: 11px;
  }
  .compass-frame {
    width: 64px;
    height: 64px;
  }
  .minimap-circle-clip {
    width: 48px;
    height: 48px;
  }

  /* Compact Equipe panel — ZERO scrollbar, razor-aligned 4 skill Auto-Use tiles! */
  #hud-party {
    top: 54px;
    left: max(5px, env(safe-area-inset-left));
    width: max-content;
    min-width: 112px;
    max-width: calc(100vw - 10px);
    max-height: none !important;
    overflow: visible !important;
    z-index: 36;
  }
  #hud-party .party-header {
    padding: 3px 7px;
    font-size: 9.5px;
  }
  #hud-party .ui-ico-head {
    width: 14px;
    height: 14px;
  }
  #hud-party .party-active-list {
    padding: 4px;
    gap: 4px;
  }
  #hud-party .party-row-card {
    padding: 4px 5px;
    gap: 5px;
  }
  #hud-party .party-portrait-box {
    width: 32px;
    height: 32px;
  }
  #hud-party .party-mon-name {
    font-size: 10.5px;
  }
  #hud-party .party-mon-lv {
    font-size: 9.5px;
  }
  #hud-party .party-hp-num {
    font-size: 8.5px;
    min-width: 36px;
  }
  #hud-party .party-controls-strip {
    gap: 4px;
  }
  #hud-party .party-skills-strip {
    gap: 3px;
  }
  #hud-party .party-skill-tile {
    width: 24px;
    height: 24px;
  }
  #hud-party .stance-art-btn {
    width: 19px;
    height: 21px;
  }
  #hud-party .stance-art-btn img {
    width: 18px;
    height: 18px;
  }

  /* ULTRA-COMPACT Selected Enemy Target Bar (no clutter, positioned clear of Equipe & Minimap!) */
  #hud-target {
    top: 84px;
    left: 50%;
    transform: translateX(-50%);
    width: min(170px, 46vw);
    min-width: 0;
    padding: 3px 7px;
    gap: 2px;
    border-width: 1px;
  }
  #hud-target .target-top-row {
    gap: 4px;
  }
  #hud-target .target-crosshair,
  #hud-target .target-nature-pill,
  #hud-target .target-types,
  #hud-target .target-moves-line {
    display: none !important;
  }
  #hud-target .target-name-wrap {
    font-size: 9.5px;
    gap: 3px;
    min-width: 0;
  }
  #hud-target #target-name {
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #hud-target .target-lv-pill {
    font-size: 8px;
    padding: 0 3px;
  }
  #hud-target .target-hp-text {
    font-size: 8px;
    white-space: nowrap;
  }
  #hud-target .target-hp-bar {
    height: 4px;
  }
  #hud-target .combat-chips-row {
    gap: 2px;
    flex-wrap: nowrap;
    overflow: hidden;
    max-height: 14px;
  }
  #hud-target .combat-chip {
    font-size: 7px;
    padding: 0 3px;
    white-space: nowrap;
  }

  /* Prompts cleanly bounded inside viewport */
  #portal-hint,
  #npc-hint,
  .capture-hint-btn {
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    bottom: 136px;
    max-width: calc(100vw - 16px);
    font-size: 9.5px;
    padding: 4px 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Chat toggleable overlay drawer on mobile */
  #hud-chat-dock {
    left: 6px;
    right: 6px;
    top: 112px;
    bottom: auto;
    width: auto;
    max-width: 320px;
    z-index: 42;
  }
  #hud-chat-dock:not(.mobile-open) {
    display: none;
  }
  #hud-chat-dock .combat-log {
    max-height: 22dvh;
  }

  /* Safe bounded popovers on mobile */
  #mmo-online-popover,
  #mmo-party-popover,
  #config-popover {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    top: 48px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: 320px !important;
    max-height: 68dvh !important;
    overflow-y: auto !important;
    z-index: 55 !important;
  }

  /* Collapsible Bottom-Right Menu Drawer (recolhe os botões do canto inferior direito!) */
  #hud-dock-wrap {
    left: auto;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    z-index: 40;
  }
  .dock-drawer-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1.5px solid rgba(201, 162, 82, 0.82);
    background: linear-gradient(180deg, rgba(32, 42, 62, 0.94), rgba(12, 18, 30, 0.98));
    color: #fef08a;
    font-size: 10.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
    touch-action: manipulation;
  }
  #hud-dock-wrap.dock-drawer-closed #hud-dock {
    display: none !important;
  }
  #hud-dock {
    display: grid;
    grid-template-columns: repeat(3, 52px);
    gap: 4px;
    padding: 5px;
    border-radius: 10px;
    background: rgba(11, 17, 28, 0.96);
    border: 1.5px solid rgba(201, 162, 82, 0.72);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.85);
    order: -1;
  }
  .dock-tile {
    width: 52px;
    height: 44px;
    padding: 2px;
    gap: 1px;
    box-sizing: border-box;
  }
  .dock-art {
    width: 19px;
    height: 19px;
  }
  .dock-tile span.rpg-font {
    font-size: 7.5px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .dock-badge {
    font-size: 7.5px;
    padding: 0 3px;
    top: 1px;
    right: 2px;
  }

  /* Compact Pokéball bar cleanly centered above Joystick & Touch Actions */
  #hud-pokeball-bar {
    top: auto;
    bottom: 136px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 2px 4px;
    gap: 3px;
    max-width: calc(100vw - 12px);
    overflow-x: auto;
    box-sizing: border-box;
  }
  .pokeball-slots {
    gap: 2px;
    flex-shrink: 0;
  }
  .pokeball-slot-btn {
    width: 26px;
    height: 28px;
    padding: 1px;
    flex-shrink: 0;
  }
  .pb-sprite-img {
    width: 15px;
    height: 15px;
  }
  .pb-badge,
  .pb-count {
    font-size: 7px;
  }
  .pokeball-auto-group {
    flex-direction: row;
    gap: 2px;
    flex-shrink: 0;
  }
  .pokeball-auto-group .gold-mini-btn {
    padding: 2px 5px;
    font-size: 8.5px;
    white-space: nowrap;
  }

  /* Fullscreen-friendly touch modals */
  .modal {
    padding: 5px;
  }
  .modal-dialog,
  .pd-dialog,
  .areas-dialog,
  .shop-dialog,
  .autocap-dialog,
  .starter-dialog,
  .storage-dialog,
  .bag-dialog,
  .tp-npc-dialog,
  .cc-dialog {
    width: calc(100vw - 10px) !important;
    max-width: calc(100vw - 10px) !important;
    height: auto !important;
    max-height: 92dvh !important;
    box-sizing: border-box;
  }
  .modal-header {
    padding: 7px 10px;
  }
  .modal-header h2 {
    font-size: 13px;
  }
  .pd-squad-bar {
    grid-template-columns: repeat(3, 1fr);
    padding: 5px 7px;
    gap: 4px;
  }
  .pd-body,
  .worldmap-layout,
  .tp-npc-layout,
  .cc-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .cc-ro-stage {
    height: 190px;
  }
  #cc-preview-canvas {
    width: 160px;
    height: 160px;
  }
  .pd-equipped-slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  .starter-cards-grid,
  .ap-thresholds-grid {
    grid-template-columns: 1fr;
  }
  .party-invite-banner {
    top: 46px;
    padding: 5px 9px;
    font-size: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Dedicated Mobile LANDSCAPE Layout (short height <= 520px, wide width) */
@media (max-height: 520px) and (orientation: landscape) {
  #hud-trainer {
    top: 4px;
    left: max(6px, env(safe-area-inset-left));
    max-width: calc(100vw - 110px);
  }
  .trainer-medallion {
    width: 28px;
    height: 28px;
  }
  .trainer-ribbon {
    padding: 1px 6px 1px 10px;
    font-size: 8.8px;
  }
  .trainer-lv,
  .trainer-name {
    font-size: 8.8px;
  }
  .player-xp-bar {
    width: 90px;
    height: 2px;
  }
  .trainer-eco-row {
    margin-left: 6px;
    gap: 2px;
  }
  .trainer-money-pill,
  .mmo-online-pill,
  .mmo-party-pill {
    font-size: 8.2px;
    padding: 1px 5px;
  }

  #hud-minimap-wrap {
    top: 4px;
    right: max(6px, env(safe-area-inset-right));
  }
  .compass-frame {
    width: 54px;
    height: 54px;
  }
  .minimap-circle-clip {
    width: 40px;
    height: 40px;
  }
  .rim-circle-btn {
    width: 19px;
    height: 19px;
  }

  #hud-party {
    top: 48px;
    left: max(6px, env(safe-area-inset-left));
    max-height: none !important;
    overflow: visible !important;
  }
  .mobile-left-pills {
    top: 70px;
    left: max(6px, env(safe-area-inset-left));
  }
  .mobile-pill-btn {
    padding: 2px 7px;
    font-size: 8.8px;
  }
  .mobile-pill-btn.fs-btn {
    padding: 2px 6px;
    font-size: 10.5px;
  }
  #hud-chat-dock {
    top: 94px;
    max-width: 280px;
  }

  /* Compact Target bar tucked at top-center in landscape! */
  #hud-target {
    top: 4px;
    width: 166px;
    padding: 2px 6px;
  }

  /* Bottom-left joystick tucked cleanly into corner */
  .touch-joystick {
    left: max(10px, env(safe-area-inset-left));
    bottom: 8px;
    width: 74px;
    height: 74px;
  }
  .touch-joy-knob {
    width: 32px;
    height: 32px;
  }

  /* Bottom-center compact Pokéball strip cleanly between Joystick and Bottom-Right Actions/Drawer */
  #hud-pokeball-bar {
    bottom: 8px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 2px 4px;
    gap: 2px;
    max-width: calc(100vw - 295px);
  }
  .pokeball-slot-btn {
    width: 24px;
    height: 26px;
  }
  .pb-sprite-img {
    width: 13px;
    height: 13px;
  }
  .pokeball-auto-group .gold-mini-btn {
    padding: 2px 4px;
    font-size: 8px;
  }

  /* Bottom-right drawer toggle + actions above it */
  #hud-dock-wrap {
    right: max(8px, env(safe-area-inset-right));
    bottom: 8px;
  }
  .dock-drawer-toggle {
    padding: 4px 10px;
    font-size: 9.5px;
  }
  .touch-actions {
    right: max(8px, env(safe-area-inset-right));
    bottom: 40px;
    gap: 4px;
  }
  .touch-skill-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  .touch-btn.sm {
    padding: 4px 6px;
    font-size: 9px;
  }
  .touch-btn.attack {
    padding: 5px 8px;
    font-size: 9.5px;
  }
  .touch-btn.capture {
    padding: 5px 9px;
    font-size: 9.5px;
  }

  #portal-hint,
  #npc-hint,
  .capture-hint-btn {
    top: 38px;
    bottom: auto;
    padding: 3px 8px;
    font-size: 9px;
  }

  /* Side-by-side compact modals in landscape */
  .pd-squad-bar {
    grid-template-columns: repeat(6, 1fr);
    padding: 4px 8px;
  }
  .pd-body {
    grid-template-columns: 235px 1fr;
  }
  .worldmap-layout {
    grid-template-columns: 1fr 215px;
  }
  .tp-npc-layout,
  .cc-body {
    grid-template-columns: 230px 1fr;
  }
  .cc-ro-stage {
    height: 220px;
  }
}


/* ============================================================================
 * Admin Badge, World Map Info Panel, Teleporter NPC Modal & Clean Time UI
 * ============================================================================ */
.admin-badge {
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, #fde047, #ca8a04);
  color: #1c1404;
  border: 1px solid #fef9c3;
  letter-spacing: 0.04em;
}

.npc-dot.teleporter {
  background: #c084fc;
  box-shadow: 0 0 10px #a855f7;
}

.npc-badge-emblem.tp {
  background: linear-gradient(180deg, #a855f7, #6b21a8);
  color: #faf5ff;
  border-color: #e9d5ff;
}

/* World Map 2-Column Layout with Selected Quadrant Spawn Panel */
.worldmap-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 310px;
  overflow: hidden;
}

.worldmap-info-panel {
  border-left: 1px solid rgba(201, 162, 82, 0.32);
  background: rgba(10, 15, 25, 0.92);
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.wm-empty-state {
  margin: auto;
  text-align: center;
  color: var(--gold-hi);
  padding: 16px;
}

.wm-selected-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.wm-sel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wm-sel-head h3 {
  font-size: 16px;
  color: var(--gold-hi);
}

.wm-area-region {
  font-size: 11.5px;
  color: #93c5fd;
  font-weight: 700;
}

.wm-spawns-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold-mid);
  margin-top: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(201, 162, 82, 0.25);
}

.wm-spawns-list {
  flex: 1;
  min-height: 80px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 4px 0;
}

.wm-spawn-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(20, 29, 45, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.34);
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
}

.wm-tp-btn {
  width: 100%;
  padding: 10px 14px;
  font-size: 12.5px;
  margin-top: auto;
}

/* Teleporter NPC Modal */
.tp-npc-dialog {
  width: 900px;
  max-width: 95vw;
  height: 82vh;
}

.tp-npc-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  overflow: hidden;
}

.tp-npc-left {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(201, 162, 82, 0.3);
}

.tp-npc-toolbar {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-bottom: 1px solid rgba(201, 162, 82, 0.25);
  background: rgba(12, 18, 30, 0.72);
}

.tp-npc-toolbar input {
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.45);
  background: rgba(8, 12, 22, 0.94);
  color: var(--text-main);
  font-size: 12px;
  outline: none;
  user-select: text;
}

.tp-npc-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 7px;
  align-content: start;
}

.tp-dest-card {
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(18, 26, 40, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.28);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  transition: all 0.12s ease;
}

.tp-dest-card:hover,
.tp-dest-card.selected {
  border-color: #c084fc;
  background: rgba(59, 24, 96, 0.45);
}

.tp-dest-name {
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
}

.tp-dest-meta {
  font-size: 10px;
  color: var(--text-soft);
}

.tp-npc-right {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  background: rgba(10, 14, 24, 0.72);
}

.tp-npc-confirm-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tp-npc-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Cleaner, More Intuitive Time (Details) Modal */
.pd-squad-pill {
  position: relative;
}

.pd-sp-swap-btn {
  margin-top: 3px;
  padding: 2px 6px;
  font-size: 9.5px;
  border-radius: 4px;
  border: 1px solid rgba(201, 162, 82, 0.55);
  background: rgba(24, 34, 52, 0.95);
  color: #fde68a;
  font-weight: 800;
  cursor: pointer;
}

.pd-sp-swap-btn:hover {
  background: rgba(164, 121, 41, 0.55);
  border-color: #fde047;
}

.pd-equipped-panel {
  padding: 10px 14px;
  background: rgba(11, 17, 28, 0.9);
  border-bottom: 1px solid rgba(201, 162, 82, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pd-eq-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-hi);
}

.pd-slot-target-hint {
  font-size: 11px;
  font-weight: 800;
  color: #161108;
  background: linear-gradient(180deg, #fde047, #ca8a04);
  padding: 2px 9px;
  border-radius: 999px;
}

.pd-equipped-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.pd-eq-slot-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(18, 26, 40, 0.94);
  border: 1.5px solid rgba(201, 162, 82, 0.35);
  cursor: pointer;
  transition: all 0.12s ease;
}

.pd-eq-slot-card:hover {
  border-color: var(--gold-hi);
}

.pd-eq-slot-card.picking {
  background: linear-gradient(180deg, rgba(130, 94, 24, 0.48), rgba(44, 30, 10, 0.85));
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.pd-eq-slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.pd-eq-slot-mid {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pd-equip-one-btn {
  padding: 5px 10px;
  font-size: 11px;
  white-space: nowrap;
}

.pd-equipped-tag {
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(21, 128, 61, 0.45);
  border: 1px solid #4ade80;
  color: #bbf7d0;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

/* Mobile modal layout overrides handled cleanly in the Portrait + Landscape blocks above */

/* ============================================================================
 * UI Scale Slider & Interactive Drag-to-Reposition "Editar UI" Mode
 * ============================================================================ */
:root {
  --ui-scale: 1;
}

.config-ui-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(10, 16, 28, 0.85);
  border: 1px solid rgba(201, 162, 82, 0.34);
}

.config-ui-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-hi);
}

.config-ui-val {
  font-family: Consolas, monospace;
  color: #7dd3fc;
  font-size: 11px;
}

#ui-scale-slider {
  width: 100%;
  accent-color: #eab308;
  cursor: pointer;
}

.config-ui-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* Smooth scalable HUD roots (never scales #viewport or modals!) */
#hud-trainer:not([data-ui-custom="1"]) { transform: scale(var(--ui-scale, 1)); transform-origin: top left; }
#hud-party:not([data-ui-custom="1"]) { transform: scale(var(--ui-scale, 1)); transform-origin: top left; }
#hud-minimap-wrap:not([data-ui-custom="1"]) { transform: scale(var(--ui-scale, 1)); transform-origin: top right; }
#hud-quest:not([data-ui-custom="1"]) { transform: scale(var(--ui-scale, 1)); transform-origin: top right; }
#hud-chat-dock:not([data-ui-custom="1"]) { transform: scale(var(--ui-scale, 1)); transform-origin: bottom left; }
#hud-dock-wrap:not([data-ui-custom="1"]) { transform: scale(var(--ui-scale, 1)); transform-origin: bottom right; }
/* Joystick stays strictly locked at 100% size regardless of UI scale slider! */
#touch-joystick { transform: none !important; }
#touch-actions:not([data-ui-custom="1"]) { transform: scale(var(--ui-scale, 1)); transform-origin: bottom right; }
.mobile-left-pills:not([data-ui-custom="1"]) { transform: scale(var(--ui-scale, 1)); transform-origin: top left; }
#hud-target:not([data-ui-custom="1"]) { transform: translateX(-50%) scale(var(--ui-scale, 1)); transform-origin: top center; }
#hud-pokeball-bar:not([data-ui-custom="1"]) { transform: translateX(-50%) scale(var(--ui-scale, 1)); transform-origin: bottom center; }

@media (max-width: 1520px) and (min-width: 901px) and (min-height: 521px) {
  #hud-pokeball-bar:not([data-ui-custom="1"]) {
    transform: scale(var(--ui-scale, 1));
    transform-origin: bottom right;
  }
}

/* Popovers as direct children of body -> clean viewport-fixed positioning on desktop & mobile */
#mmo-online-popover {
  position: fixed;
  top: 94px;
  left: 74px;
  width: 280px;
  z-index: 55;
}

#mmo-party-popover {
  position: fixed;
  top: 94px;
  left: 74px;
  width: 295px;
  z-index: 55;
  overflow: hidden;
}

#config-popover {
  position: fixed;
  right: 16px;
  bottom: 92px;
  width: 292px;
  z-index: 55;
}

.ui-edit-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 11.5px;
  color: #fef08a;
  max-width: calc(100vw - 24px);
  flex-wrap: wrap;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.88), 0 0 18px rgba(250, 204, 21, 0.4);
  border-color: #fde047 !important;
}

.ui-edit-banner-btns {
  display: flex;
  gap: 6px;
}

body.ui-edit-mode .ui-draggable {
  outline: 2px dashed #fde047 !important;
  outline-offset: 2px;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.35) !important;
  cursor: grab !important;
  pointer-events: auto !important;
  touch-action: none !important;
  user-select: none !important;
}

body.ui-edit-mode .ui-draggable.ui-dragging {
  cursor: grabbing !important;
  outline-color: #4ade80 !important;
  box-shadow: 0 0 22px rgba(74, 222, 128, 0.55) !important;
  z-index: 95 !important;
}

body.ui-edit-mode .ui-draggable * {
  pointer-events: none !important;
}

body.ui-edit-mode .ui-draggable::after {
  content: attr(data-ui-label);
  position: absolute;
  top: -15px;
  left: 0;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #fde047;
  color: #fef08a;
  font-size: 9px;
  font-weight: 800;
  font-family: 'Segoe UI', sans-serif;
  white-space: nowrap;
  pointer-events: none;
  z-index: 99;
}

/* ============================================================================
 * Evolution System, Shiny +10% Badge & Party Evo Ready Pill
 * ============================================================================ */
.pd-shiny-badge {
  font-size: 9.5px;
  font-weight: 900;
  color: #1c1303;
  background: linear-gradient(180deg, #fef08a, #eab308);
  border: 1px solid #fffbeb;
  border-radius: 999px;
  padding: 1px 7px;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.55);
  white-space: nowrap;
}

.party-evo-pill {
  font-size: 9.5px;
  font-weight: 900;
  color: #161108;
  background: linear-gradient(180deg, #a7f3d0, #10b981);
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid #d1fae5;
  cursor: pointer;
  animation: pulseGold 1.8s ease-in-out infinite;
}

.pd-evo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 38, 52, 0.9), rgba(14, 22, 34, 0.96));
  border: 1px solid rgba(250, 204, 21, 0.45);
}

.pd-evo-hint {
  font-size: 11px;
  color: #fde68a;
  font-weight: 600;
}

.pd-evolve-btn {
  padding: 4px 10px !important;
  font-size: 11px !important;
  white-space: nowrap;
}

.evolve-dialog {
  width: min(680px, calc(100vw - 24px));
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
}

.evo-options-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  overflow-y: auto;
}

.evo-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(24, 34, 52, 0.92), rgba(12, 18, 30, 0.96));
  border: 1.5px solid rgba(201, 162, 82, 0.42);
  text-align: center;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.evo-option-card.ready {
  border-color: #fde047;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.25);
}

.evo-option-card canvas {
  width: 84px;
  height: 84px;
  image-rendering: pixelated;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.16), transparent 70%);
  border-radius: 50%;
}

.evo-opt-name {
  font-size: 14px;
  font-weight: 800;
  color: #fef3c7;
}

.evo-opt-req {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.evo-opt-req.ready {
  border-color: #4ade80;
  color: #86efac;
  background: rgba(20, 83, 45, 0.45);
}

.evo-opt-bst {
  font-size: 10.5px;
  color: #94a3b8;
  font-family: Consolas, monospace;
}

.evo-opt-btn {
  width: 100%;
  padding: 6px 10px !important;
  font-size: 11.5px !important;
}

/* ============================================================================
 * Wild Caught Marker, Poké Mart Bulk/Sell Tabs, Trade & Global Market Modals
 * ============================================================================ */
.target-caught-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.target-caught-ico svg {
  width: 14px;
  height: 14px;
  display: block;
}

.shop-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 4px;
  border-bottom: 1px solid rgba(201, 162, 82, 0.25);
  flex-wrap: wrap;
}

.shop-buy-btns {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.shop-buy-btns .gold-mini-btn {
  padding: 3px 6px;
  font-size: 10.5px;
}

.sell-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(12, 18, 30, 0.85);
  border: 1px solid rgba(201, 162, 82, 0.28);
  margin-bottom: 8px;
}

.sell-filters-bar input[type="text"] {
  flex: 1 1 150px;
  min-width: 130px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.35);
  background: rgba(8, 12, 22, 0.92);
  color: #f8fafc;
  font-size: 11.5px;
}

.sell-filters-bar select {
  padding: 5px 7px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.35);
  background: rgba(8, 12, 22, 0.92);
  color: #f8fafc;
  font-size: 11.5px;
}

.sell-filter-lbl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 700;
}

.sell-filter-lbl input[type="number"] {
  width: 56px;
  padding: 4px 5px;
  border-radius: 5px;
  border: 1px solid rgba(201, 162, 82, 0.35);
  background: rgba(8, 12, 22, 0.92);
  color: #fef08a;
  font-size: 11px;
  font-family: Consolas, monospace;
}

.sell-summary-line {
  font-size: 11.5px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.sell-species-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sell-species-group {
  border-radius: 9px;
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.34);
  overflow: hidden;
}

.sell-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(24, 34, 52, 0.92);
  border-bottom: 1px solid rgba(201, 162, 82, 0.22);
  flex-wrap: wrap;
}

.sell-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: #fef3c7;
}

.sell-group-meta {
  font-size: 10.5px;
  color: #94a3b8;
  font-family: Consolas, monospace;
}

.sell-group-list {
  display: flex;
  flex-direction: column;
  divide-y: 1px solid rgba(148, 163, 184, 0.12);
}

.sell-mon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.sell-mon-row:first-child {
  border-top: none;
}

.sell-mon-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #e2e8f0;
}

/* Trade & Global Market Modals */
.trade-invite-banner {
  top: 102px !important;
  border-color: #22d3ee !important;
}

.trade-dialog,
.market-dialog {
  width: min(780px, calc(100vw - 20px));
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
}

.trade-body {
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trade-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
}

.trade-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(14, 21, 34, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.34);
}

.trade-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #fde68a;
}

.trade-status-pill {
  font-size: 10px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}

.trade-status-pill.confirmed {
  background: rgba(20, 83, 45, 0.75);
  border-color: #4ade80;
  color: #bbf7d0;
}

.trade-offer-box {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(8, 13, 24, 0.85);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  color: #94a3b8;
  font-size: 11.5px;
  text-align: center;
}

.trade-arrow-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fde047;
  font-weight: 900;
}

.trade-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trade-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.trade-pick-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(16, 24, 40, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.3);
  cursor: pointer;
  text-align: left;
  color: #f1f5f9;
  font-size: 11.5px;
}

.trade-pick-card:hover,
.trade-pick-card.selected {
  border-color: #fde047;
  background: rgba(34, 48, 72, 0.95);
}

.market-payout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(90deg, rgba(20, 83, 45, 0.55), rgba(15, 23, 42, 0.85));
  border-bottom: 1px solid rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 700;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 10px;
}

.market-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(22, 32, 50, 0.92), rgba(12, 18, 30, 0.96));
  border: 1px solid rgba(201, 162, 82, 0.38);
}

.market-card.shiny {
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.22);
}

.market-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.market-card-name {
  font-size: 13px;
  font-weight: 800;
  color: #fef3c7;
}

.market-card-meta {
  font-size: 11px;
  color: #cbd5e1;
}

.market-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.market-sell-panel {
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(14, 21, 35, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.34);
  margin-bottom: 12px;
}

.market-sell-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.market-sell-form select {
  flex: 1 1 220px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.4);
  background: rgba(8, 12, 22, 0.95);
  color: #f8fafc;
  font-size: 12px;
}

.market-sell-form input[type="number"] {
  width: 155px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 82, 0.4);
  background: rgba(8, 12, 22, 0.95);
  color: #fde047;
  font-size: 12px;
  font-family: Consolas, monospace;
}

@media (max-width: 720px) {
  .trade-arena {
    grid-template-columns: 1fr;
  }
  .trade-arrow-mid {
    transform: rotate(90deg);
  }
}

/* Official Wiki Move Unlock Level Badges & Locked Move Rows */
.pd-move-lv-pill {
  font-size: 10px;
  font-weight: 900;
  font-family: Consolas, monospace;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pd-move-lv-pill.unlocked {
  background: rgba(20, 83, 45, 0.72);
  border: 1px solid #4ade80;
  color: #bbf7d0;
}

.pd-move-lv-pill.locked {
  background: rgba(51, 65, 85, 0.75);
  border: 1px solid #64748b;
  color: #cbd5e1;
}

.pd-move-row.locked {
  opacity: 0.54;
  filter: grayscale(0.45);
}

.pd-locked-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(100, 116, 139, 0.55);
  border-radius: 6px;
  padding: 4px 8px;
  white-space: nowrap;
}

/* ============================================================================
 * World Map (M) Mobile Portrait & Landscape Fix (Overrides Desktop Grid!)
 * ============================================================================ */
@media (pointer: coarse), (max-width: 900px), (max-height: 520px) {
  .worldmap-dialog {
    width: calc(100vw - 10px) !important;
    max-width: calc(100vw - 10px) !important;
    height: 92dvh !important;
    max-height: 92dvh !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .worldmap-layout {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
  .worldmap-stage {
    padding: 6px !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  #worldmap-canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 48dvh !important;
    display: block !important;
  }
  .worldmap-info-panel {
    border-left: none !important;
    border-top: 1px solid rgba(201, 162, 82, 0.35) !important;
    padding: 10px !important;
    flex: 1 0 auto !important;
    overflow-y: visible !important;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .worldmap-dialog {
    height: 95dvh !important;
    max-height: 95dvh !important;
  }
  .worldmap-dialog .modal-header {
    padding: 4px 10px !important;
  }
  .worldmap-dialog .modal-header .modal-sub {
    display: none !important;
  }
  .worldmap-layout {
    display: grid !important;
    grid-template-columns: 1fr 235px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .worldmap-stage {
    padding: 6px !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  #worldmap-canvas {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
  }
  .worldmap-info-panel {
    border-top: none !important;
    border-left: 1px solid rgba(201, 162, 82, 0.35) !important;
    padding: 8px 10px !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
  .wm-sel-head h3 {
    font-size: 13px !important;
  }
}

/* ============================================================================
 * Interactive Milestone Tutorials & Spotlight Highlight
 * ============================================================================ */
.config-tut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.config-tut-grid .gold-mini-btn {
  font-size: 10px;
  padding: 4px 6px;
}

.tutorial-modal {
  z-index: 130 !important;
}

.tutorial-backdrop {
  background: rgba(4, 8, 16, 0.56) !important;
  backdrop-filter: blur(2px) !important;
}

.tutorial-dialog {
  width: min(560px, calc(100vw - 20px));
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  border-color: #fde047 !important;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.88), 0 0 26px rgba(250, 204, 21, 0.28);
}

.tut-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.tut-body {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 1.48;
  color: #e2e8f0;
}

.tut-lead {
  color: #fef3c7;
  font-weight: 600;
}

.tut-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.tut-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(13, 20, 34, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.34);
}

.tut-ico {
  font-size: 18px;
  line-height: 1.1;
  flex-shrink: 0;
}

.tut-card strong {
  display: block;
  color: #fef08a;
  font-size: 12px;
  margin-bottom: 2px;
}

.tut-card span {
  font-size: 11.5px;
  color: #cbd5e1;
}

.tut-dot-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  border: 1.5px solid #0f172a;
}

.tut-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(201, 162, 82, 0.28);
  background: rgba(9, 14, 24, 0.92);
  flex-wrap: wrap;
}

.tut-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tut-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

.tut-dot.active {
  background: #fde047;
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
}

.tut-nav-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tutorial-spotlight-ring {
  outline: 3px solid #fde047 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.85) !important;
  z-index: 135 !important;
}

/* Server Update Applied Popup Modal */
.server-update-modal {
  z-index: 160 !important;
}

.server-update-dialog {
  width: min(490px, calc(100vw - 24px));
  border-color: #fde047 !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.92), 0 0 28px rgba(250, 204, 21, 0.35);
}

.server-update-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #f1f5f9;
}

.server-update-note {
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(20, 83, 45, 0.38);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
  font-size: 12px;
}

.server-update-foot {
  padding: 12px 16px;
  border-top: 1px solid rgba(201, 162, 82, 0.3);
  display: flex;
  justify-content: center;
  background: rgba(9, 14, 24, 0.92);
}

.server-update-btn {
  padding: 9px 22px !important;
  font-size: 13px !important;
}

/* ========================================================================== */
/* Admin Mode Button, Top Bar, Event Rates Banner & Control Panel             */
/* ========================================================================== */
.mmo-admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fef08a;
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.85), rgba(88, 28, 135, 0.92));
  border: 1px solid rgba(250, 204, 21, 0.72);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mmo-admin-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.55);
}

.mmo-admin-pill.active {
  background: linear-gradient(135deg, #ca8a04, #9333ea);
  color: #ffffff;
  border-color: #fde047;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.65);
}

.hud-event-rates {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 44;
  padding: 5px 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.92), rgba(15, 23, 42, 0.94));
  border: 1px solid rgba(250, 204, 21, 0.65);
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-mode-bar {
  position: fixed;
  top: 106px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 56;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-color: rgba(250, 204, 21, 0.85) !important;
  background: linear-gradient(180deg, rgba(46, 16, 101, 0.94), rgba(15, 23, 42, 0.96)) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.72), 0 0 18px rgba(168, 85, 247, 0.32);
  max-width: min(560px, calc(100vw - 24px));
}

.admin-bar-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.admin-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ca8a04, #9333ea);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
}

.admin-free-tag {
  font-size: 11px;
  font-weight: 700;
  color: #86efac;
  background: rgba(20, 83, 45, 0.5);
  border: 1px solid rgba(74, 222, 128, 0.5);
  padding: 2px 7px;
  border-radius: 999px;
}

.admin-npc-move-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(250, 204, 21, 0.28);
  font-size: 12px;
  color: #fef08a;
}

.admin-npc-move-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pokedex-admin-bar {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.52), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(250, 204, 21, 0.55);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #f8fafc;
}

.admin-inline-lbl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: #fef08a;
}

.admin-inline-lbl select,
.admin-inline-lbl input {
  background: rgba(10, 16, 28, 0.95);
  border: 1px solid rgba(201, 162, 82, 0.55);
  color: #f8fafc;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 12px;
  width: 68px;
}

.admin-inline-lbl select {
  width: auto;
}

.admin-inline-chk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-weight: 700;
  color: #fde047;
}

.admin-dialog {
  width: min(760px, calc(100vw - 20px));
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
}

.admin-body {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}

.admin-rate-card {
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(14, 22, 38, 0.92);
  border: 1px solid rgba(201, 162, 82, 0.36);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-rate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.admin-rate-cur {
  color: #fde047;
  font-size: 13.5px;
}

.admin-rate-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-rate-controls input[type="number"] {
  width: 76px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(8, 13, 24, 0.95);
  border: 1px solid rgba(201, 162, 82, 0.55);
  color: #fef08a;
  font-weight: 800;
  font-size: 13px;
}

.admin-rate-presets {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.admin-actions-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(201, 162, 82, 0.22);
}

.admin-players-toolbar,
.admin-npcs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-players-list,
.admin-npcs-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.admin-player-row,
.admin-npc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.admin-player-info,
.admin-npc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-player-name,
.admin-npc-name {
  font-size: 13px;
  font-weight: 800;
  color: #fef3c7;
}

.admin-player-meta,
.admin-npc-meta {
  font-size: 11.5px;
  color: #cbd5e1;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.shop-price.adm-free {
  color: #4ade80 !important;
  font-weight: 900;
}

.config-logout-btn {
  width: 100%;
  justify-content: center;
  padding: 7px 10px !important;
  font-size: 12px !important;
}

/* ========================================================================== */
/* Social Pill, Top Player Interaction Bar, Clan, Item Trade & PvP Duel       */
/* ========================================================================== */
.mmo-social-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fde68a;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.94));
  border: 1px solid rgba(250, 204, 21, 0.55);
  cursor: pointer;
}

.mmo-social-pill:hover {
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.social-req-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.player-interact-bar {
  position: fixed;
  top: 102px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 62;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-color: rgba(56, 189, 248, 0.85) !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(9, 14, 24, 0.98)) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.78), 0 0 18px rgba(56, 189, 248, 0.3);
  max-width: calc(100vw - 24px);
}

.pi-target-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f8fafc;
  font-size: 13px;
}

.pi-clan-tag {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(139, 92, 246, 0.32);
  border: 1px solid rgba(167, 139, 250, 0.75);
  color: #ddd6fe;
  font-size: 11px;
  font-weight: 800;
}

.pi-target-lv {
  font-size: 11px;
  font-weight: 800;
  color: #fde047;
  background: rgba(202, 138, 4, 0.25);
  padding: 1px 6px;
  border-radius: 999px;
}

.pi-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.trade-lv-warn {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.55);
  border: 1px solid rgba(248, 113, 113, 0.75);
  color: #fecaca;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.social-dialog,
.clan-npc-dialog,
.duel-dialog {
  width: min(720px, calc(100vw - 20px));
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
}

.social-clan-empty {
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #e2e8f0;
  font-size: 13px;
}

.clan-header-card {
  padding: 11px 14px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.38), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(167, 139, 250, 0.55);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.clan-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 15px;
  color: #fef3c7;
}

.clan-rank-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(202, 138, 4, 0.3);
  border: 1px solid rgba(250, 204, 21, 0.65);
  color: #fef08a;
}

.clan-motto-text {
  font-size: 12px;
  color: #cbd5e1;
  font-style: italic;
}

.clan-create-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clan-create-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
}

.clan-create-form input {
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(8, 13, 24, 0.94);
  border: 1px solid rgba(201, 162, 82, 0.45);
  color: #f8fafc;
  font-size: 13px;
}

.clan-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}

.clan-ranks-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 11.5px;
  color: #cbd5e1;
}

.clan-rank-select {
  background: rgba(8, 13, 24, 0.95);
  border: 1px solid rgba(201, 162, 82, 0.55);
  color: #fef08a;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 700;
}

.itrade-coins-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(201, 162, 82, 0.35);
  margin: 8px 0;
  font-size: 12px;
  color: #fef08a;
  font-weight: 700;
}

.itrade-coins-row input {
  width: 120px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(8, 13, 24, 0.95);
  border: 1px solid rgba(201, 162, 82, 0.55);
  color: #fde047;
  font-weight: 800;
}

.duel-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.duel-arena-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.duel-fighter-card {
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.48);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.duel-fighter-card.opp {
  border-color: rgba(248, 113, 113, 0.55);
}

.duel-fighter-owner {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}

.duel-fighter-name {
  font-size: 15px;
  color: #fef3c7;
}

.duel-hp-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.9);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.duel-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #4ade80);
  transition: width 0.25s ease;
}

.duel-hp-fill.opp {
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.duel-hp-txt {
  font-size: 11.5px;
  font-weight: 800;
  color: #e2e8f0;
}

.duel-squad-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.duel-vs-badge {
  font-size: 18px;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.6);
}

.duel-moves-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.duel-move-btn {
  padding: 9px 11px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(28, 39, 61, 0.95), rgba(14, 20, 34, 0.98));
  border: 1px solid rgba(201, 162, 82, 0.5);
  color: #f8fafc;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.duel-move-btn:hover:not(:disabled) {
  border-color: #fde047;
  background: rgba(45, 58, 86, 0.95);
}

.duel-move-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.duel-log {
  max-height: 120px;
  overflow-y: auto;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(6, 10, 18, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 11.5px;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ========================================================================== */
/* HUD Potions Strip, Grid Icon Inventory + Tooltip & Mentorship Banner       */
/* ========================================================================== */
.hud-bar-sep {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, rgba(201, 162, 82, 0.65), transparent);
  flex-shrink: 0;
}

.hud-potion-slots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.potion-slot-btn {
  border-color: rgba(148, 163, 184, 0.42);
}

.potion-slot-btn:hover:not(.empty) {
  border-color: var(--pot-color, #4ade80);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.28);
}

.potion-svg-icon {
  display: block;
  flex-shrink: 0;
}

.bag-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 7px;
  padding: 10px;
  border-radius: 9px;
  background: rgba(8, 13, 24, 0.86);
  border: 1px solid rgba(201, 162, 82, 0.34);
}

.bag-inv-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(26, 35, 52, 0.95), rgba(13, 19, 31, 0.98));
  border: 1.5px solid rgba(201, 162, 82, 0.38);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.12s ease, transform 0.1s ease, box-shadow 0.12s ease;
}

.bag-inv-slot:hover:not(.empty-slot) {
  border-color: var(--item-accent, #fde047);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.32);
  transform: translateY(-1px);
}

.bag-inv-slot.equipped {
  border-color: #fde047;
  box-shadow: inset 0 0 10px rgba(250, 204, 21, 0.28);
}

.bag-inv-slot.empty-slot {
  background: rgba(10, 15, 25, 0.55);
  border: 1px dashed rgba(148, 163, 184, 0.16);
  cursor: default;
}

.bag-inv-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bag-inv-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}

.bag-inv-emoji {
  font-size: 26px;
  line-height: 1;
}

.bag-inv-qty {
  position: absolute;
  right: 4px;
  bottom: 3px;
  font-family: Consolas, monospace;
  font-size: 10.5px;
  font-weight: 900;
  color: #fef08a;
  background: rgba(2, 6, 23, 0.88);
  border: 1px solid rgba(201, 162, 82, 0.45);
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.3;
  pointer-events: none;
}

.bag-item-tooltip {
  position: fixed;
  z-index: 240;
  width: 248px;
  padding: 10px 12px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.98), rgba(8, 12, 22, 0.99)) !important;
  border-color: rgba(250, 204, 21, 0.72) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
}

.bit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.bit-name {
  font-size: 13px;
  font-weight: 800;
}

.bit-cat {
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.72);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.bit-qty {
  font-size: 11px;
  color: #e2e8f0;
}

.bit-desc {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.35;
}

.bit-eff {
  font-size: 11px;
  font-weight: 700;
  color: #86efac;
}

.bit-price {
  font-size: 10.5px;
  font-family: Consolas, monospace;
  color: #fde68a;
}

.bit-hint {
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 10.5px;
  color: #7dd3fc;
}

.mentor-info-banner {
  padding: 9px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.42), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.52);
  color: #e0f2fe;
  font-size: 12px;
  line-height: 1.4;
}

.trainer-clan-rank-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.65));
}

.pd-eq-slot-card[draggable="true"] {
  cursor: grab;
  user-select: none;
}

.pd-eq-slot-card[draggable="true"]:active {
  cursor: grabbing;
}

.pd-eq-drag-handle {
  font-size: 11px;
  color: rgba(203, 213, 225, 0.6);
  letter-spacing: -1px;
  margin-right: 2px;
}

.pd-eq-slot-card.dragging {
  opacity: 0.42;
  transform: scale(0.96);
}

.pd-eq-slot-card.drag-over {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.55), inset 0 0 14px rgba(56, 189, 248, 0.22);
  transform: translateY(-2px);
}

.party-recall-btn {
  padding: 2px 7px !important;
  font-size: 10px !important;
  border-color: rgba(56, 189, 248, 0.65) !important;
  color: #bae6fd !important;
  background: linear-gradient(180deg, rgba(14, 48, 84, 0.92), rgba(9, 26, 48, 0.96)) !important;
  white-space: nowrap;
}

.party-recall-btn:hover {
  border-color: #7dd3fc !important;
  color: #f0f9ff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.38);
}

.touch-btn.recall {
  border-color: rgba(56, 189, 248, 0.72);
  color: #bae6fd;
}

.wm-party-here {
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(12, 42, 78, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.72);
  color: #bae6fd;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
}

/* =========================================================================
   Pokédex Spawn Locations & Direct Teleport UI
   ========================================================================= */
.poke-grid {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
}

.poke-card-spawns {
  width: 100%;
  margin-top: 2px;
  padding: 5px 6px;
  border-radius: 6px;
  background: rgba(8, 14, 24, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.poke-spawn-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.2px;
}

.poke-spawn-chips {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.poke-spawn-chip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  background: rgba(14, 42, 72, 0.72);
  color: #e0f2fe;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poke-spawn-chip:hover {
  background: rgba(2, 132, 199, 0.48);
  border-color: #7dd3fc;
  transform: translateY(-1px);
}

.poke-spawn-lv {
  font-size: 9px;
  font-weight: 600;
  color: #fde68a;
  flex-shrink: 0;
}

.poke-spawn-more {
  font-size: 9.5px;
  color: #94a3b8;
  text-align: center;
  padding-top: 1px;
}

.poke-spawn-legendary {
  font-size: 10px;
  font-weight: 700;
  color: #fde047;
  text-align: center;
  line-height: 1.3;
}

.poke-spawn-none {
  font-size: 10px;
  color: #94a3b8;
  text-align: center;
}

.pd-spawns-panel {
  padding: 9px 14px;
  background: rgba(10, 17, 30, 0.92);
  border-bottom: 1px solid rgba(201, 162, 82, 0.32);
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.pd-spawns-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-hi);
}

.pd-spawns-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pd-spawns-count {
  font-size: 10.5px;
  font-weight: 700;
  color: #bae6fd;
  background: rgba(14, 42, 72, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.48);
  padding: 2px 8px;
  border-radius: 999px;
}

.pd-spawns-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
  padding-right: 2px;
}

.pd-spawns-panel.is-pokedex .pd-spawns-list {
  max-height: 205px;
}

.pd-spawn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(18, 28, 44, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.24);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.pd-spawn-row:hover {
  border-color: rgba(247, 223, 153, 0.55);
  background: rgba(24, 38, 60, 0.96);
}

.pd-spawn-row.is-here {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(14, 46, 32, 0.72);
}

.pd-spawn-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pd-spawn-title {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.pd-spawn-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-spawn-id {
  font-size: 9.5px;
  font-family: Consolas, monospace;
  color: #94a3b8;
  flex-shrink: 0;
}

.pd-spawn-meta {
  font-size: 10px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-spawn-tp-btn {
  flex-shrink: 0;
  font-size: 10.5px !important;
  padding: 4px 8px !important;
  white-space: nowrap;
}

.pd-spawn-special-note {
  grid-column: 1 / -1;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(18, 28, 44, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.4;
}

.pd-spawn-special-note.legendary {
  background: rgba(69, 26, 3, 0.55);
  border-color: rgba(250, 204, 21, 0.5);
  color: #fef08a;
}

@media (max-width: 780px) {
  .pd-spawns-list {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Pokémon Favorite / Lock Protection UI (Storage, Details, Shop Sell, Trade)
   ========================================================================= */
.pd-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(18, 28, 44, 0.88);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.pd-fav-btn:hover {
  border-color: #fbbf24;
  color: #fef08a;
}

.pd-fav-btn.is-fav {
  background: linear-gradient(180deg, rgba(161, 98, 7, 0.85), rgba(113, 63, 18, 0.92));
  border-color: #facc15;
  color: #fef08a;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.28);
}

.st-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.82);
  color: #94a3b8;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.12s ease;
}

.st-fav-btn:hover {
  border-color: #fbbf24;
  color: #fef08a;
  transform: scale(1.06);
}

.st-fav-btn.is-fav {
  background: linear-gradient(180deg, rgba(161, 98, 7, 0.9), rgba(113, 63, 18, 0.95));
  border-color: #facc15;
  color: #fef08a;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.32);
}

.storage-slot-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.storage-card.is-favorite,
.storage-slot-card.is-favorite {
  border-color: rgba(250, 204, 21, 0.72) !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.16);
}

.sell-mon-row.is-locked {
  background: rgba(69, 26, 3, 0.32);
  border-color: rgba(250, 204, 21, 0.42);
}

.sell-mon-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fav-lock-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fef08a;
  background: rgba(161, 98, 7, 0.65);
  border: 1px solid rgba(250, 204, 21, 0.68);
}

.trade-pick-card.locked {
  opacity: 0.55;
  cursor: not-allowed !important;
  border-color: rgba(250, 204, 21, 0.4) !important;
}

@media (max-width: 900px), (max-height: 520px) {
  .hud-potion-slots {
    gap: 2px;
    flex-shrink: 0;
  }
  .hud-bar-sep {
    height: 22px;
  }
  .potion-slot-btn .potion-svg-icon {
    width: 14px;
    height: 14px;
  }
}
