/* Retrofun Pokédex Stylesheet */
:root {
  --type-normal: #9fa19f;
  --type-fire: #e62829;
  --type-water: #2980ef;
  --type-grass: #3fa129;
  --type-electric: #fac000;
  --type-ice: #3dcef3;
  --type-fighting: #ff8000;
  --type-poison: #8f41cb;
  --type-ground: #915121;
  --type-flying: #81b9ef;
  --type-psychic: #ef4179;
  --type-bug: #91a119;
  --type-rock: #afa981;
  --type-ghost: #704170;
  --type-dragon: #5060e1;
  --type-steel: #60a1b8;
  --type-dark: #624d4e;
  --type-fairy: #ef70ef;

  --dex-bg: #0d1017;
  --dex-card: #141926;
  --dex-card-hover: #1b2233;
  --dex-border: #263147;
  --dex-border-glow: rgba(255, 189, 90, 0.35);
}

/* Hero Section */
.dex-hero {
  padding: 40px 0 24px;
  text-align: center;
}
.dex-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 12px 0 14px;
}
.dex-hero p {
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 20px;
  font-size: 15px;
  line-height: 1.6;
}

/* Controls & Filter Bar */
.dex-controls {
  background: #121622;
  border: 1px solid var(--dex-border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.dex-search-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.dex-search-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
}
.dex-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 16px;
}
.dex-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: #090c12;
  border: 1px solid var(--dex-border);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all .2s;
}
.dex-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 189, 90, 0.2);
}

.dex-sort-select {
  padding: 12px 16px;
  background: #090c12;
  border: 1px solid var(--dex-border);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  min-width: 170px;
}
.dex-sort-select:focus {
  border-color: var(--gold);
}

/* Generation Tabs */
.gen-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.gen-tab {
  background: #171d2c;
  border: 1px solid #2a354c;
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s ease;
}
.gen-tab:hover {
  background: #232d42;
  color: #fff;
}
.gen-tab.active {
  background: var(--gold);
  color: #121008;
  border-color: var(--gold);
  font-weight: 700;
}

/* Type Filter Pills */
.type-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.type-filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-right: 4px;
}
.type-pill-btn {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  border: 1px solid transparent;
  cursor: pointer;
  opacity: 0.65;
  transition: all .15s;
  background: #232c3f;
}
.type-pill-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}
.type-pill-btn.active {
  opacity: 1;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
  transform: scale(1.05);
}

/* Type Pill Colors */
.type-Normal { background-color: var(--type-normal); color: #fff; }
.type-Fire { background-color: var(--type-fire); color: #fff; }
.type-Water { background-color: var(--type-water); color: #fff; }
.type-Grass { background-color: var(--type-grass); color: #fff; }
.type-Electric { background-color: var(--type-electric); color: #111; }
.type-Ice { background-color: var(--type-ice); color: #111; }
.type-Fighting { background-color: var(--type-fighting); color: #fff; }
.type-Poison { background-color: var(--type-poison); color: #fff; }
.type-Ground { background-color: var(--type-ground); color: #fff; }
.type-Flying { background-color: var(--type-flying); color: #111; }
.type-Psychic { background-color: var(--type-psychic); color: #fff; }
.type-Bug { background-color: var(--type-bug); color: #fff; }
.type-Rock { background-color: var(--type-rock); color: #fff; }
.type-Ghost { background-color: var(--type-ghost); color: #fff; }
.type-Dragon { background-color: var(--type-dragon); color: #fff; }
.type-Steel { background-color: var(--type-steel); color: #fff; }
.type-Dark { background-color: var(--type-dark); color: #fff; }
.type-Fairy { background-color: var(--type-fairy); color: #fff; }

/* Grid of Pokemon */
.dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}
@media (max-width: 640px) {
  .dex-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Pokemon Card */
.dex-card {
  background: var(--dex-card);
  border: 1px solid var(--dex-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.dex-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background .2s;
}
.dex-card:hover {
  background: var(--dex-card-hover);
  border-color: var(--dex-border-glow);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.dex-card:hover::before {
  background: var(--gold);
}

.dex-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.dex-card-num {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #222938;
}
.dex-card-bst {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255, 189, 90, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.dex-card-art-wrap {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 10px;
  position: relative;
}
.dex-card-art {
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.dex-card:hover .dex-card-art {
  transform: scale(1.12);
}

.dex-card-name {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dex-card-types {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 12px;
}
.dex-type-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Card Defense Hint (Critical for battle!) */
.dex-card-defense {
  background: rgba(10, 13, 20, 0.6);
  border: 1px solid #1f2738;
  border-radius: 6px;
  padding: 6px 8px;
  margin-top: auto;
  font-size: 11px;
}
.dex-defense-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
}
.dex-defense-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.dex-weak-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.dex-weak-4x {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
  font-weight: 800;
}
.dex-weak-2x {
  background: #f97316;
  color: #fff;
}
.dex-immune-badge {
  background: #475569;
  color: #e2e8f0;
}

/* Empty State / Loading */
.dex-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.dex-empty h3 {
  color: #fff;
  margin-bottom: 8px;
}

/* ========================================================
   DETAIL MODAL / POPUP SHEET
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #111522;
  border: 1px solid var(--dex-border);
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e2e8f0;
}
.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: all .15s;
}
.modal-close-btn:hover {
  background: var(--red);
  border-color: var(--red);
  transform: rotate(90deg);
}

/* Modal Body Header */
.modal-top {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(20, 26, 40, 0.9) 0%, rgba(13, 16, 23, 0.6) 100%);
  border-bottom: 1px solid var(--dex-border);
}
@media (max-width: 640px) {
  .modal-top {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }
}

.modal-art-box {
  background: radial-gradient(circle, rgba(255, 189, 90, 0.08) 0%, rgba(15, 20, 31, 0.8) 70%);
  border: 1px solid #232c3f;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  position: relative;
}
.modal-art-box img {
  max-width: 170px;
  max-height: 170px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}

.modal-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.modal-mon-num {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.modal-mon-name {
  font-size: clamp(26px, 3.5vw, 36px);
  margin-bottom: 10px;
}
.modal-type-list {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
@media (max-width: 640px) {
  .modal-type-list {
    justify-content: center;
  }
}

/* Modal Sections */
.modal-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--dex-border);
}
.modal-section:last-child {
  border-bottom: none;
}
.modal-section-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-section-title span.badge-desc {
  font-size: 11px;
  font-weight: normal;
  color: var(--muted);
  font-family: var(--body);
}

/* Battle Matchup Defense Table */
.defense-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.defense-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.defense-category {
  width: 140px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.defense-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.def-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.def-pill .mult-tag {
  background: rgba(0,0,0,0.3);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
}

/* Base Stats Grid */
.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-row {
  display: grid;
  grid-template-columns: 80px 45px 1fr;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.stat-name {
  font-weight: 600;
  color: var(--muted);
}
.stat-val {
  font-family: monospace;
  font-weight: 700;
  color: #fff;
  text-align: right;
}
.stat-bar-track {
  background: #1b2333;
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  position: relative;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width .4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Evolution Chain Visualizer */
.evo-chain-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
}
.evo-card {
  background: #141a27;
  border: 1px solid var(--dex-border);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.evo-card:hover {
  background: #1d2538;
  border-color: var(--gold);
}
.evo-card img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.evo-card-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}
.evo-card-id {
  font-family: monospace;
  font-size: 10px;
  color: var(--muted);
}
.evo-arrow {
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Move Table */
.move-table-wrap {
  overflow-x: auto;
  max-height: 280px;
}
.move-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
.move-table th {
  background: #0d111a;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--dex-border);
}
.move-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #1c2436;
}
.move-table tr:hover td {
  background: #151c2a;
}
.cat-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.cat-Physical { background: #e06c4b; color: #fff; }
.cat-Special { background: #4a7ec5; color: #fff; }
.cat-Status { background: #888e99; color: #fff; }

/* ========================================================
   COMPACT IN-APP VIEW (?view=compact)
   ======================================================== */
body.compact-mode {
  background: #0d1017;
  padding: 0;
  margin: 0;
}
body.compact-mode .site-header,
body.compact-mode .dex-hero,
body.compact-mode .site-footer {
  display: none !important;
}
body.compact-mode .wrap {
  width: 100% !important;
  max-width: 100% !important;
  padding: 10px;
}
body.compact-mode .modal-overlay {
  position: static !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: transparent !important;
  padding: 0 !important;
}
body.compact-mode .modal-content {
  max-height: none !important;
  border-radius: 10px !important;
  transform: none !important;
  box-shadow: none !important;
}


/* ========================================================
   MASTER TABS (Pokemon Dex / Skill Dex / Item Dex)
   ======================================================== */
.dex-master-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 28px;
  flex-wrap: wrap;
}
.dex-master-tab {
  background: #151a26;
  border: 1px solid var(--dex-border);
  color: #cbd5e1;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.dex-master-tab:hover {
  background: #1d2538;
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-2px);
}
.dex-master-tab.active {
  background: linear-gradient(135deg, #f5c518 0%, #e5b00b 100%);
  color: #121008;
  border-color: var(--gold);
  box-shadow: 0 6px 20px rgba(245, 197, 24, 0.35);
}
.dex-master-tab .tab-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  color: inherit;
}

/* Category Filter Pills */
.cat-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-pill-btn {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: #171d2c;
  border: 1px solid #2a354c;
  cursor: pointer;
  transition: all .15s;
}
.cat-pill-btn:hover {
  background: #232d42;
  color: #fff;
}
.cat-pill-btn.active {
  background: var(--gold);
  color: #121008;
  border-color: var(--gold);
  font-weight: 700;
}

/* Move Dex Table & Card Styles */
.move-dex-table-wrap {
  background: var(--dex-card);
  border: 1px solid var(--dex-border);
  border-radius: 14px;
  overflow-x: auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  margin-bottom: 60px;
}
.move-dex-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.move-dex-table th {
  background: #0f131d;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--dex-border);
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: .03em;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}
.move-dex-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #1a2233;
}
.move-dex-table tr:hover td {
  background: #182030;
}
.move-name-cell {
  font-weight: 700;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}
.move-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tm-disc-img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  image-rendering: pixelated;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
  transition: transform .18s ease;
}
.move-dex-table tr:hover .tm-disc-img {
  transform: scale(1.18) rotate(12deg);
}
.modal-tm-disc-box {
  width: 72px;
  height: 72px;
  background: radial-gradient(circle, rgba(255,189,90,0.18) 0%, rgba(15,20,31,0.9) 70%);
  border: 1px solid #2a3449;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.modal-tm-disc {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 10px rgba(255,189,90,0.35));
}

.move-desc-cell {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
  min-width: 280px;
}

/* Item Dex Card Grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 60px;
}
.item-card {
  background: var(--dex-card);
  border: 1px solid var(--dex-border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.item-card:hover {
  background: var(--dex-card-hover);
  border-color: var(--dex-border-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.item-sprite-box {
  width: 52px;
  height: 52px;
  background: radial-gradient(circle, rgba(255,189,90,0.08) 0%, rgba(15,20,31,0.8) 70%);
  border: 1px solid #232c3f;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
}
.item-sprite-box img {
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}
.item-info {
  flex: 1;
  min-width: 0;
}
.item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.item-name {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-category-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255,189,90,0.12);
  border: 1px solid rgba(255,189,90,0.25);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.item-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Priority badges */
.prio-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
}
.prio-pos {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.prio-neg {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Item price */
.item-price-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 4px;
}

/* Profile chips in Pokemon Modal */
.profile-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.profile-chip {
  background: #151c28;
  border: 1px solid #232d42;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.profile-chip span {
  color: var(--muted);
}
.profile-chip strong {
  color: #fff;
  font-weight: 600;
}

/* Ability Cards */
.ability-cards-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.ability-card {
  background: #151c28;
  border: 1px solid #232d42;
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .15s ease;
}
.ability-card:hover {
  border-color: #3b82f6;
}
.ability-hidden {
  border-left: 3px solid #facc15;
}
.ability-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.ability-name {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
}
.ability-type-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .04em;
}
.tag-normal {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.tag-hidden {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}
.ability-desc {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

/* In-Game Battle Switcher Bar */
.battle-switcher-bar {
  background: #111722;
  border: 1px solid #28354d;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.battle-switcher-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-right: 4px;
}
.battle-mon-btn {
  background: #1a2233;
  border: 1px solid #2e3b52;
  color: #e2e8f0;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.battle-mon-btn:hover {
  background: #25334c;
}
.battle-mon-btn.active {
  background: var(--gold);
  color: #121008;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(255,189,90,0.3);
}
.battle-mon-btn.btn-enemy {
  border-color: #ef4444;
}
.battle-mon-btn.btn-team {
  border-color: #10b981;
}
