@import url("./oldschool-battle-stage.css");

:root {
  --bg-0: #070b16;
  --bg-1: #0d1526;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --text: #e6eefc;
  --text-dim: #7c8aa5;
  --panel: rgba(13, 21, 38, 0.72);
  --panel-border: rgba(56, 189, 248, 0.18);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background:
    radial-gradient(1200px 800px at 50% -10%, #142139 0%, transparent 60%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  color: var(--text);
}

/* Scene fills the entire viewport; HUD windows float above it. */
#game {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

.teleport-splash {
  position: fixed;
  inset: 0;
  z-index: 7500;
  pointer-events: none;
  background: #071018;
  opacity: 1;
  transition: opacity var(--splash-reveal-ms, 400ms) ease;
}

.teleport-splash.is-blocking {
  pointer-events: auto;
}

.teleport-splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.teleport-splash[hidden] {
  display: none;
}

.teleport-splash__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.teleport-splash__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity var(--splash-crossfade-ms, 1400ms) ease,
    transform 12s ease-out;
  will-change: opacity, transform;
}

.teleport-splash__img.is-visible {
  opacity: 1;
  transform: scale(1);
}

.teleport-splash__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 16, 24, 0.42) 0%, rgba(7, 16, 24, 0.08) 40%, rgba(7, 16, 24, 0.28) 100%),
    linear-gradient(180deg, rgba(7, 16, 24, 0.22) 0%, rgba(7, 16, 24, 0.12) 45%, rgba(7, 16, 24, 0.55) 100%);
}

.teleport-splash__loading {
  position: absolute;
  left: 50%;
  bottom: clamp(48px, 12vh, 120px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(7, 16, 24, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.teleport-splash__spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: teleport-splash-spin 0.75s linear infinite;
}

.teleport-splash__loading-text {
  margin: 0;
}

.teleport-splash__progress {
  width: min(280px, 70vw);
  height: 3px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.28);
  overflow: hidden;
}

.teleport-splash__progress-fill {
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: #38bdf8;
  transition: transform 180ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .teleport-splash__img {
    transition: none;
    transform: none;
  }

  .teleport-splash__spinner {
    animation: none;
    opacity: 0.65;
  }

  .teleport-splash,
  .teleport-splash__progress-fill {
    transition: none;
  }
}

/* ---- Draggable window chrome -------------------------------------------- */
.window {
  position: fixed;
  z-index: 200;
  display: flex;
  flex-direction: column;
  /* width: 232px; */
  max-height: calc(100vh - 32px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  user-select: none;
  overflow: hidden;
}

/* Panels hosted inside the game menu keep their inner spacing only;
   positioning is handled by the menu pages. */
#win-party-field .hud__control {
  margin-bottom: 2px;
}

#win-party-field .hud__control-label {
  font-size: 11px;
  margin-bottom: 4px;
}

#win-party-field .hud__symbiosis-hint {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.3;
}

#win-party-field .party-field {
  margin-top: 4px;
  padding-top: 0;
  border-top: none;
}

#win-bag .window__body {
  overflow-x: hidden;
}
#win-bag .hud__symbiosis-hint {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Legacy center skill bar ÃÂ¢Ã¢ÂÂ¬Ã¢ÂÂ replaced by party-roster 2ÃÂÃ¢ÂÂ2 moves. */
#win-skills {
  display: none !important;
}

.window[hidden] { display: none; }

.window.is-dragging {
  cursor: grabbing;
  box-shadow:
    0 0 0 1px var(--accent),
    0 30px 70px rgba(0, 0, 0, 0.6);
}

.window__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  cursor: grab;
  touch-action: none;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0.02));
  border-bottom: 1px solid var(--panel-border);
}

.window.is-dragging .window__bar { cursor: grabbing; }

.window__title {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.window__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.window__collapse {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 15px;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.window__collapse:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.window__body {
  padding: 14px 16px;
  overflow-y: auto;
}

.window.is-collapsed .window__body { display: none; }

.window__close {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 15px;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.window__close:hover {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
}

/* ---- Player HUD: top status bar ------------------------------------------ */
.hud-topbar {
  position: fixed;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 220;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.hud-topbar__side {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.hud-topbar__side--right {
  align-items: flex-start;
  justify-content: flex-end;
}

.hud-topbar__side--left {
  align-items: flex-start;
  gap: 10px;
}

.hud-topbar__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  font-size: 13px;
  line-height: 1;
}

.hud-chip b {
  font-weight: 650;
  letter-spacing: 0.02em;
}

.hud-chip svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent);
}

.hud-chip--zone {
  max-width: min(520px, 62vw);
  font-size: 14px;
  letter-spacing: 0.04em;
  min-width: 0;
}

.hud-chip--zone b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-zone__track {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.92;
}

.hud-zone__level {
  flex: 0 0 auto;
  margin-left: 2px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hud-chip[hidden] {
  display: none;
}

.hud-topbar__biome-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.hud-chip--biome {
  max-width: min(220px, 30vw);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.hud-chip--biome b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.hud-chip--coords {
  flex: 0 0 auto;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.hud-chip--coords b {
  font-weight: 500;
}

.hud-shrine-compass {
  display: none;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: 2px;
  padding-left: 6px;
  border-left: 1px solid rgba(124, 138, 165, 0.45);
  opacity: 0.9;
}

.hud-shrine-compass:not([hidden]) {
  display: inline-flex;
}

.hud-shrine-compass__arrow {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 50%;
  transition: transform 0.35s ease, color 0.25s ease;
}

.hud-shrine-compass__type {
  flex: 0 0 auto;
  min-width: 14px;
  min-height: 14px;
  cursor: default;
}

.hud-shrine-compass__type .type-shield-icon {
  width: 14px;
  height: 14px;
}

.hud-shrine-compass__dist {
  flex: 0 0 auto;
  min-width: 2.5em;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  white-space: nowrap;
}

.hud-chip--clock {
  gap: 6px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.hud-chip--clock > b {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hud-clock__icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle at 35% 35%, #fde68a 0%, #f59e0b 55%, #b45309 100%);
}

.hud-chip--clock[data-period="afternoon"] .hud-clock__icon {
  background: radial-gradient(circle at 30% 30%, #fdba74 0%, #ea580c 50%, #9a3412 100%);
}

.hud-chip--clock[data-period="night"] .hud-clock__icon {
  background:
    radial-gradient(circle at 62% 38%, rgba(15, 23, 42, 0.92) 0 38%, transparent 40%),
    radial-gradient(circle at 40% 40%, #e2e8f0 0%, #94a3b8 45%, #334155 100%);
}

.hud-clock__period {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hud-chip--weather {
  gap: 4px;
  min-height: 34px;
  padding: 6px 10px 8px;
}

.hud-weather-forecast {
  position: relative;
  display: inline-block;
  width: 84px;
  height: 26px;
  vertical-align: middle;
}

.hud-weather-forecast__pointer {
  position: absolute;
  left: 50%;
  top: -1px;
  z-index: 2;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #d97706;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.hud-weather-forecast__mask {
  overflow: hidden;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
}

.hud-weather-forecast__track {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  will-change: transform;
}

.hud-weather-forecast__slot {
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  opacity: 0.72;
}

/* Midpoint tick between icons (center of the 8px gap). */
.hud-weather-forecast__slot:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(124, 138, 165, 0.7);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hud-weather-forecast__slot .hud-wx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hud-weather-forecast__slot[data-weather="clear"] .hud-wx--clear,
.hud-weather-forecast__slot[data-weather="cloudy"] .hud-wx--cloudy,
.hud-weather-forecast__slot[data-weather="rain"] .hud-wx--rain,
.hud-weather-forecast__slot[data-weather="blizzard"] .hud-wx--blizzard,
.hud-weather-forecast__slot[data-weather="sandstorm"] .hud-wx--sandstorm,
.hud-weather-forecast__slot[data-weather="fog"] .hud-wx--fog,
.hud-weather-forecast__slot[data-weather="gale"] .hud-wx--gale {
  display: block;
}

.hud-weather-forecast__slot[data-weather="clear"] {
  color: #d97706;
}

.hud-weather-forecast__slot[data-weather="cloudy"] {
  color: #64748b;
}

.hud-weather-forecast__slot[data-weather="rain"] {
  color: #0284c7;
}

.hud-weather-forecast__slot[data-weather="blizzard"] {
  color: #7dd3fc;
}

.hud-weather-forecast__slot[data-weather="sandstorm"] {
  color: #d97706;
}

.hud-weather-forecast__slot[data-weather="fog"] {
  color: #7c6ba8;
}

.hud-weather-forecast__slot[data-weather="gale"] {
  color: #94a3b8;
}

.hud-weather-forecast__slot[data-intensity="strong"] .hud-wx {
  stroke-width: 2.35;
  filter: drop-shadow(0 0 2px currentColor);
}

.hud-weather-forecast__slot[data-intensity="strong"]::before {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 1;
}

.hud-weather-forecast__slot[data-intensity="weak"] {
  opacity: 0.62;
}

.hud-weather-forecast__slot[data-weather="clear"] .hud-wx--clear {
  fill: rgba(251, 191, 36, 0.35);
}

.hud-weather-forecast__slot[data-weather="cloudy"] .hud-wx--cloudy {
  fill: rgba(148, 163, 184, 0.35);
}

.hud-weather-forecast__slot[data-weather="rain"] .hud-wx--rain {
  fill: rgba(125, 211, 252, 0.28);
}

.hud-weather-forecast__slot[data-weather="blizzard"] .hud-wx--blizzard {
  fill: rgba(186, 230, 253, 0.35);
}

.hud-weather-forecast__slot[data-weather="sandstorm"] .hud-wx--sandstorm {
  fill: rgba(251, 191, 36, 0.28);
}

.hud-weather-forecast__slot[data-weather="fog"] .hud-wx--fog {
  fill: rgba(167, 139, 250, 0.28);
}

.hud-weather-forecast__slot[data-weather="gale"] .hud-wx--gale {
  fill: rgba(148, 163, 184, 0.28);
}

.hud-wind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 42px;
  height: 20px;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(124, 138, 165, 0.45);
  color: var(--text-dim);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.hud-wind__arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 50%;
  transition: transform 0.35s ease;
}

.hud-wind__strength {
  min-width: 24px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
}

.hud-clock__fps {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-left: 2px;
  padding-left: 8px;
  border-left: 1px solid rgba(124, 138, 165, 0.45);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hud-clock__fps b {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: none;
}

.hud-server-dot {
  align-self: center;
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  flex: 0 0 auto;
}

.hud-server-dot[data-online="1"] {
  background: #22c55e;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 0 6px rgba(34, 197, 94, 0.55);
}

.hud-chip--money b {
  color: #fde68a;
}

.hud-chip--online b {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ---- PokÃÂ© Radar (left of online chip) ------------------------------------ */
.poke-radar-host {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
  max-width: min(46vw, 260px);
}

.poke-radar-host[hidden] {
  display: none !important;
}

.poke-radar {
  --poke-radar-cols: 1;
  --poke-radar-cell-w: 30px;
  --poke-radar-cell-h: 38px;
  --poke-radar-gap: 3px;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 2px;
  padding: 4px 6px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  max-width: 100%;
  overflow: hidden;
}

.poke-radar:hover,
.poke-radar:focus-within {
  opacity: 1;
}

.poke-radar[hidden] {
  display: none !important;
}

.poke-radar.is-empty {
  min-width: 36px;
  min-height: 36px;
  opacity: 0.55;
}

.poke-radar.is-empty:hover,
.poke-radar.is-empty:focus-within {
  opacity: 1;
}

.poke-radar__toggle {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.12);
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.poke-radar__toggle:hover {
  background: rgba(15, 23, 42, 0.22);
}

.poke-radar__toggle:focus-visible {
  outline: 2px solid rgba(34, 197, 94, 0.7);
  outline-offset: 1px;
}

.poke-radar.is-minimized {
  align-items: center;
  padding: 4px 6px;
  gap: 6px;
}

.poke-radar.is-minimized .poke-radar__grid {
  display: none;
}

.poke-radar__title {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.poke-radar__title[hidden] {
  display: none !important;
}

.poke-radar__grid {
  display: grid;
  grid-template-rows: repeat(4, var(--poke-radar-cell-h));
  grid-auto-flow: column;
  grid-auto-columns: var(--poke-radar-cell-w);
  gap: var(--poke-radar-gap);
  max-height: calc(4 * var(--poke-radar-cell-h) + 3 * var(--poke-radar-gap));
  max-width: 100%;
  overflow: hidden;
}

.poke-radar__cell {
  position: relative;
  width: var(--poke-radar-cell-w);
  height: var(--poke-radar-cell-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  padding: 1px 1px 0;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
  overflow: visible;
  contain: layout;
  cursor: pointer;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.poke-radar__cell:not(.has-rate) {
  justify-content: center;
  padding-bottom: 1px;
}

.poke-radar__cell:focus-visible {
  outline: 2px solid rgba(34, 197, 94, 0.7);
  outline-offset: 1px;
}

.poke-radar__cell:hover {
  background: rgba(15, 23, 42, 0.18);
}

.poke-radar__cell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1.5px rgba(22, 101, 52, 0.45);
}

.poke-radar__cell.is-water-rate::after {
  box-shadow: inset 0 0 0 1.5px rgba(3, 105, 161, 0.55);
}

.poke-radar__cell.is-fixed::after {
  box-shadow: inset 0 0 0 1.5px rgba(180, 83, 9, 0.7);
}

.poke-radar__cell.is-fixed:not(.has-rate)::after {
  box-shadow: inset 0 0 0 1.5px rgba(180, 83, 9, 0.8);
}

.poke-radar__face {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 5px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.35);
}

.poke-radar__cell .pokemon-portrait {
  --portrait-size: 22px;
}

.poke-radar__pin {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff7c2 0%, #f59e0b 45%, #92400e 100%);
  box-shadow:
    0 0 0 1.5px rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.4);
  z-index: 2;
  pointer-events: none;
}

.poke-radar__pin::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.poke-radar__pin[hidden] {
  display: none !important;
}

.poke-radar__ball {
  position: absolute;
  left: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #ef4444 0 48%, #111 48% 52%, #f8fafc 52% 100%);
  box-shadow:
    0 0 0 1.5px rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.35);
  z-index: 2;
  pointer-events: none;
}

.poke-radar__ball::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 0 0 1px #111;
}

.poke-radar__ball[hidden] {
  display: none !important;
}

.poke-radar__rate {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #14532d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  flex: 0 0 auto;
  padding-bottom: 1px;
}

.poke-radar__cell.is-water-rate .poke-radar__rate {
  color: #0c4a6e;
}

.poke-radar__cell.is-fixed .poke-radar__rate {
  color: #92400e;
}

/* Dex tiers Ã¢ÂÂ unseen gray / seen blue / caught full */
.poke-radar__cell.is-dex-unseen .pokemon-portrait {
  filter: grayscale(1) brightness(0.88) contrast(0.95);
  opacity: 0.78;
}

.poke-radar__cell.is-dex-unseen .poke-radar__face {
  background: rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.35);
}

.poke-radar__cell.is-dex-unseen:not(.is-fixed)::after {
  box-shadow: inset 0 0 0 1.5px rgba(100, 116, 139, 0.65);
}

.poke-radar__cell.is-dex-unseen .poke-radar__rate {
  color: #475569;
}

.poke-radar__cell.is-dex-seen .pokemon-portrait {
  filter: saturate(0.55) brightness(0.95) contrast(1.05);
}

.poke-radar__cell.is-dex-seen .poke-radar__face {
  background: rgba(59, 130, 246, 0.18);
}

.poke-radar__cell.is-dex-seen:not(.is-fixed)::after {
  box-shadow: inset 0 0 0 1.5px rgba(37, 99, 235, 0.65);
}

.poke-radar__cell.is-dex-seen .poke-radar__rate {
  color: #1e3a8a;
}

.poke-radar__cell.is-dex-caught .pokemon-portrait {
  filter: none;
}

.poke-radar__cell.is-dex-caught .poke-radar__face {
  background: rgba(239, 68, 68, 0.12);
}

.poke-radar__cell.is-dex-caught:not(.is-fixed)::after {
  box-shadow: inset 0 0 0 1.5px rgba(185, 28, 28, 0.55);
}

.poke-radar__rate[hidden] {
  display: none !important;
}

.poke-radar.is-wide {
  max-width: min(56vw, 300px);
  --poke-radar-cell-w: 26px;
  --poke-radar-cell-h: 34px;
  --poke-radar-gap: 2px;
  overflow: hidden;
}

.poke-radar.is-wide .poke-radar__grid {
  overflow: hidden;
}

/* Rich hover card for radar slots */
.poke-radar-hover {
  position: fixed;
  z-index: 9710;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 196px;
  max-width: min(280px, calc(100vw - 16px));
  padding: 10px 12px;
  color: #f8fafc;
  background: rgba(9, 15, 28, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.poke-radar-hover[hidden] {
  display: none !important;
}

.poke-radar-hover.is-dex-unseen {
  border-color: rgba(100, 116, 139, 0.45);
}

.poke-radar-hover.is-dex-seen {
  border-color: rgba(59, 130, 246, 0.55);
}

.poke-radar-hover.is-dex-caught {
  border-color: rgba(239, 68, 68, 0.5);
}

.poke-radar-hover__face {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.poke-radar-hover.is-dex-unseen .poke-radar-hover__face {
  background: rgba(148, 163, 184, 0.22);
}

.poke-radar-hover.is-dex-unseen .pokemon-portrait {
  filter: grayscale(1) brightness(0.9) contrast(0.95);
  opacity: 0.82;
}

.poke-radar-hover.is-dex-seen .pokemon-portrait {
  filter: saturate(0.7);
}

.poke-radar-hover.is-dex-caught .pokemon-portrait {
  filter: none;
}

.poke-radar-hover__face .pokemon-portrait {
  --portrait-size: 72px;
}

.poke-radar-hover__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

.poke-radar-hover__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #f8fafc;
}

.poke-radar-hover.is-dex-unseen .poke-radar-hover__name {
  letter-spacing: 0.12em;
  color: #cbd5e1;
}

.poke-radar-hover__dex {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}

.poke-radar-hover__types {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.poke-radar-hover__types:empty {
  display: none;
}

.poke-radar-hover__types .type-icon {
  pointer-events: none;
}

.poke-radar-hover__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}

.poke-radar-hover__badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.poke-radar-hover__badge.is-fixed {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.poke-radar-hover__badge.is-dex-caught {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

.poke-radar-hover__badge.is-dex-seen {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.5);
}

.poke-radar-hover__badge.is-dex-unseen {
  background: rgba(71, 85, 105, 0.35);
  color: #cbd5e1;
  border-color: rgba(100, 116, 139, 0.5);
}

.poke-radar-hover__stat {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: #86efac;
}

.poke-radar-hover__stat.is-water {
  color: #7dd3fc;
}

.hud-chip--team-mode {
  gap: 6px;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-chip--team-mode select {
  max-width: 132px;
  padding: 4px 24px 4px 8px;
  color: var(--text);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  text-transform: none;
}

.hud-chip--team-mode select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.hud-chip--team-mode option {
  color: var(--text);
  background: var(--bg-1);
}

.hud-chip--menu {
  cursor: pointer;
  color: var(--text);
  font: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hud-chip--menu:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.4);
}

.hud-chip--menu kbd {
  margin-left: 2px;
}

/* ---- Area minimap (lives inside left topbar cluster) --------------------- */
.hud-topbar__map-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 auto;
}

/* Minimap + route/biome/clock stack Ã¢ÂÂ log width must not push this row. */
.hud-topbar__map-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 100%;
}

.hud-topbar__map-row .hud-topbar__stack {
  flex: 0 1 auto;
  min-width: 0;
  padding-top: 2px;
}

.area-minimap {
  position: relative;
  flex: 0 0 auto;
  width: var(--area-minimap-size, 220px);
  height: var(--area-minimap-size, 220px);
  padding: 0;
  margin-top: 28px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  cursor: pointer;
  pointer-events: auto;
  overflow: visible;
}

.area-minimap--circular .area-minimap__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  background: #060a14;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 14px 36px rgba(0, 0, 0, 0.5);
}

.area-minimap__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(145deg, rgba(226, 232, 240, 0.55), rgba(71, 85, 105, 0.35) 42%, rgba(148, 163, 184, 0.5) 70%, rgba(30, 41, 59, 0.65));
  -webkit-mask:
    radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask:
    radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.55),
    inset 0 1px 0 rgba(248, 250, 252, 0.35);
}

.area-minimap__north {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translate(-50%, -55%);
  z-index: 3;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 0.68rem/1 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.02em;
  color: #f8fafc;
  background: linear-gradient(180deg, #64748b, #334155);
  border: 1px solid rgba(226, 232, 240, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.area-minimap__header {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  max-width: calc(var(--area-minimap-size, 220px) + 48px);
  pointer-events: none;
  text-align: center;
}

.area-minimap__place {
  font: 700 0.78rem/1.15 "Segoe UI", system-ui, sans-serif;
  color: #e6eefc;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.area-minimap__clock {
  font: 600 0.68rem/1.1 "Segoe UI", system-ui, sans-serif;
  color: rgba(186, 200, 222, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.area-minimap__grain {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: var(--area-minimap-grain-alpha, 0.06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}


/* ---- Battle log (above left utility rail) -------------------------------- */
.battle-log {
  display: flex;
  flex-direction: column;
  width: calc(var(--area-minimap-size, 210px) * 2);
  max-height: 168px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(8, 12, 24, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.battle-log[hidden],
.battle-log.is-menu-hidden {
  display: none !important;
}

.battle-log.is-collapsed {
  max-height: none;
}

.battle-log.is-collapsed .battle-log__entries {
  display: none;
}

.battle-log__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(248, 113, 113, 0.18);
}

.battle-log.is-collapsed .battle-log__bar {
  border-bottom: none;
}

.battle-log__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fda4af;
}

.battle-log__toggle {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  background: transparent;
  color: #fecdd3;
  cursor: pointer;
  line-height: 1;
}

.battle-log__entries {
  max-height: 128px;
  overflow-y: auto;
  padding: 6px 8px;
  font-size: 0.75rem;
  line-height: 1.35;
}

.battle-log__line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 5px;
  color: var(--text-dim, #94a3b8);
  word-break: break-word;
}

.battle-log__line:last-child {
  margin-bottom: 0;
}

.battle-log__faces {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  margin-top: 1px;
}

.battle-log__face.pokemon-portrait {
  --portrait-size: 18px;
  border-radius: 4px;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: none;
  background: rgba(15, 23, 42, 0.78);
}

.battle-log__face.pokemon-portrait.is-shiny {
  border-color: rgba(250, 204, 21, 0.7);
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.35);
}

.battle-log__text {
  min-width: 0;
  flex: 1 1 auto;
}

.battle-log__line--hit,
.battle-log__line--move {
  color: #e2e8f0;
}

.battle-log__line--faint {
  color: #fb7185;
  font-weight: 650;
}

.battle-log__line--status {
  color: #fbbf24;
}

.battle-log__line--damage {
  color: #cbd5e1;
}

@media (max-width: 760px) {
  .battle-log {
    width: min(calc(var(--area-minimap-size, 210px) * 2), 84px);
    max-height: 140px;
  }

  .battle-log__entries {
    max-height: 100px;
  }
}

.hud-utility-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: var(--area-minimap-size, 210px);
  padding-bottom: 6px;
  pointer-events: auto;
}

.hud-utility-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease,
    transform 0.12s ease;
}

.hud-utility-btn__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 16px;
  text-align: center;
  color: #1a1408;
  background: #e8c547;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.hud-utility-btn__badge[hidden] {
  display: none;
}

.hud-utility-btn__level {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  height: 13px;
  padding: 0 4px;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 13px;
  white-space: nowrap;
  color: #06202a;
  background: #38bdf8;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.hud-utility-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--hud-utility-accent, var(--accent));
}

.hud-utility-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.38);
  transform: translateY(-1px);
}

.hud-utility-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.hud-utility-btn.is-resting:not(:disabled) {
  background: rgba(125, 211, 252, 0.16);
  border-color: rgba(125, 211, 252, 0.45);
}

.hud-utility-btn.is-active {
  background: rgba(201, 162, 39, 0.18);
  border-color: rgba(201, 162, 39, 0.55);
}

.hud-utility-btn.is-active:hover:not(:disabled) {
  background: rgba(201, 162, 39, 0.24);
  border-color: rgba(201, 162, 39, 0.7);
}

.hud-utility-btn[hidden] {
  display: none;
}

.hud-utility-rail.is-menu-hidden {
  display: none;
}

.save-menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
}

.save-menu__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.save-menu__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.save-menu__copy {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.82;
}

.save-menu__slot {
  width: 100%;
}

.save-menu__meta-host {
  min-width: 0;
}

.save-menu__actions {
  margin-top: 4px;
}

.save-menu__save-btn.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.save-menu__status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  opacity: 0.85;
}

.save-menu__status.is-ok {
  color: #4ade80;
  opacity: 1;
}

.save-menu__status.is-error {
  color: #f87171;
  opacity: 1;
}

.save-menu__empty {
  margin: 0;
  opacity: 0.75;
}

/* Floating trainer status panel (utility rail). */
.player-status-layer {
  position: fixed;
  z-index: 7200;
  width: min(340px, calc(100vw - 16px));
  max-height: min(86vh, 680px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(12, 18, 32, 0.97), rgba(6, 10, 18, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 44px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.player-status-layer.is-dragging {
  user-select: none;
}

.player-status-layer.is-dragging,
.player-status-layer.is-dragging * {
  cursor: grabbing !important;
}

.player-status-layer[hidden] {
  display: none !important;
}

.player-status {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}

.player-status__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 12px 8px;
  cursor: grab;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.player-status-layer.is-dragging .player-status__bar {
  cursor: grabbing;
}

.player-status__title {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.player-status__close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.player-status__close:hover {
  background: rgba(248, 113, 113, 0.22);
}

.player-status__body {
  display: grid;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  min-height: 0;
}

.player-status__hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.player-status__sprite-stage {
  display: grid;
  place-items: center;
  width: 96px;
  height: 112px;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 78%, rgba(56, 189, 248, 0.18), transparent 62%),
    rgba(2, 6, 16, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.player-status__sprite {
  display: block;
  image-rendering: pixelated;
  max-width: 100%;
  max-height: 100%;
}

.player-status__summary {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.player-status__identity {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.player-status__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-status__level {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #7dd3fc;
}

.player-status__bars {
  gap: 6px;
}

/* Labels longos (Stamina/Fatigue/Cansaço) — party-detail usa 28px p/ HP/PP/EXP */
.player-status__bars .party-detail__bar {
  grid-template-columns: 5.5em 1fr auto;
}

.player-status__bars .party-detail__bar--hearts {
  grid-template-columns: 5.5em 1fr;
}

.player-status__bars .party-detail__bar-tag {
  white-space: nowrap;
}

.player-status__bars .party-detail__bar-value {
  min-width: 5.5em;
}

.player-status__section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.player-status__badges-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.player-status__badges-count {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.player-status__badge-case {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.16), rgba(12, 18, 32, 0.55)),
    rgba(2, 6, 16, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 224, 130, 0.18);
}

.player-status__badge-slot {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.player-status__badge-slot svg {
  width: 100%;
  height: 100%;
  display: block;
}

.player-status__badge-slot.is-empty {
  filter: grayscale(1);
  opacity: 0.28;
}

.player-status__badge-slot.is-earned {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 224, 130, 0.22), transparent 62%),
    rgba(0, 0, 0, 0.28);
  border-color: rgba(201, 162, 39, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 10px rgba(201, 162, 39, 0.18);
}

.player-status__list {
  display: grid;
  gap: 8px;
}

.player-status__list[hidden],
.player-status__empty[hidden] {
  display: none !important;
}

.player-status__empty {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.35;
}

.player-status__skills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.player-status__skills-row.has-points {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(20, 40, 28, 0.55);
}

.player-status__skills-btn {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(180deg, rgba(30, 58, 80, 0.9), rgba(15, 30, 45, 0.95));
  color: #e0f2fe;
  font: inherit;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.player-status__skills-btn:hover {
  border-color: rgba(125, 211, 252, 0.65);
  color: #fff;
}

.player-status__skills-points {
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.3;
}

.player-status__skills-row.has-points .player-status__skills-points {
  color: #86efac;
  font-weight: 600;
}

.player-status__row {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left-width: 3px;
}

.player-status__row.is-good {
  border-left-color: #4ade80;
}

.player-status__row.is-warn {
  border-left-color: #fbbf24;
}

.player-status__row.is-bad {
  border-left-color: #f87171;
}

.player-status__row.is-neutral {
  border-left-color: #38bdf8;
}

.player-status__row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.player-status__row-detail {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-dim);
}

.area-minimap.is-menu-hidden,
.area-minimap[hidden] {
  display: none;
}

.area-minimap__canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  image-rendering: auto;
}

.area-minimap__place-tip {
  position: fixed;
  z-index: 400;
  max-width: min(240px, 70vw);
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: rgba(9, 15, 28, 0.94);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  pointer-events: none;
  white-space: normal;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, calc(-100% - 10px));
}

.area-minimap__place-tip[hidden] {
  display: none;
}

.area-minimap:hover {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.25),
    0 18px 44px rgba(0, 0, 0, 0.5);
}

/* ---- Always-on party HUD (bottom combat strip + active detail) ----------- */
.hud-party {
  --party-slot: clamp(48px, 7.2vmin, 58px);
  --party-detail-portrait: clamp(64px, 9vmin, 78px);
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  z-index: 210;
  width: min(560px, calc(100vw - 24px));
  transform: none;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
  opacity: 0.42;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.hud-party:hover,
.hud-party:focus-within,
.hud-party.is-exp-revealed,
.hud-party.has-active {
  opacity: 1;
}

.party-hud {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(6px, 1.2vmin, 10px);
  width: 100%;
  pointer-events: none;
}

.party-hud__stage {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  pointer-events: none;
}

.party-hud__stage[hidden] {
  display: none !important;
}

.party-combat {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  max-width: 100%;
  pointer-events: none;
}

.party-combat[hidden] {
  display: none !important;
}

.party-combat > .party-combat__detail,
.party-combat > .party-detail__moves {
  pointer-events: auto;
}

.party-combat__detail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}

.party-combat.is-fainted {
  opacity: 0.7;
  filter: grayscale(0.35);
}

.party-combat.is-fused .party-detail__moves--combat {
  border-color: rgba(168, 85, 247, 0.55);
}

.party-combat.is-riding .party-detail__moves--combat {
  border-color: rgba(56, 189, 248, 0.55);
}

.party-combat.is-turn-pick .party-detail__moves--combat {
  border-color: rgba(250, 204, 21, 0.75);
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.25),
    0 0 24px rgba(250, 204, 21, 0.18);
}

.party-combat.is-turn-pick .skill-chip.is-ready:not(:disabled) {
  animation: turn-pick-chip-pulse 0.9s ease-in-out infinite;
}

.party-combat .skill-chip.is-turn-waiting:not(:disabled) {
  opacity: 1;
  filter: none;
}

.party-combat:not(.is-turn-pick) .skill-chip.is-turn-waiting {
  border-color: rgba(148, 163, 184, 0.35);
}

body.turn-pick-active::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  box-shadow: inset 0 0 140px rgba(2, 6, 23, 0.55);
}

@keyframes turn-pick-chip-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.35);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.2);
  }
}

.party-hud__strip.party-roster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 0.8vmin, 8px);
  max-width: min(96vw, 720px);
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(6, 10, 18, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28),
    0 12px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

/* Dual arcs around portraits */
.party-arcs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.party-arcs__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.party-arcs__track {
  fill: none;
  stroke: rgba(15, 23, 42, 0.72);
  stroke-width: 2.6;
  stroke-linecap: round;
}

.party-arcs__fill {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  transition: stroke-dasharray 0.12s linear;
}

.party-arcs__fill.party-arcs__hp {
  stroke: #4ade80;
}

.party-arcs.is-low .party-arcs__fill.party-arcs__hp {
  stroke: #fbbf24;
}

.party-arcs.is-down .party-arcs__fill.party-arcs__hp {
  stroke: #f87171;
}

.party-arcs__fill.party-arcs__exp {
  stroke: #60a5fa;
}

.party-arcs.is-gaining .party-arcs__fill.party-arcs__exp {
  stroke: #facc15;
  filter: drop-shadow(0 0 3px rgba(250, 204, 21, 0.55));
}

.party-arcs.is-max .party-arcs__fill.party-arcs__exp {
  stroke: #a78bfa;
}

/* Compact 6-slot strip */
.party-slot {
  --poke: var(--accent);
  position: relative;
  width: var(--party-slot);
  height: var(--party-slot);
  flex: 0 0 auto;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(9, 15, 28, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.party-slot:hover {
  transform: translateY(-2px) scale(1.04);
}

.party-slot.is-empty {
  opacity: 0.28;
  cursor: default;
  background: rgba(9, 15, 28, 0.22);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.party-slot.is-empty::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 6px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
}

.party-slot.is-out {
  box-shadow:
    inset 0 0 0 1px rgba(234, 248, 176, 0.35),
    0 0 0 2px rgba(234, 248, 176, 0.28);
}

.party-slot.is-recalled {
  opacity: 0.78;
}

.party-slot.is-fainted {
  filter: grayscale(0.85) brightness(0.72);
  opacity: 0.55;
}

.party-slot.is-fused {
  box-shadow:
    0 0 0 2px rgba(168, 85, 247, 0.55),
    0 0 14px rgba(168, 85, 247, 0.35);
}

.party-slot.is-riding {
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.55),
    0 0 14px rgba(56, 189, 248, 0.28);
}

.party-slot__portrait {
  position: absolute;
  inset: 11%;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(2, 6, 16, 0.55);
}

.party-slot__icon {
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.party-slot__icon .pokemon-portrait,
.party-slot__portrait .pokemon-portrait {
  width: 100% !important;
  height: 100% !important;
  --portrait-size: 100%;
}

.party-slot__lv {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 3;
  min-width: 16px;
  padding: 1px 4px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  cursor: pointer;
  pointer-events: auto;
}

.party-slot__lv:hover {
  border-color: rgba(253, 230, 138, 0.7);
  color: #fde68a;
}

.party-slot__status {
  position: absolute;
  left: -2px;
  top: -2px;
  z-index: 3;
  pointer-events: none;
}

.party-slot__status[hidden] {
  display: none !important;
}

/* Expanded card for deployed PokÃÂÃÂ©mon */
.party-detail {
  --poke: var(--accent);
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: min(280px, calc(100vw - 24px));
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(12, 18, 32, 0.92), rgba(6, 10, 18, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  animation: party-detail-in 0.18s ease-out;
}

.party-detail[hidden] {
  display: none !important;
}

@keyframes party-detail-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.party-detail.is-fused {
  border-color: rgba(168, 85, 247, 0.55);
}

.party-detail.is-riding {
  border-color: rgba(56, 189, 248, 0.55);
}

.party-detail.is-fainted {
  opacity: 0.7;
  filter: grayscale(0.4);
}

.party-detail__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.party-detail__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.party-detail__name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.party-detail__status:not([hidden]) {
  display: inline-flex;
}

.party-detail__level {
  flex: 0 0 auto;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  color: #fde68a;
  background: transparent;
  border: none;
  cursor: pointer;
}

.party-detail__level:hover {
  text-decoration: underline;
  color: #fef3c7;
}

.party-detail__bars {
  display: grid;
  gap: 4px;
}

.party-detail__bar {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.party-detail__bar-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.party-detail__bar-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(2, 6, 16, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.party-detail__bar--hp .party-detail__bar-track {
  height: 12px;
}

.party-detail__bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  border-radius: inherit;
  transition: transform 0.12s linear;
}

.party-detail__bar--hp .party-detail__bar-fill {
  transform: scaleX(var(--hp, 1));
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.party-detail__bar--hp.is-low .party-detail__bar-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.party-detail__bar--hp.is-down .party-detail__bar-fill {
  background: #7f1d1d;
}

.party-detail__bar--pp .party-detail__bar-fill {
  transform: scaleX(var(--pp, 1));
  background: linear-gradient(90deg, #1d4ed8, #60a5fa);
}

.party-detail__bar--pp.is-low .party-detail__bar-fill,
.party-detail__bar--pp.is-empty .party-detail__bar-fill {
  background: linear-gradient(90deg, #1e3a8a, #93c5fd);
}

.party-detail__bar--stamina .party-detail__bar-fill {
  transform: scaleX(var(--stamina, 1));
  background: linear-gradient(90deg, #ca8a04, #facc15);
}

.party-detail__bar--stamina.is-low .party-detail__bar-fill,
.party-detail__bar--stamina.is-empty .party-detail__bar-fill {
  background: linear-gradient(90deg, #b45309, #fbbf24);
}

.party-detail__bar--jump .party-detail__bar-fill {
  transform: scaleX(var(--jump, 1));
  background: linear-gradient(90deg, #0f766e, #2dd4bf);
}

.party-detail__bar--jump.is-low .party-detail__bar-fill,
.party-detail__bar--jump.is-empty .party-detail__bar-fill {
  background: linear-gradient(90deg, #115e59, #5eead4);
}

.party-detail__bar--fatigue .party-detail__bar-fill {
  transform: scaleX(var(--fatigue, 0));
  background: linear-gradient(90deg, #9a3412, #fb923c);
}

.party-detail__bar--fatigue.is-low .party-detail__bar-fill {
  background: linear-gradient(90deg, #c2410c, #fdba74);
}

.party-detail__bar--fatigue.is-empty .party-detail__bar-fill {
  background: linear-gradient(90deg, #7f1d1d, #ef4444);
}

/* Corações Zelda (player / humanos) — 20 HP = 1 coração, fill em ¼ */
.party-detail__bar--hearts {
  grid-template-columns: 28px 1fr;
  --heart-fill: #e11d48;
  --heart-empty: rgba(15, 23, 42, 0.55);
  --heart-stroke: rgba(15, 23, 42, 0.9);
}

.party-detail__bar--hearts.is-low {
  --heart-fill: #f59e0b;
}

.party-detail__bar--hearts.is-down {
  --heart-fill: #7f1d1d;
}

.heart-meter__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.heart {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: block;
}

.heart__svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.heart__outline {
  fill: var(--heart-stroke);
}

.heart__fill {
  fill: var(--heart-empty);
}

.heart--full .heart__fill {
  fill: var(--heart-fill);
}

.heart--q1 .heart__fill,
.heart--q2 .heart__fill,
.heart--q3 .heart__fill {
  fill: var(--heart-fill);
  clip-path: inset(0 75% 0 0);
}

.heart--q2 .heart__fill {
  clip-path: inset(0 50% 0 0);
}

.heart--q3 .heart__fill {
  clip-path: inset(0 25% 0 0);
}

.party-detail__bar--exp .party-detail__bar-fill {
  transform: scaleX(var(--exp, 0));
  background: linear-gradient(90deg, #2563eb, #93c5fd);
}

.party-detail__bar--exp.is-gaining .party-detail__bar-fill {
  background: linear-gradient(90deg, #eab308, #fde047, #fef08a, #eab308);
  background-size: 200% 100%;
  animation: exp-gain-shimmer 0.9s linear infinite;
  filter: brightness(1.15);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.45);
}

.party-detail__bar--exp.is-max .party-detail__bar-fill {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.party-detail__bar-value {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  white-space: nowrap;
  text-align: right;
  min-width: 4.5em;
}

.party-detail__bar--hp .party-detail__bar-value {
  color: #86efac;
}

.party-detail__bar--pp .party-detail__bar-value {
  color: #93c5fd;
}

.party-detail__bar--stamina .party-detail__bar-value {
  color: #fde68a;
}

.party-detail__bar--jump .party-detail__bar-value {
  color: #5eead4;
}

.party-detail__bar--fatigue .party-detail__bar-value {
  color: #fdba74;
}

.party-detail__bar--exp .party-detail__bar-value {
  color: #93c5fd;
}

.party-detail__actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
  justify-content: stretch;
}

.party-detail__btn {
  flex: 1 1 0;
  height: 32px;
  margin-left: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
  cursor: pointer;
}

.party-detail__actions .hud__ball-toggle,
.party-detail__actions .hud__ride-toggle,
.party-detail__actions .hud__symbiosis-toggle,
.party-detail__actions .hud__mode-current {
  width: auto;
  height: 32px;
  margin-left: 0;
}

.party-detail__status-btn {
  flex: 1.15 1 0;
  min-width: 0;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.party-detail__status-btn.is-open {
  border-color: color-mix(in srgb, var(--accent) 55%, white);
  color: #e0f2fe;
  background: rgba(14, 116, 144, 0.35);
}

/* Floating status window (sprite + stats + moves). */
.party-status-layer {
  position: fixed;
  z-index: 7200;
  width: min(380px, calc(100vw - 16px));
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(12, 18, 32, 0.97), rgba(6, 10, 18, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 44px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.party-status-layer.is-dragging {
  opacity: 0.97;
  user-select: none;
  pointer-events: auto;
}

.party-status-layer.is-dragging,
.party-status-layer.is-dragging * {
  overscroll-behavior: none;
}

.party-status-layer[hidden] {
  display: none !important;
}

.party-status {
  --poke: var(--accent);
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.party-status[hidden] {
  display: none !important;
}

.party-status__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 12px 8px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  overscroll-behavior: none;
  background: linear-gradient(165deg, rgba(12, 18, 32, 0.97), rgba(10, 15, 26, 0.97));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.party-status__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 12px 0;
  background: linear-gradient(165deg, rgba(12, 18, 32, 0.97), rgba(10, 15, 26, 0.97));
}

.party-status__tab {
  appearance: none;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.65);
  color: var(--text-dim);
  font: 750 11px/1.1 "Figtree", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.party-status__tab:hover {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.4);
}

.party-status__tab.is-active {
  color: #ecfeff;
  border-color: color-mix(in srgb, var(--poke, var(--accent)) 55%, rgba(148, 163, 184, 0.35));
  background: color-mix(in srgb, var(--poke, var(--accent)) 18%, rgba(8, 14, 24, 0.85));
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--poke, var(--accent)) 65%, transparent);
}

.party-status__panel {
  display: grid;
  gap: 10px;
}

.party-status__panel[hidden] {
  display: none !important;
}

.party-status-layer.is-dragging .party-status__bar {
  cursor: grabbing;
}

.party-status__body {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.party-status-layer.is-dragging .party-status__body {
  overflow: hidden;
  pointer-events: none;
}

.party-status__title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.party-status__close {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.party-status__close:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

.party-status__hero {
  display: grid;
  grid-template-columns: minmax(140px, 0.95fr) minmax(0, 1.15fr);
  gap: 12px;
  align-items: stretch;
}

.party-status__sprite-stage {
  position: relative;
  min-height: 188px;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 78%, color-mix(in srgb, var(--poke) 34%, transparent), transparent 58%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.55), rgba(2, 6, 16, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.party-status__sprite {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.party-status__sprite-stage.is-ready .party-status__sprite {
  opacity: 1;
}

.party-status__sprite-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.party-status__sprite-stage.is-ready .party-status__sprite-fallback {
  opacity: 0;
}

.party-status__sprite-fallback .pokemon-portrait {
  --portrait-size: 72px;
}

.party-status__summary {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.party-status__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.party-status__loan-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.4);
}

.party-status__name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.party-status__ailment:not([hidden]) {
  display: inline-flex;
}

.party-status__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.party-status__level {
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
}

.party-status__types {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.party-status__body-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin-top: 2px;
}

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

.party-status__body-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.party-status__body-value {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.party-status__section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.party-status__stat-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.party-status__stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 4px;
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.party-status__stat-row.is-boosted {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(74, 222, 128, 0.28);
}

.party-status__stat-row.is-lowered {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(248, 113, 113, 0.28);
}

.party-status__stat-label {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.party-status__stat-value {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  min-width: 2ch;
  text-align: left;
}

.party-status__stat-value.is-boosted {
  color: #86efac;
}

.party-status__stat-value.is-lowered {
  color: #fca5a5;
}

.party-status__stat-stage {
  min-width: 2.2ch;
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.party-status__stat-stage.is-up {
  color: #4ade80;
}

.party-status__stat-stage.is-down {
  color: #f87171;
}

.party-status__stat-stage[hidden] {
  display: none !important;
}

.party-status__items {
  display: grid;
  gap: 8px;
}

.party-status__items .party-status__section-title {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 8px;
}

.party-status__items-empty {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

.party-status__items-empty[hidden] {
  display: none !important;
}

.party-status__item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.party-status__item-row {
  margin: 0;
  padding: 0;
}

.party-status__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.1s ease,
    opacity 0.15s ease;
}

.party-status__item:hover:not(:disabled),
.party-status__item:focus-visible {
  border-color: rgba(232, 121, 249, 0.5);
  background: rgba(232, 121, 249, 0.1);
  outline: none;
}

.party-status__item:active:not(:disabled) {
  transform: translateY(1px);
}

.party-status__item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.party-status__item.is-used {
  animation: party-status-item-used 0.42s ease-out;
}

@keyframes party-status-item-used {
  0% {
    border-color: rgba(120, 220, 140, 0.85);
    background: rgba(48, 120, 64, 0.35);
  }
  100% {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.55);
  }
}

.party-status__item-icon-wrap {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}

.party-status__item-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.party-status__item-icon--empty {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.35);
}

.party-status__item-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

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

.party-status__item-meta {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

.party-status__item-qty {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #e9d5ff;
}

.party-status__item-action {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f5d0fe;
  min-width: 2.5em;
  text-align: right;
}

.party-status__item:disabled .party-status__item-action {
  color: var(--text-dim);
}

.party-status__equip {
  display: grid;
  gap: 10px;
}

.party-status__equip-slots {
  display: grid;
  gap: 8px;
}

.party-status__equip-slot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px;
  align-items: center;
}

.party-status__equip-slot-label {
  font: 650 11px/1.2 "Figtree", system-ui, sans-serif;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.party-status__equip-slot-btn {
  appearance: none;
  margin: 0;
  min-height: 44px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.55);
  color: #cbd5e1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.party-status__equip-slot-btn.is-filled {
  border-style: solid;
  border-color: color-mix(in srgb, var(--poke, var(--accent)) 45%, rgba(148, 163, 184, 0.35));
  background: color-mix(in srgb, var(--poke, var(--accent)) 10%, rgba(8, 14, 24, 0.65));
}

.party-status__equip-slot-btn:hover,
.party-status__equip-slot-btn:focus-visible {
  border-color: color-mix(in srgb, var(--poke, var(--accent)) 55%, rgba(148, 163, 184, 0.45));
}

.party-status__equip-slot-empty {
  opacity: 0.55;
  font-weight: 700;
}

.party-status__equip-slot-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.party-status__equip-slot-name {
  font: 650 12px/1.2 "Figtree", system-ui, sans-serif;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-status__section-title--sub {
  margin-top: 4px;
}

.party-status__equip-list {
  max-height: 220px;
  overflow: auto;
}

.party-status__equip-pick .party-status__item-action {
  opacity: 0.85;
}

.party-status__equip-pick--held {
  border-color: color-mix(in srgb, #fbbf24 35%, rgba(148, 163, 184, 0.28));
  background: color-mix(in srgb, #fbbf24 8%, rgba(8, 14, 24, 0.72));
}

.party-status__item-qty--held {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: auto;
}

.party-status__equip-holder-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(8, 14, 24, 0.85);
  flex-shrink: 0;
}

.party-status__equip-holder-face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.party-status__equip-held-tag {
  font: 750 10px/1 "Figtree", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fde68a;
}

@media (max-width: 420px) {
  .party-status__hero {
    grid-template-columns: 1fr;
  }

  .party-status__sprite-stage {
    min-height: 170px;
  }
}

.party-detail__btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.party-detail__btn.is-out,
.party-detail__btn.is-riding,
.party-detail__btn.is-fused {
  border-color: color-mix(in srgb, var(--accent) 55%, white);
  color: #e0f2fe;
  background: rgba(14, 116, 144, 0.35);
}

.party-detail__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.party-detail__suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.party-detail__suggest:not([hidden]) {
  display: flex;
}

.party-detail__suggest .hud__item-suggest-btn--icon {
  position: relative;
  width: 40px;
  height: 40px;
  max-width: none;
  padding: 4px;
  justify-content: center;
  gap: 0;
  border-radius: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.28);
}

.party-detail__suggest .hud__item-suggest-icon {
  width: 28px;
  height: 28px;
}

.party-detail__suggest .hud__item-suggest-dot {
  width: 18px;
  height: 18px;
}

.party-detail__suggest .hud__item-suggest-count {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
  background: linear-gradient(180deg, #fff8d6, #f5d56a);
  border: 1px solid rgba(120, 85, 12, 0.45);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  opacity: 1;
}

.party-detail__moves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  align-content: start;
  width: min(228px, calc(100vw - 24px));
  padding: 7px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(12, 18, 32, 0.94), rgba(6, 10, 18, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.party-detail__moves-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 1px;
  padding: 0 2px 4px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.party-detail__moves-label {
  min-width: 0;
}

.party-detail__moves-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.party-detail__moves-info {
  appearance: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-dim);
  font: 800 11px/1 "Figtree", system-ui, sans-serif;
  cursor: pointer;
}

.party-detail__moves-info:hover,
.party-detail__moves-info:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 65%, white);
  color: #fff;
  outline: none;
}

.party-detail__moves-loadout svg {
  width: 10px;
  height: 10px;
  display: block;
  fill: currentColor;
}

.party-detail .party-roster__moves-edit {
  float: none;
  margin: 0;
}

.party-detail .party-roster__move-editor {
  grid-column: 1 / -1;
}

.party-status__moves {
  width: 100%;
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.party-status__skill-btn {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.1);
  color: #5eead4;
  font: 700 12px/1.2 "Figtree", system-ui, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-align: center;
}

.party-status__skill-btn:hover {
  background: rgba(94, 234, 212, 0.18);
  border-color: #5eead4;
}

.party-status__moves .party-detail__moves-title {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: none;
  padding-top: 8px;
}

.party-move-slot {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 4px;
  min-width: 0;
  touch-action: none;
}

.party-move-reorder-hint {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  padding: 0 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-transform: none;
  color: var(--text-dim);
}

.party-move-slot.is-drop-target {
  outline: 2px solid rgba(163, 230, 53, 0.85);
  outline-offset: 2px;
  border-radius: 12px;
}

.party-move-slot .skill-chip.is-drag-source {
  opacity: 0.35;
}

.party-detail__moves.is-reordering {
  cursor: grabbing;
}

.party-move-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 4800;
  margin: 0;
  pointer-events: none;
  opacity: 0.92;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
  transform-origin: top left;
}

.party-move-slot .skill-chip {
  min-width: 0;
}

.party-move-slot__auto {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.72);
  color: #94a3b8;
  font: 800 9px/1 system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease,
    box-shadow 0.12s ease;
}

.party-move-slot__auto.is-on {
  color: #ecfccb;
  border-color: rgba(163, 230, 53, 0.55);
  background: color-mix(in srgb, #65a30d 28%, rgba(15, 23, 42, 0.88));
  box-shadow: 0 0 10px rgba(132, 204, 22, 0.22);
}

.party-move-slot__auto.is-off {
  color: #fdba74;
  border-color: rgba(251, 146, 60, 0.5);
  background: color-mix(in srgb, #c2410c 22%, rgba(15, 23, 42, 0.88));
}

.party-move-slot__auto:hover:not(:disabled) {
  filter: brightness(1.08);
}

.party-move-slot__auto:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 1px;
}

.party-move-slot__auto:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

.party-move-slot:has(.party-move-slot__auto.is-off) .skill-chip {
  filter: saturate(0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(251, 146, 60, 0.22);
}

/* Landscape phones / short viewports */
@media (max-height: 420px), (orientation: landscape) and (max-width: 900px) {
  .hud-party {
    --party-slot: clamp(42px, 9vh, 52px);
    left: max(8px, env(safe-area-inset-left, 0px));
    bottom: max(6px, env(safe-area-inset-bottom, 0px));
    width: min(560px, calc(100vw - 16px));
  }

  .party-hud {
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 10px;
  }

  .party-hud__stage {
    flex: 0 1 auto;
    justify-content: flex-start;
    max-width: min(520px, calc(100vw - 16px));
  }

  .party-detail {
    width: min(260px, 42vw);
    padding: 8px;
    gap: 5px;
  }

  .party-combat {
    gap: 6px;
  }

  .party-detail__moves--combat {
    width: min(200px, 36vw);
    padding: 6px;
    gap: 4px;
  }

  .party-detail__suggest .hud__item-suggest-btn--icon {
    width: 34px;
    height: 34px;
  }

  .party-detail__suggest .hud__item-suggest-icon {
    width: 24px;
    height: 24px;
  }

  .party-hud__strip.party-roster {
    flex: 0 0 auto;
    padding: 4px 6px;
  }
}

@media (max-width: 560px) and (orientation: portrait) {
  .party-detail {
    width: min(280px, calc(100vw - 16px));
  }

  .party-detail__moves--combat {
    width: min(280px, calc(100vw - 16px));
  }
}

/* Legacy class hooks kept for debug editor / emerald theme remnants */
.party-roster__moves-edit {
  padding: 0 3px;
  font-size: 10px;
  line-height: 1.2;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  cursor: pointer;
}

.party-roster__move-editor {
  display: none;
  gap: 4px;
}

.party-roster__move-editor.is-open {
  display: grid;
}

.party-roster__move-select {
  width: 100%;
  font-size: 11px;
}

/* ---- Full-screen tabbed game menu ---------------------------------------- */
.game-menu {
  --botw-menu-bg: rgba(6, 8, 12, 0.78);
  --botw-menu-panel: rgba(10, 12, 16, 0.55);
  --botw-menu-ink: #f5f5f5;
  --botw-menu-dim: rgba(245, 245, 245, 0.55);
  --botw-select: rgba(255, 255, 255, 0.92);
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: flex;
  flex-direction: column;
  padding: 0;
  color: var(--botw-menu-ink);
  background: var(--botw-menu-bg);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.game-menu.is-open:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.game-menu[hidden] {
  display: none;
}

.game-menu__panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.game-menu__top {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 28px 8px;
  flex-shrink: 0;
}

.game-menu__money {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.game-menu__money-gem {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, #5eead4, #059669);
  color: #042f2e;
  font-size: 12px;
  font-weight: 800;
}

.game-menu__tabs {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  padding: 0;
  background: transparent;
  border-bottom: none;
}

.game-menu__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 10px;
  color: var(--botw-menu-dim);
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  transition: color 0.15s ease, opacity 0.15s ease;
  box-shadow: none;
}

.game-menu__tab:hover {
  color: var(--botw-menu-ink);
  background: transparent;
}

.game-menu__tab.is-active {
  color: var(--botw-menu-ink);
  background: transparent;
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--botw-select);
  font-weight: 600;
}

.game-menu__tab kbd {
  display: none;
}

.game-menu__tab--dev,
.game-menu__system-tab--dev {
  opacity: 0.72;
}

.game-menu__tabs-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  justify-self: end;
}

.game-menu__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 245, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: var(--botw-menu-ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.game-menu__close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.game-menu__system-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 4px 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.game-menu__system-rail[hidden] {
  display: none !important;
}

.game-menu__system-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  color: var(--botw-menu-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.game-menu__system-tab.is-active {
  color: var(--botw-menu-ink);
  box-shadow: inset 0 -1px 0 var(--botw-select);
}

.game-menu__system-tab kbd {
  opacity: 0.55;
  font-size: 0.72rem;
}

.game-menu__pages {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 24px 0;
  overflow: hidden;
}

.game-menu.is-map-focus .game-menu__pages {
  padding: 0;
}

.game-menu.is-map-focus .game-menu__system-rail {
  display: none !important;
}

.game-menu__page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-menu__page[hidden] {
  display: none !important;
}

.game-menu__page .window {
  position: static;
  inset: auto;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

.game-menu__page .window__bar {
  display: none;
}

.game-menu__page .window__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: transparent;
  color: var(--botw-menu-ink);
}

.menu-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 28px;
  padding: 12px 16px 18px;
  flex-shrink: 0;
  color: var(--botw-menu-dim);
  font-size: 0.85rem;
}

.menu-prompts kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.4em;
  padding: 2px 6px;
  margin-right: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--botw-menu-ink);
  font-size: 0.75rem;
}

.game-menu__page--dev {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
  overflow: auto;
}

.game-menu__page--dev .window {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
}

.game-menu__page--dev .window__bar {
  display: flex;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-menu__page--map .map__canvas {
  height: min(520px, calc(100vh - 240px));
}

/* Mapa ocupa a tela inteira quando o menu estÃÂ¡ na aba Map */
.game-menu.is-map-focus {
  place-items: stretch;
  padding: 0;
  background: #060a14;
  backdrop-filter: none;
}

.game-menu.is-map-focus .game-menu__panel {
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: #060a14;
}

.game-menu.is-map-focus .game-menu__pages {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.game-menu.is-map-focus .game-menu__page--map {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.game-menu.is-map-focus .game-menu__page--map .window--map {
  position: static;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.game-menu.is-map-focus .game-menu__page--map .window__body,
.game-menu.is-map-focus .map__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.game-menu.is-map-focus .map__viewport {
  position: relative;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.game-menu.is-map-focus .game-menu__page--map .map__canvas {
  width: 100%;
  height: 100%;
}

.game-menu.is-map-focus .map__toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(8, 10, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: auto;
  color: rgba(245, 245, 245, 0.88);
  font-size: 11px;
  /* Painel de ÃÂ­cones abre pra baixo Ã¢ÂÂ nÃÂ£o clipar. */
  overflow: visible;
}

.game-menu.is-map-focus .map__icon-filter {
  margin-left: 0;
}

/* Toolbar no topo: dropdown abre para baixo (antes abria pra cima e sumia). */
.game-menu.is-map-focus .map__icon-panel {
  top: calc(100% + 8px);
  bottom: auto;
  right: 0;
  left: auto;
  z-index: 20;
  max-height: min(70vh, 420px);
  overflow: auto;
}

.game-menu.is-map-focus .map__toolbar-meta {
  white-space: nowrap;
}

.game-menu.is-map-focus .map__toolbar-meta b {
  color: #fff;
}

.game-menu.is-map-focus .map__recenter,
.game-menu.is-map-focus .map__toggle {
  color: rgba(245, 245, 245, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.game-menu.is-map-focus .map__recenter:hover,
.game-menu.is-map-focus .map__toggle:hover,
.game-menu.is-map-focus .map__toggle[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}

.game-menu.is-map-focus .map__journey {
  flex: 0 0 auto;
  z-index: 6;
}

.game-menu.is-map-focus .map__journey.is-hidden,
.game-menu.is-map-focus .map__journey[hidden] {
  display: none;
}

.map__toolbar {
  display: none;
}

.game-menu.is-map-focus .map__toolbar {
  display: flex;
}

.map__journey {
  background: rgba(8, 10, 14, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.game-menu__page .save-menu {
  max-width: 520px;
  margin: 12px auto 24px;
  padding: 8px 4px 24px;
}

.game-menu__page .save-menu__title {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.game-menu__page .save-menu__slot.mmo-login__slot,
.game-menu__page .save-menu__slot {
  padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.game-menu__page .save-menu__save-btn.mmo-login__slot-play,
.game-menu__page .save-menu__save-btn {
  min-width: 160px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
}

.game-menu__page .save-menu__save-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.game-menu__page .game-settings,
.game-menu__page .help__body,
.game-menu__page .about__body,
.game-menu__page .biomes-panel,
.game-menu__page .paint-panel {
  max-width: 920px;
  margin: 0 auto;
  padding-bottom: 20px;
}

.game-menu__page .help__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.game-menu__page .audio-settings,
.game-menu__page .battle-mode-settings {
  padding: 12px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.party-menu__mode-select {
  min-width: 140px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
}

.party-menu .hud__mode-block.party-menu-slot {
  cursor: pointer;
  position: relative;
  overflow: visible;
  isolation: auto;
  border: 2px solid var(--em-card-edge, #17376e);
  border-radius: 10px 32px 32px 10px;
  /* Fundo no ::after — filter no card recortaria o sprite. */
  background: transparent;
  box-shadow: none;
  transition: border-color 0.12s ease;
}

.party-menu .hud__mode-block.party-menu-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.07) 0 2px,
      transparent 2px 4px
    ),
    linear-gradient(180deg, var(--em-card-hi, #63a8e8), var(--em-card-lo, #3c74c4));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(10, 30, 70, 0.35),
    0 4px 0 rgba(0, 0, 0, 0.22);
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}

.party-menu .hud__mode-block.party-menu-slot:hover::after {
  filter: brightness(1.06);
}

.party-menu .hud__mode-block.party-menu-slot.is-menu-selected {
  border-color: #f5f7ff;
  background: transparent;
  box-shadow: none;
}

.party-menu .hud__mode-block.party-menu-slot.is-menu-selected::after {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.1) 0 2px,
      transparent 2px 4px
    ),
    linear-gradient(180deg, #8ec4f4, #5a9ae0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 0 rgba(10, 30, 70, 0.28),
    0 0 0 2px rgba(255, 255, 255, 0.55),
    0 6px 14px rgba(0, 0, 0, 0.28);
  filter: none;
}

.party-menu .hud__mode-block.party-menu-slot.is-recalled {
  opacity: 0.78;
}

.party-menu .hud__mode-block.party-menu-slot.is-recalled::after {
  filter: saturate(0.85);
}

.party-menu .hud__mode-block.party-menu-slot.is-fainted {
  background: transparent;
}

.party-menu .hud__mode-block.party-menu-slot.is-fainted::after {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04) 0 2px,
      transparent 2px 4px
    ),
    linear-gradient(180deg, #5a6a88, #3a4860);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(10, 30, 70, 0.35),
    0 4px 0 rgba(0, 0, 0, 0.22);
}

.party-menu .hud__mode-block.party-menu-slot:hover {
  filter: none;
}

.party-menu__empty-slot {
  min-height: 64px;
  border-radius: 10px 32px 32px 10px;
  border: 2px dashed rgba(180, 220, 220, 0.35);
  background: rgba(8, 40, 48, 0.35);
}

.party-menu__detail-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.party-menu__detail-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.party-menu__detail-meta {
  margin: 0;
  color: rgba(245, 245, 245, 0.65);
  font-size: 0.9rem;
}

.party-menu__detail-moves {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.party-menu__detail-moves li {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.88rem;
}

/* Journey timeline (YouTube-style) */
.journey-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 12px;
  color: var(--text);
  user-select: none;
}

.journey-timeline.is-empty .journey-timeline__row {
  opacity: 0.55;
}

.journey-timeline__chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 52px;
  overflow: auto;
}

.journey-timeline__empty {
  color: var(--text-dim);
  font-size: 12px;
}

.journey-timeline__chip {
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.journey-timeline__chip:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.45);
}

.journey-timeline__chip.is-active {
  color: #0f172a;
  background: #38bdf8;
  border-color: #38bdf8;
}

.journey-timeline__chip.is-closed:not(.is-active) {
  border-color: rgba(239, 68, 68, 0.35);
}

.journey-timeline__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.journey-timeline__btn {
  flex: 0 0 auto;
  min-width: 36px;
  height: 32px;
  margin: 0;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.journey-timeline__btn:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.journey-timeline__speed {
  min-width: 42px;
}

.journey-timeline__scrub {
  position: relative;
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.journey-timeline__track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  overflow: visible;
}

.journey-timeline__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #fbbf24);
}

.journey-timeline__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2px solid #38bdf8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.journey-timeline__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.journey-timeline__tick {
  position: absolute;
  top: 50%;
  width: 3px;
  height: 12px;
  margin-left: -1.5px;
  margin-top: -6px;
  border-radius: 1px;
  background: rgba(248, 250, 252, 0.75);
}

.journey-timeline__tick.is-death {
  background: #ef4444;
  height: 16px;
  margin-top: -8px;
}

.journey-timeline__tick.is-capture {
  background: #60a5fa;
}

.journey-timeline__tick.is-battle {
  background: #fb923c;
}

.journey-timeline__tick.is-teleport {
  background: #a78bfa;
}

.journey-timeline__time {
  flex: 0 0 auto;
  min-width: 92px;
  text-align: right;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.game-menu__page--paint .paint__canvas {
  height: min(520px, calc(100vh - 280px));
}

.party-global-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}

.party-global-mode p {
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 11px;
}

.party-global-mode > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

.game-menu__page--party .party-global-mode {
  color: #f4fffe;
  background: rgba(8, 36, 40, 0.45);
  border: 1px solid rgba(180, 230, 230, 0.28);
}

.game-menu__page--party .party-global-mode p {
  color: rgba(230, 248, 248, 0.7);
}

.game-menu__page--party .party-global-mode > span[data-global-mode-summary] {
  color: #e8fff8;
  background: rgba(255, 255, 255, 0.14);
}

.game-menu__page--party .party-menu__agro .hud__control-label,
.game-menu__page--party .party-menu__agro #hud-agro {
  color: #f4fffe;
}

.game-menu__page--party .party-field__empty {
  color: rgba(230, 248, 248, 0.75);
}

@media (max-width: 760px) {
  .hud-topbar {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .hud-topbar__side--left {
    gap: 8px;
  }

  .hud-topbar__map-row {
    gap: 8px;
  }

  .area-minimap {
    width: min(var(--area-minimap-size, 220px), 42px);
    height: min(var(--area-minimap-size, 220px), 42px);
    margin-top: 18px;
    padding: 0;
    border-radius: 0;
  }

  .area-minimap__header {
    display: none;
  }

  .area-minimap__north {
    width: 12px;
    height: 12px;
    font-size: 0.45rem;
  }

  .area-minimap__canvas {
    border-radius: 50%;
  }

  .hud-utility-rail {
    width: min(var(--area-minimap-size, 220px), 42px);
  }

  .hud-utility-btn {
    width: 22px;
    height: 22px;
  }

  .item-hotbar {
    right: 8px;
    bottom: 8px;
    gap: 4px;
    padding: 4px;
    border-radius: 7px;
  }

  .item-hotbar__slot {
    width: 32px;
    min-height: 37px;
    gap: 2px;
    padding: 4px 3px 2px;
    border-radius: 6px;
  }

  .item-hotbar__key {
    top: 2px;
    left: 3px;
    font-size: 5px;
  }

  .item-hotbar__icon,
  .item-hotbar__img {
    width: 14px;
    height: 14px;
  }

  .item-hotbar__icon.is-empty {
    width: 11px;
    height: 11px;
    border-radius: 3px;
  }

  .item-hotbar__icon .bag__ball {
    width: 11px;
    height: 11px;
  }

  .item-hotbar__icon .bag__berry-dot {
    width: 8px;
    height: 9px;
  }

  .item-hotbar__count {
    font-size: 5px;
    min-height: 0.8em;
  }

  .item-hotbar__name {
    display: none;
  }

  .hud-chip {
    min-height: 32px;
    padding: 5px 9px;
  }

  .hud-chip--online,
  .hud-chip--team-mode > span,
  .hud-chip--menu > span,
  .hud-clock__period,
  .hud-clock__fps > span {
    display: none;
  }

  .poke-radar {
    --poke-radar-cell-w: 26px;
    --poke-radar-cell-h: 34px;
    --poke-radar-gap: 2px;
    padding: 3px 4px;
  }

  .poke-radar__rate {
    font-size: 8px;
  }

  .poke-radar-host {
    max-width: min(52vw, 180px);
  }

  .hud-chip--team-mode select {
    max-width: 104px;
  }

  .party-global-mode {
    align-items: flex-start;
  }
}

.hud__row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 13px;
  padding: 3px 0;
  color: var(--text-dim);
}

.hud__row b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.audio-settings {
  display: grid;
  gap: 14px;
  max-width: 420px;
}

.audio-settings__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.audio-settings__hint {
  margin: 0;
}

.audio-settings__row {
  margin: 0;
}

.audio-settings__actions {
  margin-top: 4px;
}

.game-settings {
  display: grid;
  gap: 28px;
  max-width: 420px;
}

.battle-mode-settings {
  display: grid;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.battle-mode-settings__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.battle-mode-settings__hint {
  margin: 0;
}

.battle-mode-settings__options {
  display: grid;
  gap: 10px;
}

.battle-mode-settings__option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

.battle-mode-settings__option input {
  accent-color: var(--accent);
}

.hud__row--range {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 0 4px;
}

.hud__row--range input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.hud__row--actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  padding-top: 6px;
}

.hud__row--actions .noise__btn {
  flex: 1 1 auto;
  min-width: 0;
}

.hud__control {
  margin-top: 0;
}

.hud__control-label {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.hud__control-label b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hud__control input[type="range"],
.noise__row input[type="range"] {
  width: 100%;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--accent-soft);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.hud__control input[type="range"]::-webkit-slider-thumb,
.noise__row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #0b1526;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.hud__control input[type="range"]::-moz-range-thumb,
.noise__row input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #0b1526;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

/* --- World noise controls --- */
#win-noise { width: 100%; }

.noise__group {
  margin: 14px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--panel-border);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.noise__group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.noise__row {
  margin-bottom: 9px;
}

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

.noise__field input[type="range"] {
  flex: 1;
  min-width: 0;
}

.noise__field input[type="number"] {
  width: 76px;
  flex-shrink: 0;
  padding: 4px 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  outline: none;
}

.noise__field input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.noise__label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.noise__label b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.noise__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--panel-border);
}

.noise__btn {
  flex: 1;
  padding: 7px 6px;
  font: inherit;
  font-size: 12px;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.noise__btn:hover {
  color: #0b1526;
  background: var(--accent);
}

.hud__modes {
  display: grid;
  gap: 8px;
}

/* Legacy combat HUD uses .party-slot / .party-detail. */
.party-roster__row { --poke: var(--accent); }

.party-roster__main {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(52px, 0.85fr) 24px 24px;
  align-items: center;
  gap: 4px 5px;
  min-width: 0;
}

/* Secondary moves window ÃÂ¢Ã¢ÂÂ¬Ã¢ÂÂ docks to the right of the out slot, outside the party panel.
   Bottom-anchored so lower slots (esp. the last) grow upward and stay on-screen. */
.party-roster__moves {
  display: none;
  position: absolute;
  left: calc(100% + 10px);
  top: auto;
  bottom: 0;
  z-index: 230;
  width: 176px;
  padding: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 14px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.party-roster__moves-title {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  padding: 0 2px 4px;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--panel-border);
}

.party-roster__row.is-out .party-roster__moves {
  display: grid;
}

/* DEBUG (temporary ÃÂ¢Ã¢ÂÂ¬Ã¢ÂÂ remove before launch): moveset editor for testing. */
.party-roster__moves-edit {
  float: right;
  margin: -2px 0 0;
  padding: 0 3px;
  font-size: 10px;
  line-height: 1.2;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  cursor: pointer;
}

.party-roster__moves-edit:hover {
  color: #fff;
}

.party-roster__move-editor {
  grid-column: 1 / -1;
  display: none;
  gap: 3px;
  padding-top: 4px;
  border-top: 1px solid var(--panel-border);
}

.party-roster__move-editor.is-open {
  display: grid;
}

.party-roster__move-select {
  width: 100%;
  padding: 2px 4px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
}

.party-roster__move-select option {
  color: #111;
}

.party-roster__suggest {
  grid-column: 1 / -1;
  margin-top: 0;
}

.party-roster__suggest:not([hidden]) {
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.party-roster__row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--poke);
}

.party-roster__row.is-out {
  border-color: rgba(74, 222, 128, 0.35);
}

.party-roster__row.is-recalled {
  opacity: 0.72;
}

.party-roster__row.is-fainted {
  opacity: 0.92;
  background: rgba(8, 12, 20, 0.55);
}

.party-roster__row.is-fainted .pokemon-portrait,
.hud__mode-block.is-fainted .pokemon-portrait {
  filter: brightness(0.4) saturate(0.5) grayscale(0.2);
  box-shadow: none;
  border-color: rgba(71, 85, 105, 0.55);
  background: rgba(8, 12, 20, 0.85);
}

.party-roster__row.is-fused {
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.2);
}

.party-roster__row.is-riding {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.party-roster__row .pokemon-portrait,
.party-roster__icon-btn .pokemon-portrait {
  --portrait-size: 32px;
}

.hud__poke-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  line-height: 0;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.hud__poke-icon-btn .pokemon-portrait {
  border: none;
  box-shadow: none;
  background: transparent;
}

.hud__poke-icon-btn:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 12px color-mix(in srgb, var(--poke, var(--accent)) 45%, transparent);
}

.hud__poke-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.hud__poke-icon-btn.is-picker-open {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22);
}

.hud__poke-icon-btn.is-symbiosis {
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.25);
}

.hud__mode-block .hud__poke-icon-btn .pokemon-portrait,
.hud__mode-block .hud__poke-icon-btn .pokemon-icon,
.hud__mode-block .hud__poke-icon-btn .party-menu-slot__sprite {
  --portrait-size: 88px;
  --icon-size: 88px;
}

.party-roster__info {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.party-roster__name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.party-roster__name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.party-roster__status,
.hud__mode-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
}

.party-roster__status[hidden],
.hud__mode-status[hidden] {
  display: none !important;
}

.status-icon {
  display: block;
  width: auto;
  height: 12px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
  user-select: none;
}

.hud__mode-status .status-icon {
  height: 13px;
}

.party-roster__level {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fde68a;
}

.party-roster__hp {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.party-roster__pp {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.party-roster__bars {
  display: grid;
  gap: 3px;
  min-width: 0;
  align-content: center;
}

.party-roster__hp-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(2, 6, 16, 0.6);
  border: 1px solid var(--panel-border);
  overflow: hidden;
}

.party-roster__pp-track {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(2, 6, 16, 0.6);
  border: 1px solid var(--panel-border);
  overflow: hidden;
}

.party-roster__hp-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--hp, 1));
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  transition: transform 0.15s linear, background 0.2s;
}

.party-roster__pp-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--pp, 1));
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: transform 0.15s linear, background 0.2s;
}

.party-roster__hp.is-low .party-roster__hp-fill {
  background: linear-gradient(90deg, #f97316, #fbbf24);
}

.party-roster__hp.is-down .party-roster__hp-value {
  color: #f87171;
}

.party-roster__hp.is-down .party-roster__hp-fill {
  background: #7f1d1d;
}

.party-roster__hp-value,
.party-roster__pp-value,
.party-roster__exp-value {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.1;
}

.party-roster__pp-value {
  color: #93c5fd;
}

.party-roster__exp {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.party-roster__exp-track {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(2, 6, 16, 0.6);
  border: 1px solid var(--panel-border);
  overflow: hidden;
}

.party-roster__exp-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--exp, 0));
  border-radius: inherit;
  background: linear-gradient(90deg, #ca8a04, #facc15);
  transition: filter 0.55s ease;
}

.party-roster__exp-fill.is-instant {
  transition: none !important;
}

.party-roster__exp.is-gaining .party-roster__exp-fill {
  background: linear-gradient(90deg, #eab308, #fde047, #fef08a, #eab308);
  background-size: 200% 100%;
  animation: exp-gain-shimmer 0.9s linear infinite;
  filter: brightness(1.15);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.5);
}

.party-roster__exp.is-gaining .party-roster__exp-value {
  color: #fde047;
  text-shadow: 0 0 6px rgba(250, 204, 21, 0.55);
}

.party-roster__exp.is-max .party-roster__exp-fill {
  background: linear-gradient(90deg, #a855f7, #e879f9);
}

.party-roster__ball {
  margin-left: 0;
}

.hud__symbiosis-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.hud__symbiosis-toggle svg {
  width: 14px;
  height: 14px;
}

.hud__symbiosis-toggle.is-fused {
  color: #fde047;
  border-color: rgba(250, 204, 21, 0.55);
  background: rgba(250, 204, 21, 0.12);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.18);
}

.hud__symbiosis-toggle:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.85);
}

.hud__symbiosis-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hud__ride-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.hud__ride-toggle svg {
  width: 14px;
  height: 14px;
}

.hud__ride-toggle.is-riding {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.18);
}

.hud__ride-toggle:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.85);
}

.hud__ride-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.party-field__empty {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--panel-border);
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

.party-field__empty[hidden] {
  display: none;
}

.hud__mode-block {
  --poke: var(--accent);
  position: relative;
  display: grid;
  gap: 5px;
  padding: 7px 8px 8px 11px;
  border-radius: 10px;
  background: rgba(9, 15, 28, 0.55);
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Colored spine on the left keyed to each pokemon's color. */
.hud__mode-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--poke);
}

.hud__mode-block.is-fused {
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(250, 204, 21, 0.25);
}

.hud__mode-block.is-riding {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(56, 189, 248, 0.25);
}

.hud__mode-block.is-recalled {
  opacity: 0.72;
}

.hud__mode-block.is-recalled:not(.is-fainted) .hud__skills {
  opacity: 0.55;
}

.hud__mode-block.is-fainted {
  opacity: 0.92;
  background: rgba(8, 12, 20, 0.42);
}

.hud__item-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 1px;
}

.hud__item-suggest[hidden] {
  display: none;
}

.hud__item-suggest-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 7px 3px 5px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--berry, #93c5fd) 55%, rgba(148, 163, 184, 0.35));
  background: color-mix(in srgb, var(--berry, #93c5fd) 18%, rgba(15, 23, 42, 0.72));
  color: #f8fafc;
  font: 600 10px/1.2 system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.hud__item-suggest-btn:hover {
  background: color-mix(in srgb, var(--berry, #93c5fd) 28%, rgba(15, 23, 42, 0.78));
  border-color: color-mix(in srgb, var(--berry, #93c5fd) 75%, #e2e8f0);
}

.hud__item-suggest-btn:active {
  transform: translateY(1px);
}

.hud__item-suggest-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: radial-gradient(
    circle at 35% 30%,
    color-mix(in srgb, var(--berry, #93c5fd) 70%, #fff),
    var(--berry, #93c5fd) 55%,
    color-mix(in srgb, var(--berry, #93c5fd) 55%, #0f172a)
  );
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.hud__item-suggest-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  image-rendering: pixelated;
  object-fit: contain;
}

.hud__item-suggest-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud__item-suggest-count {
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

.hud__mode-block[hidden] {
  display: none !important;
}

.hud__ball-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.hud__ball-toggle svg {
  width: 14px;
  height: 14px;
}

.hud__ball-toggle.is-out {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
}

.hud__ball-toggle.is-in-ball {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
}

.hud__ball-toggle:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.85);
}

.hud__ball-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hud__mode-btn.is-disabled,
.hud__mode-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.hud__mode-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.hud__mode-header .hud__mode-current {
  margin-left: auto;
}

.hud__mode-header .hud__poke-icon-btn {
  margin-right: 2px;
}

/* Retrato quadrado SpriteCollab (party HUD). Mini-mapa continua .pokemon-icon. */
.pokemon-portrait {
  --portrait-size: 28px;
  width: var(--portrait-size);
  height: var(--portrait-size);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 8px color-mix(in srgb, var(--poke, var(--accent)) 35%, transparent);
}

.pokemon-portrait.is-shiny {
  border-color: rgba(250, 204, 21, 0.85);
  box-shadow:
    0 0 10px rgba(250, 204, 21, 0.55),
    0 0 8px color-mix(in srgb, var(--poke, var(--accent)) 25%, transparent);
}

.pokemon-icon.is-shiny {
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.65);
}

.pokemon-portrait__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.pokemon-portrait.is-loaded .pokemon-portrait__img {
  display: block;
}

.pokemon-portrait.is-missing::after {
  content: "?";
  font-size: calc(var(--portrait-size) * 0.42);
  font-weight: 700;
  color: var(--text-dim);
}

/* ÃÂcone circular do mini-mapa (mundo, PC, PokÃÂ©dex). */
.pokemon-icon {
  --icon-size: 28px;
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 8px color-mix(in srgb, var(--poke, var(--accent)) 35%, transparent);
}

.pokemon-icon__img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.pokemon-icon.is-loaded .pokemon-icon__img {
  display: block;
}

.pokemon-icon.is-missing::after {
  content: "?";
  font-size: calc(var(--icon-size) * 0.42);
  font-weight: 700;
  color: var(--text-dim);
}

/* Name grows so controls sit flush to the right edge. */
.hud__mode-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud__mode-level {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fde68a;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.28);
}

.hud__mode-types {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* Shared type shield icon host (see ui/typeIcon.js). */
.type-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  cursor: help;
  border-radius: 4px;
  outline: none;
  min-width: 24px;
  min-height: 24px;
}

/* Color fallback while the shield sheet loads (or if it fails). */
.type-icon::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: var(--type, #64748b);
  opacity: 0.85;
  z-index: 0;
}

.type-icon.is-loaded::before {
  display: none;
}

.type-shield-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.type-icon:focus-visible {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.55);
}
/* Compact button that reflects the active mode and opens the picker. */
.hud__mode-current {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  padding: 0;
  color: var(--text-dim);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.hud__mode-current svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hud__mode-current:hover {
  color: var(--text);
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
}

.hud__mode-current.is-picker-open {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(56, 189, 248, 0.55);
}

.hud__mode-current.is-symbiosis {
  color: #fef08a;
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.55);
}

/* Floating AI mode picker (opens from party HUD). */
.mode-picker {
  position: fixed;
  /* Above the game menu (7000) and the hotbar (7100), where the party page lives. */
  z-index: 7300;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 16px));
  padding: 10px;
  border-radius: 12px;
  background: rgba(6, 10, 20, 0.97);
  border: 1px solid var(--panel-border);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(56, 189, 248, 0.08);
}

.mode-picker__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 2px 4px 8px;
  border-bottom: 1px solid var(--panel-border);
}

.mode-picker__icon .pokemon-portrait {
  --portrait-size: 28px;
}

.mode-picker__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-picker__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mode-picker__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--text-dim);
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.1s;
}

.mode-picker__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mode-picker__glyph svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-picker__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.mode-picker__option:hover:not(:disabled) {
  color: var(--text);
  background: rgba(56, 189, 248, 0.14);
  transform: translateY(-1px);
}

.mode-picker__option.is-active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.mode-picker__option.is-active.is-symbiosis {
  color: #fef08a;
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.25);
}

.mode-picker__option:disabled,
.mode-picker__option.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.hud__mode-moves {
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.85;
  letter-spacing: 0.02em;
}

/* Per-pokemon HP/EXP bars shown in the party list. */
.hud__bars {
  display: grid;
  gap: 3px;
}

.hud__bar-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 5px;
}

.hud__bar-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hud__hp-value,
.hud__pp-value,
.hud__exp-value {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}

.hud__pp-value {
  color: #93c5fd;
}

.hud__exp-value {
  color: #fde68a;
}

.hud__hp-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(2, 6, 16, 0.6);
  border: 1px solid var(--panel-border);
  overflow: hidden;
}

/* League-style HP notches every 10 / 100 max HP */
.hp-bar-ticks {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hp-bar-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: rgba(0, 0, 0, 0.42);
}

.hp-bar-tick.is-major {
  width: 1.5px;
  margin-left: -0.75px;
  background: rgba(0, 0, 0, 0.72);
}

.hud__hp-fill,
.party-detail__bar-fill {
  position: relative;
  z-index: 1;
}

.hud__pp-track {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: rgba(2, 6, 16, 0.6);
  border: 1px solid var(--panel-border);
  overflow: hidden;
}

.hud__hp-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--hp, 1));
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  transition: transform 0.15s linear, background 0.2s;
}

.hud__pp-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--pp, 1));
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: transform 0.15s linear, background 0.2s;
}

.hud__hp.is-low .hud__hp-fill {
  background: linear-gradient(90deg, #f97316, #fbbf24);
}

.hud__hp.is-down .hud__hp-value {
  color: #f87171;
}

.hud__hp.is-down .hud__hp-fill {
  background: #7f1d1d;
}

.hud__exp-track {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(2, 6, 16, 0.6);
  border: 1px solid var(--panel-border);
  overflow: hidden;
}

.hud__exp-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--exp, 0));
  border-radius: inherit;
  background: linear-gradient(90deg, #ca8a04, #facc15);
  transition: filter 0.55s ease;
}

.hud__exp-fill.is-instant {
  transition: none !important;
}

.hud__exp.is-gaining .hud__exp-fill {
  background: linear-gradient(90deg, #eab308, #fde047, #fef08a, #eab308);
  background-size: 200% 100%;
  animation: exp-gain-shimmer 0.9s linear infinite;
  filter: brightness(1.15);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.55);
}

.hud__exp.is-gaining .hud__exp-value {
  color: #fde047;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.65);
}

.hud__exp.is-max .hud__exp-fill {
  background: linear-gradient(90deg, #a855f7, #e879f9);
}

.hud__mode-block.is-level-up {
  animation: level-up-flash 1.35s ease-out;
}

.hud__mode-block.is-level-up .hud__exp-fill {
  background: linear-gradient(90deg, #facc15, #fff7ad, #fde047);
  box-shadow: 0 0 14px rgba(253, 224, 71, 0.8);
}

@keyframes exp-gain-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes level-up-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.95), 0 0 18px rgba(253, 224, 71, 0.55);
    filter: brightness(1.45) saturate(1.25);
    transform: scale(1);
  }
  18% {
    transform: scale(1.035);
    box-shadow: 0 0 0 3px rgba(254, 243, 199, 0.55), 0 0 22px rgba(250, 204, 21, 0.45);
  }
  40% {
    box-shadow: 0 0 0 5px rgba(250, 204, 21, 0.28);
    filter: brightness(1.2);
  }
  100% {
    box-shadow: none;
    filter: none;
    transform: scale(1);
  }
}

.hud__mode-block.is-evolving {
  animation: evolve-flash 1.4s ease-out;
}

@keyframes evolve-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.9);
    filter: brightness(1.5) saturate(1.35);
    transform: scale(1);
  }
  25% {
    transform: scale(1.03);
  }
  55% {
    box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.25);
    filter: brightness(1.2);
  }
  100% {
    box-shadow: none;
    filter: none;
    transform: scale(1);
  }
}

/* Two rows of three icon buttons. */
.hud__mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.hud__mode-btn {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 0;
  color: var(--text-dim);
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.hud__mode-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hud__mode-btn:hover {
  color: var(--text);
  background: rgba(56, 189, 248, 0.14);
  transform: translateY(-1px);
}

.hud__mode-btn:active {
  transform: translateY(0);
}

.hud__mode-btn.is-active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.hud__mode-btn.is-active.is-symbiosis {
  color: #fef08a;
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.28);
}

/* --- Bag: MMO-style inventory slot grid (matches item-hotbar chrome) ------ */
.bag-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bag__grid,
.bag,
.bag__berries,
.bag__materials,
.bag__medicine,
.bag__tools,
.bag__key-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 0;
  min-height: 0;
}

.bag__materials:empty::before,
.bag__medicine:empty::before,
.bag__key-items:empty::before {
  content: "\2014";
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.55;
  padding: 4px 2px;
}

.bag__slot {
  --slot-accent: var(--accent);
  position: relative;
  width: 100%;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px 6px;
  font: inherit;
  color: var(--text);
  background: rgba(9, 15, 28, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
  text-align: center;
}

.bag__slot:hover {
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-1px);
}

.bag__slot.is-active {
  border-color: var(--slot-accent);
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 0 1px var(--slot-accent), 0 0 18px -4px var(--slot-accent);
}

.bag__slot--clickable {
  cursor: pointer;
}

.bag__slot--context {
  cursor: context-menu;
}

.bag__slot.is-empty {
  opacity: 0.55;
}

.bag__slot-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.bag__slot-icon .bag__ball {
  width: 22px;
  height: 22px;
}

.bag__slot-icon .bag__berry-dot,
.bag__slot-icon .bag__material-dot {
  width: 18px;
  height: 18px;
}

.bag__slot-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}

.bag__slot-img--empty {
  display: block;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.25);
}

.bag__slot-count {
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  line-height: 1;
}

.bag__slot.is-active .bag__slot-count {
  color: var(--text);
}

.bag__slot-count[hidden] {
  display: none;
}

.bag__slot-name {
  max-width: 100%;
  font-size: 9px;
  line-height: 1.15;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Two-tone pokeball dot: top half tinted, split by a dark equator. */
.bag__ball {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: #f8fafc;
  border: 1.5px solid #0b0f19;
  box-shadow: 0 0 8px -2px var(--ball, var(--slot-accent));
}

.bag__ball::before {
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  background: var(--ball, var(--slot-accent));
  border-bottom: 1.5px solid #0b0f19;
}

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

.bag__section-title {
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.bag__section-title:first-of-type {
  margin-top: 10px;
}

.bag__berry-dot {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), var(--berry) 58%);
  border: 1px solid rgba(11, 15, 25, 0.7);
  box-shadow: 0 0 8px -3px var(--berry);
}

.bag__berry-dot::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 55%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #166534;
}

.bag__material-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--mat, #86efac);
  border: 1px solid rgba(11, 15, 25, 0.55);
  box-shadow: 0 0 8px -3px var(--mat, #86efac);
}

.bag__tool-glyph,
.bag__key-glyph {
  font-size: 16px;
  line-height: 1;
}

.bag__caught {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--panel-border);
}

.bag__slot.is-dragging {
  opacity: 0.55;
}

.bag__slot[draggable="true"] {
  cursor: grab;
  -webkit-user-drag: element;
  user-select: none;
}

.bag__slot[draggable="true"] .bag__slot-icon,
.bag__slot[draggable="true"] .bag__slot-count,
.bag__slot[draggable="true"] .bag__slot-name {
  pointer-events: none;
  -webkit-user-drag: none;
}

.bag__slot[draggable="true"]:active {
  cursor: grabbing;
}

.item-hotbar__slot.is-dragging {
  opacity: 0.55;
}

/* Drop must hit the slot button itself ÃÂ¢Ã¢ÂÂ¬Ã¢ÂÂ children steal events on occupied slots. */
.item-hotbar__slot > * {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* --- Item hotbar (ready slots column, bottom-right) ---------------------- */
.item-hotbar {
  position: fixed;
  /* Above the game-menu overlay so drag-drop from Bag still lands on a slot. */
  z-index: 7100;
  right: 16px;
  bottom: 16px;
  left: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: auto;
}

/* Mapa fullscreen: esconde a hotbar (z-index 7100 era sÃÂ³ pra drag na Bag). */
.item-hotbar.is-map-hidden {
  visibility: hidden;
  pointer-events: none;
}

/* Chrome lives on a pseudo so an active slot can stay fully opaque. */
.item-hotbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 18px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  opacity: 0.25;
  transition: opacity 0.15s ease;
}

.item-hotbar:hover::before,
.item-hotbar:focus-within::before,
.item-hotbar:has(.is-drop-target)::before,
.item-hotbar:has(.is-dragging)::before,
.item-hotbar:has(.is-received)::before {
  opacity: 1;
}

.item-hotbar__slot {
  --slot-accent: var(--accent);
  position: relative;
  z-index: 1;
  width: 64px;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px 6px;
  font: inherit;
  color: var(--text);
  background: rgba(9, 15, 28, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  cursor: pointer;
  opacity: 0.25;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s, opacity 0.15s ease;
}

.item-hotbar__slot:hover {
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-1px);
}

.item-hotbar__slot.is-active {
  opacity: 1;
  border-color: var(--slot-accent);
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 0 1px var(--slot-accent), 0 0 18px -4px var(--slot-accent);
}

.item-hotbar:hover .item-hotbar__slot,
.item-hotbar:focus-within .item-hotbar__slot,
.item-hotbar:has(.is-drop-target) .item-hotbar__slot,
.item-hotbar:has(.is-dragging) .item-hotbar__slot,
.item-hotbar:has(.is-received) .item-hotbar__slot {
  opacity: 1;
}

.item-hotbar:hover .item-hotbar__slot.is-empty,
.item-hotbar:focus-within .item-hotbar__slot.is-empty,
.item-hotbar:has(.is-drop-target) .item-hotbar__slot.is-empty,
.item-hotbar:has(.is-dragging) .item-hotbar__slot.is-empty,
.item-hotbar:has(.is-received) .item-hotbar__slot.is-empty {
  opacity: 0.55;
}

.item-hotbar__slot.is-drop-target {
  border-color: #4ade80;
  box-shadow: 0 0 0 1px #4ade80;
}

.item-hotbar__slot.is-received {
  opacity: 1;
  z-index: 2;
  border-color: var(--slot-accent);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, opacity 0.15s ease;
  animation: item-hotbar-slot-pop 0.85s cubic-bezier(0.22, 1.4, 0.36, 1);
}

.item-hotbar__slot.is-received .item-hotbar__icon {
  animation: item-hotbar-icon-pop 0.85s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes item-hotbar-slot-pop {
  0% {
    opacity: 0.35;
    transform: scale(0.72);
    box-shadow: 0 0 0 0 transparent;
  }
  35% {
    opacity: 1;
    transform: scale(1.18);
    box-shadow:
      0 0 0 2px var(--slot-accent),
      0 0 22px -2px var(--slot-accent);
  }
  70% {
    opacity: 1;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 1px var(--slot-accent), 0 0 14px -4px var(--slot-accent);
  }
}

@keyframes item-hotbar-icon-pop {
  0% {
    transform: scale(0.55);
  }
  40% {
    transform: scale(1.28);
  }
  100% {
    transform: scale(1);
  }
}

.item-hotbar__key {
  position: absolute;
  top: 5px;
  left: 7px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
}

.item-hotbar__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.item-hotbar__icon.is-empty {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px dashed rgba(124, 138, 165, 0.45);
}

.item-hotbar__icon .bag__ball {
  width: 22px;
  height: 22px;
}

.item-hotbar__icon .bag__berry-dot {
  width: 16px;
  height: 18px;
}

.item-hotbar__count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  min-height: 1em;
}

.item-hotbar__slot.is-active .item-hotbar__count {
  color: var(--text);
}

.item-hotbar__name {
  max-width: 64px;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Global world map ---------------------------------------------------- */
.window--map .window__body {
  padding: 10px;
}

.map__viewport {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background: #060a14;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.map__place-tip {
  position: absolute;
  z-index: 4;
  max-width: min(240px, 70%);
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: rgba(9, 15, 28, 0.94);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  pointer-events: none;
  white-space: normal;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, calc(-100% - 10px));
}

.map__place-tip[hidden] {
  display: none;
}

.map__canvas {
  display: block;
  width: 100%;
  height: 560px;
  cursor: grab;
  touch-action: none;
}

.map__canvas:active {
  cursor: grabbing;
}

.map__body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- World paint editor -------------------------------------------------- */
.window--paint .window__body {
  padding: 10px;
}

.paint-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.paint__layers {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(2, 6, 16, 0.45);
  border: 1px solid var(--panel-border);
}

.paint__layer,
.paint__tool {
  margin: 0;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.paint__layer.is-active,
.paint__tool.is-active {
  color: var(--text);
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.35);
}

.paint__tool {
  border-color: var(--panel-border);
  background: rgba(9, 15, 28, 0.55);
  color: var(--text);
}

.paint__tool--primary {
  background: rgba(12, 74, 110, 0.7);
  border-color: rgba(56, 189, 248, 0.5);
}

.paint__palette {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
}

.paint__swatch {
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  border: 2px solid transparent;
  background: var(--swatch, #888);
  cursor: pointer;
}

.paint__swatch.is-active {
  border-color: #f8fafc;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.paint__brush {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.paint__brush input {
  width: 88px;
}

.paint__viewport {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background: #060a14;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.paint__canvas {
  display: block;
  width: 100%;
  height: 560px;
  cursor: crosshair;
  touch-action: none;
}

.paint__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}

.paint__status {
  color: var(--accent);
}

.paint__hint {
  margin: 0;
}

.paint__hint code {
  font-size: 11px;
}

.map__ctx {
  position: absolute;
  z-index: 5;
  min-width: 160px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(7, 11, 22, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.map__ctx[hidden] {
  display: none !important;
}

.map__ctx-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e2e8f0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.map__ctx-item:hover,
.map__ctx-item:focus-visible {
  background: rgba(56, 189, 248, 0.18);
  color: #f8fafc;
  outline: none;
}

.map__compass {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(7, 11, 22, 0.72);
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  pointer-events: none;
}

.map__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  /* Keep a stable second row for buttons so wrap does not reflow the canvas. */
  min-height: 56px;
  align-content: flex-start;
}

.map__footer-hover {
  display: inline-block;
  min-width: 7.5ch;
}

.map__footer b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.map__recenter {
  margin-left: auto;
  padding: 4px 10px;
  font: inherit;
  font-size: 11px;
  color: var(--text);
  background: rgba(9, 15, 28, 0.65);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.map__recenter:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.map__icon-filter {
  position: relative;
  margin-left: auto;
}

.map__icon-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
  min-width: 300px;
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 10px 12px;
  background: rgba(9, 15, 28, 0.97);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.map__icon-panel[hidden] {
  display: none;
}

.map__icon-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 6px;
}

.map__icon-opt:hover {
  background: rgba(56, 189, 248, 0.1);
}

.map__icon-opt input {
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.map__icon-panel-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(56, 189, 248, 0.16);
}

.map__icon-action {
  flex: 1;
  padding: 5px 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  color: var(--text);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  cursor: pointer;
}

.map__icon-action:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.map__toggle.is-active {
  color: #f8fafc;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
}

.map__hint {
  margin-top: 8px;
}

/* Shared floating tooltip (see ui/tooltip.js). */
.tooltip {
  position: fixed;
  /* Tooltips must float over everything, including the game menu and modals. */
  z-index: 9700;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  background: rgba(9, 15, 28, 0.96);
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  pointer-events: none;
  white-space: pre-line;
  max-width: min(360px, calc(100vw - 16px));
  text-align: left;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.tooltip[hidden] {
  display: none;
}

.ground-item-tag {
  position: fixed;
  z-index: 9600;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #ffd84d;
  background: rgba(6, 10, 20, 0.82);
  border: 1px solid rgba(255, 200, 50, 0.35);
  border-radius: 5px;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  transform: translateY(-2px);
  animation: ground-item-tag-in 0.12s ease;
}

.ground-item-tag[hidden] {
  display: none;
}

@keyframes ground-item-tag-in {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.hud__symbiosis-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

.hud__stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 4px 0 2px;
}

.hud__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 2px;
  border-radius: 5px;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
  color: var(--text-dim);
  white-space: nowrap;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.hud__stat--boosted {
  background: rgba(34, 197, 94, 0.12);
}

.hud__stat--lowered {
  background: rgba(239, 68, 68, 0.12);
}

.hud__stat-value {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hud__stat-value--boosted {
  color: #86efac;
}

.hud__stat-value--lowered {
  color: #fca5a5;
}

.hud__stat-stage {
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.hud__stat-stage--up {
  color: #4ade80;
}

.hud__stat-stage--down {
  color: #f87171;
}

.hud__stat-label {
  font-size: 8px;
  color: var(--text-dim);
}

.hud__stat--flash-up {
  animation: hud-stat-flash-up 0.65s ease-out;
}

.hud__stat--flash-down {
  animation: hud-stat-flash-down 0.65s ease-out;
}

@keyframes hud-stat-flash-up {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.75);
  }
  35% {
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.45);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

@keyframes hud-stat-flash-down {
  0% {
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.75);
  }
  35% {
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.45);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
  }
}

/* Per-pokemon cooldown chips Ã¢ÂÂ 2ÃÂ2 Nintendo-style move HUD. */
.hud__skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 6px;
}

.skill-chip {
  --move-color: #94a3b8;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  padding: 5px 8px 6px 8px;
  border-radius: 10px;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  background:
    linear-gradient(
      105deg,
      color-mix(in srgb, var(--move-color) 42%, #0b1220) 0%,
      color-mix(in srgb, var(--move-color) 18%, #111827) 38%,
      rgba(15, 23, 42, 0.94) 100%
    );
  border: 1px solid color-mix(in srgb, var(--move-color) 55%, #1e293b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 4px 10px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.skill-chip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--move-color);
  box-shadow: 0 0 8px color-mix(in srgb, var(--move-color) 55%, transparent);
  z-index: 2;
  pointer-events: none;
}

.skill-chip--info,
.skill-chip--hud {
  min-height: 46px;
}

.skill-chip:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.skill-chip:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.96);
}

.skill-chip:focus-visible {
  outline: 2px solid #fff4a8;
  outline-offset: 2px;
}

.skill-chip:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  filter: saturate(0.7);
}

.skill-chip__kind {
  position: absolute;
  left: 25%;
  top: 50%;
  z-index: 0;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(255, 248, 214, 0.42);
  background: none;
  box-shadow: none;
  pointer-events: none;
  user-select: none;
}

.skill-chip--info .skill-chip__kind {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0;
  color: rgba(255, 248, 214, 0.42);
}

.skill-chip__body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-right: 0;
}

.skill-chip__type {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  min-width: 0;
  min-height: 0;
  line-height: 0;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.skill-chip__type::before {
  display: none;
}

.skill-chip__type .type-shield-icon {
  position: absolute;
  left: 75%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.42;
}

.skill-chip__name {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  padding-right: 0;
}

.skill-chip--info .skill-chip__name {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  padding-right: 0;
}

.skill-chip__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.skill-chip__meta {
  font-size: 8px;
  line-height: 1.2;
  color: rgba(226, 232, 240, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0;
}

.party-detail__moves--combat .skill-chip__meta {
  display: none;
}

.skill-chip__cooldown {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: right center;
  transform: scaleX(var(--cd, 0));
  background: linear-gradient(
    90deg,
    rgba(2, 6, 16, 0.18),
    rgba(2, 6, 16, 0.72)
  );
  pointer-events: none;
  transition: transform 0.05s linear;
}

.skill-chip__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 3px;
  width: 100%;
  background: rgba(15, 23, 42, 0.55);
  pointer-events: none;
}

.skill-chip__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: calc((1 - var(--cd, 0)) * 100%);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--move-color) 75%, #fff),
    var(--move-color)
  );
  box-shadow: 0 0 6px color-mix(in srgb, var(--move-color) 45%, transparent);
}

.skill-chip.is-ready {
  border-color: color-mix(in srgb, var(--move-color) 40%, #eaf8b0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(234, 248, 176, 0.35),
    0 6px 14px rgba(0, 0, 0, 0.3);
}

.skill-chip.is-ready .skill-chip__bar::after {
  background: linear-gradient(90deg, #f7fec8, #b6f06a);
  box-shadow: 0 0 8px rgba(182, 240, 106, 0.45);
}

.skill-chip__pp {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #dbeafe;
  pointer-events: none;
  z-index: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

.skill-chip__pp small {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(191, 219, 254, 0.85);
}

.skill-chip__pp b {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.skill-chip.is-empty-pp .skill-chip__pp,
.skill-chip.is-empty-pp .skill-chip__pp small,
.skill-chip.is-empty-pp .skill-chip__pp b {
  color: #fca5a5;
}

.skill-chip.is-empty-pp {
  opacity: 0.72;
}

.skill-chip.is-empty-pp:not(.is-ready) {
  border-color: rgba(248, 113, 113, 0.4);
}

/* Skill HUD content (lives inside the draggable Symbiosis window). */
.window--skills .window__bar {
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.16), rgba(250, 204, 21, 0.02));
  border-bottom-color: rgba(250, 204, 21, 0.4);
}

.window--skills .window__title {
  color: #fde047;
}

.skill-hud {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.skill-hud__title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding-right: 12px;
  border-right: 1px solid var(--panel-border);
}

.skill-hud__title small {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 204, 21, 0.85);
}

.skill-hud__title b {
  font-size: 15px;
  color: var(--text);
}

.skill-hud__types {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.skill-slot {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid var(--panel-border);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.skill-slot:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

/* Radial cooldown wheel driven by --cd (0 ready .. 1 just used). */
.skill-slot__dial {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    conic-gradient(rgba(2, 6, 16, 0.72) calc(var(--cd, 0) * 360deg), transparent 0),
    radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.25), rgba(56, 189, 248, 0.08));
  display: grid;
  place-items: center;
  border: 1px solid var(--panel-border);
}

.skill-slot__key {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}

.skill-slot__meta {
  display: grid;
  gap: 2px;
}

.skill-slot__kind {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.skill-slot__name {
  font-size: 13px;
  color: var(--text);
}

.skill-slot__status {
  font-size: 10px;
  color: var(--text-dim);
}

.skill-slot__type {
  position: absolute;
  top: 6px;
  right: 8px;
  line-height: 0;
}

.skill-slot.is-ready {
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.2);
}

.skill-slot.is-ready .skill-slot__status {
  color: #4ade80;
}

.help__body {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

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

.about__body {
  display: grid;
  gap: 14px;
  max-width: 520px;
  font-size: 13px;
  color: var(--text-dim);
}

.about__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(245, 245, 245, 0.9);
}

.about__discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: #5865f2;
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.28);
  transition: filter 160ms ease, transform 160ms ease;
}

.about__discord:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.about__discord:focus-visible {
  outline: 2px solid rgba(148, 163, 255, 0.9);
  outline-offset: 3px;
}

.about__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}

/* --- Biomes catalog (land biomes + vegetation sprites) -------------------- */
.biomes-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

.biomes__intro {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}

.biomes__list {
  display: grid;
  gap: 12px;
}

.biomes__card {
  padding: 12px;
  background: rgba(9, 15, 28, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
}

.biomes__card--sea {
  background: rgba(8, 28, 40, 0.62);
  border-color: rgba(56, 140, 168, 0.35);
}

.biomes__card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.biomes__ground-preview {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  image-rendering: pixelated;
  background: rgba(2, 6, 16, 0.45);
}

.biomes__card-meta {
  min-width: 0;
}

.biomes__card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.biomes__card-sub {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-dim);
}

.biomes__section {
  margin-top: 8px;
}

.biomes__section-title {
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.biomes__chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.biomes__chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.biomes__chip-frame {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 4px;
  overflow: hidden;
  background: rgba(2, 6, 16, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}

.biomes__chip-img {
  /* Limites em px: max-height % nÃÂÃÂ£o resolve em linha de grid "auto",
     e sprites altos (ÃÂÃÂ¡rvores) vazariam do quadro. */
  width: auto;
  height: auto;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.biomes__chip-empty {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.2);
}

.biomes__chip-name {
  max-width: 100%;
  font-size: 9px;
  line-height: 1.15;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biomes__empty {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.55;
  padding: 2px 0;
}

/* --- Biomes editor (toolbar, fields, toggle chips) ------------------------ */
.biomes__toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(9, 15, 28, 0.92);
  border: 1px solid var(--panel-border);
}

.biomes__status {
  flex: 1 1 auto;
  min-width: 120px;
  font-size: 11px;
  color: var(--text-dim);
}

.biomes__tool {
  margin: 0;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: rgba(9, 15, 28, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.biomes__tool--primary {
  background: rgba(12, 74, 110, 0.7);
  border-color: rgba(56, 189, 248, 0.5);
}

a.biomes__tool {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.biomes__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0;
}

.biomes__field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.biomes__field--color {
  margin-left: auto;
}

.biomes__field-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.biomes__select,
.biomes__number {
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: rgba(2, 6, 16, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.biomes__number {
  width: 84px;
}

.biomes__color {
  width: 44px;
  height: 28px;
  padding: 1px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: rgba(2, 6, 16, 0.55);
  cursor: pointer;
}

.biomes__splat {
  margin-top: 8px;
}

.biomes__splat > summary {
  cursor: pointer;
  list-style: none;
}

.biomes__splat > summary::before {
  content: "\25b8\00a0";
}

.biomes__splat[open] > summary::before {
  content: "\25be\00a0";
}

.biomes__chip--toggle {
  cursor: pointer;
  border-radius: 10px;
}

.biomes__chip--toggle:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 2px;
}

.biomes__chip--toggle .biomes__chip-frame {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.25);
}

.biomes__chip--toggle.is-off .biomes__chip-frame {
  border-color: var(--panel-border);
  box-shadow: none;
}

.biomes__chip--toggle.is-off .biomes__chip-img {
  opacity: 0.28;
  filter: grayscale(0.9);
}

.biomes__chip--toggle.is-off .biomes__chip-name {
  opacity: 0.5;
}

.biomes__chip-weight {
  width: 56px;
  padding: 2px 4px;
  border-radius: 5px;
  border: 1px solid var(--panel-border);
  background: rgba(2, 6, 16, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 640px) {
  .window {
    width: min(232px, calc(100vw - 24px));
  }

  .skill-hud {
    flex-wrap: wrap;
  }
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
}

/* Zone banner (area enter) */
.zone-banner {
  position: fixed;
  top: 18%;
  left: 50%;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 28px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.zone-banner--show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.temple-title {
  position: fixed;
  top: 20%;
  left: 50%;
  z-index: 160;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.temple-title--show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.temple-title__name {
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  font-size: clamp(1.55rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f4efe2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.temple-title__rule {
  display: block;
  width: min(260px, 40vw);
  height: 1px;
  background: #d4af77;
}

.temple-title__kind {
  font-family: Figtree, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(244, 239, 226, 0.8);
}

.zone-banner__name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.zone-banner__type {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(100, 116, 139, 0.75);
}

.zone-banner__type[data-type="city"] {
  background: rgba(201, 176, 122, 0.85);
  color: #1e293b;
}

.zone-banner__type[data-type="route"] {
  background: rgba(34, 87, 54, 0.85);
}

.zone-banner__type[data-type="wilderness"] {
  background: rgba(22, 163, 74, 0.75);
}

.quest-objective {
  position: relative;
  z-index: 140;
  width: min(calc(var(--area-minimap-size, 210px) * 2), calc(100vw - 32px));
  max-width: min(520px, calc(100vw - 32px));
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(9, 15, 28, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  box-sizing: border-box;
}

.quest-objective.has-tip {
  pointer-events: auto;
  cursor: help;
}

.quest-objective__text {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #fde68a;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.quest-objective__move {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: help;
}

.window--quest-board {
  width: min(520px, calc(100vw - 24px));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5200;
}

.quest-board__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.quest-board__intro {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
}

.quest-board__toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.quest-board__force-refresh {
  font-size: 11px;
  padding: 6px 10px;
}

.quest-board__tabs {
  display: flex;
  gap: 8px;
}

.quest-board__tab {
  flex: 1;
  padding: 8px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(9, 15, 28, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.quest-board__tab:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.1);
}

.quest-board__tab.is-active {
  color: var(--text);
  border-color: rgba(250, 204, 21, 0.5);
  background: rgba(250, 204, 21, 0.12);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.25);
}

.quest-board__type-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.quest-board__type-tabs[hidden] {
  display: none !important;
}

.quest-board__type-tab {
  min-width: 0;
  padding: 6px 7px;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(9, 15, 28, 0.45);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.15s, background 0.15s, color 0.15s, opacity 0.15s;
}

.quest-board__type-tab:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.55);
}

.quest-board__type-tab.is-empty {
  opacity: 0.5;
}

.quest-board__type-tab.is-active {
  opacity: 1;
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.22);
}

.quest-board__type-tab[data-type="all"].is-active {
  border-color: rgba(250, 204, 21, 0.5);
  background: rgba(250, 204, 21, 0.12);
}

.quest-board__type-tab[data-type="missing-person"].is-active {
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(148, 163, 184, 0.14);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.quest-board__type-tab[data-type="material-delivery"].is-active {
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22);
}

.quest-board__type-tab[data-type="skill-unlock"].is-active {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.14);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.22);
}

.quest-board__type-tab[data-type="capture"].is-active {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(34, 197, 94, 0.14);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.22);
}

@media (max-width: 420px) {
  .quest-board__type-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quest-board__type-tab[data-type="all"] {
    grid-column: 1 / -1;
  }
}

.quest-board__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
}

.quest-board__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-board__group-title {
  margin: 4px 0 0;
  padding-bottom: 5px;
  color: var(--text);
  border-bottom: 1px solid var(--panel-border);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quest-board__group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-board__empty {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
}

.quest-board__card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(9, 15, 28, 0.45);
}

.quest-board__card[data-type="material-delivery"] {
  border-color: rgba(125, 211, 252, 0.32);
}

.quest-board__card[data-type="skill-unlock"] {
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(
    160deg,
    rgba(251, 191, 36, 0.08),
    rgba(9, 15, 28, 0.45) 42%
  );
}

.quest-board__card[data-type="capture"] {
  border-color: rgba(74, 222, 128, 0.42);
  background: linear-gradient(
    160deg,
    rgba(34, 197, 94, 0.1),
    rgba(9, 15, 28, 0.45) 42%
  );
}

.quest-board__card-title {
  margin: 0 0 6px;
  font-size: 15px;
}

.quest-board__card-title--tip,
.quest-board__card-detail--tip {
  cursor: help;
}

.quest-board__card-title--tip {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.quest-board__card-detail,
.quest-board__card-reward {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-dim);
}

.quest-board__card-reward {
  color: #fde68a;
  font-weight: 650;
}

.quest-board__card-actions {
  display: flex;
  gap: 8px;
}

.quest-board__btn {
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(12, 74, 110, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 10px;
  cursor: pointer;
}

.quest-board__btn:hover {
  border-color: rgba(125, 211, 252, 0.75);
  background: rgba(14, 116, 144, 0.75);
}

.quest-board__btn--ghost {
  background: rgba(69, 10, 10, 0.45);
  border-color: rgba(248, 113, 113, 0.4);
}

.quest-board__done {
  font-size: 12px;
  font-weight: 700;
  color: #86efac;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quest-board__message {
  margin: 0;
  min-height: 1.2em;
  font-size: 12px;
  color: var(--text-dim);
}

.quest-board__message[data-tone="good"] {
  color: #86efac;
}

.quest-board__message[data-tone="bad"] {
  color: #f87171;
}

.quest-skill-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 10px;
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(2, 8, 18, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.quest-skill-progress--compact {
  margin: 6px 0 8px;
  padding: 8px 9px;
  gap: 5px;
}

.quest-skill-progress__heading {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253, 230, 138, 0.88);
}

.quest-skill-progress__ready {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #86efac;
}

.quest-skill-progress__or {
  margin: 2px 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(148, 163, 184, 0.75);
}

.quest-skill-progress__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quest-skill-progress--compact .quest-skill-progress__group {
  gap: 5px;
}

.quest-skill-progress__row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.quest-skill-progress__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: rgba(148, 163, 184, 0.85);
}

.quest-skill-progress__row.is-ok .quest-skill-progress__mark {
  color: #86efac;
}

.quest-skill-progress__row.is-no .quest-skill-progress__mark {
  color: rgba(248, 113, 113, 0.75);
}

.quest-skill-progress__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  align-items: center;
  min-width: 0;
}

.quest-skill-progress__label {
  grid-column: 1 / -1;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
}

.quest-skill-progress--compact .quest-skill-progress__label {
  font-size: 11px;
}

.quest-skill-progress__label[data-tip] {
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.quest-skill-progress__bar {
  position: relative;
  height: 6px;
  min-width: 0;
  border-radius: 999px;
  background: rgba(2, 6, 16, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.quest-skill-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--pct, 0));
  transform-origin: left center;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #fde68a);
  transition: transform 0.18s ease-out;
}

.quest-skill-progress__row.is-ok .quest-skill-progress__fill {
  background: linear-gradient(90deg, #16a34a, #86efac);
}

.quest-skill-progress__value {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(253, 230, 138, 0.95);
  white-space: nowrap;
}

.quest-skill-progress__row.is-ok .quest-skill-progress__value {
  color: #bbf7d0;
}

.pokedex-hud__quest-card .quest-skill-progress {
  margin: 2px 0 0;
}

.pokedex-hud__quest-card--completed .quest-skill-progress {
  opacity: 0.88;
}

.hub-prompt {
  position: fixed;
  bottom: 118px;
  left: 50%;
  z-index: 280;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(13, 21, 38, 0.88);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  pointer-events: none;
}

.dialogue-box {
  position: fixed;
  bottom: 118px;
  left: 50%;
  z-index: 290;
  transform: translateX(-50%);
  width: min(92vw, 520px);
  margin: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: auto;
  cursor: pointer;
}

.dialogue-box__portrait-wrap {
  position: absolute;
  left: 50%;
  /* Inteiro acima do painel, sem cruzar. */
  bottom: calc(100% + 8px);
  z-index: 0;
  transform: translateX(-50%);
  pointer-events: none;
  line-height: 0;
}

.dialogue-box__portrait-wrap[hidden] {
  display: none;
}

.dialogue-box__portrait {
  display: block;
  height: min(42vh, 380px);
  width: auto;
  max-width: min(92vw, 520px);
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 28px rgba(2, 6, 23, 0.55));
  user-select: none;
  -webkit-user-drag: none;
  image-rendering: auto;
}

/* Retratos SpriteCollab sÃÂ£o quadrados Ã¢ÂÂ nÃÂ£o inflar como arte de NPC. */
.dialogue-box--pokemon-portrait .dialogue-box__portrait {
  width: 96px;
  height: 96px;
  max-width: 96px;
  object-fit: contain;
  object-position: center;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 14px rgba(2, 6, 23, 0.45));
}

.dialogue-box__panel {
  position: relative;
  z-index: 1;
  padding: 14px 18px 12px;
  color: var(--text);
  background: rgba(13, 21, 38, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.45);
}

.dialogue-box__hearts {
  position: absolute;
  top: 10px;
  right: 12px;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 1px 2px rgba(2, 6, 23, 0.55));
}

.dialogue-box__hearts[hidden] {
  display: none;
}

.dialogue-box--hearts .dialogue-box__name {
  padding-right: 7.5rem;
}

.dialogue-box__name {
  margin: 0 0 6px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.dialogue-box__name[hidden] {
  display: none;
}

.dialogue-box__text {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.45;
  min-height: 1.45em;
}

.dialogue-box--typing .dialogue-box__text::after {
  content: "\258C";
  margin-left: 1px;
  color: var(--title-accent, #f2c078);
  opacity: 0.85;
  animation: dialogue-caret 0.72s steps(1, end) infinite;
}

@keyframes dialogue-caret {
  0%,
  49% {
    opacity: 0.9;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.dialogue-box__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: right;
}

.dialogue-box__hint[hidden] {
  display: none;
}

.move-learn {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.55);
}

.move-learn[hidden] {
  display: none;
}

.move-learn__panel {
  width: min(92vw, 420px);
  padding: 18px 18px 14px;
  color: var(--text);
  background: rgba(13, 21, 38, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.5);
}

.move-learn__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.move-learn__text,
.move-learn__new {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.move-learn__new {
  color: #7dd3fc;
  font-weight: 600;
}

.move-learn__slots {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.move-learn__slot {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  cursor: pointer;
}

.move-learn__slot:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(30, 58, 90, 0.9);
}

.move-learn__slot-key {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.move-learn__slot-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.move-learn__slot-body strong {
  font-size: 0.92rem;
}

.move-learn__slot-body small {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.move-learn__skip {
  width: 100%;
  padding: 10px 12px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  cursor: pointer;
}

.move-learn__skip:hover {
  color: var(--text);
  border-color: rgba(248, 113, 113, 0.45);
}

.evolve-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: block;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.evolve-modal[hidden] {
  display: none;
}

.evolve-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, 0);
  width: max-content;
  max-width: min(92vw, 280px);
  padding: 8px 10px;
  color: var(--text);
  text-align: center;
  background: rgba(13, 21, 38, 0.82);
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.45);
  pointer-events: auto;
}

.evolve-modal.is-done .evolve-modal__panel,
.evolve-modal.is-cancelled .evolve-modal__panel {
  max-width: min(92vw, 360px);
  padding: 12px 14px;
}

.evolve-modal__title {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.evolve-modal__title[hidden],
.evolve-modal__text[hidden] {
  display: none;
}

.evolve-modal__text {
  margin: 0 0 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  min-height: 0;
}

.evolve-modal__actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.evolve-modal__cancel,
.evolve-modal__ok {
  min-width: 6.5rem;
  padding: 8px 12px;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.evolve-modal__cancel {
  background: rgba(69, 10, 10, 0.55);
  border: 1px solid rgba(248, 113, 113, 0.45);
}

.evolve-modal__cancel:hover {
  border-color: rgba(248, 113, 113, 0.75);
  background: rgba(127, 29, 29, 0.65);
}

.evolve-modal__ok {
  background: rgba(12, 74, 110, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.5);
}

.evolve-modal__ok:hover {
  border-color: rgba(125, 211, 252, 0.75);
  background: rgba(14, 116, 144, 0.75);
}

.mart__body {
  position: relative;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
}

.mart__money {
  font-size: 15px;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.02em;
}

.mart__tabs {
  display: flex;
  gap: 8px;
}

.mart__tab {
  flex: 1;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(9, 15, 28, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.mart__tab:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.1);
}

.mart__tab.is-active {
  color: var(--text);
  border-color: rgba(250, 204, 21, 0.5);
  background: rgba(250, 204, 21, 0.12);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.25);
}

.mart__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 12px;
  min-height: 0;
  flex: 1;
}

.mart__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  align-content: start;
  max-height: 360px;
  overflow-y: auto;
  padding: 2px;
}

.mart__empty {
  margin: 0;
  padding: 12px 8px;
  font-size: 12px;
  color: var(--text-dim);
  grid-column: 1 / -1;
}

.mart__slot {
  --slot-accent: #facc15;
  position: relative;
  width: 100%;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px 8px;
  font: inherit;
  color: var(--text);
  background: rgba(9, 15, 28, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
  text-align: center;
}

.mart__slot:hover {
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-1px);
}

.mart__slot.is-selected,
.mart__slot.is-active {
  border-color: var(--slot-accent);
  background: rgba(250, 204, 21, 0.12);
  box-shadow: 0 0 0 1px var(--slot-accent), 0 0 18px -4px var(--slot-accent);
}

.mart__slot-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mart__slot-name {
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mart__slot-price {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fde68a;
  line-height: 1;
}

.mart__row-icon,
.mart__slot-icon,
.mart__detail-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.mart__icon-img,
.item-hotbar__img,
.bag__medicine-icon,
.bag__slot-img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  object-fit: contain;
}

.item-icon--tileset,
.mart__icon-img.item-icon--tileset,
.item-hotbar__img.item-icon--tileset,
.bag__slot-img.item-icon--tileset {
  display: inline-block;
  flex-shrink: 0;
  overflow: hidden;
  vertical-align: middle;
  background-repeat: no-repeat;
}

.mart__swatch {
  --swatch: #94a3b8;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 6px color-mix(in srgb, var(--swatch) 45%, transparent);
}

.mart__swatch--diamond {
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.mart__detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(9, 15, 28, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
}

.mart__detail-name {
  font-size: 15px;
  font-weight: 700;
}

.mart__detail-meta {
  font-size: 12px;
  color: #fde68a;
}

.mart__detail-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
  min-height: 2.8em;
}

.mart__qty {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.mart__qty-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.mart__qty-input {
  width: 56px;
  padding: 5px 6px;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
}

.mart__qty-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.mart__qty-btn {
  min-width: 36px;
  padding: 5px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  cursor: pointer;
}

.mart__qty-btn:hover:not(:disabled) {
  border-color: rgba(253, 230, 138, 0.55);
  background: rgba(253, 230, 138, 0.12);
}

.mart__qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mart__action {
  flex: 1;
  min-width: 120px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.mart__action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mart__message {
  margin: 0;
  min-height: 1.2em;
  font-size: 12px;
  color: var(--text-dim);
}

.mart__message[data-tone="good"] {
  color: #86efac;
}

.mart__message[data-tone="bad"] {
  color: #f87171;
}

.mart__pix-modal {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.72);
  border-radius: inherit;
}

.mart__pix-modal[hidden] {
  display: none;
}

.mart__pix-card {
  width: min(320px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: rgba(9, 15, 28, 0.96);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.mart__pix-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.mart__pix-qr {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  image-rendering: pixelated;
  background: #fff;
  border-radius: 8px;
}

.mart__pix-code {
  width: 100%;
  min-height: 64px;
  resize: none;
  padding: 8px;
  font: inherit;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
}

.mart__pix-timer,
.mart__pix-status {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

.mart__pix-actions {
  display: flex;
  gap: 8px;
}

.mart__pix-copy,
.mart__pix-dismiss {
  flex: 1;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  cursor: pointer;
}

.mart__pix-copy {
  color: #0f172a;
  background: linear-gradient(180deg, #86efac, #22c55e);
  border: none;
}

.mart__action--pix,
.mart__tab[data-mode="pix"].is-active {
  border-color: rgba(52, 211, 153, 0.55);
}

.window--mart {
  width: min(620px, calc(100vw - 24px));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5200;
}

.bag__money {
  margin: 8px 0 2px;
}

.bag__money b {
  color: #fde68a;
}

@media (max-width: 640px) {
  .mart__layout {
    grid-template-columns: 1fr;
  }

  .mart__list {
    max-height: 200px;
  }
}

/* ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ Title / MMO login (cinematic start page) ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ */
body.is-title-menu #game,
body.is-title-menu #hud-topbar,
body.is-title-menu #symbiosis-hud,
body.is-title-menu #item-hotbar {
  visibility: hidden;
  pointer-events: none;
}

.mmo-login[hidden] {
  display: none !important;
}

.mmo-login:not([hidden]) {
  --title-ink: #f4f7fb;
  --title-muted: rgba(226, 232, 240, 0.78);
  --title-line: rgba(226, 232, 240, 0.16);
  --title-accent: #5eead4;
  --title-accent-deep: #0d9488;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #071018;
  overflow: hidden;
  font-family: "Figtree", "Segoe UI", system-ui, sans-serif;
  color: var(--title-ink);
}

.mmo-login__splash {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #071018;
}

.mmo-login__splash-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity var(--splash-crossfade-ms, 1400ms) ease,
    transform 12s ease-out;
  will-change: opacity, transform;
}

.mmo-login__splash-img.is-visible {
  opacity: 1;
  transform: scale(1);
}

.mmo-login__splash-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 16, 24, 0.38) 0%, rgba(7, 16, 24, 0.06) 36%, rgba(7, 16, 24, 0.22) 100%),
    linear-gradient(180deg, rgba(7, 16, 24, 0.18) 0%, rgba(7, 16, 24, 0.08) 42%, rgba(7, 16, 24, 0.48) 78%, rgba(7, 16, 24, 0.86) 100%);
}

.mmo-login__boot {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: max(32px, 6vh);
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(7, 16, 24, 0.55);
  border: 1px solid rgba(94, 234, 212, 0.18);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.mmo-login--booting .mmo-login__boot {
  display: inline-flex;
}

.mmo-login__boot-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(94, 234, 212, 0.22);
  border-top-color: var(--title-accent, #5eead4);
  animation: mmo-login-spin 0.7s linear infinite;
}

.mmo-login__boot-text {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--title-ink, #f4f7fb);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.mmo-login--booting .mmo-login__top,
.mmo-login--booting .mmo-login__stage {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.mmo-login--ready .mmo-login__top,
.mmo-login--ready .mmo-login__stage {
  visibility: visible;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .mmo-login__splash-img {
    transition: none;
    transform: none;
  }

  .mmo-login__boot-spinner {
    animation: none;
    border-top-color: rgba(94, 234, 212, 0.55);
  }

  .mmo-login__hero,
  .mmo-login__sheet,
  .mmo-login--ready .mmo-login__top,
  .mmo-login--ready .mmo-login__hero {
    animation: none;
  }
}

.mmo-login__top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px 0;
}

.mmo-login__top-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.mmo-login__top-nav .mmo-login__text-link {
  margin-top: 0;
}

.mmo-login__lang {
  display: flex;
  justify-content: flex-end;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch--compact .lang-switch__select {
  min-width: 148px;
  padding: 4px 8px;
  font-size: 0.72rem;
}

.lang-switch__label {
  font-size: 0.78rem;
  color: var(--title-muted, var(--text-dim));
  letter-spacing: 0.04em;
}

.lang-switch__select {
  min-width: 188px;
  max-width: min(280px, 42vw);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--title-line, var(--panel-border));
  background: rgba(4, 12, 18, 0.55);
  color: var(--title-ink, var(--text));
  font-size: 0.84rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.lang-switch__select:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.18);
}

.mmo-login__stage {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: end;
  justify-items: start;
  padding: clamp(24px, 5vh, 48px) clamp(22px, 5vw, 72px) clamp(28px, 5vh, 56px);
  min-height: 0;
}

.mmo-login__hero {
  width: min(520px, 100%);
}

.mmo-login--ready .mmo-login__top,
.mmo-login--ready .mmo-login__hero {
  animation: mmo-login-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mmo-login--ready .mmo-login__top {
  animation-duration: 560ms;
}

/* Logo já está na splash art — h1 fica só para acessibilidade / aria-labelledby */
.mmo-login__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mmo-login__subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  font-weight: 500;
  color: var(--title-ink);
  line-height: 1.45;
  max-width: 36ch;
  margin: 0 0 22px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.mmo-login__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(440px, 100%);
}

.mmo-login__cta > .mmo-login__btn {
  flex: 1 1 180px;
}

.mmo-login__cta > .mmo-login__continue,
.mmo-login__cta > .mmo-login__text-link {
  flex: 1 1 100%;
}

.mmo-login__continue {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border-radius: 4px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  color: var(--title-ink);
  background: rgba(7, 16, 24, 0.55);
  backdrop-filter: blur(10px);
  font-family: inherit;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.mmo-login__continue:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, 0.65);
  background: rgba(7, 16, 24, 0.7);
}

.mmo-login__continue:active {
  transform: translateY(0);
}

.mmo-login__continue-label {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--title-accent);
}

.mmo-login__continue-body {
  min-width: 0;
}

.mmo-login__continue-hint {
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--title-ink);
  animation: mmo-login-press-blink 1.15s steps(1, end) infinite;
}

.mmo-login__continue.is-loading {
  pointer-events: none;
  border-color: rgba(94, 234, 212, 0.75);
  background: rgba(7, 16, 24, 0.78);
}

.mmo-login__continue.is-loading .mmo-login__continue-hint {
  animation: mmo-login-loading-pulse 0.9s ease-in-out infinite;
  letter-spacing: 0.06em;
  color: var(--title-accent);
}

.mmo-login--connecting .mmo-login__cta {
  pointer-events: none;
  opacity: 0.78;
}

.mmo-login--connecting .mmo-login__continue.is-loading {
  opacity: 1;
}

.mmo-login--connecting [data-mmo-enter] {
  opacity: 0.65;
  pointer-events: none;
}

.mmo-login__loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(4, 10, 16, 0.55);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.mmo-login__loading[hidden] {
  display: none;
}

.mmo-login__loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(94, 234, 212, 0.22);
  border-top-color: var(--title-accent, #5eead4);
  animation: mmo-login-spin 0.7s linear infinite;
}

.mmo-login__loading-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--title-ink, #f4f7fb);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.mmo-login__progress {
  width: min(280px, 70vw);
  height: 3px;
  border-radius: 99px;
  background: rgba(94, 234, 212, 0.22);
  overflow: hidden;
}

.mmo-login__progress-fill {
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--title-accent, #5eead4);
  transition: transform 180ms ease;
}

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

@keyframes mmo-login-press-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.2;
  }
}

@keyframes mmo-login-loading-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.mmo-login__welcome {
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: var(--title-muted);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.mmo-login__btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    filter 160ms ease,
    opacity 160ms ease;
}

.mmo-login__btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.mmo-login__btn:active:not(:disabled) {
  transform: translateY(0);
}

.mmo-login__btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  filter: none;
}

.mmo-login__btn.is-checking:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mmo-login__btn[hidden] {
  display: none !important;
}

.mmo-login__btn-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(4, 47, 46, 0.22);
  border-top-color: rgba(4, 47, 46, 0.85);
  animation: mmo-login-spin 0.7s linear infinite;
}

.mmo-login__btn:not(.is-checking) .mmo-login__btn-spinner {
  display: none;
}

.mmo-login--checking .mmo-login__status--checking {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  animation: mmo-login-loading-pulse 1.1s ease-in-out infinite;
}

.mmo-login--checking .mmo-login__status--checking::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(94, 234, 212, 0.25);
  border-top-color: var(--title-accent, #5eead4);
  animation: mmo-login-spin 0.7s linear infinite;
}

.mmo-login__btn--primary {
  border: none;
  color: #042f2e;
  background: linear-gradient(135deg, #5eead4 0%, #2dd4bf 55%, #14b8a6 100%);
  box-shadow: 0 10px 30px rgba(13, 148, 136, 0.28);
}

.mmo-login__btn--primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.mmo-login__btn--ghost {
  border: 1px solid rgba(244, 247, 251, 0.28);
  color: var(--title-ink);
  background: rgba(7, 16, 24, 0.28);
  backdrop-filter: blur(6px);
}

.mmo-login__btn--ghost:hover:not(:disabled) {
  border-color: rgba(94, 234, 212, 0.55);
  background: rgba(7, 16, 24, 0.42);
}

.mmo-login__link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

.mmo-login__text-link {
  justify-self: start;
  margin-top: 4px;
  color: var(--title-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.mmo-login__text-link:hover {
  color: var(--title-accent);
  border-bottom-color: rgba(94, 234, 212, 0.45);
}

.mmo-login__sheet {
  width: min(780px, 100%);
  max-height: min(78vh, 720px);
  overflow: auto;
  padding: 8px 4px 4px;
  animation: mmo-login-rise 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mmo-login__back {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--title-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0;
  margin: 0 0 16px;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.mmo-login__back:hover {
  color: var(--title-accent);
}

.mmo-login__back::before {
  content: "\2190\00a0";
}

.mmo-login__sheet-title {
  font-family: "Syne", "Figtree", sans-serif;
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.mmo-login__sheet-copy {
  font-size: 0.92rem;
  color: var(--title-muted);
  line-height: 1.45;
  margin: 0 0 18px;
  max-width: 36ch;
}

.mmo-login__auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(440px, 100%);
  margin-bottom: 8px;
}

.mmo-login__auth-actions > .mmo-login__btn {
  flex: 1 1 180px;
}

.mmo-login__slots {
  display: grid;
  gap: 10px;
}

.mmo-login__slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 4px;
  border: 1px solid rgba(244, 247, 251, 0.14);
  background: rgba(7, 16, 24, 0.55);
  backdrop-filter: blur(10px);
}

.mmo-login__slot--new {
  border-style: dashed;
  background: rgba(7, 16, 24, 0.35);
}

.mmo-login__slot-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mmo-login__slot-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.mmo-login__slot-vitals {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.mmo-login__slot-level {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #7dd3fc;
}

.mmo-login__slot-hearts {
  --heart-fill: #e11d48;
  --heart-empty: rgba(15, 23, 42, 0.55);
  --heart-stroke: rgba(15, 23, 42, 0.9);
  gap: 2px;
}

.mmo-login__slot-heart {
  width: 14px;
  height: 14px;
}

.mmo-login__slot-location {
  display: grid;
  gap: 1px;
  min-width: 0;
  margin-top: 2px;
  color: var(--title-ink);
}

.mmo-login__slot-location-label {
  color: var(--title-accent);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mmo-login__slot-location-value {
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mmo-login__slot-detail,
.mmo-login__slot-saved {
  font-size: 0.76rem;
  color: var(--title-muted);
  line-height: 1.35;
}

.mmo-login__slot-party {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.mmo-login__slot-party-empty {
  font-size: 0.72rem;
  color: var(--title-muted);
  opacity: 0.85;
}

.mmo-login__slot-mon {
  --poke: var(--title-accent);
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mmo-login__slot-mon .pokemon-portrait {
  border-color: color-mix(in srgb, var(--poke) 45%, rgba(148, 163, 184, 0.25));
}

.mmo-login__slot-mon-lv {
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  color: var(--title-muted);
  letter-spacing: 0.02em;
}

.mmo-login__slot-badges,
.mmo-login__slot-shrines {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.mmo-login__slot-badge {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 224, 130, 0.2), transparent 62%),
    rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(201, 162, 39, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.mmo-login__slot-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mmo-login__slot-shrine {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 1px 6px 1px 2px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.mmo-login__slot-shrine .type-icon {
  flex: 0 0 auto;
}

.mmo-login__slot-shrine-count {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(244, 247, 251, 0.92);
}

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

.mmo-login__slot-play,
.mmo-login__slot-delete {
  padding: 8px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.mmo-login__slot-play {
  border: none;
  background: rgba(94, 234, 212, 0.18);
  color: var(--title-ink);
}

.mmo-login__slot-play:hover {
  background: rgba(94, 234, 212, 0.28);
}

.mmo-login__slot-delete {
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.mmo-login__slot-delete:hover {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.55);
}

.mmo-login__status {
  min-height: 1.2em;
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--title-accent);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.mmo-login__status--error {
  color: #f87171;
}

.mmo-login__hint {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--title-muted);
  max-width: 42ch;
}

.mmo-login__hint code {
  font-size: 0.76rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(7, 16, 24, 0.7);
  border: 1px solid var(--title-line);
}

@keyframes mmo-login-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .mmo-login__stage {
    align-items: end;
    padding-bottom: 24px;
  }

  .mmo-login__sheet {
    width: 100%;
  }

  .mmo-login__cta,
  .mmo-login__auth-actions {
    width: 100%;
  }

  .mmo-login__cta > .mmo-login__btn,
  .mmo-login__auth-actions > .mmo-login__btn {
    flex-basis: 100%;
  }

  .mmo-login__continue {
    padding: 12px;
  }
}

/* Item obtain toast (ícone + acumulação ×N) */
.item-obtain-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 7200;
  min-width: 168px;
  max-width: min(280px, calc(100vw - 32px));
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(16, 12, 8, 0.9);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.item-obtain-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.item-obtain-toast[hidden] {
  display: none !important;
}

.item-obtain-toast__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.item-obtain-toast__row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.item-obtain-toast__row.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.item-obtain-toast__row.is-bump .item-obtain-toast__qty {
  animation: item-obtain-qty-bump 0.28s ease;
}

.item-obtain-toast__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.item-obtain-toast__glyph {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}

.item-obtain-toast__glyph--empty {
  display: block;
  border-radius: 6px;
  background: rgba(253, 230, 138, 0.18);
}

.item-obtain-toast__name {
  min-width: 0;
  color: #fef3c7;
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-obtain-toast__qty {
  color: #fde68a;
  font-size: 0.92rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

@keyframes item-obtain-qty-bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.28);
  }
  100% {
    transform: scale(1);
  }
}

/* ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ PvP duel UI ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ */
.duel-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(24, 16, 8, 0.88);
  color: #fde68a;
  font-size: 0.92rem;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.duel-toast[hidden],
.duel-offer[hidden],
.gym-offer[hidden],
.dive-offer[hidden] {
  display: none !important;
}

#win-respawn {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 32px));
  z-index: 9600;
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(165deg, rgba(28, 12, 14, 0.96), rgba(10, 8, 12, 0.94));
}

#win-respawn .window__bar {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.18), rgba(248, 113, 113, 0.04));
}

#win-respawn .window__title {
  color: #fecaca;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 14px;
  font-weight: 650;
}

#win-respawn .window__body {
  padding: 14px 16px 16px;
  text-align: left;
}

.respawn-cause {
  margin: 0 0 12px;
  color: #fecaca;
  font-weight: 600;
  line-height: 1.4;
}

.respawn-facts {
  margin: 0 0 14px;
  display: grid;
  gap: 6px;
}

.respawn-facts__row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
}

.respawn-facts__row dt {
  margin: 0;
  color: var(--text-dim);
  font-weight: 500;
}

.respawn-facts__row dd {
  margin: 0;
  color: #fff1f2;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.respawn-hint {
  color: var(--text-dim);
  margin: 0 0 14px;
  line-height: 1.45;
  font-size: 13px;
}

.respawn-overlay__btn {
  appearance: none;
  border: 1px solid rgba(252, 165, 165, 0.45);
  border-radius: 10px;
  padding: 10px 22px;
  font: inherit;
  font-weight: 650;
  color: #fff1f2;
  background: linear-gradient(180deg, #b91c1c, #7f1d1d);
  cursor: pointer;
  width: 100%;
}

.respawn-overlay__btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.respawn-overlay__btn:disabled {
  cursor: wait;
  opacity: 0.72;
  filter: saturate(0.65);
}

.duel-offer:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 18, 0.55);
}

.duel-offer__panel {
  width: min(380px, calc(100vw - 32px));
  padding: 22px 20px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: linear-gradient(165deg, rgba(30, 20, 10, 0.96), rgba(12, 10, 8, 0.94));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.duel-offer__title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #fde68a;
}

.duel-offer__text {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.duel-offer__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.duel-offer__accept,
.duel-offer__decline {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.duel-offer__accept {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #1c1004;
}

.duel-offer__decline {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}

.item-qty-modal[hidden] {
  display: none !important;
}

.item-qty-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 18, 0.55);
}

.item-qty-modal__panel {
  width: min(360px, calc(100vw - 32px));
  padding: 22px 20px;
  border-radius: 14px;
  border: 1px solid rgba(232, 121, 249, 0.4);
  background: linear-gradient(165deg, rgba(36, 18, 42, 0.97), rgba(12, 10, 18, 0.96));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.item-qty-modal__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
}

.item-qty-modal__icon-img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}

.item-qty-modal__title {
  margin: 0;
  font-size: 1.15rem;
  color: #f5d0fe;
}

.item-qty-modal__text {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
}

.item-qty-modal__qty-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.item-qty-modal__qty-input {
  width: 64px;
  padding: 6px 8px;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  text-align: center;
}

.item-qty-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.item-qty-modal__confirm,
.item-qty-modal__cancel {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font: inherit;
}

.item-qty-modal__confirm {
  background: linear-gradient(135deg, #e879f9, #c026d3);
  color: #1c0418;
}

.item-qty-modal__cancel {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}

.plot-forfeit-modal[hidden] {
  display: none !important;
}

.plot-forfeit-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9610;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 18, 0.58);
}

.plot-forfeit-modal__panel {
  width: min(400px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  padding: 20px 18px;
  border-radius: 14px;
  border: 1px solid rgba(134, 239, 172, 0.35);
  background: linear-gradient(165deg, rgba(18, 36, 28, 0.97), rgba(10, 14, 18, 0.96));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plot-forfeit-modal__title {
  margin: 0;
  font-size: 1.12rem;
  color: #bbf7d0;
}

.plot-forfeit-modal__text {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
}

.plot-forfeit-modal__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  max-height: 340px;
  padding-right: 2px;
}

.plot-forfeit-modal__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  color: inherit;
  box-sizing: border-box;
}

.plot-forfeit-modal__item:hover {
  border-color: rgba(134, 239, 172, 0.45);
  background: rgba(22, 40, 30, 0.7);
}

.plot-forfeit-modal__delete {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.plot-forfeit-modal__delete:hover {
  border-color: rgba(248, 113, 113, 0.75);
  background: rgba(153, 27, 27, 0.55);
  color: #fff;
}

.plot-forfeit-modal__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.plot-forfeit-modal__icon-img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.plot-forfeit-modal__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.plot-forfeit-modal__name {
  font-weight: 600;
  font-size: 13px;
  color: #f8fafc;
}

.plot-forfeit-modal__meta {
  font-size: 11px;
  color: var(--text-dim);
}

.plot-forfeit-modal__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.plot-forfeit-modal__clear-all,
.plot-forfeit-modal__cancel {
  padding: 10px 14px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.plot-forfeit-modal__clear-all {
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}

.plot-forfeit-modal__clear-all:hover {
  border-color: rgba(248, 113, 113, 0.75);
  background: rgba(153, 27, 27, 0.55);
  color: #fff;
}

.plot-forfeit-modal__cancel {
  margin-left: auto;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text-dim);
}

.player-skill-layer {
  position: fixed;
  z-index: 9200;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 24px));
  pointer-events: auto;
}

.player-skill-layer[hidden] {
  display: none !important;
}

.player-skill {
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(165deg, rgba(18, 28, 42, 0.97), rgba(8, 12, 20, 0.96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.player-skill__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
}

.player-skill__title {
  font-weight: 700;
  color: #e0f2fe;
  flex: 1;
}

.player-skill__points {
  font-size: 12px;
  color: var(--text-dim);
}

.player-skill__points.has-points {
  color: #86efac;
  font-weight: 700;
}

.player-skill__close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
}

.player-skill__close:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.15);
}

.player-skill__hint {
  margin: 0;
  padding: 10px 14px 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}

.player-skill__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 16px;
  max-height: min(58vh, 460px);
  overflow: auto;
}

.player-skill__row {
  display: grid;
  grid-template-columns: 44px 1fr 40px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
}

.player-skill__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.player-skill__icon-img {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
}

.player-skill__body {
  min-width: 0;
}

.player-skill__row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.player-skill__name {
  font-weight: 700;
  font-size: 13px;
  color: #f8fafc;
}

.player-skill__rank {
  font-size: 11px;
  color: #7dd3fc;
  white-space: nowrap;
}

.player-skill__desc,
.player-skill__effect {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-dim);
}

.player-skill__effect {
  color: #86efac;
}

.player-skill__invest {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: linear-gradient(180deg, rgba(34, 80, 50, 0.95), rgba(16, 40, 28, 0.95));
  color: #bbf7d0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.player-skill__invest:hover:not(:disabled) {
  border-color: rgba(134, 239, 172, 0.8);
  color: #fff;
}

.player-skill__invest:disabled {
  opacity: 0.35;
  cursor: default;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-dim);
}

.gym-offer:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9550;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 18, 0.55);
}

.gym-offer__panel {
  width: min(400px, calc(100vw - 32px));
  padding: 22px 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.gym-offer__title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #93c5fd;
}

.gym-offer__text {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.gym-offer__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gym-offer__accept,
.gym-offer__decline {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.gym-offer__accept {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #eff6ff;
  border: none;
}

.gym-offer__decline {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}

.dive-offer:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9550;
  display: grid;
  place-items: center;
  background: rgba(4, 12, 24, 0.58);
}

.dive-offer__panel {
  width: min(400px, calc(100vw - 32px));
  padding: 22px 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 40, 64, 0.97), rgba(8, 18, 36, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.dive-offer__title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #7dd3fc;
}

.dive-offer__text {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.dive-offer__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dive-offer__accept,
.dive-offer__decline {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.dive-offer__accept {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ecfeff;
  border: none;
}

.dive-offer__decline {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}

.ferry-offer[hidden] {
  display: none !important;
}

.ferry-offer:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9550;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 18, 0.55);
}

.ferry-offer__panel {
  width: min(420px, calc(100vw - 32px));
  padding: 22px 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(12, 74, 110, 0.96), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.ferry-offer__title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #7dd3fc;
}

.ferry-offer__fare,
.ferry-offer__money {
  color: var(--text-dim);
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.ferry-offer__list {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
}

.ferry-offer__dest {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ecfeff;
  border: none;
  text-align: left;
}

.ferry-offer__dest:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ferry-offer__empty {
  color: var(--text-dim);
  margin: 0;
}

.ferry-offer__actions {
  display: grid;
}

.ferry-offer__close {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}

/* ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ MMO area chat ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ */

.trade-offer[hidden],
.trade-window[hidden] {
  display: none !important;
}

.window--mmo-chat {
  left: 16px;
  bottom: 210px;
  top: auto;
  width: min(320px, calc(100vw - 32px));
  max-height: none;
  z-index: 8500;
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(8, 12, 24, 0.9);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.window--mmo-chat .window__bar {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.12), rgba(96, 165, 250, 0.02));
  border-bottom-color: rgba(96, 165, 250, 0.18);
}

.window--mmo-chat .window__title {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
  font-weight: 700;
  color: #93c5fd;
}

.window--mmo-chat .window__body {
  padding: 0;
  overflow: hidden;
}

.window--mmo-chat .mmo-chat__log,
.window--mmo-chat .mmo-chat__input {
  user-select: text;
}

.mmo-chat__log {
  max-height: 160px;
  overflow-y: auto;
  padding: 8px 10px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.mmo-chat__line {
  margin: 0 0 6px;
  color: var(--text-dim);
  word-break: break-word;
}

.mmo-chat__line strong {
  color: #dbeafe;
}

.mmo-chat__form {
  display: flex;
  padding: 8px;
  border-top: 1px solid rgba(96, 165, 250, 0.12);
}

.mmo-chat__input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(4, 8, 18, 0.75);
  color: var(--text);
  font-size: 0.84rem;
}

/* ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ MMO trading ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ÃÂ¢Ã¢ÂÂÃ¢ÂÂ¬ */

.trade-offer:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 18, 0.55);
}

.trade-offer__panel {
  width: min(380px, calc(100vw - 32px));
  padding: 22px 20px;
  border-radius: 14px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: linear-gradient(165deg, rgba(10, 24, 20, 0.96), rgba(8, 12, 10, 0.94));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.trade-offer__title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #6ee7b7;
}

.trade-offer__text {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.trade-offer__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.trade-offer__accept,
.trade-offer__decline,
.trade-window__confirm,
.trade-window__cancel,
.trade-window__slot {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.trade-offer__accept,
.trade-window__confirm {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #052e1a;
  border: none;
}

.trade-offer__decline,
.trade-window__cancel {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}

.trade-window:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9650;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 18, 0.6);
}

.trade-window__panel {
  width: min(520px, calc(100vw - 32px));
  padding: 22px 20px;
  border-radius: 14px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: linear-gradient(165deg, rgba(10, 24, 20, 0.97), rgba(8, 12, 10, 0.95));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.trade-window__title {
  font-size: 1.2rem;
  color: #6ee7b7;
  margin-bottom: 4px;
}

.trade-window__partner {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.trade-window__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.trade-window__side-title {
  font-size: 0.9rem;
  color: #a7f3d0;
  margin-bottom: 8px;
}

.trade-window__slots {
  display: grid;
  gap: 6px;
}

.trade-window__slot {
  text-align: left;
  background: rgba(4, 12, 10, 0.7);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--text);
}

.trade-window__slot--selected {
  border-color: rgba(52, 211, 153, 0.75);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.35);
}

.trade-window__slot--blocked,
.trade-window__slot:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.trade-window__their-offer {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(4, 12, 10, 0.7);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--text);
  margin-bottom: 8px;
}

.trade-window__status {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.trade-window__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.trade-window__confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==========================================================================
   Emerald skin ÃÂ¢Ã¢ÂÂ¬Ã¢ÂÂ PokÃÂÃÂ©mon Emerald (GBA) look for the in-game HUD.
   Cream text-box frames with teal borders, blue party cards, classic
   green HP / blue EXP bars. Overrides the base HUD styles above.
   ========================================================================== */
:root {
  --em-cream: linear-gradient(180deg, #fffbe6, #f3e7c3);
  --em-cream-flat: #f8efd0;
  --em-ink: #46403a;
  --em-ink-dim: #7a6f5b;
  --em-frame: #1d5a54;
  --em-frame-inner: #8ed4c8;
  --em-teal: #2b8f86;
  --em-red: #c83828;
  --em-gold: #8a6d1c;
  --em-card-hi: #63a8e8;
  --em-card-lo: #3c74c4;
  --em-card-edge: #17376e;
  --em-bar-casing: #3a4438;
  --em-bar-edge: #232b21;
  --em-hp: linear-gradient(180deg, #8ce890 0%, #8ce890 45%, #40c050 45%, #40c050 100%);
  --em-hp-low: linear-gradient(180deg, #f8e070 0%, #f8e070 45%, #e8a010 45%, #e8a010 100%);
  --em-hp-down: linear-gradient(180deg, #f87860 0%, #f87860 45%, #d03020 45%, #d03020 100%);
  --em-exp: linear-gradient(180deg, #70c8f8 0%, #70c8f8 45%, #2890f0 45%, #2890f0 100%);
}

/* ---- Topbar chips: Emerald text-box frame ---- */
.hud-chip {
  color: var(--em-ink);
  background: var(--em-cream);
  border: 2px solid var(--em-frame);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 2px var(--em-frame-inner),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.3);
  backdrop-filter: none;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hud-chip svg {
  color: var(--em-teal);
  stroke-width: 2;
}

.hud-chip--money b {
  color: var(--em-gold);
}

.hud-chip--clock > b {
  color: var(--em-ink);
}

.poke-radar {
  color: var(--em-ink);
  background: var(--em-cream);
  border: 2px solid var(--em-frame);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 2px var(--em-frame-inner),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.3);
  backdrop-filter: none;
}

.poke-radar__toggle {
  border-color: rgba(122, 111, 91, 0.45);
  background: rgba(23, 55, 110, 0.08);
  color: var(--em-ink);
}

.poke-radar__toggle:hover {
  background: rgba(23, 55, 110, 0.16);
}

.poke-radar__cell {
  background: rgba(23, 55, 110, 0.08);
  box-shadow: inset 0 0 0 1px rgba(23, 55, 110, 0.12);
}

.poke-radar__rate {
  color: var(--em-ink, #1a2f1c);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.poke-radar__cell.is-water-rate .poke-radar__rate {
  color: #0b3d5c;
}

.poke-radar__cell.is-fixed .poke-radar__rate {
  color: #7a3e08;
}

.hud-chip--biome,
.hud-chip--coords {
  color: var(--em-ink-dim);
}

.hud-zone__level {
  color: var(--em-ink-dim);
  border-left-color: rgba(122, 111, 91, 0.45);
}

.hud-zone__track {
  color: var(--em-ink-dim);
}

.hud-clock__period {
  color: var(--em-ink-dim);
}

.hud-weather-forecast__pointer {
  border-top-color: var(--em-gold);
}

.hud-weather-forecast__slot:not(:last-child)::after {
  background: rgba(122, 111, 91, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 253, 240, 0.35);
}

.hud-weather-forecast__slot[data-weather="clear"] {
  color: var(--em-gold);
}

.hud-weather-forecast__slot[data-weather="cloudy"] {
  color: #6b6354;
}

.hud-weather-forecast__slot[data-weather="rain"] {
  color: var(--em-teal);
}

.hud-weather-forecast__slot[data-weather="blizzard"] {
  color: #5b9bb8;
}

.hud-weather-forecast__slot[data-weather="sandstorm"] {
  color: #b45309;
}

.hud-weather-forecast__slot[data-weather="fog"] {
  color: #6d5a8d;
}

.hud-weather-forecast__slot[data-weather="gale"] {
  color: #6b6354;
}

.hud-weather-forecast__slot[data-intensity="strong"]::before {
  background: var(--em-gold);
  box-shadow: 0 0 0 1px rgba(255, 253, 240, 0.45);
}

.hud-weather-forecast__slot[data-intensity="weak"] {
  opacity: 0.58;
}

.hud-weather-forecast__slot[data-weather="clear"] .hud-wx--clear {
  fill: rgba(138, 109, 28, 0.22);
}

.hud-weather-forecast__slot[data-weather="cloudy"] .hud-wx--cloudy {
  fill: rgba(107, 99, 84, 0.22);
}

.hud-weather-forecast__slot[data-weather="rain"] .hud-wx--rain {
  fill: rgba(43, 143, 134, 0.2);
}

.hud-weather-forecast__slot[data-weather="blizzard"] .hud-wx--blizzard {
  fill: rgba(125, 180, 210, 0.22);
}

.hud-weather-forecast__slot[data-weather="sandstorm"] .hud-wx--sandstorm {
  fill: rgba(180, 120, 40, 0.22);
}

.hud-weather-forecast__slot[data-weather="fog"] .hud-wx--fog {
  fill: rgba(110, 90, 140, 0.22);
}

.hud-weather-forecast__slot[data-weather="gale"] .hud-wx--gale {
  fill: rgba(107, 99, 84, 0.22);
}

.hud-wind {
  color: var(--em-ink-dim);
  border-left-color: rgba(122, 111, 91, 0.35);
}

.hud-shrine-compass {
  border-left-color: rgba(122, 111, 91, 0.35);
}

.hud-clock__fps {
  color: var(--em-ink-dim);
  border-left-color: rgba(122, 111, 91, 0.35);
}

.hud-clock__fps b {
  color: var(--em-teal);
}

.hud-chip--team-mode {
  color: var(--em-ink-dim);
}

.hud-chip--team-mode select {
  color: var(--em-ink);
  background: #fffbe8;
  border: 1px solid #c4b384;
  box-shadow: inset 0 1px 2px rgba(122, 111, 91, 0.25);
}

.hud-chip--team-mode select:focus-visible {
  border-color: var(--em-red);
  box-shadow: 0 0 0 2px rgba(200, 56, 40, 0.25);
}

.hud-chip--team-mode option {
  color: var(--em-ink);
  background: #fffbe8;
}

.hud-chip--menu {
  color: var(--em-ink);
}

.hud-chip--menu:hover {
  background: #fffdf0;
  border-color: var(--em-red);
}

.hud-chip kbd,
.game-menu__tab kbd {
  color: #5c5344;
  background: #ede0b4;
  border: 1px solid #c4b384;
  box-shadow: inset 0 -2px 0 rgba(122, 111, 91, 0.35);
  text-shadow: none;
}

/* ---- Party strip: glass combat dock (emerald soft overrides) ---- */
.hud-party {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.party-hud__strip.party-roster {
  background: linear-gradient(180deg, rgba(46, 150, 142, 0.72), rgba(22, 79, 74, 0.82));
  border: 2px solid #164f4a;
  box-shadow:
    inset 0 0 0 1px rgba(224, 248, 240, 0.35),
    0 10px 24px rgba(0, 0, 0, 0.35);
}

.party-detail {
  background: linear-gradient(180deg, rgba(86, 189, 178, 0.18), rgba(12, 18, 32, 0.92));
  border: 2px solid #164f4a;
  box-shadow:
    inset 0 0 0 1px rgba(224, 248, 240, 0.28),
    0 16px 36px rgba(0, 0, 0, 0.42);
}

.party-detail__moves--combat {
  background: linear-gradient(180deg, rgba(86, 189, 178, 0.16), rgba(12, 18, 32, 0.94));
  border: 2px solid #164f4a;
  box-shadow:
    inset 0 0 0 1px rgba(224, 248, 240, 0.28),
    0 16px 36px rgba(0, 0, 0, 0.42);
}

.party-detail__moves .skill-chip--info {
  color: #ffffff;
  border-radius: 10px;
}

.party-detail__moves .skill-chip--info .skill-chip__name { color: #fff; }
.party-detail__moves .skill-chip--info .skill-chip__meta { color: #dcecff; }
.party-detail__moves .skill-chip.is-ready {
  border-color: color-mix(in srgb, var(--move-color) 35%, #eaf8b0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 0 0 1px rgba(234, 248, 176, 0.4),
    0 6px 14px rgba(0, 0, 0, 0.28);
}

/* ---- Classic GBA bars: dark casing, flat two-tone fill with top shine ---- */
.party-roster__hp-track,
.hud__hp-track,
.party-roster__pp-track,
.hud__pp-track {
  height: 7px;
  border-radius: 4px;
  background: var(--em-bar-casing);
  border: 1px solid var(--em-bar-edge);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
}

.party-roster__hp-track,
.hud__hp-track {
  height: 14px;
}

.party-detail__bar--hp .party-detail__bar-track {
  height: 12px;
}

.party-roster__exp-track,
.hud__exp-track {
  height: 5px;
  border-radius: 3px;
  background: var(--em-bar-casing);
  border: 1px solid var(--em-bar-edge);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
}

.party-roster__hp-fill,
.hud__hp-fill {
  background: var(--em-hp);
}

.party-roster__pp-fill,
.hud__pp-fill {
  background: linear-gradient(90deg, #1d4ed8, #60a5fa);
}

.party-roster__pp.is-low .party-roster__pp-fill,
.hud__pp.is-low .hud__pp-fill {
  background: linear-gradient(90deg, #1e3a8a, #93c5fd);
}

.party-roster__hp.is-low .party-roster__hp-fill,
.hud__hp.is-low .hud__hp-fill {
  background: var(--em-hp-low);
}

.hud__hp.is-down .hud__hp-fill {
  background: var(--em-hp-down);
}

.party-roster__exp-fill,
.hud__exp-fill {
  background: var(--em-exp);
}

.party-roster__exp.is-gaining .party-roster__exp-fill,
.hud__exp.is-gaining .hud__exp-fill {
  background: linear-gradient(90deg, #eab308, #fde047, #fef08a, #eab308);
  background-size: 200% 100%;
  animation: exp-gain-shimmer 0.9s linear infinite;
  filter: brightness(1.2);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.55);
}

.party-roster__exp.is-gaining .party-roster__exp-value,
.hud__exp.is-gaining .hud__exp-value {
  color: #fde047;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.55);
}

.party-roster__exp.is-max .party-roster__exp-fill,
.hud__exp.is-max .hud__exp-fill {
  background: linear-gradient(180deg, #e0a8f8 0%, #e0a8f8 45%, #9848e0 45%, #9848e0 100%);
}

/* ---- Item hotbar: cream frame with bevelled slots ---- */
.item-hotbar {
  background: var(--em-cream);
  border: 2px solid var(--em-frame);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 2px var(--em-frame-inner),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 14px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: none;
}

.item-hotbar__slot {
  color: var(--em-ink);
  background: #efe3bc;
  border: 1px solid #c8b888;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(122, 111, 91, 0.25);
}

.item-hotbar__slot:hover {
  background: #fff8dc;
  transform: translateY(-1px);
}

.item-hotbar__slot.is-active {
  --slot-accent: var(--em-red);
  border-color: var(--em-red);
  background: #fff8dc;
  box-shadow:
    0 0 0 1px var(--em-red),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.item-hotbar__slot.is-drop-target {
  border-color: #2e968e;
  box-shadow: 0 0 0 1px #2e968e;
}

.item-hotbar__slot.is-received {
  --slot-accent: var(--em-red);
  border-color: var(--em-red);
  background: #fff8dc;
}

.item-hotbar__key {
  color: var(--em-ink-dim);
}

.item-hotbar__count {
  color: var(--em-ink-dim);
}

.item-hotbar__slot.is-active .item-hotbar__count {
  color: var(--em-ink);
}

.item-hotbar__name {
  color: var(--em-ink-dim);
}

.item-hotbar__icon.is-empty {
  border-color: rgba(122, 111, 91, 0.5);
}

.bag__slot {
  color: var(--em-ink);
  background: #efe3bc;
  border: 1px solid #c8b888;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(122, 111, 91, 0.25);
}

.bag__slot:hover {
  background: #fff8dc;
  transform: translateY(-1px);
}

.bag__slot.is-active {
  --slot-accent: var(--em-red);
  border-color: var(--em-red);
  background: #fff8dc;
  box-shadow:
    0 0 0 1px var(--em-red),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.bag__slot-count {
  color: var(--em-ink-dim);
}

.bag__slot.is-active .bag__slot-count {
  color: var(--em-ink);
}

.bag__slot-name {
  color: var(--em-ink-dim);
}

.biomes__card {
  background: linear-gradient(180deg, var(--em-card-hi), var(--em-card-lo));
  border: 2px solid var(--em-card-edge);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: var(--em-ink);
}

.biomes__card-title {
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(23, 55, 110, 0.55);
}

.biomes__card-sub,
.biomes__intro,
.biomes__section-title,
.biomes__empty {
  color: rgba(234, 248, 240, 0.85);
}

.biomes__chip-name {
  color: var(--em-ink-dim);
}

.biomes__chip-frame,
.biomes__ground-preview {
  background: #efe3bc;
  border-color: #c8b888;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.biomes__toolbar {
  background: var(--em-cream);
  border: 2px solid var(--em-frame);
}

.biomes__status,
.biomes__field-label {
  color: var(--em-ink-dim);
}

.biomes__tool,
.biomes__select,
.biomes__number,
.biomes__chip-weight {
  background: #fffbe9;
  border-color: #c8b888;
  color: var(--em-ink);
}

.biomes__tool--primary {
  background: var(--em-red);
  border-color: var(--em-frame);
  color: #fff;
}

.biomes__chip--toggle .biomes__chip-frame {
  border-color: #2f8f3a;
  box-shadow: inset 0 0 0 1px rgba(47, 143, 58, 0.35);
}

.biomes__chip--toggle.is-off .biomes__chip-frame {
  border-color: #c8b888;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* ---- Zone banner: Emerald wooden-sign box ---- */
.zone-banner {
  padding: 12px 26px;
  background: var(--em-cream);
  border: 2px solid var(--em-frame);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 2px var(--em-frame-inner),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 12px 26px rgba(0, 0, 0, 0.35);
}

.zone-banner__name {
  color: var(--em-ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ---- Game menu: Emerald skin disabled (BOTW chrome owns the menu) ---- */

/* ---- Legacy center skill bar (hidden; moves live on party roster) ---- */
#win-skills {
  display: none !important;
}

.skill-hud {
  gap: 8px;
}

.skill-hud__title {
  padding-right: 8px;
  gap: 0;
  border-right-color: rgba(22, 79, 74, 0.55);
}

.skill-hud__title small {
  font-size: 8px;
  letter-spacing: 0.06em;
  color: #e8fff8;
  text-shadow: 1px 1px 0 var(--em-frame);
}

.skill-hud__title b {
  font-size: 12px;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  text-shadow: 1px 1px 0 var(--em-frame);
}

.skill-slot {
  grid-template-columns: 28px 1fr;
  gap: 7px;
  min-width: 106px;
  padding: 5px 8px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--em-card-hi), var(--em-card-lo));
  border: 2px solid var(--em-card-edge);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.skill-slot__dial {
  width: 28px;
  height: 28px;
}

.skill-slot__meta {
  gap: 0;
}

.skill-slot__kind {
  display: none;
}

.skill-slot__name {
  font-size: 11px;
  line-height: 1.2;
  padding-right: 14px;
}

.skill-slot__status {
  font-size: 9px;
}

.skill-slot__key {
  font-size: 9px;
}

.skill-slot__type {
  top: 4px;
  right: 5px;
}

.skill-slot:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.skill-slot:focus-visible {
  outline: 2px solid #fff4a8;
  outline-offset: 2px;
}

.skill-slot.is-ready {
  border-color: #eaf8b0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(234, 248, 176, 0.5);
}

.skill-slot__dial {
  border-color: #142f60;
  background:
    conic-gradient(rgba(14, 31, 63, 0.74) calc(var(--cd, 0) * 360deg), transparent 0),
    radial-gradient(circle at 50% 40%, #75c3f2, #326bb8);
}

.skill-slot__key,
.skill-slot__name {
  color: #ffffff;
  text-shadow: 1px 1px 0 var(--em-card-edge);
}

.skill-slot__kind,
.skill-slot__status {
  color: #dcecff;
}

.skill-slot.is-ready .skill-slot__status {
  color: #eaf8b0;
}

@media (max-width: 860px) {
  .skill-hud__title {
    display: none;
  }

  .skill-slot {
    min-width: 88px;
  }

  .skill-slot__status {
    display: none;
  }
}

.skill-chip {
  appearance: none;
}

/* ---- PokÃÂÃÂ©dex HUD --------------------------------------------------------- */
.pokedex-hud {
  position: fixed;
  inset: 0;
  z-index: 9050;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.pokedex-hud[hidden] {
  display: none !important;
}

.pokedex-hud__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

.pokedex-hud__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pokedex-hud__panel {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 2px solid #c9a227;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  color: var(--text);
}

.pokedex-hud__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.pokedex-hud__title-wrap {
  flex: 1;
  min-width: 0;
}

.pokedex-hud__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.pokedex-hud__summary {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.pokedex-hud__regions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pokedex-hud__region-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: #ffe082;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.32);
}

.pokedex-hud__region-chip--total {
  color: #fff8e1;
  background: rgba(201, 162, 39, 0.22);
  border-color: rgba(201, 162, 39, 0.5);
}

.pokedex-hud__region-name {
  opacity: 0.85;
  font-weight: 600;
}

.pokedex-hud__region-pct {
  font-weight: 800;
}

.pokedex-hud__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pokedex-hud__legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.pokedex-hud__legend-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.pokedex-hud__legend-icon svg {
  width: 14px;
  height: 14px;
}

.pokedex-hud__legend-chip--caught {
  color: #ffcdd2;
  background: rgba(198, 40, 40, 0.16);
  border-color: rgba(198, 40, 40, 0.35);
}

.pokedex-hud__legend-chip--seen {
  color: #bbdefb;
  background: rgba(66, 133, 244, 0.14);
  border-color: rgba(100, 160, 220, 0.35);
}

.pokedex-hud__legend-chip--unseen {
  color: #bdbdbd;
  background: rgba(120, 120, 120, 0.14);
  border-color: rgba(160, 160, 160, 0.28);
}

.pokedex-hud__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pokedex-hud__search {
  flex: 1 1 160px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.pokedex-hud__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pokedex-hud__type-filters {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding-top: 2px;
}

.pokedex-hud__type-hint {
  margin-right: 4px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pokedex-hud__type-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--type, #64748b) 35%, transparent);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  cursor: pointer;
  opacity: 0.72;
  transition:
    opacity 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    transform 0.12s ease;
}

.pokedex-hud__type-filter:hover {
  opacity: 1;
  border-color: color-mix(in srgb, var(--type, #64748b) 70%, transparent);
}

.pokedex-hud__type-filter.is-active {
  opacity: 1;
  background: color-mix(in srgb, var(--type, #64748b) 28%, rgba(0, 0, 0, 0.35));
  border-color: color-mix(in srgb, var(--type, #64748b) 85%, #fff);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--type, #64748b) 55%, transparent),
    0 0 10px color-mix(in srgb, var(--type, #64748b) 35%, transparent);
}

.pokedex-hud__type-filter.is-muted {
  opacity: 0.32;
}

.pokedex-hud__type-filter.is-muted:hover {
  opacity: 0.55;
}

.pokedex-hud__type-filter:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.55);
}

.pokedex-hud__type-filter .type-icon {
  cursor: inherit;
  pointer-events: none;
}

.pokedex-hud__type-clear {
  margin-left: 2px;
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.pokedex-hud__type-clear:hover {
  color: var(--text);
  border-color: rgba(248, 113, 113, 0.55);
}

.pokedex-hud__type-clear[hidden] {
  display: none;
}

.pokedex-hud__filter {
  padding: 6px 10px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.pokedex-hud__filter.is-active {
  color: #1a1408;
  background: #c9a227;
  border-color: #c9a227;
}

.pokedex-hud__filter--caught.is-active {
  color: #fff5f5;
  background: #b71c1c;
  border-color: #ef5350;
}

.pokedex-hud__filter--seen.is-active {
  color: #e3f2fd;
  background: #1565c0;
  border-color: #64b5f6;
}

.pokedex-hud__filter--unseen.is-active {
  color: #f5f5f5;
  background: #424242;
  border-color: #9e9e9e;
}

.pokedex-hud__grid-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 14px;
  scrollbar-width: thin;
}

.pokedex-hud__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}

.pokedex-hud__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.pokedex-hud__card[hidden],
.pokedex-hud__toolbar[hidden],
.pokedex-hud__legend[hidden],
.pokedex-hud__regions[hidden],
.pokedex-hud__grid-wrap[hidden] {
  display: none !important;
}

.pokedex-hud__card.is-interactive {
  cursor: pointer;
}

.pokedex-hud__card.is-interactive:hover,
.pokedex-hud__card.is-interactive:focus-visible {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.pokedex-hud__badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pokedex-hud__badge svg {
  width: 16px;
  height: 16px;
}

.pokedex-hud__badge--caught {
  color: #ef9a9a;
}

.pokedex-hud__badge--seen {
  color: #90caf9;
}

.pokedex-hud__badge--unseen {
  color: #9e9e9e;
}

.pokedex-hud__card.is-caught {
  border-color: rgba(198, 40, 40, 0.55);
  background: linear-gradient(180deg, rgba(198, 40, 40, 0.12) 0%, rgba(0, 0, 0, 0.2) 100%);
  box-shadow: inset 0 0 0 1px rgba(198, 40, 40, 0.12);
}

.pokedex-hud__card.is-seen {
  border-color: rgba(100, 160, 220, 0.5);
  background: linear-gradient(180deg, rgba(66, 133, 244, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.pokedex-hud__card.is-unseen {
  border-color: rgba(120, 120, 120, 0.35);
  background: rgba(0, 0, 0, 0.32);
  opacity: 0.88;
}

.pokedex-hud__card-portrait-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pokedex-hud__card-silhouette {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 800;
  color: rgba(180, 180, 180, 0.55);
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed rgba(160, 160, 160, 0.35);
}

.pokedex-hud__card-silhouette[hidden],
.pokedex-hud__card-portrait-wrap .pokemon-portrait[hidden],
.pokedex-hud__card-type[hidden] {
  display: none !important;
}

.pokedex-hud__card-portrait-wrap .pokemon-portrait {
  --portrait-size: 48px;
  border: none;
  box-shadow: none;
  background: transparent;
}

.pokedex-hud__card.is-seen .pokedex-hud__card-portrait-wrap .pokemon-portrait {
  filter: saturate(0.82);
}

.pokedex-hud__card.is-caught .pokedex-hud__card-portrait-wrap .pokemon-portrait {
  filter: none;
}

.pokedex-hud__card-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.pokedex-hud__card-num.is-hidden-entry,
.pokedex-hud__card-name.is-hidden-entry {
  color: rgba(160, 160, 160, 0.75);
  letter-spacing: 0.06em;
}

.pokedex-hud__card-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.pokedex-hud__card-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 16px;
}

.pokedex-hud__card-body {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  line-height: 1.2;
}

.pokedex-hud__card-body.is-hidden-entry {
  color: rgba(160, 160, 160, 0.75);
  letter-spacing: 0.04em;
}

.pokedex-hud__quests {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pokedex-hud__quests[hidden] {
  display: none !important;
}

.pokedex-hud__quests-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
}

.pokedex-hud__quest-heading {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.pokedex-hud__quest-empty {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.18);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.pokedex-hud__quest-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pokedex-hud__quest-card:last-child {
  margin-bottom: 0;
}

.pokedex-hud__quest-card--active {
  border-color: rgba(100, 181, 246, 0.35);
  background: rgba(33, 150, 243, 0.1);
}

.pokedex-hud__quest-card--completed {
  border-color: rgba(129, 199, 132, 0.3);
  background: rgba(76, 175, 80, 0.08);
  opacity: 0.92;
}

.pokedex-hud__quest-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pokedex-hud__quest-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.pokedex-hud__quest-title--tip {
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.pokedex-hud__quest-status {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pokedex-hud__quest-card--active .pokedex-hud__quest-status {
  color: #bbdefb;
  background: rgba(66, 133, 244, 0.22);
  border: 1px solid rgba(100, 160, 220, 0.35);
}

.pokedex-hud__quest-card--completed .pokedex-hud__quest-status {
  color: #c8e6c9;
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid rgba(129, 199, 132, 0.35);
}

.pokedex-hud__quest-detail {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}

.pokedex-hud__quest-reward {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  color: #fde68a;
}

/* ---- Lab incubator test spawn HUD --------------------------------------- */
.lab-incubator-spawn-hud {
  position: fixed;
  inset: 0;
  z-index: 9060;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.lab-incubator-spawn-hud[hidden] {
  display: none !important;
}

.lab-incubator-spawn-hud__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

.lab-incubator-spawn-hud__panel {
  position: relative;
  width: min(920px, calc(100vw - 20px));
  height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 2px solid #38bdf8;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  color: var(--text);
}

.lab-incubator-spawn-hud__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.28);
}

.lab-incubator-spawn-hud__title-wrap {
  flex: 1;
  min-width: 0;
}

.lab-incubator-spawn-hud__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lab-incubator-spawn-hud__status {
  margin: 6px 0 0;
  min-height: 1.2em;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

.lab-incubator-spawn-hud__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lab-incubator-spawn-hud__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}

.lab-incubator-spawn-hud__search {
  flex: 1 1 180px;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.lab-incubator-spawn-hud__level-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.lab-incubator-spawn-hud__level {
  width: 64px;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.lab-incubator-spawn-hud__give {
  padding: 8px 14px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-radius: 8px;
  background: #0284c7;
  color: #f0f9ff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.lab-incubator-spawn-hud__give:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lab-incubator-spawn-hud__type-filters {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.lab-incubator-spawn-hud__type-hint {
  margin-right: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
}

.lab-incubator-spawn-hud__type-filter {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid var(--type, #64748b);
  border-radius: 8px;
  background: color-mix(in srgb, var(--type, #64748b) 22%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
}

.lab-incubator-spawn-hud__type-filter.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}

.lab-incubator-spawn-hud__type-filter.is-muted {
  opacity: 0.32;
}

.lab-incubator-spawn-hud__type-filter .type-icon {
  pointer-events: none;
}

.lab-incubator-spawn-hud__type-clear {
  margin-left: 2px;
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.lab-incubator-spawn-hud__type-clear[hidden] {
  display: none;
}

.lab-incubator-spawn-hud__grid-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 16px;
}

.lab-incubator-spawn-hud__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.lab-incubator-spawn-hud__card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.lab-incubator-spawn-hud__card[hidden] {
  display: none !important;
}

.lab-incubator-spawn-hud__card:hover,
.lab-incubator-spawn-hud__card:focus-visible {
  border-color: rgba(56, 189, 248, 0.65);
  outline: none;
}

.lab-incubator-spawn-hud__card.is-selected {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45);
  background: rgba(14, 116, 144, 0.28);
}

.lab-incubator-spawn-hud__card-portrait {
  width: 48px;
  height: 48px;
}

.lab-incubator-spawn-hud__card-portrait .pokemon-portrait {
  --portrait-size: 48px;
}

.lab-incubator-spawn-hud__card-num {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.lab-incubator-spawn-hud__card-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.lab-incubator-spawn-hud__card-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 16px;
}

/* ---- PokÃÂ©dex species detail ---- */
.pokedex-detail {
  position: fixed;
  inset: 0;
  z-index: 9060;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.pokedex-detail[hidden] {
  display: none !important;
}

.pokedex-detail__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.pokedex-detail__panel {
  position: relative;
  width: min(720px, calc(100vw - 20px));
  height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 2px solid #c9a227;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  color: var(--text);
}

.pokedex-detail__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.pokedex-detail__identity {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pokedex-detail__portrait.pokemon-portrait {
  --portrait-size: 72px;
  flex-shrink: 0;
  border-radius: 10px;
  border-color: rgba(201, 162, 39, 0.3);
  box-shadow: none;
}

.pokedex-detail__titles {
  min-width: 0;
}

.pokedex-detail__num {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.pokedex-detail__name {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}

.pokedex-detail__genus {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

.pokedex-detail__types {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.pokedex-detail__body {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.pokedex-detail__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pokedex-detail__tabs {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
}

.pokedex-detail__tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.pokedex-detail__tab.is-active {
  color: #ffe082;
  background: rgba(201, 162, 39, 0.14);
  border-color: rgba(201, 162, 39, 0.4);
}

.pokedex-detail__body-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 16px;
}

.pokedex-detail__flavor {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.pokedex-detail__section {
  margin-top: 16px;
}

.pokedex-detail__section-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffe082;
}

.pokedex-detail__stats {
  display: grid;
  gap: 6px;
}

.pokedex-detail__stat {
  display: grid;
  grid-template-columns: 64px 1fr 36px;
  gap: 8px;
  align-items: center;
}

.pokedex-detail__stat-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 700;
}

.pokedex-detail__stat-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pokedex-detail__stat-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9a227, #ffe082);
}

.pokedex-detail__stat-value {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text-dim);
}

.pokedex-detail__evo {
  overflow-x: auto;
  padding-bottom: 4px;
}

.pokedex-detail__evo-empty {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* Root tree wrapper */
.pokedex-detail__evo-tree {
  display: inline-flex;
  align-items: flex-start;
  min-width: min-content;
}

/* A horizontal chain of [cell cell cell...] */
.pokedex-detail__evo-chain {
  display: flex;
  align-items: center;
  gap: 0;
}

/* One cell = optional arrow + stage button */
.pokedex-detail__evo-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Grid layout for branching: left = shared prefix, right = stacked branch rows */
.pokedex-detail__evo-grid {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.pokedex-detail__evo-grid-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.pokedex-detail__evo-grid-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

/* Each branch row in the right column */
.pokedex-detail__evo-branch-row {
  display: flex;
  align-items: center;
}

.pokedex-detail__evo-arrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0 4px;
}

.pokedex-detail__evo-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  cursor: pointer;
  min-width: 64px;
  flex-shrink: 0;
}

.pokedex-detail__evo-stage:disabled {
  cursor: default;
  opacity: 0.55;
}

.pokedex-detail__evo-stage.is-current {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.12);
}

.pokedex-detail__evo-portrait.pokemon-portrait {
  --portrait-size: 40px;
  border: none;
  box-shadow: none;
  background: transparent;
}

.pokedex-detail__evo-name {
  font-size: 10px;
  font-weight: 700;
}

.pokedex-detail__habitat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pokedex-detail__habitat-filters {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 8px;
}

.pokedex-detail__habitat-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.pokedex-detail__habitat-filter input {
  width: 14px;
  height: 14px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.pokedex-detail__region {
  margin: 0;
  font-size: 11px;
  color: var(--text-dim);
}

.pokedex-detail__locations {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pokedex-detail__location {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #b3e5fc;
}

.pokedex-detail__habitat-empty {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.pokedex-detail__habitat-empty[hidden] {
  display: none !important;
}

.pokedex-detail__map-wrap {
  height: min(280px, 36vh);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: #060a14;
}

.pokedex-detail__map {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.pokedex-detail__map:active {
  cursor: grabbing;
}

.pokedex-detail__shrine-meta {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.4;
}

.pokedex-detail__shrine-meta[hidden] {
  display: none !important;
}

.pokedex-detail__shrine-map-wrap {
  width: min(100%, 260px);
  margin-inline: auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: #060a14;
  aspect-ratio: 1;
}

.pokedex-detail__shrine-map-wrap[hidden] {
  display: none !important;
}

.pokedex-detail__shrine-map {
  width: 100%;
  height: 100%;
  display: block;
}

.pokedex-detail__learnset {
  display: grid;
  gap: 4px;
}

.pokedex-detail__learnset-empty {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.pokedex-detail__learn-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pokedex-detail__learn-lv {
  font-size: 11px;
  font-weight: 800;
  color: #ffe082;
  font-variant-numeric: tabular-nums;
}

.pokedex-detail__learn-name {
  font-size: 12px;
  font-weight: 700;
}

.pokedex-detail__learn-meta {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: capitalize;
}

/* ---- BOTW bag / party menu layouts --------------------------------------- */
.bag-panel--botw {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
  padding: 4px 0 0;
  overflow: hidden;
}

.bag-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  flex-shrink: 0;
}

.bag-cats__btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
  padding: 6px 8px;
  color: rgba(245, 245, 245, 0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.bag-cats__btn.is-active {
  color: #fff;
}

.bag-cats__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.28);
  font-size: 1.15rem;
}

.bag-cats__btn.is-active .bag-cats__icon {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.bag-cats__label {
  max-width: 72px;
  text-align: center;
  line-height: 1.2;
}

.bag-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.bag-grid-wrap {
  min-height: 0;
  overflow: auto;
  padding: 4px;
}

.bag-panel--botw .bag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  align-content: start;
}

.bag-panel--botw .bag-grid[hidden] {
  display: none !important;
}

.bag-panel--botw .bag__slot {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  min-height: 76px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  flex-direction: column;
  justify-content: center;
}

.bag-panel--botw .bag__slot:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: none;
}

.bag-panel--botw .bag__slot.is-selected,
.bag-panel--botw .bag__slot.is-active.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 18px rgba(255, 255, 255, 0.12);
}

.bag-panel--botw .bag__slot-name {
  display: none;
}

.bag-panel--botw .bag__slot-count {
  position: absolute;
  left: 6px;
  bottom: 5px;
  right: auto;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  text-shadow: 0 1px 2px #000;
}

.bag-panel--botw .bag__slot-count::before {
  content: 'x';
}

.bag-panel--botw .bag__slot-icon {
  width: 40px;
  height: 40px;
}

.bag-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px 8px 8px 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  overflow: auto;
}

.bag-detail__empty {
  margin: auto 0;
  color: rgba(245, 245, 245, 0.45);
  font-size: 0.95rem;
}

.bag-detail__empty[hidden],
.bag-detail__body[hidden],
.bag-detail__count[hidden] {
  display: none !important;
}

.bag-detail__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bag-detail__icon {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  align-self: flex-start;
}

.bag-detail__icon .bag__slot-icon,
.bag-detail__icon canvas,
.bag-detail__icon img {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px;
  max-height: 64px;
}

.bag-detail__name {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bag-detail__count {
  margin: 0;
  color: rgba(245, 245, 245, 0.7);
  font-size: 0.9rem;
}

.bag-detail__desc {
  margin: 0;
  white-space: pre-line;
  line-height: 1.45;
  color: rgba(245, 245, 245, 0.78);
  font-size: 0.92rem;
}

.bag-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.bag-detail__btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.bag-detail__btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.bag-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 4px 4px 0;
  color: rgba(245, 245, 245, 0.55);
  font-size: 0.85rem;
}

.party-menu {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 20px;
  height: 100%;
  min-height: 0;
}

.party-menu__grid-col {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 12px 20px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.08) 0 1px,
      transparent 1px 3px
    ),
    linear-gradient(180deg, #4aa0a0 0%, #2f7a7e 55%, #246868 100%);
  box-shadow: inset 0 0 0 2px rgba(20, 60, 64, 0.55);
}

.party-menu__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-end;
}

.party-menu__detail {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 8px 12px 16px;
  color: rgba(245, 245, 245, 0.7);
  overflow: auto;
}

.party-menu__detail-empty {
  margin: 24px 0 0;
}

/* ---- Party menu slots: FRLG / Emerald card layout ---- */
.party-menu-slot {
  --party-slot-pad-y: 10px;
  gap: 6px !important;
  padding: var(--party-slot-pad-y) 18px var(--party-slot-pad-y) 10px !important;
  overflow: visible !important;
}

.party-menu-slot::before {
  display: none !important;
}

.party-menu-slot__main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) minmax(140px, 1.15fr) 28px;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  min-height: 44px;
  overflow: visible;
}

/* Sprite overworld solto por cima do card (padrão das boxes do PC). */
.party-menu-slot__ball.hud__poke-icon-btn {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  margin: -22px 0 -18px -8px;
  border-radius: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.party-menu-slot__ball .pokemon-portrait,
.party-menu-slot__ball .pokemon-icon,
.party-menu-slot__ball .party-menu-slot__sprite {
  --portrait-size: 88px;
  --icon-size: 88px;
  width: 88px;
  height: 88px;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.party-menu-slot__ball .pokemon-icon__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.party-menu-slot__sprite {
  display: block;
  width: 88px;
  height: 88px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

.party-menu-slot__ball:hover,
.party-menu-slot__ball.hud__poke-icon-btn:hover {
  border: none !important;
  box-shadow: none !important;
  filter: none;
  transform: none;
}

.party-menu-slot__id {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.party-menu-slot__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.party-menu-slot__name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 1px 1px 0 #17376e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.party-menu-slot__meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.party-menu-slot__level {
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 0 #17376e;
}

.party-menu-slot__gender {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.party-menu-slot__gender--m {
  color: #4fc3f7;
}

.party-menu-slot__gender--f {
  color: #f48fb1;
}

.party-menu-slot__vitals {
  display: grid;
  gap: 2px;
  min-width: 0;
  justify-items: stretch;
}

.party-menu-slot__hp {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.party-menu-slot__hp-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.party-menu-slot__hp-tag {
  padding: 1px 5px;
  border-radius: 2px;
  background: #1a1a1a;
  color: #f0d030;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px #3a3a3a;
}

.party-menu-slot__hp .hud__hp-track {
  height: 10px;
  border-radius: 2px;
  background: var(--em-bar-casing, #3a4438);
  border: 2px solid var(--em-bar-edge, #232b21);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.party-menu-slot__hp .hud__hp-fill {
  background: var(--em-hp);
}

.party-menu-slot__hp.is-low .hud__hp-fill {
  background: var(--em-hp-low);
}

.party-menu-slot__hp.is-down .hud__hp-fill {
  background: var(--em-hp-down);
}

.party-menu-slot__hp-value {
  justify-self: end;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 1px 1px 0 #17376e;
}

.party-menu-slot__pp,
.party-menu-slot__exp,
.party-menu-slot__types,
.party-menu-slot__stats {
  display: none !important;
}

.party-menu-slot__mode {
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid rgba(23, 55, 110, 0.55);
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.party-menu-slot__mode svg {
  color: #fff;
  stroke: #fff;
}

.party-menu-slot__mode:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.party-menu-slot .hud__item-suggest-btn {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(12, 40, 70, 0.35);
}

@media (max-width: 720px) {
  .party-menu-slot__main {
    grid-template-columns: 64px minmax(0, 1fr) 28px;
    grid-template-areas:
      "ball id mode"
      "ball vitals mode";
  }

  .party-menu-slot__ball { grid-area: ball; width: 72px; height: 72px; margin: -16px 0 -12px -4px; }
  .party-menu-slot__ball .party-menu-slot__sprite { width: 72px; height: 72px; }
  .party-menu-slot__id { grid-area: id; }
  .party-menu-slot__vitals { grid-area: vitals; }
  .party-menu-slot__mode { grid-area: mode; }
}

.game-menu__page--party .party-global-mode,
.game-menu__page .game-settings,
.game-menu__page .help__body,
.game-menu__page .about__body,
.game-menu__page .save-menu {
  color: rgba(245, 245, 245, 0.88);
}

.game-menu__page .help__row {
  color: rgba(245, 245, 245, 0.8);
}

.game-menu.is-map-focus .map__toolbar {
  background: rgba(8, 10, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f5f5;
}

@media (max-width: 900px) {
  .bag-main,
  .party-menu {
    grid-template-columns: 1fr;
  }

  .bag-detail,
  .party-menu__detail {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-left: 8px;
  }

  .game-menu__top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .game-menu__money,
  .game-menu__tabs-end {
    justify-self: center;
  }
}

/* Party field blocks inside BOTW menu — FRLG cards on teal stage */
.game-menu__page--party .hud__modes {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: visible;
  padding: 10px 4px 16px;
}

.game-menu__page--party .hud__mode-block.party-menu-slot {
  background: transparent;
  border: 2px solid var(--em-card-edge, #17376e);
  box-shadow: none;
  overflow: visible;
}

.game-menu__page--party .hud__mode-block.party-menu-slot::before {
  display: none;
}

.game-menu__page--party .hud__mode-block.party-menu-slot.is-menu-selected {
  border-color: #f5f7ff;
  background: transparent;
  box-shadow: none;
}

.game-menu__page--party .party-menu__detail-icon {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
}

.game-menu.is-map-focus .game-menu__top {
  position: relative;
  z-index: 8;
  background: linear-gradient(180deg, rgba(6, 8, 12, 0.88), rgba(6, 8, 12, 0.35));
}

/* ÂÂ Oldschool battle sandbox ÂÂ */
body.oldschool-battle-active {
  overflow: hidden;
}

/* Hide overworld HUD while the battle sandbox owns the screen. */
body.oldschool-battle-active .hud-topbar,
body.oldschool-battle-active .hud-party,
body.oldschool-battle-active .party-hud,
body.oldschool-battle-active .item-hotbar,
body.oldschool-battle-active .hud-utility-rail,
body.oldschool-battle-active .battle-log,
body.oldschool-battle-active .action-prompt-hud,
body.oldschool-battle-active .poke-radar-host,
body.oldschool-battle-active .quest-objective,
body.oldschool-battle-active .controle-analogico-mobile,
body.oldschool-battle-active .zone-banner,
body.oldschool-battle-active .temple-title,
body.oldschool-battle-active .player-status-layer,
body.oldschool-battle-active #win-party-field,
body.oldschool-battle-active #win-party-roster,
body.oldschool-battle-active .party-field,
body.oldschool-battle-active .party-combat {
  visibility: hidden !important;
  pointer-events: none !important;
}

.oldschool-battle {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: grid;
  grid-template-rows: 1fr auto;
  pointer-events: auto;
  font-family: "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
  color: #1e293b;
  image-rendering: pixelated;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.oldschool-battle[hidden] {
  display: none !important;
}

.oldschool-battle__veil {
  display: none;
}

/* stage / battleback / sky / base / slot / battler / atmo / depth-prop → oldschool-battle-stage.css */

.oldschool-battle__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  z-index: 1;
}

.oldschool-battle__bg.is-procedural-sky {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.oldschool-battle__fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  pointer-events: none;
}

.oldschool-battle__battler-img.is-portrait {
  width: 58%;
  height: 58%;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 12%;
}

.oldschool-battle__sprite {
  width: 70%;
  height: 70%;
  display: grid;
  place-items: center;
  margin-bottom: 8%;
}

.oldschool-battle__sprite[hidden] {
  display: none !important;
}

.oldschool-battle__portrait {
  --portrait-size: 100% !important;
  width: 100%;
  height: 100%;
}

.oldschool-battle__portrait .pokemon-portrait__img {
  image-rendering: pixelated;
}

.oldschool-battle__hud-stack {
  position: absolute;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  max-width: min(280px, 48vw);
}

.oldschool-battle__hud-stack--foe {
  top: 3%;
  right: 2%;
  left: auto;
  align-items: flex-end;
}

.oldschool-battle__hud-stack--player {
  top: 3%;
  left: 2%;
  right: auto;
  bottom: auto;
  align-items: flex-start;
}

.oldschool-battle__hud-stack .oldschool-battle__balls {
  margin-top: 4px;
  align-self: stretch;
}

.oldschool-battle__hud {
  position: relative;
  z-index: 4000;
  min-width: min(260px, 46vw);
  padding: 8px 12px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f4f1e8 0%, #e7e0d0 100%);
  border: 3px solid #4a5568;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
  color: #1a202c;
  pointer-events: none;
}

.oldschool-battle__hud-stack.is-multi .oldschool-battle__hud-plate {
  min-width: min(200px, 40vw);
  padding: 5px 8px 6px;
  border-width: 2px;
}

.oldschool-battle__hud-stack.is-multi[data-count="4"] .oldschool-battle__hud-plate,
.oldschool-battle__hud-stack.is-multi[data-count="5"] .oldschool-battle__hud-plate {
  min-width: min(168px, 34vw);
  padding: 4px 6px 5px;
}

.oldschool-battle__hud-stack.is-multi .oldschool-battle__nameplate {
  font-size: clamp(0.75rem, 1.6vw, 0.95rem);
  margin-bottom: 3px;
}

.oldschool-battle__hud-plate.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.oldschool-battle__hud-plate.is-targetable {
  pointer-events: auto;
  cursor: pointer;
}

.oldschool-battle__hud-plate.is-targetable:hover,
.oldschool-battle__hud-plate.is-target-hover {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.4), 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.oldschool-battle__hud-plate.is-target-cursor {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.55), 4px 4px 0 rgba(0, 0, 0, 0.25);
  outline: 2px solid rgba(254, 202, 202, 0.9);
  outline-offset: 1px;
}

.oldschool-battle__hud-plate.is-fainted {
  opacity: 0.45;
  filter: grayscale(0.35);
}

.oldschool-battle__slot.is-commanding .oldschool-battle__battler {
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.16))
    drop-shadow(0 0 10px rgba(37, 99, 235, 0.55));
}

.oldschool-battle__hud--foe {
  top: auto;
  left: auto;
}

.oldschool-battle__hud--player {
  right: auto;
  bottom: auto;
}

.oldschool-battle__nameplate {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
}

.oldschool-battle__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oldschool-battle__level {
  opacity: 0.9;
  font-size: 0.92em;
  font-weight: 700;
  flex: 0 0 auto;
}

.oldschool-battle__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.oldschool-battle__status[hidden] {
  display: none !important;
}

.oldschool-battle__status-icon {
  image-rendering: pixelated;
  display: block;
}

.oldschool-battle__status-chip {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--status-color, #64748b);
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.oldschool-battle__stages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.oldschool-battle__stages[hidden] {
  display: none !important;
}

.oldschool-battle__stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: #edf2f7;
  color: #2d3748;
}

.oldschool-battle__stage-chip.is-up {
  background: #ebf8ff;
  color: #2b6cb0;
  border-color: #90cdf4;
}

.oldschool-battle__stage-chip.is-down {
  background: #fff5f5;
  color: #c53030;
  border-color: #feb2b2;
}

.oldschool-battle__hp-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.oldschool-battle__hp-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #c05621;
}

.oldschool-battle__hpbar {
  height: 10px;
  border-radius: 2px;
  background: #2d3748;
  border: 2px solid #1a202c;
  overflow: hidden;
}

.oldschool-battle__hpfill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transition: transform 180ms ease;
  background: #48bb78;
}

.oldschool-battle__hpfill.is-mid {
  background: #ecc94b;
}

.oldschool-battle__hpfill.is-low {
  background: #e53e3e;
}

.oldschool-battle__hp-nums {
  margin-top: 4px;
  text-align: right;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.oldschool-battle__exp-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.oldschool-battle__exp-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #2b6cb0;
}

.oldschool-battle__expbar {
  height: 5px;
  border-radius: 1px;
  background: #2d3748;
  border: 1px solid #1a202c;
  overflow: hidden;
}

.oldschool-battle__expfill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 220ms ease;
  background: linear-gradient(180deg, #63b3ed 0%, #3182ce 100%);
}

.oldschool-battle__balls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.oldschool-battle__ball {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.oldschool-battle__ball-icon {
  width: 14px;
  height: 14px;
  display: block;
  image-rendering: pixelated;
  object-fit: contain;
}

.oldschool-battle__ball--fallback {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fecaca, #ef4444 45%, #7f1d1d);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.oldschool-battle__ball.is-active {
  outline: 2px solid #2b6cb0;
  outline-offset: 1px;
}

.oldschool-battle__ball.is-fainted {
  filter: grayscale(1);
  opacity: 0.55;
}

.oldschool-battle__ball.is-fainted.oldschool-battle__ball--fallback {
  background: #a0aec0;
  filter: none;
}

.oldschool-battle__dock {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0;
  padding: 0;
  min-height: clamp(118px, 22vh, 160px);
  background: #203060;
  border-top: 4px solid #0f172a;
}

.oldschool-battle__message {
  min-height: 100%;
  padding: 16px 18px;
  background: #203060;
  border: 4px solid #c5d0e6;
  box-shadow: inset 0 0 0 3px #203060, inset 0 0 0 6px #8fa0c8;
  color: #f8fafc;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.oldschool-battle__menus {
  display: grid;
  background: #f7f3e8;
  border: 4px solid #1a202c;
  border-left: none;
}

.oldschool-battle__menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-content: stretch;
  height: 100%;
  padding: 6px;
}

.oldschool-battle__menu[hidden] {
  display: none !important;
}

.oldschool-battle__menu--fight {
  grid-template-columns: 1fr 1fr;
}

.oldschool-battle__menu--party,
.oldschool-battle__menu--bag {
  grid-template-columns: 1fr;
  max-height: none;
  overflow: auto;
}

.oldschool-battle__btn {
  appearance: none;
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1a202c;
  padding: 12px 14px 12px 28px;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.oldschool-battle__btn small {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  opacity: 0.7;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.oldschool-battle__btn.is-selected::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #1a202c;
}

.oldschool-battle__btn:hover:not(:disabled),
.oldschool-battle__btn.is-selected {
  background: rgba(32, 48, 96, 0.08);
}

.oldschool-battle__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.oldschool-battle__btn--back {
  grid-column: 1 / -1;
  text-align: center;
  padding-left: 14px;
}

.oldschool-battle__btn--back.is-selected::before {
  left: calc(50% - 48px);
}

.oldschool-battle__empty {
  margin: 0;
  padding: 12px;
  opacity: 0.8;
  font-weight: 700;
}

@media (max-width: 720px) {
  .oldschool-battle__dock {
    grid-template-columns: 1fr;
  }

  .oldschool-battle__menus {
    border-left: 4px solid #1a202c;
    min-height: 120px;
  }

  .oldschool-battle__hud-stack--player {
    top: 3%;
    left: 2%;
    right: auto;
    bottom: auto;
  }

  .oldschool-battle__hud-stack--foe {
    top: 3%;
    right: 2%;
    left: auto;
  }
}
