/* ==========================================================================
   宝可梦 朱／紫 (Pokémon Scarlet & Violet) - Rotom Dex UI Design System
   Authentic Pokémon Design Language · Paldea Academy · Terastal Shimmer · Pokéball HUD
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Official Pokémon & Scarlet/Violet Color System
   -------------------------------------------------------------------------- */
:root {
  /* Pokémon Scarlet & Violet Brand Palette */
  --pkmn-scarlet: #e82a2a;         /* 故勒顿朱红 / 橘子学院 Naranja */
  --pkmn-scarlet-dark: #b81414;
  --pkmn-scarlet-glow: rgba(232, 42, 42, 0.4);
  --pkmn-scarlet-subtle: rgba(232, 42, 42, 0.12);
  
  --pkmn-violet: #78288c;          /* 密勒顿紫 / 葡萄学院 Uva */
  --pkmn-violet-dark: #501660;
  --pkmn-violet-glow: rgba(120, 40, 140, 0.4);
  --pkmn-violet-subtle: rgba(120, 40, 140, 0.12);

  --pkmn-rotom: #ff5500;           /* 洛托姆手机电光橙 */
  --pkmn-rotom-glow: rgba(255, 85, 0, 0.4);
  --pkmn-rotom-subtle: rgba(255, 85, 0, 0.12);

  --pkmn-gold: #fcc000;            /* 经典皮卡丘金色 / 宝可梦 Logo 金 */
  --pkmn-gold-glow: rgba(252, 192, 0, 0.4);
  --pkmn-gold-subtle: rgba(252, 192, 0, 0.12);

  --pkmn-blue: #2264d1;            /* 宝可梦经典联盟蓝 */
  --pkmn-hp-green: #38c868;        /* 对战血条满血绿 */
  --pkmn-hp-yellow: #f8b800;       /* 对战血条半血黄 */
  --pkmn-hp-red: #e83020;          /* 对战血条残血红 */
  --pkmn-exp-cyan: #30b8e8;        /* 对战经验值亮蓝 */

  /* Terastal (太晶化) Prismatic Crystal Gradient */
  --tera-crystal-grad: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.25) 0%, 
    rgba(244, 114, 182, 0.22) 25%, 
    rgba(168, 85, 247, 0.22) 50%, 
    rgba(56, 189, 248, 0.22) 75%, 
    rgba(74, 222, 128, 0.25) 100%
  );
  --tera-border: linear-gradient(135deg, #f472b6, #c084fc, #60a5fa, #34d399, #facc15);

  /* 18 Official Pokémon Type Colors (宝可梦18官方属性配色) */
  --type-normal: #a8a77a;
  --type-fire: #ee8130;
  --type-water: #6390f0;
  --type-electric: #f7d02c;
  --type-grass: #7ac74c;
  --type-ice: #96d9d6;
  --type-fighting: #c22e28;
  --type-poison: #a33ea1;
  --type-ground: #e2bf65;
  --type-flying: #a98ff3;
  --type-psychic: #f95587;
  --type-bug: #a6b91a;
  --type-rock: #b6a136;
  --type-ghost: #735797;
  --type-dragon: #6f35fc;
  --type-dark: #705746;
  --type-steel: #b7b7ce;
  --type-fairy: #d685ad;

  /* Theme: Rotom Dex Midnight (Dark Mode - Default) */
  --bg: #0c101d;
  --bg-rotom-mesh: radial-gradient(circle at 100% 0%, rgba(232, 42, 42, 0.15) 0%, transparent 40%),
                   radial-gradient(circle at 0% 25%, rgba(120, 40, 140, 0.14) 0%, transparent 45%),
                   radial-gradient(circle at 50% 100%, rgba(255, 85, 0, 0.08) 0%, transparent 50%),
                   linear-gradient(180deg, #0c101d 0%, #11182c 50%, #0a0d18 100%);
  --panel: rgba(18, 25, 46, 0.82);
  --panel-solid: #12192e;
  --panel-card: rgba(22, 32, 60, 0.65);
  --panel-card-hover: rgba(28, 42, 78, 0.85);
  --panel-inner: rgba(14, 20, 38, 0.7);
  --border: rgba(255, 255, 255, 0.09);
  --border-rotom: rgba(255, 85, 0, 0.35);
  --border-light: rgba(255, 255, 255, 0.18);
  
  --text-primary: #f8fafc;
  --text-secondary: #9cb0d1;
  --text-muted: #64789d;
  --link: #60a5fa;
  --link-hover: #93c5fd;

  --shadow-hud: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-poke: 0 4px 20px var(--pkmn-scarlet-glow);
  --shadow-crystal: 0 0 25px rgba(168, 85, 247, 0.3);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --sidebar-w: 296px;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Theme: Naranja Academy Classroom (Light Mode) */
[data-theme="light"] {
  --bg: #f5f2eb;
  --bg-rotom-mesh: radial-gradient(circle at 100% 0%, rgba(232, 42, 42, 0.08) 0%, transparent 40%),
                   radial-gradient(circle at 0% 25%, rgba(120, 40, 140, 0.06) 0%, transparent 45%),
                   linear-gradient(180deg, #faf7f2 0%, #ebe5d8 100%);
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --panel-card: rgba(255, 255, 255, 0.85);
  --panel-card-hover: #ffffff;
  --panel-inner: rgba(240, 235, 225, 0.65);
  --border: rgba(200, 190, 175, 0.65);
  --border-rotom: rgba(255, 85, 0, 0.45);
  --border-light: rgba(160, 150, 135, 0.4);

  --text-primary: #1e2433;
  --text-secondary: #4a5568;
  --text-muted: #78859e;
  --link: #1d4ed8;
  --link-hover: #2563eb;

  --shadow-hud: 0 8px 24px rgba(60, 50, 40, 0.08), 0 2px 6px rgba(60, 50, 40, 0.04);
  --shadow-poke: 0 4px 16px rgba(232, 42, 42, 0.2);
  --shadow-crystal: 0 0 20px rgba(168, 85, 247, 0.15);
}

/* --------------------------------------------------------------------------
   2. Reset & Core Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  background-image: var(--bg-rotom-mesh);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Pokédex Hexagon Grid Watermark Background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] body::before {
  background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}

::selection {
  background: var(--pkmn-scarlet);
  color: #ffffff;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--link-hover);
}

/* --------------------------------------------------------------------------
   3. Rotom Dex Reading Line
   -------------------------------------------------------------------------- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--pkmn-scarlet) 0%, var(--pkmn-rotom) 40%, var(--pkmn-violet) 70%, var(--pkmn-exp-cyan) 100%);
  z-index: 1000;
  box-shadow: 0 0 10px var(--pkmn-rotom-glow);
  transition: width 0.1s ease-out;
}

/* --------------------------------------------------------------------------
   4. App Layout
   -------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   5. Rotom Phone Sidebar & Navigation
   -------------------------------------------------------------------------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 14px 28px;
  background: var(--panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
}

/* Rotom Dex Brand Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 8px;
  margin-bottom: 4px;
  text-decoration: none;
  color: var(--text-primary);
}

.logoIcon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--pkmn-scarlet) 0%, var(--pkmn-rotom) 50%, var(--pkmn-violet) 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 18px var(--pkmn-scarlet-glow);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.logoIcon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
}

.logoIcon svg {
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.logoText {
  display: flex;
  flex-direction: column;
}

.logoText b {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--pkmn-scarlet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logoBadge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--pkmn-rotom);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.logoBadge::before {
  content: "⚡";
  font-size: 9px;
}

.sideSub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0 0 14px 8px;
  font-weight: 600;
}

/* Rotom Search Bar */
.searchWrap {
  position: relative;
  margin-bottom: 16px;
}

.globalSearch {
  width: 100%;
  padding: 10px 38px 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--panel-inner);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.globalSearch::placeholder {
  color: var(--text-muted);
}

.globalSearch:hover, .globalSearch:focus {
  border-color: var(--pkmn-rotom);
  background: var(--panel-card);
  box-shadow: 0 0 0 3px var(--pkmn-rotom-subtle);
}

.searchIconHint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Nav Groups & Menu Links */
.navGroup {
  margin-bottom: 16px;
}

.navLabel {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 8px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.navLabel::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.navGroup a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8.5px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  margin: 2px 0;
  transition: all var(--transition-fast);
  position: relative;
  text-decoration: none;
}

.navGroup a span:first-child {
  font-size: 16px;
  width: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.navGroup a:hover {
  background: var(--panel-card);
  color: var(--text-primary);
  transform: translateX(3px);
  text-decoration: none;
}

.navGroup a.active {
  background: linear-gradient(90deg, var(--pkmn-scarlet-subtle) 0%, var(--panel-card) 100%);
  color: var(--text-primary);
  font-weight: 700;
  border-left: 3px solid var(--pkmn-scarlet);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navGroup a.active span:last-child {
  color: var(--pkmn-scarlet);
}

/* Trainer EXP & Adventure Progress Card */
.sideProgress {
  margin-top: auto;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-card) 0%, var(--panel-inner) 100%);
  box-shadow: var(--shadow-hud);
  position: relative;
  overflow: hidden;
}

.sideProgress::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pkmn-scarlet), var(--pkmn-rotom), var(--pkmn-violet));
}

.sideProgressHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sideProgressHead b {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.rankBadge {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--pkmn-scarlet), var(--pkmn-rotom));
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px var(--pkmn-scarlet-glow);
}

/* Pokémon Health / EXP Bar Style Progress */
.bar {
  height: 9px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 10px 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--pkmn-hp-green) 0%, #22c55e 60%, var(--pkmn-exp-cyan) 100%);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.bar > span::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: rgba(255, 255, 255, 0.4);
}

.sideProgressFooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Sidebar Action Buttons */
.sideActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid var(--border);
  background: var(--panel-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  user-select: none;
}

.btn:hover {
  background: var(--panel-card-hover);
  border-color: var(--pkmn-rotom);
  transform: translateY(-1px);
  color: var(--pkmn-rotom);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   6. Topbar (Mobile Header)
   -------------------------------------------------------------------------- */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 10px 16px;
  border-bottom: 1.5px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: center;
  justify-content: space-between;
}

.topbarLeft, .topbarRight {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   7. Hero Banner (Paldea Horizon Header)
   -------------------------------------------------------------------------- */
.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hero {
  padding: 44px clamp(20px, 4.5vw, 64px) 32px;
  border-bottom: 1.5px solid var(--border);
  background: radial-gradient(ellipse at 88% 0%, rgba(232, 42, 42, 0.18) 0%, transparent 45%),
              radial-gradient(ellipse at 12% 10%, rgba(120, 40, 140, 0.16) 0%, transparent 40%),
              radial-gradient(ellipse at 50% 90%, rgba(255, 85, 0, 0.1) 0%, transparent 50%),
              linear-gradient(180deg, var(--panel-card) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}

/* Pokédex Top Strip */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pkmn-scarlet) 0%, var(--pkmn-rotom) 50%, var(--pkmn-violet) 100%);
}

.crumb {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.crumb a {
  color: var(--text-muted);
}
.crumb a:hover {
  color: var(--pkmn-scarlet);
}

.hero h1 {
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--pkmn-scarlet) 80%, var(--pkmn-rotom) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero p {
  max-width: 920px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

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

.chip, .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--border);
  background: var(--panel);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: all var(--transition-fast);
}

.chip:hover, .tag:hover {
  border-color: var(--pkmn-scarlet);
  color: var(--pkmn-scarlet);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   8. Main Content & Sections
   -------------------------------------------------------------------------- */
main.article {
  padding: 16px clamp(20px, 4.5vw, 64px) 80px;
  max-width: 1440px;
  width: 100%;
}

section {
  padding-top: 36px;
  scroll-margin-top: 80px;
}

h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 900;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Pokédex Section Marker */
h2::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 22px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, var(--pkmn-scarlet) 0%, var(--pkmn-rotom) 50%, var(--pkmn-violet) 100%);
  box-shadow: 0 0 8px var(--pkmn-scarlet-glow);
}

h3 {
  font-size: 17.5px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.lead {
  max-width: 980px;
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.7;
  margin-top: 0;
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   9. Bento Grid & Rotom HUD Cards
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin: 18px 0;
}

.card {
  grid-column: span 4;
  padding: 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-card) 100%);
  box-shadow: var(--shadow-hud);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  transition: background var(--transition-fast);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card.wide {
  grid-column: span 6;
}

.card.full {
  grid-column: 1 / -1;
}

.card p {
  margin: 6px 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
}

.card ul {
  margin: 8px 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.card li {
  margin: 4px 0;
}

.card b, .card strong {
  color: var(--text-primary);
}

/* Pokémon Path Color Accents */
.accent-red::before, .card.accent-red::before {
  background: linear-gradient(90deg, var(--pkmn-scarlet), var(--pkmn-rotom));
}
.accent-red:hover {
  border-color: var(--pkmn-scarlet);
  box-shadow: 0 12px 28px var(--pkmn-scarlet-subtle);
}

.accent-violet::before, .card.accent-violet::before {
  background: linear-gradient(90deg, var(--pkmn-violet), #a855f7);
}
.accent-violet:hover {
  border-color: var(--pkmn-violet);
  box-shadow: 0 12px 28px var(--pkmn-violet-subtle);
}

.accent-gold::before, .card.accent-gold::before {
  background: linear-gradient(90deg, var(--pkmn-gold), #f59e0b);
}
.accent-gold:hover {
  border-color: var(--pkmn-gold);
  box-shadow: 0 12px 28px var(--pkmn-gold-subtle);
}

.accent-green::before, .card.accent-green::before {
  background: linear-gradient(90deg, var(--pkmn-hp-green), #10b981);
}
.accent-green:hover {
  border-color: var(--pkmn-hp-green);
  box-shadow: 0 12px 28px rgba(56, 200, 104, 0.15);
}

.accent-cyan::before, .card.accent-cyan::before {
  background: linear-gradient(90deg, var(--pkmn-exp-cyan), #06b6d4);
}
.accent-cyan:hover {
  border-color: var(--pkmn-exp-cyan);
  box-shadow: 0 12px 28px rgba(48, 184, 232, 0.15);
}

/* Porto Marinada auction price scanner */
.auction-guide {
  margin-top: 28px;
  border: 1.5px solid rgba(252, 192, 0, 0.34);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(252, 192, 0, 0.13), transparent 34%),
    linear-gradient(180deg, var(--panel) 0%, var(--panel-inner) 100%);
  box-shadow: var(--shadow-hud), 0 0 34px rgba(252, 192, 0, 0.07);
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
}

.auction-guide-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.auction-kicker {
  display: block;
  margin-bottom: 8px;
  color: #f6bd2b;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.auction-guide-head h3 {
  margin: 0;
  font-size: clamp(23px, 3vw, 32px);
  letter-spacing: -0.025em;
}

.auction-guide-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--text-secondary);
}

.auction-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px;
}

.auction-stats > div {
  min-width: 86px;
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-card);
  text-align: center;
}

.auction-stats b,
.auction-stats span {
  display: block;
}

.auction-stats b {
  color: var(--pkmn-gold);
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.1;
}

.auction-stats span {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.auction-price-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 14px;
  color: var(--text-secondary);
  font-size: 12px;
}

.auction-price-rules > div {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rule-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.rule-green { color: var(--pkmn-hp-green); background: currentColor; }
.rule-gold { color: var(--pkmn-gold); background: currentColor; }
.rule-red { color: var(--pkmn-scarlet); background: currentColor; }

.auction-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px);
  gap: 10px;
  margin: 10px 0;
}

.auction-search-wrap,
.auction-quantity {
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-inner);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.auction-search-wrap:focus-within,
.auction-quantity:focus-within {
  border-color: var(--pkmn-gold);
  box-shadow: 0 0 0 3px var(--pkmn-gold-subtle);
}

.auction-search-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
}

.auction-search-wrap > span:first-child {
  color: var(--pkmn-gold);
  font-size: 22px;
  line-height: 1;
}

.auction-search-wrap input,
.auction-quantity input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
}

.auction-search-wrap input {
  width: 100%;
}

.auction-search-wrap input::placeholder {
  color: var(--text-muted);
}

.auction-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 0 14px;
}

.auction-quantity span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.auction-quantity input {
  width: 58px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-card);
  font-family: var(--font-mono);
  font-weight: 800;
  text-align: center;
}

.auction-filters {
  display: flex;
  gap: 7px;
  padding: 4px 0 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.auction-filters::-webkit-scrollbar { display: none; }

.auction-filter {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auction-filter:hover {
  border-color: rgba(252, 192, 0, 0.55);
  color: var(--text-primary);
}

.auction-filter.active {
  border-color: var(--pkmn-gold);
  background: var(--pkmn-gold);
  color: #29200a;
  box-shadow: 0 4px 14px var(--pkmn-gold-subtle);
}

.auction-result-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 2px -7px;
  color: var(--text-muted);
  font-size: 11.5px;
}

.auction-result-line b {
  color: var(--pkmn-gold);
}

.auction-table-wrap {
  max-height: 620px;
  margin-bottom: 12px;
  background: var(--panel-inner);
}

.auction-table {
  min-width: 1040px;
}

.auction-table th {
  top: 0;
  background: var(--panel-solid);
  box-shadow: 0 1px 0 var(--border);
}

.auction-table td:first-child {
  display: grid;
  grid-template-columns: 31px minmax(105px, auto);
  align-items: center;
  column-gap: 10px;
}

.auction-table td:first-child b,
.auction-table td:first-child small {
  grid-column: 2;
}

.auction-table td small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.auction-table td strong,
.auction-table [data-auction-total] {
  color: var(--pkmn-gold);
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
}

.item-orb {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 29px;
  height: 29px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  background: linear-gradient(145deg, #4b5563, #111827);
  color: #fff;
  box-shadow: inset 0 -5px 9px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.25);
  display: inline-grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.orb-fast { background: linear-gradient(145deg, #f97316 0 48%, #facc15 48%); }
.orb-level { background: linear-gradient(145deg, #facc15 0 36%, #111827 36% 65%, #ef4444 65%); }
.orb-lure { background: linear-gradient(145deg, #2563eb 0 45%, #ef4444 45% 60%, #38bdf8 60%); }
.orb-heavy { background: linear-gradient(145deg, #6b7280 0 55%, #2563eb 55%); }
.orb-love { background: linear-gradient(145deg, #f9a8d4 0 50%, #fff 50%); color: #db2777; }
.orb-friend { background: linear-gradient(145deg, #84cc16 0 55%, #ef4444 55%); }
.orb-moon { background: linear-gradient(145deg, #172554 0 55%, #facc15 55%); }
.orb-dream { background: linear-gradient(145deg, #a855f7, #f9a8d4); }
.orb-silver { background: linear-gradient(145deg, #e5e7eb, #64748b); color: #1f2937; }
.orb-gold { background: linear-gradient(145deg, #fde047, #ca8a04); color: #4a3200; }
.orb-vitamin, .orb-heal { background: linear-gradient(145deg, #ef4444, #991b1b); }
.orb-feather { background: linear-gradient(145deg, #fff, #7dd3fc); color: #0369a1; }
.orb-berry { background: linear-gradient(145deg, #f43f5e, #7e22ce); }
.orb-pp { background: linear-gradient(145deg, #8b5cf6, #312e81); font-size: 8px; }
.orb-stone { background: linear-gradient(145deg, #fde68a, #a78bfa); color: #312e81; }
.orb-evo { background: linear-gradient(145deg, #9ca3af, #374151); }
.orb-pot { background: linear-gradient(145deg, #b45309, #78350f); }
.orb-drink { background: linear-gradient(145deg, #38bdf8, #0369a1); }
.orb-poke { background: linear-gradient(#ef4444 0 47%, #111827 47% 55%, #f8fafc 55%); }
.orb-great { background: linear-gradient(#2563eb 0 47%, #111827 47% 55%, #f8fafc 55%); }
.orb-ultra { background: linear-gradient(#111827 0 47%, #facc15 47% 55%, #f8fafc 55%); }
.orb-premier { background: linear-gradient(#f8fafc 0 47%, #ef4444 47% 55%, #fff 55%); color: #ef4444; }
.orb-healball { background: linear-gradient(145deg, #f9a8d4, #a855f7); }
.orb-specialball { background: linear-gradient(145deg, #38bdf8, #ef4444); }
.orb-luxury { background: linear-gradient(145deg, #171717 0 60%, #facc15 60%); }
.orb-timer { background: linear-gradient(145deg, #f8fafc 0 45%, #ef4444 45% 60%, #111827 60%); color: #111827; }
.orb-food { background: linear-gradient(145deg, #fb923c, #b91c1c); }

.auction-rating {
  display: inline-flex;
  align-items: center;
  min-width: 68px;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.rating-priority { color: #f6bd2b; background: rgba(252, 192, 0, 0.1); }
.rating-good { color: var(--pkmn-hp-green); background: rgba(56, 200, 104, 0.1); }
.rating-caution { color: var(--text-secondary); background: var(--panel-card); }

.auction-empty td {
  padding: 34px 20px;
  color: var(--text-muted);
  text-align: center;
}

.auction-disclaimer {
  margin: 0 2px 18px;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.auction-specials {
  margin-top: 0;
  border-color: rgba(168, 85, 247, 0.34);
}

.auction-specials summary {
  align-items: center;
}

.auction-specials summary span {
  font-weight: 900;
}

.auction-specials summary small {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}

.special-price-callout {
  display: grid;
  grid-template-columns: auto auto minmax(200px, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 15px;
  padding: 14px;
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: var(--radius-md);
  background: var(--pkmn-violet-subtle);
}

.special-price-callout > div {
  padding-right: 14px;
  border-right: 1px solid var(--border);
}

.special-price-callout span,
.special-price-callout b {
  display: block;
}

.special-price-callout span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.special-price-callout b {
  color: #c084fc;
  font-family: var(--font-mono);
}

.special-price-callout p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.special-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.special-item-grid > div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-card);
}

.special-item-grid h4 {
  margin: 0 0 5px;
  font-size: 13px;
}

.special-item-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.65;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   10. Glass Tables & Pokédex Lists
   -------------------------------------------------------------------------- */
.tableWrap {
  overflow-x: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-hud);
  margin: 18px 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 14px;
  min-width: 680px;
}

th, td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--panel-card);
  color: var(--text-primary);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 2px solid var(--border);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--panel-card);
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}
[data-theme="light"] tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

/* Completed Rows */
tbody tr.row-done {
  background: rgba(56, 200, 104, 0.12) !important;
}

tbody tr.row-done td b, tbody tr.row-done td strong {
  text-decoration: line-through;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   11. Custom Pokéball Checkbox
   -------------------------------------------------------------------------- */
.check {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-light);
  background: var(--panel-inner);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  position: relative;
}

input[type="checkbox"]:hover {
  border-color: var(--pkmn-scarlet);
  background: var(--panel-card);
}

input[type="checkbox"]:checked {
  background: linear-gradient(180deg, var(--pkmn-scarlet) 0%, var(--pkmn-scarlet) 50%, #ffffff 50%, #ffffff 100%);
  border-color: #ffffff;
  box-shadow: 0 0 12px var(--pkmn-scarlet-glow);
}

input[type="checkbox"]:checked::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #111;
  border: 1.5px solid #fff;
  border-radius: var(--radius-full);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* --------------------------------------------------------------------------
   12. Roadmap Timeline
   -------------------------------------------------------------------------- */
.timeline {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  position: relative;
}

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  position: relative;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 44px;
  bottom: -14px;
  left: 21px;
  width: 2px;
  background: linear-gradient(180deg, var(--pkmn-scarlet) 0%, var(--pkmn-rotom) 50%, var(--pkmn-violet) 100%);
  opacity: 0.4;
}

.num {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  background: linear-gradient(135deg, var(--pkmn-scarlet) 0%, var(--pkmn-rotom) 50%, var(--pkmn-violet) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--pkmn-scarlet-glow);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.stepBody {
  padding: 15px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-hud);
  font-size: 14.5px;
  line-height: 1.65;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stepBody:hover {
  border-color: var(--pkmn-rotom);
  transform: translateX(3px);
}

.stepBody b {
  display: block;
  font-size: 15.5px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   13. Stat Grids (Numbers & Stats)
   -------------------------------------------------------------------------- */
.statGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}

.stat {
  padding: 18px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-card) 100%);
  text-align: center;
  box-shadow: var(--shadow-hud);
  position: relative;
  overflow: hidden;
}

.stat strong {
  display: block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--pkmn-scarlet) 80%, var(--pkmn-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
  margin-bottom: 4px;
}

.stat span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   14. In-Game Dialogue Callouts (Note, Tip, Danger)
   -------------------------------------------------------------------------- */
.note, .tip, .danger {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin: 18px 0;
  background: var(--panel);
  border: 1.5px solid var(--border);
  font-size: 14.5px;
  line-height: 1.68;
  box-shadow: var(--shadow-hud);
  position: relative;
}

.note {
  border-left: 5px solid var(--pkmn-gold);
  background: linear-gradient(90deg, var(--pkmn-gold-subtle) 0%, var(--panel) 100%);
}

.tip {
  border-left: 5px solid var(--pkmn-hp-green);
  background: linear-gradient(90deg, rgba(56, 200, 104, 0.12) 0%, var(--panel) 100%);
}

.danger {
  border-left: 5px solid var(--pkmn-scarlet);
  background: linear-gradient(90deg, var(--pkmn-scarlet-subtle) 0%, var(--panel) 100%);
}

.note b, .tip b, .danger b {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   15. Details & Summary (Rotom Dialog Accordions)
   -------------------------------------------------------------------------- */
details {
  margin: 12px 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-hud);
  overflow: hidden;
  transition: all var(--transition-fast);
}

details[open] {
  border-color: var(--pkmn-rotom);
}

summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  background: var(--panel);
  transition: background var(--transition-fast);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "›";
  font-size: 22px;
  font-weight: 800;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

details[open] summary::after {
  transform: rotate(90deg);
  color: var(--pkmn-rotom);
}

summary:hover {
  background: var(--panel-card);
}

details p, details div.details-body {
  padding: 0 18px 16px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   16. Official 18 Pokémon Elemental Types Grid
   -------------------------------------------------------------------------- */
.typeGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.typeRow {
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-hud);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.typeRow:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
  background: var(--panel-card);
}

.typeRow b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.typeRow span {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Official Pokémon Type Colors */
.typeRow:nth-child(1) b { background: var(--type-normal); }
.typeRow:nth-child(2) b { background: var(--type-fire); }
.typeRow:nth-child(3) b { background: var(--type-water); }
.typeRow:nth-child(4) b { background: var(--type-electric); color: #1a1a1a; text-shadow: none; }
.typeRow:nth-child(5) b { background: var(--type-grass); }
.typeRow:nth-child(6) b { background: var(--type-ice); color: #1a1a1a; text-shadow: none; }
.typeRow:nth-child(7) b { background: var(--type-fighting); }
.typeRow:nth-child(8) b { background: var(--type-poison); }
.typeRow:nth-child(9) b { background: var(--type-ground); }
.typeRow:nth-child(10) b { background: var(--type-flying); }
.typeRow:nth-child(11) b { background: var(--type-psychic); }
.typeRow:nth-child(12) b { background: var(--type-bug); }
.typeRow:nth-child(13) b { background: var(--type-rock); }
.typeRow:nth-child(14) b { background: var(--type-ghost); }
.typeRow:nth-child(15) b { background: var(--type-dragon); }
.typeRow:nth-child(16) b { background: var(--type-dark); }
.typeRow:nth-child(17) b { background: var(--type-steel); }
.typeRow:nth-child(18) b { background: var(--type-fairy); }

/* --------------------------------------------------------------------------
   17. Source Box & Footer
   -------------------------------------------------------------------------- */
.sourceBox {
  margin-top: 40px;
  padding: 18px 20px;
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.sourceBox b {
  display: block;
  font-size: 13.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.sourceBox ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.sourceBox li {
  margin: 4px 0;
}

.sourceBox a {
  color: var(--link);
  word-break: break-all;
}
.sourceBox a:hover {
  text-decoration: underline;
}

.footer {
  margin-top: auto;
  padding: 32px clamp(20px, 4.5vw, 64px) 48px;
  border-top: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  background: var(--panel-inner);
}

/* --------------------------------------------------------------------------
   18. Spotlight Omnibar (Rotom Dex Search Modal)
   -------------------------------------------------------------------------- */
.spotlight-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 20px;
}

.spotlight-modal.active {
  display: grid;
}

.spotlight-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.spotlight-dialog {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--panel-solid);
  border: 2px solid var(--pkmn-rotom);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px var(--pkmn-rotom-subtle);
  overflow: hidden;
  z-index: 1;
  animation: scaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.spotlight-input-wrap {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--border);
  background: var(--panel);
}

.spotlight-input-wrap svg {
  color: var(--pkmn-rotom);
  margin-right: 12px;
  flex-shrink: 0;
}

.spotlight-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  outline: none;
}

.spotlight-input::placeholder {
  color: var(--text-muted);
}

.spotlight-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.spotlight-item:hover, .spotlight-item.focused {
  background: var(--panel-card);
  color: var(--pkmn-scarlet);
  transform: translateX(4px);
}

.spotlight-item-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.spotlight-item-title {
  font-weight: 700;
  font-size: 14.5px;
}

.spotlight-item-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.spotlight-item-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--panel-inner);
  color: var(--text-secondary);
}

.spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--panel-inner);
  border-top: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.spotlight-shortcuts {
  display: flex;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   19. Toast System & Floating Buttons
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--panel-solid);
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-hud);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(20px);
}

.toast-success {
  border-left: 5px solid var(--pkmn-hp-green);
}

.fab-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fab-btn {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--panel-solid);
  border: 1.5px solid var(--border-light);
  color: var(--text-primary);
  box-shadow: var(--shadow-hud);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(16px);
}

.fab-btn:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: var(--pkmn-scarlet);
  color: var(--pkmn-scarlet);
  box-shadow: 0 6px 20px var(--pkmn-scarlet-glow);
}

.fab-btn.back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}

.fab-btn.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   20. Responsive Breakdown
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .card { grid-column: span 6; }
  .statGrid { grid-template-columns: repeat(2, 1fr); }
  .typeGrid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    transform: translateX(-105%);
    box-shadow: var(--shadow-hud);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 35;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }
  
  .sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
  }
  
  .topbar {
    display: flex;
  }
  
  .card, .card.wide {
    grid-column: 1 / -1;
  }
  
  .hero {
    padding-top: 24px;
  }
  
  .hero h1 {
    font-size: 30px;
  }

  .auction-guide-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
  }

  .auction-stats {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .statGrid {
    grid-template-columns: 1fr 1fr;
  }
  .typeGrid {
    grid-template-columns: 1fr;
  }
  .timeline .step {
    grid-template-columns: 36px 1fr;
    gap: 10px;
  }
  .num {
    width: 36px;
    height: 36px;
    font-size: 14px;
    border-radius: var(--radius-sm);
  }
  .step:not(:last-child)::after {
    left: 17px;
  }
  .fab-container {
    bottom: 20px;
    right: 20px;
  }

  .auction-guide {
    margin-left: -8px;
    margin-right: -8px;
    padding: 16px 12px;
    border-radius: var(--radius-lg);
  }

  .auction-toolbar {
    grid-template-columns: 1fr;
  }

  .auction-result-line {
    display: block;
  }

  .auction-result-line span:last-child {
    display: block;
    margin-top: 3px;
  }

  .special-price-callout,
  .special-item-grid {
    grid-template-columns: 1fr;
  }

  .special-price-callout > div {
    padding: 0 0 8px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .auction-specials summary small {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   21. PokeSprite entity artwork (latest generation with fallbacks)
   -------------------------------------------------------------------------- */
.brand-asset,
.item-image,
.entity-image {
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.brand-asset {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.42));
}

.logoIcon::after {
  pointer-events: none;
}

.item-label,
.item-heading {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.item-image {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.28));
}

.entity-image {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  image-rendering: auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.page-entity-strip,
.entity-strip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-entity-strip {
  max-width: 100%;
  margin-top: 17px;
  padding: 4px 0 3px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.entity-strip {
  flex-wrap: wrap;
  margin-top: 12px;
}

.entity-strip-table {
  margin-top: 7px;
}

.entity-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--panel-inner);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--shadow-hud);
}

.entity-badge .entity-image {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.page-entity-strip .entity-badge {
  min-height: 50px;
  padding-right: 12px;
}

.page-entity-strip .entity-image {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.entity-badge-item {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-inner) 88%, var(--pkmn-gold)), var(--panel-inner));
}

.entity-badge-pokemon {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-inner) 88%, var(--pkmn-rotom)), var(--panel-inner));
}

.entity-heading-stack {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  vertical-align: middle;
}

.entity-heading-stack .entity-image {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  margin-left: -8px;
}

.entity-heading-stack .entity-image:first-child {
  margin-left: 0;
}

.item-image-ball {
  display: inline-block;
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  margin: -8px 0;
}

.item-image-chip {
  width: 23px;
  height: 23px;
  flex-basis: 23px;
}

.chip-item-stack,
.topic-item-stack {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.chip-item-stack :is(.item-image, .entity-image),
.topic-item-stack :is(.item-image, .entity-image) {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
  margin-left: -9px;
}

.chip-item-stack :is(.item-image, .entity-image):first-child,
.topic-item-stack :is(.item-image, .entity-image):first-child {
  margin-left: 0;
}

.chip-item-stack :is(.item-image, .entity-image) {
  width: 21px;
  height: 21px;
  flex-basis: 21px;
  margin-left: -11px;
}

.item-image-topic {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
}

.ball-gallery-section {
  padding-top: 28px;
}

.ball-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.ball-gallery-card {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-card) 100%);
  box-shadow: var(--shadow-hud);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.ball-gallery-card:hover {
  transform: translateY(-2px);
  border-color: var(--pkmn-scarlet);
}

.item-image-gallery {
  width: 58px;
  height: 58px;
}

.item-orb {
  display: none !important;
}

.item-image-stack {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 42px;
  min-height: 38px;
  display: grid;
  place-items: center;
  position: relative;
}

.item-image-stack .item-image,
.item-image-stack .entity-image {
  grid-area: 1 / 1;
  width: 38px;
  height: 38px;
}

.item-image-stack .item-image:nth-child(n + 2),
.item-image-stack .entity-image:nth-child(n + 2) {
  width: 27px;
  height: 27px;
  transform: translate(calc((var(--item-index, 1) - 1) * 3px), calc((var(--item-index, 1) - 1) * -2px));
}

.item-image-stack :is(.item-image, .entity-image):nth-child(2) { transform: translate(8px, -6px); }
.item-image-stack :is(.item-image, .entity-image):nth-child(3) { transform: translate(-8px, 6px); }
.item-image-stack :is(.item-image, .entity-image):nth-child(4) { transform: translate(9px, 8px); }
.item-image-stack :is(.item-image, .entity-image):nth-child(5) { transform: translate(-9px, -8px); }
.item-image-stack :is(.item-image, .entity-image):nth-child(6) { transform: translate(0, 10px); }

.auction-table td:first-child {
  grid-template-columns: 42px minmax(105px, auto);
}

.auction-table td:first-child.no-item-art {
  grid-template-columns: minmax(105px, auto);
}

.auction-table td:first-child.no-item-art b,
.auction-table td:first-child.no-item-art small {
  grid-column: 1;
}

.asset-credit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.asset-credit a {
  color: var(--pkmn-rotom);
  font-weight: 700;
}

@media (max-width: 640px) {
  .ball-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ball-gallery-card {
    min-height: 96px;
    padding: 9px 4px;
  }

  .item-image-gallery {
    width: 48px;
    height: 48px;
  }

  .item-image-ball {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .page-entity-strip {
    margin-right: -15px;
    padding-right: 15px;
  }

  .entity-badge {
    font-size: 10px;
  }
}
