:root {
  --bg: #f6f1e7;
  --panel: rgba(255, 250, 240, 0.92);
  --ink: #1f2a1f;
  --muted: #5f6b5c;
  --line: rgba(51, 70, 46, 0.15);
  --accent: #d94f3d;
  --accent-strong: #9f2318;
--grass: #77CC55;
--electric: #FFCC33;
--water: #3399FF;
  --shadow: 0 18px 48px rgba(64, 50, 28, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(214, 177, 19, 0.24), transparent 28%),
    radial-gradient(circle at top right, rgba(59, 132, 197, 0.16), transparent 24%),
    linear-gradient(180deg, #f9f3ea 0%, #efe3cf 100%);
}

.app-shell {
  width: min(1200px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

/* ── Top Navigation Bar ── */
.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(31, 42, 31, 0.08);
  box-shadow: 0 4px 24px rgba(64, 50, 28, 0.08), 0 1px 4px rgba(64, 50, 28, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 12px;
  z-index: 100;
}

.top-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  flex-shrink: 0;
}

.top-nav-logo {
  font-size: 20px;
  line-height: 1;
}

.top-nav-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--accent), #e67e22, var(--grass), var(--water));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.top-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 200ms, background 200ms;
  white-space: nowrap;
}

.top-nav-link:hover {
  color: var(--ink);
  background: rgba(31, 42, 31, 0.05);
}

.top-nav-link-active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.top-nav-link-active:hover {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.top-nav-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-light);
  flex-shrink: 0;
  padding: 6px;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
  margin-left: auto;
}

.top-nav-github:hover {
  color: var(--ink);
  background: rgba(31, 42, 31, 0.07);
}

/* ── Nav Search Box ── */
.nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 260px;
  min-width: 120px;
}

.nav-search-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
}

.nav-search {
  width: 100%;
  padding: 7px 32px 7px 30px;
  border: 1px solid rgba(31, 42, 31, 0.10);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.6);
  font-size: 13px;
  color: var(--ink);
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}

.nav-search::placeholder {
  color: var(--muted);
  opacity: 0.65;
  font-size: 12px;
}

.nav-search:focus {
  outline: none;
  border-color: rgba(217, 79, 61, 0.35);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

.nav-search-clear {
  position: absolute;
  right: 6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(31, 42, 31, 0.08);
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms, color 150ms;
}

.nav-search-clear:hover {
  background: rgba(217, 79, 61, 0.12);
  color: var(--accent-strong);
  transform: none;
  box-shadow: none;
}

/* ── Nav Filter Button ── */
.nav-filter-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(31, 42, 31, 0.08);
  border-radius: 50%;
  background: rgba(255, 248, 236, 0.6);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 200ms, color 200ms, border-color 200ms;
}

.nav-filter-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border-color: rgba(31, 42, 31, 0.15);
  transform: none;
  box-shadow: none;
}

.nav-filter-btn-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  border-color: transparent;
}

.nav-filter-btn-active:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  transform: none;
  box-shadow: none;
}

.nav-filter-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid white;
}

.nav-filter-btn-active .nav-filter-badge {
  background: white;
  border-color: var(--accent);
}

/* ── Floating Filter Panel ── */
.filter-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 72px 20px 20px;
  background: rgba(0, 0, 0, 0.08);
  animation: filterOverlayIn 200ms ease;
}

@keyframes filterOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.filter-panel {
  width: min(360px, calc(100vw - 40px));
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.96);
  border: 1px solid rgba(31, 42, 31, 0.08);
  box-shadow: 0 20px 60px rgba(64, 50, 28, 0.18), 0 4px 16px rgba(64, 50, 28, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: filterPanelIn 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes filterPanelIn {
  from { opacity: 0; transform: translateX(20px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.filter-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.filter-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.filter-panel-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(31, 42, 31, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms, color 150ms;
}

.filter-panel-close:hover {
  background: rgba(217, 79, 61, 0.1);
  color: var(--accent-strong);
  transform: none;
  box-shadow: none;
}

.filter-section {
  margin-bottom: 16px;
}

.filter-section-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.filter-hint {
  font-weight: 400;
  opacity: 0.7;
  margin-left: 4px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(31, 42, 31, 0.08);
  cursor: pointer;
  transition: background 180ms, color 180ms, border-color 180ms;
  white-space: nowrap;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(31, 42, 31, 0.15);
  transform: none;
  box-shadow: none;
}

.filter-chip-active {
  color: white !important;
  background: linear-gradient(135deg, var(--grass), #6b9a3a) !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(138, 166, 90, 0.25);
}

.filter-chip-active:hover {
  background: linear-gradient(135deg, #7aaf4a, #5a8a2e) !important;
  transform: none;
  box-shadow: 0 2px 8px rgba(138, 166, 90, 0.3);
}

/* Type filter chips in panel */
.filter-type-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 50%;
  padding: 2px;
  background: rgba(31, 42, 31, 0.45);
}

.filter-chip-type[data-type="一般"] .filter-type-icon { background: #BBBBAA; }
.filter-chip-type[data-type="火"] .filter-type-icon { background: #FF4422; }
.filter-chip-type[data-type="水"] .filter-type-icon { background: #3399FF; }
.filter-chip-type[data-type="电"] .filter-type-icon { background: #FFCC33; }
.filter-chip-type[data-type="草"] .filter-type-icon { background: #77CC55; }
.filter-chip-type[data-type="冰"] .filter-type-icon { background: #77DDFF; }
.filter-chip-type[data-type="格斗"] .filter-type-icon { background: #BB5544; }
.filter-chip-type[data-type="毒"] .filter-type-icon { background: #AA5599; }
.filter-chip-type[data-type="地面"] .filter-type-icon { background: #DDBB55; }
.filter-chip-type[data-type="飞行"] .filter-type-icon { background: #6699FF; }
.filter-chip-type[data-type="超能力"] .filter-type-icon { background: #FF5599; }
.filter-chip-type[data-type="虫"] .filter-type-icon { background: #AABB22; }
.filter-chip-type[data-type="岩石"] .filter-type-icon { background: #BBAA66; }
.filter-chip-type[data-type="幽灵"] .filter-type-icon { background: #6666BB; }
.filter-chip-type[data-type="龙"] .filter-type-icon { background: #7766EE; }
.filter-chip-type[data-type="恶"] .filter-type-icon { background: #775544; }
.filter-chip-type[data-type="钢"] .filter-type-icon { background: #AAAABB; }
.filter-chip-type[data-type="妖精"] .filter-type-icon { background: #FFAAFF; }

.filter-chip-type-active {
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.filter-chip-type-active:hover {
  transform: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.filter-chip-type-active .filter-type-icon {
  background: rgba(255, 255, 255, 0.35);
}

.filter-chip-type-active[data-type="一般"] { background: #BBBBAA; }
.filter-chip-type-active[data-type="火"] { background: #FF4422; }
.filter-chip-type-active[data-type="水"] { background: #3399FF; }
.filter-chip-type-active[data-type="电"] { background: #FFCC33; color: #352a00 !important; }
.filter-chip-type-active[data-type="草"] { background: #77CC55; }
.filter-chip-type-active[data-type="冰"] { background: #77DDFF; color: #12343a !important; }
.filter-chip-type-active[data-type="格斗"] { background: #BB5544; }
.filter-chip-type-active[data-type="毒"] { background: #AA5599; }
.filter-chip-type-active[data-type="地面"] { background: #DDBB55; }
.filter-chip-type-active[data-type="飞行"] { background: #6699FF; }
.filter-chip-type-active[data-type="超能力"] { background: #FF5599; }
.filter-chip-type-active[data-type="虫"] { background: #AABB22; }
.filter-chip-type-active[data-type="岩石"] { background: #BBAA66; }
.filter-chip-type-active[data-type="幽灵"] { background: #6666BB; }
.filter-chip-type-active[data-type="龙"] { background: #7766EE; }
.filter-chip-type-active[data-type="恶"] { background: #775544; }
.filter-chip-type-active[data-type="钢"] { background: #AAAABB; }
.filter-chip-type-active[data-type="妖精"] { background: #FFAAFF; }

.filter-clear-all {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
  background: rgba(217, 79, 61, 0.08);
  border: 1px solid rgba(217, 79, 61, 0.12);
  cursor: pointer;
  transition: background 150ms;
}

.filter-clear-all:hover {
  background: rgba(217, 79, 61, 0.15);
  transform: none;
  box-shadow: none;
}

.main-panel { padding-top: 20px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.view-grid { display: grid; gap: 18px; }
.pokedex-layout, .teams-layout, .damage-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}

.panel-title { margin: 0; font-size: 24px; }
.panel-subtitle { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }

.toolbar { display: grid; gap: 12px; padding: 20px 24px 24px; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 12px; }
.team-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  gap: 12px;
}

input, select, button, textarea { font: inherit; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(31, 42, 31, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
}

button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 42, 31, 0.12);
}

.pokemon-list, .team-list { display: grid; gap: 12px; padding: 0 24px 24px; max-height: 72vh; overflow-y: auto; }

.media-list-card {
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
}

.list-card-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.list-thumb {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 42, 31, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.move-thumb {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.95), transparent 42%),
    linear-gradient(135deg, rgba(255, 213, 107, 0.36), rgba(105, 161, 255, 0.24));
}

.list-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(31, 42, 31, 0.08);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(248, 241, 226, 0.92));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.list-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(64, 50, 28, 0.08); }

.active-card {
  border-color: rgba(217, 79, 61, 0.36);
  box-shadow: 0 14px 28px rgba(159, 35, 24, 0.12);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dex-badge, .chip, .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(31, 42, 31, 0.06);
}

.pill { font-size: 13px; background: rgba(138, 166, 90, 0.12); }

.active-pill {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.types, .forms-grid, .generation-grid, .team-member-list { display: flex; flex-wrap: wrap; gap: 10px; }
.generation-card-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.learnset-generation-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.learnset-generation-pill {
  width: auto;
  padding: 6px 10px;
  color: var(--ink);
  background: rgba(138, 166, 90, 0.12);
}

.learnset-generation-pill.active-pill {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.learnset-table {
  display: grid;
  gap: 6px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.learnset-row {
  display: grid;
  grid-template-columns: minmax(118px, 1.4fr) minmax(94px, 1fr) minmax(72px, 0.8fr) minmax(72px, 0.8fr) 54px 54px 44px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(31, 42, 31, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.learnset-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-weight: 700;
  background: rgba(247, 244, 233, 0.96);
  backdrop-filter: blur(8px);
}

.text-button {
  width: auto;
  padding: 0;
  border-radius: 0;
  color: var(--accent-strong);
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.variant-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 0 0;
}

.variant-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.evolution-family-card {
  align-items: stretch;
}

.evolution-chain-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

.evolution-member {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 42, 31, 0.08);
  border-radius: 16px;
}

.evolution-member.matched {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 245, 224, 0.92));
}

.evolution-member.selected {
  border-color: rgba(217, 79, 61, 0.45);
  box-shadow: inset 0 0 0 1px rgba(217, 79, 61, 0.18);
}

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

.chain-image {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.chain-image.placeholder {
  display: grid;
  place-items: center;
  background: rgba(31, 42, 31, 0.06);
  border-radius: 18px;
}

.media-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1fr);
  margin-top: 16px;
}

.compact-media {
  grid-template-columns: minmax(160px, 0.55fr) minmax(0, 1fr);
}

.media-viewer,
.media-placeholder {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 42, 31, 0.08);
}

.entity-image {
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
}

.item-image {
  max-width: 220px;
}

.form-card {
  display: grid;
  gap: 8px;
  width: min(100%, 260px);
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(31,42,31,0.08);
}

.mini-image {
  width: 100%;
  max-width: 160px;
  height: auto;
  object-fit: contain;
}

.info-stack {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  font-size: 12px;
  color: white;
}

.type-chip-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.type-chip.type-草 { background: #77CC55; }
.type-chip.type-毒 { background: #AA5599; }
.type-chip.type-电 { background: #FFCC33; color: #352a00; }
.type-chip.type-水 { background: #3399FF; }
.type-chip.type-火 { background: #FF4422; }
.type-chip.type-一般 { background: #BBBBAA; }
.type-chip.type-冰 { background: #77DDFF; color: #12343a; }
.type-chip.type-格斗 { background: #BB5544; }
.type-chip.type-地面 { background: #DDBB55; }
.type-chip.type-飞行 { background: #6699FF; }
.type-chip.type-超能力 { background: #FF5599; }
.type-chip.type-虫 { background: #AABB22; }
.type-chip.type-岩石 { background: #BBAA66; }
.type-chip.type-幽灵 { background: #6666BB; }
.type-chip.type-龙 { background: #7766EE; }
.type-chip.type-恶 { background: #775544; }
.type-chip.type-钢 { background: #AAAABB; }
.type-chip.type-妖精 { background: #FFAAFF; }
.type-chip.type-unknown { background: #7b8481; }

.detail-panel, .team-builder { padding: 24px; }
.detail-empty, .muted { color: var(--muted); line-height: 1.7; }

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.detail-title-row h2 { margin: 0; font-size: 30px; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.meta-card, .subpanel, .team-member {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(31, 42, 31, 0.08);
}

.team-slot-grid {
  display: grid;
  gap: 14px;
}

.team-member-editor {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 42, 31, 0.08);
}

/* 嵌套在 subpanel 内时去掉重复的背景和边框 */
.subpanel .team-member-editor {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.member-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.member-grid,
.move-grid,
.stats-editor {
  display: grid;
  gap: 12px;
}

.member-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.move-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.member-grid label,
.move-grid label,
.mini-field {
  display: grid;
  gap: 6px;
}

.member-grid span,
.move-grid span,
.mini-field span,
.section-label {
  font-size: 12px;
  color: var(--muted);
}

.stats-details {
  margin-top: 14px;
}

.stats-details summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 600;
}

.stats-editor {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.stat-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.compact-button {
  padding: 8px 12px;
  font-size: 12px;
}

.damage-grid,
.result-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.damage-side-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.import-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.damage-hint-panel {
  margin-bottom: 12px;
}

.learnset-strip {
  margin-bottom: 0;
}

.warning-note {
  color: #a54927;
  font-size: 13px;
  line-height: 1.5;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(31, 42, 31, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.result-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.result-card h3 {
  margin: 0;
  font-size: 24px;
}

.result-badge {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #eb9f4b);
}

.result-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.stat-grid { display: grid; gap: 10px; margin-top: 16px; }

.stat-row {
  display: grid;
  grid-template-columns: 70px 1fr 52px;
  gap: 10px;
  align-items: center;
}

.stat-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 42, 31, 0.08);
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #eb9f4b);
}

.loading-panel { display: grid; place-items: center; min-height: 260px; }
.pulse-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════
   POKEDEX PAGE — Master-Detail Layout
   ═══════════════════════════════════════════════════════ */

.dex-page { display: flex; flex-direction: column; gap: 18px; }

/* ── Header ── */
.dex-header { padding: 22px 24px 20px; }
.dex-header-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.dex-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Filter Sections (chip-based) ── */
.dex-filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dex-filter-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.dex-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dex-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(31, 42, 31, 0.08);
  cursor: pointer;
  transition: background 180ms, color 180ms, border-color 180ms, box-shadow 180ms;
  white-space: nowrap;
}

.dex-filter-chip:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(31, 42, 31, 0.15);
  transform: none;
  box-shadow: none;
}

.dex-filter-chip-active {
  color: white !important;
  background: linear-gradient(135deg, var(--grass), #6b9a3a) !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(138, 166, 90, 0.25);
}

.dex-filter-chip-active:hover {
  background: linear-gradient(135deg, #7aaf4a, #5a8a2e) !important;
  transform: none;
  box-shadow: 0 2px 8px rgba(138, 166, 90, 0.3);
}

/* Type icon in filter chip */
.dex-filter-type-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 50%;
  padding: 3px;
  background: rgba(31, 42, 31, 0.45);
}

/* Per-type icon backgrounds (matching type-chip colors) */
.dex-filter-chip-type[data-type="一般"] .dex-filter-type-icon { background: #BBBBAA; }
.dex-filter-chip-type[data-type="火"] .dex-filter-type-icon { background: #FF4422; }
.dex-filter-chip-type[data-type="水"] .dex-filter-type-icon { background: #3399FF; }
.dex-filter-chip-type[data-type="电"] .dex-filter-type-icon { background: #FFCC33; }
.dex-filter-chip-type[data-type="草"] .dex-filter-type-icon { background: #77CC55; }
.dex-filter-chip-type[data-type="冰"] .dex-filter-type-icon { background: #77DDFF; }
.dex-filter-chip-type[data-type="格斗"] .dex-filter-type-icon { background: #BB5544; }
.dex-filter-chip-type[data-type="毒"] .dex-filter-type-icon { background: #AA5599; }
.dex-filter-chip-type[data-type="地面"] .dex-filter-type-icon { background: #DDBB55; }
.dex-filter-chip-type[data-type="飞行"] .dex-filter-type-icon { background: #6699FF; }
.dex-filter-chip-type[data-type="超能力"] .dex-filter-type-icon { background: #FF5599; }
.dex-filter-chip-type[data-type="虫"] .dex-filter-type-icon { background: #AABB22; }
.dex-filter-chip-type[data-type="岩石"] .dex-filter-type-icon { background: #BBAA66; }
.dex-filter-chip-type[data-type="幽灵"] .dex-filter-type-icon { background: #6666BB; }
.dex-filter-chip-type[data-type="龙"] .dex-filter-type-icon { background: #7766EE; }
.dex-filter-chip-type[data-type="恶"] .dex-filter-type-icon { background: #775544; }
.dex-filter-chip-type[data-type="钢"] .dex-filter-type-icon { background: #AAAABB; }
.dex-filter-chip-type[data-type="妖精"] .dex-filter-type-icon { background: #FFAAFF; }

/* ── Per-type active chip backgrounds ── */
.dex-filter-chip-type-active {
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dex-filter-chip-type-active:hover {
  transform: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.dex-filter-chip-type-active .dex-filter-type-icon {
  background: rgba(255, 255, 255, 0.35);
}

.dex-filter-chip-type-active[data-type="一般"] { background: #BBBBAA; }
.dex-filter-chip-type-active[data-type="火"] { background: #FF4422; }
.dex-filter-chip-type-active[data-type="水"] { background: #3399FF; }
.dex-filter-chip-type-active[data-type="电"] { background: #FFCC33; color: #352a00 !important; }
.dex-filter-chip-type-active[data-type="草"] { background: #77CC55; }
.dex-filter-chip-type-active[data-type="冰"] { background: #77DDFF; color: #12343a !important; }
.dex-filter-chip-type-active[data-type="格斗"] { background: #BB5544; }
.dex-filter-chip-type-active[data-type="毒"] { background: #AA5599; }
.dex-filter-chip-type-active[data-type="地面"] { background: #DDBB55; }
.dex-filter-chip-type-active[data-type="飞行"] { background: #6699FF; }
.dex-filter-chip-type-active[data-type="超能力"] { background: #FF5599; }
.dex-filter-chip-type-active[data-type="虫"] { background: #AABB22; }
.dex-filter-chip-type-active[data-type="岩石"] { background: #BBAA66; }
.dex-filter-chip-type-active[data-type="幽灵"] { background: #6666BB; }
.dex-filter-chip-type-active[data-type="龙"] { background: #7766EE; }
.dex-filter-chip-type-active[data-type="恶"] { background: #775544; }
.dex-filter-chip-type-active[data-type="钢"] { background: #AAAABB; }
.dex-filter-chip-type-active[data-type="妖精"] { background: #FFAAFF; }

/* ── Search wrapper ── */
.dex-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.dex-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.dex-search {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid rgba(31, 42, 31, 0.10);
  border-radius: 10px;
  background: rgba(255, 248, 236, 0.6);
  font-size: 13px;
  color: var(--ink);
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}

.dex-search::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.dex-search:focus {
  outline: none;
  border-color: rgba(217, 79, 61, 0.35);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}


/* ── Master-Detail Body ── */
.dex-body {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.dex-body-split {
  /* no viewport lock — page scrolls naturally */
}

/* ── Left: List Panel ── */
.dex-list-panel {
  padding: 0;
  flex: 1 1 100%;
  min-width: 0;
  transition: flex 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              max-width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.dex-list-panel-narrow {
  flex: 0 0 340px;
  max-width: 340px;
  /* no overflow-y: auto — scrolls with the page */
}

.dex-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 12px;
  padding: 16px;
  transition: gap 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When detail is open, switch to compact single-column list */
.dex-list-compact {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 8px;
}

.dex-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

/* ── Unified Item (card ↔ compact row) ── */
.dex-item {
  /* Grid-card mode (default) — vertical centered layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 16px 10px 14px;
  border: 1px solid rgba(31, 42, 31, 0.08);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,0.92), rgba(248,241,226,0.88));
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  /* Smooth morph transition for all shape properties */
  transition: padding 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              gap 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease,
              background 0.3s ease,
              box-shadow 0.3s ease,
              transform 0.2s ease;
}

.dex-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(64, 50, 28, 0.1);
}

/* Compact row mode */
.dex-item-compact {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border-color: rgba(31, 42, 31, 0.06);
  background: linear-gradient(160deg, rgba(255,255,255,0.85), rgba(248,241,226,0.7));
  text-align: left;
  box-shadow: 0 1px 4px rgba(64, 50, 28, 0.04);
}

.dex-item-compact:hover {
  transform: none;
  box-shadow: 0 4px 14px rgba(64, 50, 28, 0.08);
  border-color: rgba(31, 42, 31, 0.12);
  background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(248,241,226,0.85));
}

/* Active (selected) item */
.dex-item-active {
  background: linear-gradient(135deg, rgba(255,248,240,0.98), rgba(255,240,224,0.95));
  border-color: rgba(217, 79, 61, 0.3);
  box-shadow: 0 2px 8px rgba(217, 79, 61, 0.08);
  scroll-margin-top: 72px; /* clear the sticky nav bar */
}

.dex-item-active:hover {
  transform: none;
  background: linear-gradient(135deg, rgba(255,248,240,0.98), rgba(255,240,224,0.95));
}

/* ── Item Image ── */
.dex-item-img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dex-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dex-item-compact .dex-item-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.dex-card-placeholder {
  font-size: 28px;
  color: var(--muted);
  opacity: 0.4;
  transition: font-size 0.3s ease;
}

.dex-item-compact .dex-card-placeholder {
  font-size: 16px;
}

/* ── Item Info ── */
.dex-item-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  transition: align-items 0.3s ease;
}

.dex-item-compact .dex-item-info {
  flex: 1;
  align-items: flex-start;
  gap: 1px;
}

.dex-item-dex {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: font-size 0.3s ease;
}

.dex-item-compact .dex-item-dex {
  font-size: 10px;
}

.dex-item-name {
  font-size: 14px;
  text-align: center;
  transition: text-align 0.3s ease;
}

.dex-item-compact .dex-item-name {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dex-item-en {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: text-align 0.3s ease;
}

.dex-item-compact .dex-item-en {
  text-align: left;
}

/* ── Item Types ── */
.dex-item-types {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  flex-shrink: 0;
  transition: gap 0.3s ease;
}

.dex-item-compact .dex-item-types {
  gap: 3px;
  justify-content: flex-end;
}

/* ── Right: Detail Panel (sticky) ── */
.dex-detail-panel {
  position: sticky;
  top: 72px; /* below the sticky nav */
  padding: 24px;
  overflow-y: auto;
  max-height: calc(100vh - 84px);
  transform-origin: top center;
  flex: 1 1 0%;
  min-width: 0;
}

.dex-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(31, 42, 31, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms, color 150ms;
  z-index: 2;
}

.dex-detail-close:hover {
  background: rgba(217, 79, 61, 0.1);
  color: var(--accent-strong);
  transform: none;
  box-shadow: none;
}

.dex-drawer-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 40px;
  color: var(--muted);
}

/* ── Drawer Hero ── */
.drawer-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.drawer-img-box {
  display: grid;
  place-items: center;
}

.drawer-img-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.drawer-img-inner img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  padding: 8px;
}

.drawer-img-empty {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(31, 42, 31, 0.04);
  color: var(--muted);
}

.drawer-img-toggle {
  display: flex;
  gap: 4px;
  background: rgba(31, 42, 31, 0.06);
  border-radius: 999px;
  padding: 3px;
}

.drawer-img-toggle button {
  padding: 5px 14px;
  font-size: 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.drawer-img-toggle button:hover {
  background: rgba(255,255,255,0.5);
  transform: none;
  box-shadow: none;
}

.drawer-img-toggle button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ── Drawer Intro ── */
.drawer-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.drawer-dex {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.drawer-name {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.drawer-en {
  font-size: 14px;
  color: var(--muted);
}

.drawer-wiki-link {
  display: inline-flex;
  align-items: center;
  align-self: center;
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
  flex-shrink: 0;
}
.drawer-wiki-link:hover {
  opacity: 1;
  color: var(--accent, #d94f3d);
}

.drawer-types-row { display: flex; gap: 6px; }

.drawer-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 42, 31, 0.05);
  font-size: 13px;
}

.drawer-meta-key { color: var(--muted); font-size: 11px; }
.drawer-meta-val { font-weight: 600; }

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

.drawer-ability-label {
  font-size: 12px;
  color: var(--muted);
}

.drawer-ability-chip {
  position: relative;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(138, 166, 90, 0.15);
  color: #3d5a1e;
}

.drawer-ability-link {
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.drawer-ability-link:hover {
  background: rgba(138, 166, 90, 0.28);
  box-shadow: 0 1px 4px rgba(61, 90, 30, 0.1);
}

.drawer-ability-hidden {
  background: rgba(217, 79, 61, 0.1);
  color: var(--accent-strong);
}
.drawer-ability-hidden.drawer-ability-link:hover {
  background: rgba(217, 79, 61, 0.2);
  box-shadow: 0 1px 4px rgba(217, 79, 61, 0.1);
}

/* Ability tooltip */
.ability-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(30, 36, 30, 0.92);
  color: #f0f0f0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.ability-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(30, 36, 30, 0.92);
}
.drawer-ability-chip:hover .ability-tooltip {
display: block;
}

/* Move link in learnset table */
.drawer-move-link {
position: relative;
color: inherit;
text-decoration: none;
border-bottom: 1px dashed rgba(100, 140, 80, 0.4);
transition: color 0.15s, border-color 0.15s;
}
.drawer-move-link:hover {
color: var(--accent-strong, #3d5a1e);
border-bottom-color: var(--accent-strong, #3d5a1e);
}

/* Move tooltip – pops downward, left-aligned to avoid clipping */
.move-tooltip {
display: none;
position: absolute;
top: calc(100% + 8px);
left: 0;
padding: 8px 12px;
border-radius: 8px;
background: rgba(30, 36, 30, 0.92);
color: #f0f0f0;
font-size: 12px;
font-weight: 400;
line-height: 1.5;
white-space: normal;
width: max-content;
max-width: 240px;
z-index: 100;
pointer-events: none;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.move-tooltip::after {
content: "";
position: absolute;
bottom: 100%;
left: 12px;
border: 5px solid transparent;
border-bottom-color: rgba(30, 36, 30, 0.92);
}
.drawer-move-link:hover .move-tooltip {
display: block;
}

/* ── Form Selector ── */
.drawer-form-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.drawer-form-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.drawer-form-chip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(31, 42, 31, 0.06);
  color: var(--muted);
  transition: background 200ms, color 200ms;
}

.drawer-form-chip:hover {
  background: rgba(31, 42, 31, 0.1);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.drawer-form-chip-active {
  background: rgba(217, 79, 61, 0.12) !important;
  color: var(--accent-strong) !important;
}

/* ── Drawer Tabs ── */
.drawer-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(31, 42, 31, 0.06);
  border-radius: 10px;
  margin-bottom: 20px;
}

.drawer-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background 200ms, color 200ms;
}

.drawer-tab:hover {
  background: rgba(255,255,255,0.5);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.drawer-tab-active {
  background: white !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.drawer-tab-body { min-height: 120px; }

/* ═══════════════════════════════════════════════════════
   Tab Content
   ═══════════════════════════════════════════════════════ */

.tab-stats,
.tab-moves { display: grid; gap: 20px; }

.ov-section { display: grid; gap: 10px; }
.ov-heading { margin: 0; font-size: 16px; color: var(--ink); }

/* ═══════════════════════════════════════════════════════
   Base Stat Bars
   ═══════════════════════════════════════════════════════ */

.bsb-grid { display: grid; gap: 8px; }

.bsb-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
}

.bsb-label {
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.bsb-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 42, 31, 0.07);
  overflow: hidden;
}

.bsb-fill {
  height: 100%;
  border-radius: inherit;
}

.bsb-val-group {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 48px;
}

.bsb-val {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bsb-total .bsb-label { color: var(--ink); }
.bsb-total .bsb-val { font-size: 16px; }

.bsb-diff {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: left;
  min-width: 36px;
}
.bsb-diff-up { color: #2e9e3e; }
.bsb-diff-down { color: #d94040; }

/* ── Stat Variant Switcher ── */
.stat-variant-switcher {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: rgba(31, 42, 31, 0.03);
  border-radius: 10px;
}
.stat-variant-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stat-variant-chip {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(31, 42, 31, 0.06);
  color: var(--muted);
  transition: background 200ms, color 200ms;
}
.stat-variant-chip:hover {
  background: rgba(31, 42, 31, 0.12);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}
.stat-variant-chip-active {
  background: rgba(138, 166, 90, 0.18) !important;
  color: #3d5a1e !important;
}

/* ═══════════════════════════════════════════════════════
   Stat Calculator
   ═══════════════════════════════════════════════════════ */

.sc-root {
  display: grid;
  gap: 16px;
  font-size: 13px;
}

.sc-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

/* ── Mode Toggle ── */
.sc-mode-toggle {
  display: flex;
  gap: 6px;
  padding: 3px;
  background: rgba(31, 42, 31, 0.04);
  border-radius: 14px;
  width: fit-content;
}

.sc-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 150ms, color 150ms, box-shadow 150ms;
  white-space: nowrap;
}

.sc-mode-btn:hover:not(.sc-mode-btn-active) {
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
}

.sc-mode-btn-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(31, 42, 31, 0.1);
  cursor: default;
}

.sc-mode-icon {
  font-size: 14px;
  line-height: 1;
}

.sc-mode-desc {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}

.sc-mode-btn-active .sc-mode-desc {
  color: var(--ink-light);
}

/* ── Fixed chip (Champions) ── */
.sc-chip-fixed {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(31, 42, 31, 0.05);
  color: var(--muted);
  border: 1px solid rgba(31, 42, 31, 0.08);
  cursor: default;
}

/* ── Formula hint (Champions) ── */
.sc-formula-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: baseline;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(138, 166, 90, 0.06);
  border: 1px solid rgba(138, 166, 90, 0.12);
  font-size: 12px;
  color: var(--ink-light);
}

.sc-formula-title {
  font-weight: 700;
  color: var(--ink);
  margin-right: 4px;
}

.sc-formula-text {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 11.5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 8px;
  border-radius: 6px;
}

.sc-formula-note {
  flex-basis: 100%;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Action buttons (添加到盒子/队伍) ── */
.sc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(31, 42, 31, 0.06);
}

.sc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid rgba(31, 42, 31, 0.12);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.sc-action-btn:hover {
  background: rgba(31, 42, 31, 0.04);
  border-color: rgba(31, 42, 31, 0.2);
  box-shadow: 0 1px 4px rgba(31, 42, 31, 0.06);
}

.sc-action-btn:active {
  transform: scale(0.97);
}

.sc-action-btn svg {
  flex-shrink: 0;
}

.sc-action-feedback {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #2e7d32;
  background: rgba(76, 175, 80, 0.12);
  border-radius: 6px;
  animation: sc-feedback-in 0.3s ease;
}

@keyframes sc-feedback-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Team Picker Modal ── */
.sc-team-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  animation: sc-overlay-in 0.2s ease;
}

@keyframes sc-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sc-team-picker {
background: #fff;
border-radius: 14px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
width: 340px;
max-height: 400px;
display: flex;
flex-direction: column;
overflow: hidden;
animation: sc-picker-in 0.25s ease;
}

@keyframes sc-picker-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.sc-team-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(31, 42, 31, 0.08);
}

.sc-team-picker-header strong {
  font-size: 14px;
}

.sc-team-picker-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(31, 42, 31, 0.06);
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s;
}

.sc-team-picker-close:hover {
  background: rgba(31, 42, 31, 0.12);
}

.sc-team-picker-empty {
  padding: 32px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.sc-team-picker-list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sc-team-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(31, 42, 31, 0.08);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  width: 100%;
}

.sc-team-picker-item:hover:not(:disabled) {
  background: rgba(31, 42, 31, 0.04);
  border-color: rgba(31, 42, 31, 0.16);
}

.sc-team-picker-item:active:not(:disabled) {
  transform: scale(0.98);
}

.sc-team-picker-item-full {
  opacity: 0.5;
  cursor: not-allowed;
}

.sc-team-picker-item-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.sc-team-picker-item-count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.sc-team-picker-item-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

.sc-team-picker-footer {
  padding: 8px;
}

.sc-team-picker-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(31, 42, 31, 0.08);
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sc-team-picker-create-btn:hover {
  background: rgba(31, 42, 31, 0.04);
  color: var(--ink);
}

.sc-team-picker-create-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sc-team-picker-create-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid rgba(31, 42, 31, 0.15);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.sc-team-picker-create-input:focus {
  border-color: rgba(31, 42, 31, 0.35);
}

.sc-team-picker-create-confirm {
  padding: 7px 12px;
  border: none;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.sc-team-picker-create-confirm:hover {
  opacity: 0.85;
}

.sc-team-picker-create-cancel {
  padding: 7px 10px;
  border: 1px solid rgba(31, 42, 31, 0.12);
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s;
}

.sc-team-picker-create-cancel:hover {
  background: rgba(31, 42, 31, 0.04);
}

/* ── Preset Bar ── */
.sc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-end;
}

.sc-preset-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sc-preset-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sc-preset-chips {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.sc-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(31, 42, 31, 0.1);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
  white-space: nowrap;
}

.sc-chip:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(31, 42, 31, 0.2);
  transform: none;
  box-shadow: none;
}

.sc-chip-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong)) !important;
  color: white !important;
  border-color: transparent !important;
}

.sc-chip-reset {
  background: rgba(217, 79, 61, 0.08);
  color: var(--accent-strong);
  border-color: rgba(217, 79, 61, 0.15);
}

.sc-chip-reset:hover {
  background: rgba(217, 79, 61, 0.16);
}

.sc-chip-input {
  width: 56px !important;
  padding: 4px 6px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  text-align: center;
  border: 1px solid rgba(31, 42, 31, 0.12) !important;
  background: rgba(255, 255, 255, 0.8) !important;
}

.sc-preset-nature select {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  min-width: 200px;
}

/* SearchSelect 在预设栏内的紧凑样式 — 与 .sc-chip 风格统一 */
.sc-preset-nature .ss-wrap {
  width: auto;
}

.sc-preset-nature .ss-trigger {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
  width: auto;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(31, 42, 31, 0.1);
  gap: 4px;
  white-space: nowrap;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.sc-preset-nature .ss-trigger:hover,
.sc-preset-nature .ss-trigger:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(31, 42, 31, 0.2);
}

.sc-preset-nature .ss-dropdown {
  min-width: 260px;
  width: max-content;
  right: auto;
  border-radius: 12px;
}

.sc-preset-nature .ss-search {
  padding: 8px 12px;
  font-size: 13px;
}

.sc-preset-nature .ss-option {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

/* ── EV MAX button ── */
.sc-ev-max-btn {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(138, 166, 90, 0.15);
  color: #3d5a1e;
  border: 1px solid rgba(138, 166, 90, 0.2);
  cursor: pointer;
  transition: background 150ms;
  flex-shrink: 0;
}

.sc-ev-max-btn:hover {
  background: rgba(138, 166, 90, 0.3);
  transform: none;
  box-shadow: none;
}

/* ── EV Budget Badge ── */
.sc-ev-budget {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(138, 166, 90, 0.12);
  color: #3d5a1e;
  border: 1px solid rgba(138, 166, 90, 0.18);
}

.sc-ev-over {
  background: rgba(217, 79, 61, 0.12);
  color: var(--accent-strong);
  border-color: rgba(217, 79, 61, 0.2);
}

.sc-ev-full {
  background: rgba(31, 42, 31, 0.06);
  color: var(--muted);
  border-color: rgba(31, 42, 31, 0.1);
}

.sc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

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

.sc-field > span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.sc-field input,
.sc-field select {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
  min-width: 0;
}

.sc-field input[type="number"] { width: 72px; }
.sc-field-nature select { width: 220px; }

.sc-field-ev-budget {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sc-field-ev-budget > span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.sc-ev-budget {
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(138, 166, 90, 0.15);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sc-ev-full {
  background: rgba(214, 177, 19, 0.2);
  color: #8a6d00;
}

.sc-ev-over {
  background: rgba(217, 79, 61, 0.15);
  color: var(--accent-strong);
}

.sc-actions {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.sc-btn {
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.sc-btn-ghost {
  color: var(--accent-strong);
  background: rgba(217, 79, 61, 0.08);
}

.sc-btn-ghost:hover {
  background: rgba(217, 79, 61, 0.16);
  transform: none;
  box-shadow: none;
}

/* ── Stat Table ── */
.sc-table {
  display: grid;
  gap: 2px;
}

.sc-row {
  display: grid;
  grid-template-columns: 52px 44px 60px minmax(160px, 1fr) 44px 52px minmax(60px, 0.5fr);
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
}

.sc-row:nth-child(even) { background: rgba(255, 255, 255, 0.4); }

/* ── Champions grid (no IV column, must be after .sc-row to override) ── */
.sc-row-champ {
  grid-template-columns: 44px 40px 1fr 32px 48px minmax(48px, 0.35fr);
}

.sc-header {
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.sc-cell { font-variant-numeric: tabular-nums; }
.sc-label-cell { font-weight: 700; font-size: 13px; }
.sc-num-cell { text-align: center; }
.sc-base-val { color: var(--muted); }

.sc-input-cell input {
  width: 48px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}

.sc-slider-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sc-slider-cell input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(31, 42, 31, 0.1);
  border-radius: 999px;
  border: none;
  padding: 0;
  outline: none;
}

.sc-slider-cell input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.sc-slider-cell input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.sc-ev-num {
  width: 48px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
}

.sc-final-cell {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sc-bar-cell { min-width: 0; }

.sc-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 42, 31, 0.06);
  overflow: hidden;
}

.sc-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 300ms ease;
}

.sc-nature-up { color: #c0392b; font-weight: 700; }
.sc-nature-down { color: #2980b9; font-weight: 700; }
.sc-nature-neutral { color: var(--muted); }

.sc-total-row {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.sc-ev-total-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(31, 42, 31, 0.08);
  overflow: hidden;
}

.sc-ev-total-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--grass), var(--electric));
  transition: width 300ms ease;
}

.sc-ev-total-label {
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 0;
}

.sc-nature-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(31, 42, 31, 0.03);
}

/* ═══════════════════════════════════════════════════════
   Moves Tab (inside drawer)
   ═══════════════════════════════════════════════════════ */

.mv-gen-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.mv-gen-pill {
  width: auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(138, 166, 90, 0.12);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 200ms, color 200ms;
}

.mv-gen-pill:hover {
  background: rgba(138, 166, 90, 0.22);
  transform: none;
  box-shadow: none;
}

.mv-gen-pill-active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.mv-gen-pill-active:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.mv-version-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.mv-version-pill {
  width: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background 200ms, color 200ms;
}

.mv-version-pill:hover {
  background: rgba(100, 140, 200, 0.15);
  transform: none;
  box-shadow: none;
}

.mv-version-pill-active {
  color: white;
  background: linear-gradient(135deg, #5b8bd4, #3a6bb5);
  border-color: #5b8bd4;
}

.mv-version-pill-active:hover {
  background: linear-gradient(135deg, #4a7ac3, #2f5da6);
}

.mv-method-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.mv-method-pill {
  width: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background 200ms, color 200ms;
}

.mv-method-pill:hover {
  background: rgba(138, 166, 90, 0.15);
  transform: none;
  box-shadow: none;
}

.mv-method-pill-active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.mv-method-pill-active:hover {
  background: var(--accent-strong);
}

.mv-table {
  display: grid;
  gap: 4px;
  max-height: 480px;
  overflow: auto;
}

.mv-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.4fr) minmax(80px, 1fr) minmax(60px, 0.7fr) minmax(60px, 0.7fr) 48px 48px 40px;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.mv-row:nth-child(even) { background: rgba(255, 255, 255, 0.3); }

.mv-head {
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 700;
  color: var(--muted);
  background: rgba(247, 244, 233, 0.96);
  backdrop-filter: blur(6px);
}

.mv-move-name {
  font-weight: 600;
  color: var(--accent-strong);
}

/* ═══════════════════════════════════════════════════════
   Abilities Page — List Layout
   ═══════════════════════════════════════════════════════ */

.ab-page {
  display: grid;
  gap: 18px;
}

.ab-panel {
  padding-bottom: 24px;
}

.ab-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 22px 24px 0;
}

.ab-header .panel-title {
  flex-shrink: 0;
}

.ab-header .panel-subtitle {
  margin: 0;
}

.ab-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 24px 20px;
}

/* ── Search wrapper ── */
.ab-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ab-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.ab-search {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid rgba(31, 42, 31, 0.10);
  border-radius: 10px;
  background: rgba(255, 248, 236, 0.6);
  font-size: 13px;
  color: var(--ink);
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}

.ab-search::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.ab-search:focus {
  outline: none;
  border-color: rgba(217, 79, 61, 0.35);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

/* ── Filter selects row ── */
.ab-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ab-gen-select {
  flex: 0 1 auto;
  min-width: 100px;
  padding: 7px 28px 7px 12px;
  border: 1px solid rgba(31, 42, 31, 0.10);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235f6b5c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 200ms, background-color 200ms, box-shadow 200ms;
}

.ab-gen-select:focus {
  outline: none;
  border-color: rgba(217, 79, 61, 0.35);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

.ab-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}

/* ── List Container ── */
.ab-list {
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  gap: 2px;
}

/* ── Row Item ── */
.ab-row {
  border-radius: 10px;
  overflow: hidden;
  transition: background 150ms ease;
}

.ab-row:hover {
  background: rgba(248, 241, 226, 0.5);
}

.ab-row-expanded {
  background: rgba(248, 241, 226, 0.7);
  border: 1px solid rgba(217, 79, 61, 0.15);
  border-radius: 12px;
  margin: 4px 0;
}

/* ── Row Header (clickable) ── */
.ab-row-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
}

.ab-row-header:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.ab-row-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-family: "JetBrains Mono", "SF Mono", monospace;
  min-width: 32px;
  flex-shrink: 0;
}

.ab-row-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 80px;
  flex-shrink: 0;
}

.ab-row-name-en {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 100px;
  flex-shrink: 0;
}

.ab-row-desc {
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ab-row-arrow {
  font-size: 12px;
  color: var(--muted);
  transition: transform 200ms ease;
  flex-shrink: 0;
  margin-left: auto;
}

.ab-row-arrow-open {
  transform: rotate(180deg);
}

/* ── Expanded Detail Panel ── */
.ab-row-detail {
  padding: 0 16px 16px 60px;
  border-top: 1px solid rgba(31, 42, 31, 0.06);
}

.ab-detail-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 20px 0;
  color: var(--muted);
}

.ab-detail-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
}

.ab-name-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.ab-name-ja {
  background: rgba(217, 79, 61, 0.08);
  color: var(--accent-strong);
}

.ab-name-en {
  background: rgba(59, 132, 197, 0.1);
  color: #1a5276;
}

.ab-name-gen {
  background: rgba(138, 166, 90, 0.12);
  color: #3d5a1e;
}

/* ── Effect Detail ── */
.ab-detail-effect {
  margin-top: 14px;
}

.ab-detail-effect-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ab-detail-effect-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  white-space: pre-line;
}

/* ── Generation Changes ── */
.ab-gen-section {
  margin-top: 16px;
}

.ab-gen-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.ab-gen-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ab-gen-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(31, 42, 31, 0.05);
}

.ab-gen-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ab-gen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(138, 166, 90, 0.18), rgba(138, 166, 90, 0.08));
  color: #3d5a1e;
  white-space: nowrap;
  flex-shrink: 0;
}

.ab-gen-version {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, rgba(90, 130, 180, 0.16), rgba(90, 130, 180, 0.06));
  color: #2a4a6e;
  white-space: nowrap;
  flex-shrink: 0;
}

.ab-gen-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

/* ── Source Link ── */
.ab-source {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 42, 31, 0.06);
}

.ab-source a {
  font-size: 12px;
  color: var(--accent-strong);
  text-decoration: none;
}

.ab-source a:hover {
  text-decoration: underline;
}

/* ── Infinite Scroll Sentinel ── */
.ab-load-more {
display: flex;
justify-content: center;
padding: 24px 24px 8px;
}

/* ═══════════════════════════════════════════════════════
   Moves Page — Accordion Layout (like Abilities)
   ═══════════════════════════════════════════════════════ */

.mv-page {
  display: grid;
  gap: 18px;
}

.mv-panel {
  padding-bottom: 24px;
}

.mv-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 22px 24px 0;
}

.mv-header .panel-title {
  flex-shrink: 0;
}

.mv-header .panel-subtitle {
  margin: 0;
}

.mv-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 24px 20px;
}

/* ── Search wrapper ── */
.mv-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mv-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.mv-search {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid rgba(31, 42, 31, 0.10);
  border-radius: 10px;
  background: rgba(255, 248, 236, 0.6);
  font-size: 13px;
  color: var(--ink);
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}

.mv-search::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.mv-search:focus {
  outline: none;
  border-color: rgba(217, 79, 61, 0.35);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

/* ── Filter selects row ── */
.mv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mv-filter-select {
  flex: 1 1 0;
  min-width: 90px;
  padding: 7px 28px 7px 12px;
  border: 1px solid rgba(31, 42, 31, 0.10);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235f6b5c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 200ms, background-color 200ms, box-shadow 200ms;
}

.mv-filter-select:focus {
  outline: none;
  border-color: rgba(217, 79, 61, 0.35);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

.mv-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}

/* ── Column Header (table head) ── */
.mv-list-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin: 0 24px 4px;
  border-bottom: 2px solid rgba(31, 42, 31, 0.08);
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  user-select: none;
}

.mv-col-no    { width: 38px; flex: 0 0 38px; }
.mv-col-name  { flex: 1 1 80px; min-width: 60px; }
.mv-col-type  { width: 100px; flex: 0 0 100px; }
.mv-col-cat   { width: 80px; flex: 0 0 80px; }
.mv-col-pow,
.mv-col-acc,
.mv-col-pp    { width: 40px; flex: 0 0 40px; text-align: center; font-variant-numeric: tabular-nums; }
.mv-col-arrow { width: 18px; flex: 0 0 18px; }

/* ── List Container ── */
.mv-list {
display: flex;
flex-direction: column;
padding: 0 24px;
gap: 6px;
}

/* ── Row Item ── */
.mv-row-item {
  border-radius: 10px;
  overflow: hidden;
  transition: background 150ms ease;
}

.mv-row-item:hover {
  filter: brightness(0.97);
}

.mv-row-expanded {
  border: 1px solid rgba(217, 79, 61, 0.15);
  border-radius: 12px;
  margin: 4px 0;
}

/* ── Row Header (clickable) ── */
.mv-row-header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 10px 16px;
  padding-right: 240px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
}

.mv-row-header:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

/* ── Left side: number + name (row 1, col 1) ── */
.mv-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* ── Right side: type + category + stats + arrow (absolutely centered) ── */
.mv-row-right {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Description line ── */
.mv-row-desc {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  padding-left: 48px;
}

.mv-row-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-family: "JetBrains Mono", "SF Mono", monospace;
  width: 38px;
  flex: 0 0 38px;
}

.mv-row-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  flex: 1 1 80px;
  min-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Type column with icon ── */
.mv-row-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100px;
  flex: 0 0 100px;
}

.mv-type-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 50%;
  background: rgba(31, 42, 31, 0.55);
}

/* ── Category column with icon ── */
.mv-row-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  width: 80px;
  flex: 0 0 80px;
}

.mv-cat-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 50%;
  background: rgba(31, 42, 31, 0.55);
}

/* ── TypeIconChip: icon merged into type-chip ── */
.mv-icon-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
}

/* ── CategoryChip: pill with wiki colors ── */
.mv-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

/* ── Shared chip icon (inside TypeIconChip & CategoryChip) ── */
.mv-chip-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* ── Numeric stat columns ── */
.mv-row-pow,
.mv-row-acc,
.mv-row-pp {
  width: 40px;
  flex: 0 0 40px;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.mv-row-arrow {
  font-size: 12px;
  color: var(--muted);
  transition: transform 200ms ease;
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
}

.mv-row-arrow-open {
  transform: rotate(180deg);
}

/* ── Expanded Detail Panel ── */
.mv-row-detail {
  padding: 0 16px 16px 60px;
  border-top: 1px solid rgba(31, 42, 31, 0.06);
}

.mv-detail-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
}

.mv-name-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.mv-name-ja {
  background: rgba(217, 79, 61, 0.08);
  color: var(--accent-strong);
}

.mv-name-en {
  background: rgba(59, 132, 197, 0.1);
  color: #1a5276;
}

.mv-name-gen {
  background: rgba(138, 166, 90, 0.12);
  color: #3d5a1e;
}

/* ── Stats Grid ── */
.mv-detail-stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.mv-detail-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(31, 42, 31, 0.05);
  min-width: 64px;
}

.mv-detail-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mv-detail-stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.mv-detail-type-wrap,
.mv-detail-cat-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ── Effect Detail ── */
.mv-detail-effect {
  margin-top: 14px;
}

.mv-detail-effect-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mv-detail-effect-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  white-space: pre-line;
}

/* ── Generation Changes ── */
.mv-gen-section {
  margin-top: 16px;
}

.mv-gen-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.mv-gen-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mv-gen-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(31, 42, 31, 0.05);
}

.mv-gen-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.mv-gen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(138, 166, 90, 0.18), rgba(138, 166, 90, 0.08));
  color: #3d5a1e;
  white-space: nowrap;
  flex-shrink: 0;
}

.mv-gen-version {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, rgba(90, 130, 180, 0.16), rgba(90, 130, 180, 0.06));
  color: #2a4a6e;
  white-space: nowrap;
  flex-shrink: 0;
}

.mv-gen-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

/* ── Wiki Link (inline icon in detail names) ── */
.mv-wiki-link,
.ab-wiki-link {
  display: inline-flex;
  align-items: center;
  align-self: center;
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
  flex-shrink: 0;
}
.mv-wiki-link:hover,
.ab-wiki-link:hover {
  opacity: 1;
  color: var(--accent, #d94f3d);
}

/* ── Source Link ── */
.mv-source {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 42, 31, 0.06);
}

.mv-source a {
  font-size: 12px;
  color: var(--accent-strong);
  text-decoration: none;
}

.mv-source a:hover {
  text-decoration: underline;
}

/* ── Infinite Scroll Sentinel ── */
.mv-load-more {
display: flex;
justify-content: center;
padding: 24px 24px 8px;
}

/* ═══════════════════════════════════════════════════════
   Items Page — Accordion Layout (like Abilities)
   ═══════════════════════════════════════════════════════ */

.it-page {
  display: grid;
  gap: 18px;
}

.it-panel {
  padding-bottom: 24px;
}

.it-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 22px 24px 0;
}

.it-header .panel-title {
  flex-shrink: 0;
}

.it-header .panel-subtitle {
  margin: 0;
}

.it-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}

/* ── List Container ── */
.it-list {
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  gap: 2px;
}

/* ── Row Item ── */
.it-row {
  border-radius: 10px;
  overflow: hidden;
  transition: background 150ms ease;
}

.it-row:hover {
  background: rgba(248, 241, 226, 0.5);
}

.it-row-expanded {
  background: rgba(248, 241, 226, 0.7);
  border: 1px solid rgba(217, 79, 61, 0.15);
  border-radius: 12px;
  margin: 4px 0;
}

/* ── Row Header (clickable) ── */
.it-row-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
}

.it-row-header:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

/* ── Row Thumbnail ── */
.it-row-thumb {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 42, 31, 0.08);
  overflow: hidden;
}

.it-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.it-row-thumb-placeholder {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.it-row-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  min-width: 80px;
  flex-shrink: 0;
}

.it-row-name-en {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  min-width: 80px;
  flex-shrink: 0;
}

.it-row-cat {
  flex-shrink: 0;
}

.it-row-cat .chip {
  font-size: 11px;
  padding: 2px 8px;
}

.it-row-desc {
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.it-row-arrow {
  font-size: 12px;
  color: var(--muted);
  transition: transform 200ms ease;
  flex-shrink: 0;
  margin-left: auto;
}

.it-row-arrow-open {
  transform: rotate(180deg);
}

/* ── Expanded Detail Panel ── */
.it-row-detail {
  padding: 0 16px 16px 64px;
  border-top: 1px solid rgba(31, 42, 31, 0.06);
}

.it-detail-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 20px 0;
  color: var(--muted);
}

/* ── Detail Image ── */
.it-detail-image {
  display: flex;
  justify-content: center;
  padding: 14px 0 4px;
}

.it-detail-image img {
  max-width: 120px;
  height: auto;
  object-fit: contain;
}

/* ── Name Tags ── */
.it-detail-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
}

.it-name-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.it-name-ja {
  background: rgba(217, 79, 61, 0.08);
  color: var(--accent-strong);
}

.it-name-en {
  background: rgba(59, 132, 197, 0.1);
  color: #1a5276;
}

.it-name-gen {
  background: rgba(138, 166, 90, 0.12);
  color: #3d5a1e;
}

.it-name-cat {
  background: rgba(180, 143, 78, 0.12);
  color: #6b5a2e;
}

/* ── Wiki Link ── */
.it-wiki-link {
  display: inline-flex;
  align-items: center;
  align-self: center;
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
  flex-shrink: 0;
}
.it-wiki-link:hover {
  opacity: 1;
  color: var(--accent, #d94f3d);
}

/* ── Effect Detail ── */
.it-detail-effect {
  margin-top: 14px;
}

.it-detail-effect-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.it-detail-effect-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  white-space: pre-line;
}

/* ── Generation Changes ── */
.it-gen-section {
  margin-top: 16px;
}

.it-gen-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.it-gen-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.it-gen-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(31, 42, 31, 0.05);
}

.it-gen-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.it-gen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(138, 166, 90, 0.18), rgba(138, 166, 90, 0.08));
  color: #3d5a1e;
  white-space: nowrap;
  flex-shrink: 0;
}

.it-gen-version {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, rgba(90, 130, 180, 0.16), rgba(90, 130, 180, 0.06));
  color: #2a4a6e;
  white-space: nowrap;
  flex-shrink: 0;
}

.it-gen-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

/* ── Source Link ── */
.it-source {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 42, 31, 0.06);
}

.it-source a {
  font-size: 12px;
  color: var(--accent-strong);
  text-decoration: none;
}

.it-source a:hover {
  text-decoration: underline;
}

/* ── Infinite Scroll Sentinel ── */
.it-load-more {
  display: flex;
  justify-content: center;
  padding: 24px 24px 8px;
}

/* ═══════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .pokedex-layout, .teams-layout, .damage-layout, .meta-grid, .team-header-grid, .member-grid, .move-grid, .stats-editor, .damage-grid, .result-grid, .damage-side-grid, .media-layout, .variant-toolbar { grid-template-columns: 1fr; }
  .app-shell { width: min(100vw - 16px, 1200px); padding-top: 8px; }
  .detail-panel, .team-builder { padding: 18px; }
  .top-nav {
    gap: 6px;
    padding: 8px 10px 8px 16px;
    top: 6px;
    border-radius: 20px;
  }
  .top-nav-title { font-size: 14px; }
  .top-nav-links { gap: 2px; flex-wrap: wrap; }
  .top-nav-link { padding: 6px 12px; font-size: 13px; }
  .nav-search-wrap { flex: 1 1 100%; order: 10; min-width: 0; }
  .nav-search { font-size: 12px; padding: 6px 28px 6px 28px; }
  .nav-search-icon { left: 8px; width: 13px; height: 13px; }
  .nav-search-clear { width: 20px; height: 20px; right: 4px; }
  .top-nav-github { padding: 4px; margin-left: 0; }
  .top-nav-github svg { width: 18px; height: 18px; }
  .nav-filter-btn { width: 32px; height: 32px; }
  .filter-panel-overlay { padding: 64px 12px 12px; }
  .filter-panel { width: 100%; border-radius: 16px; padding: 16px; }
  .stat-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learnset-table { max-height: none; }
  .learnset-row { grid-template-columns: 1fr 1fr; }
  .learnset-head { display: none; }

  /* Dex responsive */
  .dex-toolbar { gap: 10px; }
  .dex-search { font-size: 12px; padding: 8px 12px 8px 32px; }
  .dex-search-icon { left: 10px; width: 14px; height: 14px; }
  .dex-filter-chip { padding: 5px 10px; font-size: 12px; gap: 4px; }
  .dex-filter-chips { gap: 4px; }
  .dex-filter-type-icon { width: 14px; height: 14px; }
  .dex-header { padding: 18px 18px 16px; }
  .dex-body { flex-direction: column; }
  .dex-list-panel-narrow { max-width: none; width: 100%; }
  .dex-detail-panel { position: relative; top: auto; max-height: none; order: -1; width: 100%; padding: 18px; }
  .dex-list { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .dex-list-compact { grid-template-columns: 1fr !important; gap: 4px !important; }
  .dex-item { padding: 10px 8px; }
  .dex-item-img { width: 64px; height: 64px; }
  .dex-item-compact .dex-item-img { width: 42px; height: 42px; }
  .drawer-hero { grid-template-columns: 1fr; }
  .drawer-img-box { max-width: 200px; margin: 0 auto; }
  .sc-row { grid-template-columns: 44px 36px 50px minmax(100px, 1fr) 36px 44px minmax(40px, 0.4fr); gap: 4px; font-size: 12px; }
  .sc-row-champ { grid-template-columns: 44px 36px minmax(120px, 1fr) 30px 44px minmax(40px, 0.3fr); }
  .sc-mode-toggle { width: 100%; }
  .sc-mode-btn { flex: 1; justify-content: center; padding: 6px 10px; font-size: 12px; }
  .sc-formula-hint { font-size: 11px; gap: 3px 10px; padding: 8px 10px; }
  .sc-formula-text { font-size: 10.5px; padding: 1px 6px; }
  .sc-field-nature select { width: 160px; }
  /* Moves responsive */
  .mv-list-head { display: none; }
  .mv-toolbar { padding: 12px 18px 16px; gap: 10px; }
  .mv-search { font-size: 12px; padding: 8px 12px 8px 32px; }
  .mv-search-icon { left: 10px; width: 14px; height: 14px; }
  .mv-filter-select { font-size: 12px; padding: 6px 24px 6px 10px; }
  .mv-header { padding: 18px 18px 0; flex-wrap: wrap; }
  .mv-list { padding: 0 12px; }
  .mv-row-header { padding: 10px 12px; padding-right: 170px; gap: 2px 8px; }
  .mv-row-left { gap: 8px; }
  .mv-row-right { right: 12px; gap: 6px; }
  .mv-row-number { min-width: 28px; }
  .mv-row-desc { padding-left: 36px; }
  .mv-row-pow, .mv-row-acc, .mv-row-pp { display: none; }
  .mv-row-detail { padding-left: 12px; }
  .mv-load-more { padding: 12px 18px 0; }

  /* Abilities responsive */
  .ab-toolbar { padding: 12px 18px 16px; gap: 10px; }
  .ab-search { font-size: 12px; padding: 8px 12px 8px 32px; }
  .ab-search-icon { left: 10px; width: 14px; height: 14px; }
  .ab-gen-select { font-size: 12px; padding: 6px 24px 6px 10px; }
  .ab-header { padding: 18px 18px 0; flex-wrap: wrap; }
  .ab-list { padding: 0 12px; }
  .ab-row-header { padding: 10px 12px; gap: 8px; }
  .ab-row-name-en { display: none; }
  .ab-row-detail { padding-left: 12px; }
  .ab-load-more { padding: 12px 18px 0; }

  /* Items responsive */
  .it-header { padding: 18px 18px 0; flex-wrap: wrap; }
  .it-list { padding: 0 12px; }
  .it-row-header { padding: 10px 12px; gap: 8px; }
  .it-row-name-en { display: none; }
  .it-row-desc { display: none; }
  .it-row-detail { padding-left: 12px; }
  .it-load-more { padding: 12px 18px 0; }

  /* Teams responsive */
  .teams-tabs { gap: 0; }
  .teams-tab { font-size: 13px; padding: 10px 16px; }
  .te-card-grid { grid-template-columns: 1fr; }
  .te-split { grid-template-columns: 1fr; }
  .te-preview-img { width: 100px; height: 100px; }
  .te-preview-img img { width: 80px; height: 80px; }
  .team-slot-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   Teams Page — 宝可梦盒子 & 队伍管理
   ══════════════════════════════════════════════ */

/* Tab 切换 */
.teams-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.teams-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.teams-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}

.teams-tab-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(64, 50, 28, 0.1);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.teams-tab-active .tab-count {
  background: var(--accent);
  color: white;
}

/* 新建配置按钮 */
.cfg-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 14px 20px;
  border: 2px dashed rgba(31, 42, 31, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cfg-new-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(217, 79, 61, 0.04);
}

.cfg-new-btn svg {
  opacity: 0.6;
  transition: opacity 0.2s;
}

.cfg-new-btn:hover svg {
  opacity: 1;
  stroke: var(--accent);
}

/* ── 编辑器：左右分栏 ── */
.te-split {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}

.te-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.te-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.te-moves {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.te-field {
  display: grid;
  gap: 6px;
}

.te-field-label {
  font-size: 12px;
  color: var(--muted);
}

/* 宝可梦预览图 */
.te-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.te-preview-img {
width: 160px;
height: 160px;
display: grid;
place-items: center;
border-radius: 16px;
background: rgba(255, 255, 255, 0.6);
border: 1px solid var(--line);
overflow: hidden;
}

.te-preview-img img {
width: 140px;
height: 140px;
object-fit: contain;
}

.te-preview-empty {
  font-size: 28px;
  color: var(--muted);
}

/* 闪光切换 — 复用 drawer-img-toggle 风格 */
.te-shiny-toggle {
  display: flex;
  gap: 2px;
  background: rgba(31, 42, 31, 0.06);
  border-radius: 999px;
  padding: 2px;
}

.te-shiny-toggle button {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.te-shiny-toggle button:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: none;
  box-shadow: none;
}

.te-shiny-toggle button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 特性横排 */
.te-ability-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.te-ability-row .te-field-label {
  flex-shrink: 0;
}

/* 特性 tab 切换 */
.te-ability-tabs {
display: flex;
flex-wrap: wrap;
gap: 6px;
}

.te-ability-tab {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(31, 42, 31, 0.1);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
  display: flex;
  align-items: center;
  gap: 4px;
}

.te-ability-tab:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(31, 42, 31, 0.2);
  transform: none;
  box-shadow: none;
}

.te-ability-tab-active {
  background: var(--accent) !important;
  color: white !important;
  border-color: transparent !important;
}

.te-ability-tab-active .te-ha-badge {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.te-ha-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(31, 42, 31, 0.08);
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* 卡片网格 */
.te-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.te-team-grid {
  grid-template-columns: repeat(auto-fill, minmax(420px, 560px));
}

/* 队伍槽位 */
.te-slot {
  border-radius: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.te-slot-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(31, 42, 31, 0.12);
  background: rgba(255, 255, 255, 0.35);
  padding: 20px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.te-slot-empty:hover {
  border-color: var(--accent);
  background: rgba(217, 79, 61, 0.03);
}

.te-slot-empty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.te-slot-empty-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.te-slot-select {
  width: auto;
}

/* ── CustomSelect 自定义下拉 ── */
.cs-wrap {
  position: relative;
  display: inline-block;
}

.cs-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 42, 31, 0.12);
  background: rgba(255, 248, 236, 0.7);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.cs-trigger:hover {
  border-color: var(--accent);
  background: rgba(255, 248, 236, 0.95);
}

.cs-trigger.cs-placeholder .cs-label {
  color: var(--muted);
}

.cs-arrow {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.2s;
}

.cs-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 210;
  min-width: 100%;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(64, 50, 28, 0.12);
  padding: 4px;
  animation: cs-fade-in 0.12s ease-out;
}

@keyframes cs-fade-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.cs-option {
  display: block;
  width: 100%;
  padding: 7px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}

.cs-option:hover {
  background: rgba(217, 79, 61, 0.06);
}

.cs-option-active {
  background: rgba(217, 79, 61, 0.1);
  color: var(--accent-strong);
  font-weight: 600;
}

.te-slot-filled {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(31, 42, 31, 0.08);
  box-shadow: 0 2px 8px rgba(64, 50, 28, 0.06);
}

.te-slot-filled:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(64, 50, 28, 0.08);
}

.te-slot-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.te-slot-thumb {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 42, 31, 0.04);
  border-radius: 10px;
  flex-shrink: 0;
}

.te-slot-thumb img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.te-slot-thumb-empty {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.4;
}

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

.te-slot-name {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.te-slot-name strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.te-slot-level {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.te-slot-types {
  display: flex;
  gap: 3px;
}

.te-slot-meta {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.te-slot-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  align-self: flex-start;
}

.te-slot-remove:hover {
  background: rgba(217, 79, 61, 0.1);
  color: var(--accent);
}

.te-slot-moves {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(31, 42, 31, 0.06);
}

.te-slot-move-pill {
  font-size: 10px;
  font-weight: 500;
  color: white;
  padding: 2px 8px;
  border-radius: 6px;
}

.te-slot-inline {
  grid-column: 1 / -1;
  border-color: var(--accent);
  border-width: 2px;
}

/* 独立于 grid 的内联编辑器 — 全宽展示 */
.te-slot-inline-standalone {
  margin-top: 14px;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

/* 队伍卡片 */
.team-card {
position: relative;
display: flex;
flex-direction: column;
gap: 12px;
padding: 16px;
width: 100%;
min-width: 0;
overflow: hidden;
background: rgba(255, 255, 255, 0.88);
border: 1px solid rgba(31, 42, 31, 0.08);
border-radius: 16px;
box-shadow: 0 4px 12px rgba(64, 50, 28, 0.06);
transition: transform 180ms ease, box-shadow 180ms ease;
}

.team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(64, 50, 28, 0.08);
}

.team-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-card-format {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(31, 42, 31, 0.06);
  color: var(--muted);
  flex-shrink: 0;
}

.team-card-members {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 4px;
min-width: 0;
}

.team-card-member {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
min-width: 0;
}

.team-card-member-img {
position: relative;
width: 100%;
aspect-ratio: 1;
display: flex;
align-items: center;
justify-content: center;
background: rgba(31, 42, 31, 0.04);
border-radius: 10px;
}

.team-card-member-img > img:first-child {
width: 80%;
height: 80%;
object-fit: contain;
}

.team-card-member-img span {
font-size: 18px;
font-weight: 700;
color: var(--muted);
opacity: 0.4;
}

.team-card-member-img .team-card-item-overlay {
position: absolute;
bottom: -4%;
right: -4%;
width: 38%;
height: 38%;
object-fit: contain;
border-radius: 6px;
background: transparent;
border: none;
padding: 0;
}

.team-card-member-name {
font-size: 10px;
font-weight: 600;
color: var(--ink);
max-width: 100%;
white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* 队伍编辑字段 */
.team-edit-fields {
  display: flex;
  gap: 8px;
  align-items: center;
}

.team-edit-name {
  width: 160px;
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.team-edit-format {
  width: auto;
}

.team-edit-format .cs-trigger {
  font-size: 13px;
  padding: 6px 14px;
}

/* 队伍槽位网格 — 和盒子卡片网格一致 */
.team-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}


/* ── SearchSelect 模糊搜索下拉 ── */
.ss-wrap {
  position: relative;
  width: 100%;
}

/* 触发按钮 — 与全局 input/select 保持一致 */
.ss-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(31, 42, 31, 0.15);
  background: rgba(255, 255, 255, 0.88);
  font-size: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s;
  text-align: left;
}

.ss-trigger:hover,
.ss-trigger:focus {
  border-color: var(--accent);
  outline: none;
}

.ss-val {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-placeholder {
  flex: 1;
  color: var(--muted);
}

.ss-arrow {
  flex-shrink: 0;
  opacity: 0.45;
  margin-left: 6px;
}

.ss-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(64, 50, 28, 0.14);
  overflow: hidden;
  animation: ss-fade-in 0.12s ease-out;
}

@keyframes ss-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ss-search {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  outline: none;
  border-radius: 0;
}

.ss-search::placeholder {
  color: var(--muted);
}

.ss-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}

.ss-empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.ss-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.ss-option:hover {
  background: rgba(217, 79, 61, 0.06);
}

.ss-option-active {
  background: rgba(217, 79, 61, 0.1);
  font-weight: 600;
}

.ss-option-label {
  flex: 1;
  min-width: 0;
}

.ss-option-sub {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

/* 危险文字 */
.danger-text {
  color: #c0392b !important;
}

/* ══════════════════════════════════════════════
   BoxCard — 盒子宝可梦卡片
   ══════════════════════════════════════════════ */

.box-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 248, 240, 0.7));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

/* 顶栏：名称 + 菜单 */
.box-card-header {
display: flex;
align-items: center;
gap: 8px;
min-height: 28px;
}

.box-card-header .box-card-name {
display: flex;
align-items: baseline;
gap: 4px;
flex-shrink: 0;
}

.box-card-title {
font-size: 12px;
font-weight: 500;
color: var(--muted);
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.box-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(64, 50, 28, 0.08);
}

/* 左右布局容器 */
.box-card-body {
  display: flex;
  gap: 20px;
  width: 100%;
}

.box-card-left {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
flex-shrink: 0;
width: 110px;
}

.box-card-right {
display: flex;
flex-direction: column;
justify-content: center;
gap: 10px;
flex: 1;
min-width: 0;
}

/* 三点菜单 */
.box-card-menu {
position: relative;
flex-shrink: 0;
margin-left: auto;
z-index: 10;
}

.box-card-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(31, 42, 31, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.box-card-menu-btn:hover {
  background: rgba(31, 42, 31, 0.12);
  color: var(--ink);
}

.box-card-menu-btn svg {
  display: block;
}

.box-card-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 100px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(64, 50, 28, 0.14);
  overflow: hidden;
  animation: ss-fade-in 0.12s ease-out;
  z-index: 100;
}

.box-card-dropdown button {
  display: block;
  width: 100%;
  padding: 9px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.box-card-dropdown button:hover {
  background: rgba(31, 42, 31, 0.05);
}

.box-card-dropdown button:not(:last-child) {
  border-bottom: 1px solid rgba(31, 42, 31, 0.06);
}

/* 图片区域 */
.box-card-thumb {
position: relative;
width: 92px;
height: 92px;
display: grid;
place-items: center;
border-radius: 16px;
background:
radial-gradient(circle, rgba(255, 213, 107, 0.2) 0%, transparent 70%),
rgba(255, 255, 255, 0.5);
flex-shrink: 0;
}

.box-card-thumb > img:first-child {
width: 76px;
height: 76px;
object-fit: contain;
}

.box-card-thumb-empty {
  font-size: 28px;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.4;
}

/* 道具叠加 */
.box-card-item-overlay {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
  border: none;
  padding: 0;
}

/* 属性图标（只显示图标，不显示文字） */
.box-card-types {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.box-card-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  padding: 3px;
}

.box-card-type-icon img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* 宝可梦属性图标底色 */
.box-card-type-icon.type-草 { background: #77CC55; }
.box-card-type-icon.type-毒 { background: #AA5599; }
.box-card-type-icon.type-电 { background: #FFCC33; }
.box-card-type-icon.type-水 { background: #3399FF; }
.box-card-type-icon.type-火 { background: #FF4422; }
.box-card-type-icon.type-一般 { background: #BBBBAA; }
.box-card-type-icon.type-冰 { background: #77DDFF; }
.box-card-type-icon.type-格斗 { background: #BB5544; }
.box-card-type-icon.type-地面 { background: #DDBB55; }
.box-card-type-icon.type-飞行 { background: #6699FF; }
.box-card-type-icon.type-超能力 { background: #FF5599; }
.box-card-type-icon.type-虫 { background: #AABB22; }
.box-card-type-icon.type-岩石 { background: #BBAA66; }
.box-card-type-icon.type-幽灵 { background: #6666BB; }
.box-card-type-icon.type-龙 { background: #7766EE; }
.box-card-type-icon.type-恶 { background: #775544; }
.box-card-type-icon.type-钢 { background: #AAAABB; }
.box-card-type-icon.type-妖精 { background: #FFAAFF; }

/* 名字 + 等级（已移至 header） */
.box-card-name strong {
font-size: 14px;
font-weight: 700;
color: var(--ink);
}

.box-card-level {
font-size: 11px;
font-weight: 600;
color: var(--muted);
}

/* 特性 + 性格 */
.box-card-meta {
display: flex;
gap: 4px;
justify-content: center;
flex-wrap: wrap;
}

.box-card-tag {
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(31, 42, 31, 0.06);
  color: var(--ink);
  font-weight: 500;
}

/* 招式列表 */
.box-card-moves {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.box-card-move {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: white;
padding: 5px 10px;
border-radius: 8px;
font-weight: 500;
min-width: 0;
}

.cfg-move-slot {
cursor: pointer;
transition: opacity 0.15s, box-shadow 0.15s;
font-size: 13px;
padding: 7px 12px;
}

.cfg-move-slot:hover {
opacity: 0.85;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.box-card-move-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.box-card-move-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.box-card-move-power {
  font-size: 11px;
  opacity: 0.85;
  flex-shrink: 0;
  font-weight: 600;
}

/* 招式属性底色 */
.type-bg-草 { background: #77CC55; }
.type-bg-毒 { background: #AA5599; }
.type-bg-电 { background: #FFCC33; color: #352a00; }
.type-bg-水 { background: #3399FF; }
.type-bg-火 { background: #FF4422; }
.type-bg-一般 { background: #BBBBAA; }
.type-bg-冰 { background: #77DDFF; color: #12343a; }
.type-bg-格斗 { background: #BB5544; }
.type-bg-地面 { background: #DDBB55; }
.type-bg-飞行 { background: #6699FF; }
.type-bg-超能力 { background: #FF5599; }
.type-bg-虫 { background: #AABB22; }
.type-bg-岩石 { background: #BBAA66; }
.type-bg-幽灵 { background: #6666BB; }
.type-bg-龙 { background: #7766EE; }
.type-bg-恶 { background: #775544; }
.type-bg-钢 { background: #AAAABB; }
.type-bg-妖精 { background: #FFAAFF; }
.type-bg-unknown { background: #7b8481; }

/* 电/冰属性深色文字时图标不反色 */
.type-bg-电 .box-card-move-icon,
.type-bg-冰 .box-card-move-icon {
  filter: none;
  opacity: 0.8;
}
.type-bg-电 .box-card-move-power,
.type-bg-冰 .box-card-move-power {
  color: inherit;
}

/* 努力值 / 个体值 — 纯数字表格 */
.box-card-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(31, 42, 31, 0.08);
}

.box-card-stats-header,
.box-card-stats-row {
  display: grid;
  grid-template-columns: 28px repeat(6, 1fr);
  gap: 2px;
  text-align: center;
  font-size: 9px;
  line-height: 1.4;
}

.box-card-stats-header span {
  color: var(--muted);
  font-weight: 600;
}

.box-card-stats-tag {
  font-size: 9px;
  color: var(--muted);
  font-weight: 500;
  text-align: right;
  padding-right: 2px;
}

.box-card-stats-num {
  font-variant-numeric: tabular-nums;
  color: rgba(31, 42, 31, 0.3);
  font-weight: 500;
}

.box-card-stats-num.has-val {
color: var(--ink);
font-weight: 700;
}

.box-card-stats-total {
font-size: 10px;
color: var(--muted);
text-align: right;
font-weight: 600;
}

.box-card-stats-tag-iv {
  color: #59c3d0;
}

.box-card-stats-tag-ev {
  color: #d98837;
}

.box-card-stats-tag-sp {
  color: #7c3aed;
  font-weight: 600;
}

.box-card-tag-mode {
  font-size: 9px;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #fff;
  padding: 1px 5px;
  border-radius: 6px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════
   Modal — 通用弹窗
   ══════════════════════════════════════════════ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  animation: modal-fade-in 180ms ease;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: linear-gradient(135deg, #fffdf8, #fff8f0);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(64, 50, 28, 0.18), 0 4px 16px rgba(64, 50, 28, 0.08);
  animation: modal-slide-up 220ms ease;
  overflow: hidden;
}

@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(31, 42, 31, 0.08);
  flex-shrink: 0;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}

.modal-header-extra {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px;
  min-width: 0;
}

.modal-header-search {
  flex: 1;
  min-width: 0;
}

.modal-header-search .ss-trigger {
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.6);
  border: 1px solid rgba(31, 42, 31, 0.10);
  padding: 7px 30px 7px 14px;
  font-size: 13px;
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}

.modal-header-search .ss-trigger:hover,
.modal-header-search .ss-trigger:focus {
  border-color: rgba(217, 79, 61, 0.35);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

.modal-header-input {
  width: 120px;
  flex-shrink: 0;
  padding: 7px 12px;
  border: 1px solid rgba(31, 42, 31, 0.10);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.6);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}

.modal-header-input:focus {
  border-color: rgba(217, 79, 61, 0.35);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

.modal-header-input::placeholder {
  color: var(--muted);
  opacity: 0.65;
  font-size: 12px;
}

.modal-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(31, 42, 31, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.modal-close-btn:hover {
  background: rgba(31, 42, 31, 0.12);
  color: var(--ink);
}

.modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* 弹窗内编辑器样式微调 */
.modal-body .team-member-editor {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

/* ── 编辑器顶部：图片 + 基本信息 ── */
.te-header {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
align-items: start;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 1px solid var(--line);
}

.te-header-preview {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
}

.te-header-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.te-inline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* ── 招式区域 ── */
.te-moves-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.te-moves-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

/* 移动端适配 */
@media (max-width: 640px) {
  .modal-backdrop {
    padding: 12px;
  }
  .modal-container {
    max-width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }
  .modal-header {
    padding: 16px 18px 12px;
  }
  .modal-body {
    padding: 16px 18px 20px;
  }
}

/* ══════════════════════════════════════════════
   新版配置编辑器 — 内联四栏布局
   ══════════════════════════════════════════════ */

.cfg-inline-wrap {
  margin-top: 16px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: var(--shadow);
  scroll-margin-top: 80px;
}

/* ── 顶部工具栏 ── */
.cfg-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cfg-toolbar strong {
  font-size: 15px;
  flex-shrink: 0;
}

.cfg-toolbar-search {
  flex: 0 1 320px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 30px;
  border: 1px solid rgba(31, 42, 31, 0.10);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.6);
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}

.cfg-toolbar-search:focus-within {
  border-color: rgba(217, 79, 61, 0.35);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

.cfg-toolbar-search-icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
  flex-shrink: 0;
}

.cfg-toolbar-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12px;
  color: var(--ink);
  outline: none;
  line-height: 1.4;
}

.cfg-toolbar-search-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.cfg-toolbar-search-clear {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(31, 42, 31, 0.08);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.cfg-toolbar-search-clear:hover {
  background: rgba(217, 79, 61, 0.15);
  color: var(--accent-strong);
}

/* 已选择宝可梦时的显示 */
.cfg-toolbar-pokemon {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cfg-toolbar-pokemon-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.cfg-toolbar-pokemon-change {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  color: var(--accent-strong);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cfg-toolbar-pokemon-change:hover {
  background: rgba(217, 79, 61, 0.08);
  border-color: rgba(217, 79, 61, 0.3);
}

.cfg-toolbar-name {
  width: 140px;
  flex-shrink: 0;
  padding: 0 12px;
  height: 30px;
  border: 1px solid rgba(31, 42, 31, 0.10);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.6);
  font-size: 12px;
  color: var(--ink);
  outline: none;
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}

.cfg-toolbar-name:focus {
  border-color: rgba(217, 79, 61, 0.35);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

.cfg-toolbar-name::placeholder {
  color: var(--muted);
  opacity: 0.65;
  font-size: 12px;
}

.cfg-toolbar-cancel {
  flex-shrink: 0;
  margin-left: 8px;
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.cfg-toolbar-cancel:hover {
  background: rgba(217, 79, 61, 0.08);
  border-color: rgba(217, 79, 61, 0.3);
  color: var(--accent-strong);
}

/* ── 宝可梦选择网格 ── */
.cfg-pokemon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

.cfg-pokemon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.cfg-pokemon-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(217, 79, 61, 0.12);
  transform: translateY(-1px);
}

.cfg-pokemon-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.cfg-pokemon-card span {
  font-size: 11px;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
}

/* ── 宝可梦选择列表（横向表格） ── */
.cfg-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
}

.cfg-picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s;
}

.cfg-picker-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.08);
}

.cfg-picker-search-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.cfg-picker-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.cfg-picker-input::placeholder {
  color: var(--muted);
}

.cfg-picker-clear {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(31, 42, 31, 0.08);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s;
}

.cfg-picker-clear:hover {
  background: rgba(217, 79, 61, 0.15);
  color: var(--accent-strong);
}

.cfg-picker-count {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.cfg-picker-table-wrap {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.cfg-picker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.cfg-picker-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 248, 236, 0.95);
  backdrop-filter: blur(4px);
}

.cfg-picker-table th {
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}

.cfg-picker-table th:first-child {
padding-left: 18px;
}

.cfg-th-img { width: 6%; }
.cfg-th-name { width: 12%; }
.cfg-th-types { width: 14%; }
.cfg-th-abilities { width: 20%; }

.cfg-picker-table th.cfg-th-stat {
width: 6.8%;
text-align: center;
cursor: pointer;
transition: color 0.15s;
}

.cfg-th-stat:hover {
  color: var(--ink);
}

.cfg-th-stat-active {
  color: var(--accent-strong);
}

.cfg-sort-arrow {
  font-size: 9px;
  margin-left: 2px;
}

.cfg-picker-row {
  cursor: pointer;
  transition: background 0.12s;
}

.cfg-picker-row:hover {
  background: rgba(217, 79, 61, 0.05);
}

.cfg-picker-row:active {
  background: rgba(217, 79, 61, 0.1);
}

.cfg-picker-row td {
padding: 6px 4px;
border-bottom: 1px solid rgba(31, 42, 31, 0.04);
vertical-align: middle;
}

.cfg-picker-row td:first-child {
padding-left: 18px;
}

.cfg-td-img img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.cfg-td-name {
  overflow: hidden;
}

.cfg-td-name-zh {
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cfg-td-name-en {
  font-size: 11px;
  color: var(--muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cfg-td-types {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cfg-td-types .type-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: 11px;
  border-radius: 999px;
  vertical-align: middle;
  margin-right: 3px;
}

.cfg-td-types .type-chip-icon {
  width: 12px;
  height: 12px;
}

.cfg-td-abilities {
white-space: normal;
overflow: visible;
text-overflow: clip;
}

.cfg-ability-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(31, 42, 31, 0.06);
  color: var(--ink);
  white-space: nowrap;
  vertical-align: middle;
  margin-right: 3px;
}

.cfg-ability-ha {
  background: rgba(139, 94, 167, 0.12);
  color: #6b4d8a;
}

.cfg-td-stat {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.cfg-td-bst {
  font-weight: 700;
  color: var(--accent-strong);
}

.cfg-picker-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ── 配置区 ── */
.cfg-editor {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cfg-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  align-items: stretch;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  border-radius: 12px;
}

.cfg-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: space-between;
  height: 100%;
  min-width: 0;
}

/* 第一栏：图片 + 特性 + 道具 */
.cfg-col-first {
  gap: 0;
  padding: 0 24px;
  justify-content: flex-start;
}

.cfg-first-inner {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex: 1;
}

.cfg-first-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  justify-content: center;
}

.cfg-first-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding-top: 0;
  justify-content: center;
}

.cfg-preview-img {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  overflow: visible;
  position: relative;
}

.cfg-preview-img > img:first-child {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

/* 道具图片叠加在宝可梦图片右下角 */
.cfg-item-overlay {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  border: 1.5px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.cfg-preview-empty {
  font-size: 28px;
  color: var(--muted);
}

.cfg-types {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.cfg-types .type-chip {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
}

.cfg-types .type-chip-icon {
  width: 12px;
  height: 12px;
}

/* 第二栏：招式 */
.cfg-col-moves {
  gap: 8px;
  padding: 0 24px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  justify-content: center;
}

/* ── 形态切换滑块（toolbar 内联） ── */
.cfg-form-slider-inline {
  display: inline-flex;
  background: rgba(31, 42, 31, 0.06);
  border-radius: 6px;
  padding: 2px;
  gap: 1px;
  margin-left: 8px;
  vertical-align: middle;
}

.cfg-form-slider-item {
  padding: 3px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
}

.cfg-form-slider-item:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.cfg-form-slider-active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ── 闪光标识（图片左上角，圆形容器，与道具风格统一） ── */
.cfg-shiny-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--line);
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s;
  user-select: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.cfg-shiny-badge:hover {
  opacity: 1;
  transform: scale(1.12);
  border-color: #f5c842;
  box-shadow: 0 2px 8px rgba(245, 200, 66, 0.3);
}

.cfg-shiny-badge-active {
  opacity: 1;
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  border-color: #f5c842;
  box-shadow: 0 0 0 2px rgba(245, 200, 66, 0.25), 0 2px 8px rgba(245, 200, 66, 0.4);
  animation: shiny-pulse 2s ease-in-out infinite;
}

@keyframes shiny-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(245, 200, 66, 0.25), 0 2px 8px rgba(245, 200, 66, 0.4); }
  50% { box-shadow: 0 0 0 3px rgba(245, 200, 66, 0.35), 0 2px 12px rgba(245, 200, 66, 0.6); }
}

.cfg-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0;
  margin-bottom: 2px;
}

.cfg-section-mode-badge {
  font-size: 9px;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #fff;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 4px;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: middle;
}

.cfg-ability-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}


/* 通用 slot 按钮 */
.cfg-slot-btn {
  display: block;
  width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.cfg-slot-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.9);
}

.cfg-slot-btn.cfg-slot-active {
  border-color: var(--accent);
  background: rgba(217, 79, 61, 0.06);
  box-shadow: 0 0 0 2px rgba(217, 79, 61, 0.1);
}

/* 道具锁定态 */
.cfg-slot-btn.cfg-slot-locked {
  cursor: not-allowed;
  opacity: 0.65;
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--line);
  border-style: dashed;
  pointer-events: none;
}

.cfg-section-lock-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 500;
  color: #888;
  vertical-align: middle;
  letter-spacing: 0;
  text-transform: none;
}

/* 第三栏：能力值概览 */
.cfg-col-stats {
  cursor: pointer;
  padding: 0 24px;
  transition: background 0.15s;
  justify-content: center;
}

.cfg-col-stats:hover {
  background: rgba(255, 255, 255, 0.3);
}

.cfg-stats-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.cfg-stat-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cfg-stat-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  width: 26px;
  text-transform: uppercase;
  opacity: 0.7;
}

.cfg-stat-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(31, 42, 31, 0.08);
  overflow: hidden;
}

.cfg-stat-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.3s;
}

.cfg-stat-row:nth-child(1) .cfg-stat-fill { background: #8AC654; }
.cfg-stat-row:nth-child(2) .cfg-stat-fill { background: #F8CB3C; }
.cfg-stat-row:nth-child(3) .cfg-stat-fill { background: #D98837; }
.cfg-stat-row:nth-child(4) .cfg-stat-fill { background: #59C3D0; }
.cfg-stat-row:nth-child(5) .cfg-stat-fill { background: #5890CD; }
.cfg-stat-row:nth-child(6) .cfg-stat-fill { background: #A456D0; }

.cfg-stat-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  width: 24px;
  text-align: right;
}

.cfg-stat-total {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 2px;
}

/* ── 道具搜索框（内联在道具位置） ── */
.cfg-item-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(217, 79, 61, 0.1);
  height: 35px;
  box-sizing: border-box;
}

.cfg-item-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  min-width: 0;
  padding: 0;
  border-radius: 0;
  width: auto;
  line-height: 1.4;
}

.cfg-item-search-input::placeholder {
  color: var(--muted);
}

.cfg-item-search-clear {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}

.cfg-item-search-clear:hover {
  color: var(--ink);
}

.cfg-item-search-close {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.cfg-item-search-close:hover {
  color: var(--accent-strong);
  background: rgba(217, 79, 61, 0.08);
}

/* 道具按钮中已选道具展示 */
.cfg-item-selected {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cfg-item-selected-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ── 道具面板列表 ── */
.cfg-item-panel-list {
  max-height: 280px;
  overflow-y: auto;
}

.cfg-item-panel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid rgba(31, 42, 31, 0.04);
}

.cfg-item-panel-row:hover {
  background: rgba(217, 79, 61, 0.05);
}

.cfg-item-panel-row-active {
  background: rgba(217, 79, 61, 0.08);
}

.cfg-item-panel-img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.cfg-item-panel-img img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.cfg-item-panel-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.cfg-item-panel-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  flex-shrink: 0;
}

.cfg-item-panel-desc {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* ── 下方联动面板 ── */
.cfg-bottom-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.cfg-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 236, 0.5);
}

.cfg-panel-search {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.cfg-panel-search:focus {
  border-color: var(--accent);
}

.cfg-panel-title {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

.cfg-panel-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(31, 42, 31, 0.06);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background 0.15s;
}

.cfg-panel-close:hover {
  background: rgba(217, 79, 61, 0.12);
  color: var(--accent-strong);
}

.cfg-panel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  padding: 12px;
  max-height: 240px;
  overflow-y: auto;
}

.cfg-panel-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.cfg-panel-item:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
}

.cfg-panel-item.cfg-panel-item-active {
  border-color: var(--accent);
  background: rgba(217, 79, 61, 0.08);
}

.cfg-panel-item-sub {
  font-size: 11px;
  color: var(--muted);
}

.cfg-panel-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
}

.cfg-panel-stats {
  padding: 16px;
}

/* ── 招式搜索框（内联在招式按钮位置） ── */
.cfg-move-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(217, 79, 61, 0.1);
  height: 35px;
  box-sizing: border-box;
}

.cfg-move-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  padding: 0;
  border-radius: 0;
  width: auto;
  line-height: 1.4;
}

.cfg-move-search-input::placeholder {
  color: var(--muted);
}

.cfg-move-search-clear {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}

.cfg-move-search-clear:hover {
  color: var(--ink);
}

.cfg-move-search-close {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.cfg-move-search-close:hover {
  color: var(--accent-strong);
  background: rgba(217, 79, 61, 0.08);
}

/* ── 招式面板表格 ── */
.cfg-move-panel-wrap {
  max-height: 280px;
  overflow-y: auto;
}

.cfg-move-panel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.cfg-move-panel-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 248, 236, 0.95);
  backdrop-filter: blur(4px);
}

.cfg-move-panel-table th,
.cfg-move-panel-table td {
padding: 8px 6px;
font-size: 12px;
vertical-align: middle;
}

.cfg-move-panel-table th:first-child,
.cfg-move-panel-table td:first-child {
padding-left: 16px;
}

.cfg-move-panel-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}

.cfg-move-panel-table td {
  text-align: left;
}

.cfg-move-panel-table .cfg-mth-cat,
.cfg-move-panel-table .cfg-mth-num { text-align: center; }

.cfg-move-panel-table .cfg-mtd-cat,
.cfg-move-panel-table .cfg-mtd-num { text-align: center; }

.cfg-mth-name { width: 13%; }
.cfg-mth-type { width: 10%; }
.cfg-mth-cat { width: 5%; }
.cfg-mth-num { width: 7%; }
.cfg-mth-desc { width: auto; overflow: hidden; }

.cfg-move-panel-table .cfg-mtd-desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

.cfg-move-panel-row {
  cursor: pointer;
  transition: background 0.12s;
}

.cfg-move-panel-row:hover {
  background: rgba(217, 79, 61, 0.05);
}

.cfg-move-panel-row:active {
  background: rgba(217, 79, 61, 0.1);
}

.cfg-move-panel-row-active {
  background: rgba(217, 79, 61, 0.08);
}

.cfg-move-panel-row td {
  border-bottom: 1px solid rgba(31, 42, 31, 0.04);
}

.cfg-mtd-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfg-mtd-type .type-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: 11px;
  border-radius: 999px;
  vertical-align: middle;
}

.cfg-mtd-type .type-chip-icon {
  width: 12px;
  height: 12px;
}

.cfg-mtd-cat {
  text-align: center;
}

.cfg-move-cat-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  vertical-align: middle;
}

.cfg-move-cat-chip img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.cfg-move-cat-物理 { background: #FF4400; }
.cfg-move-cat-特殊 { background: #2266CC; }
.cfg-move-cat-变化 { background: #999999; }

.cfg-mtd-num {
  color: var(--ink);
}

.cfg-mtd-desc {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 底部操作栏 ── */
.cfg-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cfg-actions button {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
}

.cfg-actions button.secondary {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
}

/* ══════════════════════════════════════════════════════════════
   Toast 通知系统
   ══════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  animation: toast-enter 0.3s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
  max-width: 420px;
  word-break: break-word;
}

.toast-item.toast-leaving {
  animation: toast-leave 0.3s cubic-bezier(0.06, 0.71, 0.55, 1) forwards;
}

/* 类型变体 */
.toast-error {
  background: #fff0f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
}

.toast-success {
  background: #f0fff4;
  border: 1px solid #b7eb8f;
  color: #237804;
}

.toast-info {
  background: #f0f5ff;
  border: 1px solid #adc6ff;
  color: #1d39c4;
}

/* 图标 */
.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-error .toast-icon { color: #cf1322; }
.toast-success .toast-icon { color: #237804; }
.toast-info .toast-icon { color: #1d39c4; }

/* 消息文本 */
.toast-message {
  flex: 1;
}

/* 动画 */
@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-leave {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
}

/* ══════════════════════════════════════════════════════════════
   Version Exclusive Tags (仅限标识)
   ══════════════════════════════════════════════════════════════ */

.mv-gen-exclusive-tag,
.ab-gen-exclusive-tag,
.it-gen-exclusive-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(220, 120, 60, 0.18), rgba(220, 120, 60, 0.08));
  color: #b05020;
  white-space: nowrap;
  flex-shrink: 0;
}

.mv-gen-exclusive,
.ab-gen-exclusive,
.it-gen-exclusive {
  opacity: 0.75;
  border-left: 2px solid rgba(220, 120, 60, 0.4);
  padding-left: 10px;
}
