.brand-link {
  text-decoration: none;
}

.s18-preview-page {
  --s18-cost-1: rgb(145, 145, 145);
  --s18-cost-2: rgb(16, 166, 14);
  --s18-cost-3: rgb(67, 156, 204);
  --s18-cost-4: rgb(175, 25, 186);
  --s18-cost-5: rgb(147, 130, 22);
}

.s18-preview-page {
  width: min(1380px, calc(100% - 36px));
}

.s18-preview-nav {
  margin-bottom: 26px;
}

.s18-preview-nav .nav-actions {
  flex: 0 1 auto;
}

.s18-preview-hero {
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0 24px;
}

.s18-preview-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.s18-preview-hero h1 {
  margin: 8px 0 0;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

.s18-preview-count {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
}

.s18-main-tabs {
  position: sticky;
  top: 12px;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(var(--tab-count, 3), minmax(0, 1fr));
  width: min(540px, 100%);
  margin: 0 auto 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent);
  box-shadow: 0 14px 38px rgba(55, 45, 31, 0.1);
  padding: 4px;
  backdrop-filter: blur(16px);
}

:root[data-theme="dark"] .s18-main-tabs {
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.26);
}

.s18-main-tab {
  position: relative;
  z-index: 2;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  transition: color 180ms ease;
}

.s18-main-tab.active {
  color: #fffaf5;
}

.s18-main-tab:focus-visible,
.champion-filter-options button:focus-visible,
.trait-type-switch button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.s18-tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  z-index: 1;
  width: calc((100% - 8px) / var(--tab-count, 3));
  border-radius: 10px;
  background: var(--accent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 32%, transparent);
  transform: translateX(calc(var(--active-tab, 0) * 100%));
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.s18-preview-content {
  min-height: 360px;
}

.s18-view-panel {
  opacity: 0;
  transform: translateY(8px);
}

.s18-view-panel.active {
  animation: s18-panel-in 280ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes s18-panel-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.champion-filter-panel {
  display: grid;
  gap: 15px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(55, 45, 31, 0.08);
  padding: 18px;
}

@media (min-width: 861px) {
  .champion-filter-panel {
    padding: 12px;
  }

  .champion-filter-row {
    grid-template-columns: minmax(260px, 1.45fr) repeat(3, minmax(150px, 1fr)) auto;
    align-items: center;
    gap: 10px;
  }

  .s18-search-field,
  .champion-filter-group {
    position: relative;
  }

  .s18-search-field > span,
  .champion-filter-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .s18-search-field input,
  .s18-filter-select-trigger {
    height: 40px;
  }
}

.champion-filter-toggle {
  display: none;
}

:root[data-theme="dark"] .champion-filter-panel {
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
}

.champion-filter-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) repeat(3, minmax(140px, 1fr)) auto;
  align-items: end;
  gap: 14px;
}

.s18-search-field {
  display: grid;
  width: min(440px, 100%);
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.s18-search-field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--surface-solid);
  color: var(--text);
  padding: 0 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.s18-search-field input:focus {
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 68%, transparent);
}

.skill-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.skill-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.skill-toggle-track {
  position: relative;
  width: 46px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 16%, var(--surface-solid));
  transition: background 180ms ease, border-color 180ms ease;
}

.skill-toggle-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-solid);
  box-shadow: 0 2px 8px rgba(33, 31, 28, 0.2);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-toggle input:checked + .skill-toggle-track {
  border-color: var(--accent);
  background: var(--accent);
}

.skill-toggle input:checked + .skill-toggle-track span {
  transform: translateX(20px);
}

.skill-toggle input:focus-visible + .skill-toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.champion-filter-group {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.champion-filter-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.champion-filter-options {
  display: block;
  min-width: 0;
}

.s18-filter-select {
  position: relative;
  width: min(360px, 100%);
}

.s18-filter-select-trigger {
  display: flex;
  width: 100%;
  height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.s18-filter-select-trigger:hover,
.s18-filter-select.open .s18-filter-select-trigger {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 50%, transparent);
}

.s18-filter-select-trigger:focus-visible,
.s18-filter-select-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.s18-filter-select-value,
.s18-filter-select-option {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.s18-filter-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s18-filter-select-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: transform 180ms ease;
}

.s18-filter-select.open .s18-filter-select-chevron {
  transform: rotate(180deg);
}

.s18-filter-select-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 120;
  display: grid;
  max-height: 300px;
  gap: 3px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  box-shadow: 0 18px 44px rgba(55, 45, 31, 0.18);
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

:root[data-theme="dark"] .s18-filter-select-menu {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

.s18-filter-select.open .s18-filter-select-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.s18-filter-select-option {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 7px 8px;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}

.s18-filter-select-option:hover,
.s18-filter-select-option.selected {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.s18-filter-select-icon,
.s18-filter-select-icon-spacer {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}

:root:not([data-theme="dark"]) .s18-filter-select-icon {
  filter: brightness(0) saturate(100%) opacity(0.78);
}

:root[data-theme="dark"] .s18-filter-select-icon {
  filter: brightness(0) invert(1) opacity(0.86);
}

.champion-filter-options button,
.trait-type-switch button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-solid);
  color: var(--muted);
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 750;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.champion-filter-options button:hover,
.trait-type-switch button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  color: var(--text);
}

.champion-filter-options button.active,
.trait-type-switch button.active {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.champion-cost-section + .champion-cost-section {
  margin-top: 34px;
}

.champion-cost-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
}

.champion-cost-heading h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0;
}

.champion-cost-heading span {
  color: var(--muted);
  font-size: 13px;
}

.champion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 14px;
  align-items: stretch;
}

.champion-card-link {
  min-width: 0;
  height: 100%;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, filter 180ms ease;
}

.champion-card-link:hover {
  z-index: 1;
  transform: translateY(-3px);
  filter: drop-shadow(0 12px 20px color-mix(in srgb, var(--accent) 18%, transparent));
}

.champion-card-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

.champion-card,
.trait-card,
.wand-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(55, 45, 31, 0.08);
}

:root[data-theme="dark"] .champion-card,
:root[data-theme="dark"] .trait-card,
:root[data-theme="dark"] .wand-card {
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

.champion-card {
  height: 100%;
  overflow: hidden;
  border: 2px solid var(--cost-color);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  animation: s18-card-in 340ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes s18-card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.champion-art {
  position: relative;
  aspect-ratio: 720 / 427;
  overflow: hidden;
  background: color-mix(in srgb, var(--cost-color) 16%, var(--surface-solid));
}

.champion-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.7) 0, transparent 35%, rgba(10, 9, 8, 0.86) 100%);
  content: "";
  pointer-events: none;
}

.champion-art > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.champion-name,
.champion-traits,
.champion-cost {
  position: absolute;
  z-index: 2;
}

.champion-name {
  top: 13px;
  left: 14px;
  margin: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.54);
}

.champion-traits {
  bottom: 12px;
  left: 13px;
  display: grid;
  max-width: calc(100% - 90px);
  gap: 5px;
}

.champion-trait {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

.champion-trait img {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
}

.champion-cost,
.wand-cost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 900;
}

.champion-cost {
  right: 12px;
  bottom: 12px;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.champion-cost img,
.wand-cost img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.champion-skill {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition: grid-template-rows 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
}

.champion-skill > div {
  min-height: 0;
  overflow: hidden;
}

.champion-skill-body {
  padding: 15px;
}

.champion-card.skills-hidden .champion-skill {
  grid-template-rows: 0fr;
  opacity: 0;
}

.champion-skill-name {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.champion-skill-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.trait-type-switch {
  display: flex;
  width: fit-content;
  margin: 0 0 18px;
  gap: 8px;
}

.trait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: 14px;
  align-items: stretch;
}

.trait-card {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 15px;
  border-radius: 8px;
  padding: 18px;
  opacity: 0;
  transform: translateY(10px);
  animation: s18-card-in 340ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.trait-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.trait-card-title img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

:root:not([data-theme="dark"]) .trait-card-title img {
  filter: brightness(0) saturate(100%) opacity(0.78);
}

:root[data-theme="dark"] .trait-card-title img {
  filter: brightness(0) invert(1) opacity(0.86);
}

.trait-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.66;
  overflow-wrap: anywhere;
}

.trait-levels {
  display: grid;
  border-top: 1px solid var(--line);
}

.trait-level {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.trait-level-count {
  display: inline-grid;
  width: 34px;
  min-height: 26px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.trait-level-effect {
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.trait-champions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trait-champion {
  display: grid;
  gap: 4px;
  justify-items: center;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
}

.trait-champion:hover,
.trait-champion:focus-visible {
  z-index: 1;
  transform: translateY(-3px);
}

.trait-champion:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.trait-champion img {
  display: block;
  width: 48px;
  height: 48px;
  border: 2px solid var(--cost-color);
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 5px 12px color-mix(in srgb, var(--cost-color) 20%, transparent);
  transition: box-shadow 160ms ease;
}

.trait-champion:hover img,
.trait-champion:focus-visible img {
  box-shadow: 0 8px 18px color-mix(in srgb, var(--cost-color) 42%, transparent);
}

.trait-champion span {
  max-width: 56px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.trait-no-champions {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.champion-hover-layer {
  position: fixed;
  z-index: 1200;
  width: min(292px, calc(100vw - 20px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px) scale(0.98);
  transform-origin: center;
  transition: opacity 140ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.champion-hover-layer.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.champion-hover-card {
  overflow: hidden;
  border: 2px solid var(--cost-color);
  border-radius: 8px;
  background: var(--surface-solid);
  box-shadow: 0 20px 46px rgba(20, 17, 12, 0.28);
}

.champion-hover-art {
  position: relative;
  aspect-ratio: 720 / 427;
  overflow: hidden;
  background: color-mix(in srgb, var(--cost-color) 16%, var(--surface-solid));
}

.champion-hover-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.72), transparent 38%, rgba(10, 9, 8, 0.9));
  content: "";
}

.champion-hover-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.champion-hover-overlay {
  position: absolute;
  z-index: 1;
  inset: 11px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: space-between;
  color: #fff;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.72);
}

.champion-hover-overlay > strong {
  grid-column: 1 / -1;
  align-self: start;
  font-size: 18px;
}

.champion-hover-traits {
  display: grid;
  align-self: end;
  gap: 3px;
}

.champion-hover-traits span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 750;
}

.champion-hover-traits img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.champion-hover-cost {
  display: flex;
  align-self: end;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 900;
}

.champion-hover-cost img {
  width: 16px;
  height: 16px;
}

.champion-hover-skill {
  padding: 12px 13px 13px;
}

.champion-hover-skill strong {
  color: var(--text);
  font-size: 13px;
}

.champion-hover-skill p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.wand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 12px;
  align-items: stretch;
}

.wand-card {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 12px;
  border-radius: 8px;
  padding: 16px;
}

.wand-card.animate-in {
  opacity: 0;
  transform: translateY(8px);
  animation: s18-card-in 300ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.wand-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wand-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.wand-cost {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 14px;
}

.wand-effect {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.wand-condition {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.s18-loading,
.s18-load-error,
.s18-empty-state {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 38px 20px;
  text-align: center;
}

.s18-empty-state {
  display: grid;
  gap: 7px;
}

.s18-empty-state strong {
  color: var(--text);
  font-size: 17px;
}

.s18-load-error {
  color: var(--accent-strong);
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .s18-preview-page {
    width: min(100% - 24px, 720px);
  }

  .s18-preview-nav {
    margin-bottom: 12px;
  }

  .s18-preview-hero {
    padding-top: 10px;
  }

  .champion-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  }
}

@media (max-width: 640px) {
  .s18-preview-page {
    width: min(100% - 18px, 480px);
    padding-top: 14px;
  }

  .s18-preview-nav {
    align-items: center;
  }

  .s18-preview-nav .nav-actions {
    display: flex;
  }

  .s18-preview-nav .nav-tool-link {
    width: auto;
  }

  .s18-preview-nav .nav-icon-button {
    width: 40px;
  }

  .s18-preview-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .s18-preview-hero h1 {
    font-size: clamp(36px, 12vw, 50px);
  }

  .s18-preview-count {
    padding: 6px 10px;
  }

  .s18-main-tabs {
    top: 8px;
    margin-bottom: 12px;
  }

  .champion-filter-toggle {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    padding: 9px 13px;
    text-align: left;
  }

  .champion-filter-toggle-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .champion-filter-toggle-copy strong {
    font-size: 14px;
  }

  .champion-filter-toggle-copy span {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .champion-filter-toggle-chevron {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 18px;
    transition: transform 180ms ease;
  }

  .champion-filter-toggle[aria-expanded="true"] .champion-filter-toggle-chevron {
    transform: rotate(180deg);
  }

  .champion-filter-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .champion-filter-panel.mobile-collapsed {
    display: none;
  }

  .champion-filter-panel {
    gap: 13px;
    margin-bottom: 16px;
    padding: 14px;
  }

  .champion-filter-row {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .skill-toggle {
    justify-content: space-between;
  }

  .champion-filter-group {
    gap: 7px;
  }

  .champion-filter-label {
    padding-top: 0;
  }

  .champion-filter-options {
    width: 100%;
  }

  .s18-filter-select {
    width: 100%;
  }

  .champion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .trait-grid,
  .wand-grid {
    grid-template-columns: 1fr;
  }

  .champion-cost-section + .champion-cost-section {
    margin-top: 28px;
  }

  .champion-name {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    font-size: 16px;
  }

  .champion-traits {
    bottom: 7px;
    left: 7px;
    max-width: calc(100% - 54px);
    gap: 2px;
  }

  .champion-trait {
    gap: 3px;
    font-size: 10px;
  }

  .champion-trait img {
    width: 13px;
    height: 13px;
  }

  .champion-cost {
    right: 7px;
    bottom: 7px;
    gap: 3px;
    font-size: 11px;
  }

  .champion-cost img {
    width: 13px;
    height: 13px;
  }

  .champion-skill-body {
    padding: 10px;
  }

  .champion-skill-name {
    margin-bottom: 5px;
    font-size: 13px;
  }

  .champion-skill-description {
    font-size: 11px;
    line-height: 1.5;
  }

  .champion-cost-heading {
    margin-bottom: 9px;
  }

  .champion-cost-heading h2 {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .s18-tab-indicator,
  .s18-main-tab,
  .champion-filter-options button,
  .trait-type-switch button,
  .skill-toggle-track,
  .skill-toggle-track span,
  .champion-filter-toggle-chevron,
  .champion-skill,
  .champion-card-link,
  .trait-champion,
  .trait-champion img,
  .champion-hover-layer {
    transition: none !important;
  }

  .s18-view-panel.active,
  .champion-card,
  .trait-card,
  .wand-card.animate-in {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

/* ---- Season library generic additions ---- */

.s18-preview-page {
  --s18-cost-7: rgb(205, 82, 61);
}

.champion-card {
  position: relative;
}

.champion-new-badge {
  position: absolute;
  z-index: 3;
  top: 11px;
  left: 12px;
  border: 1px solid rgba(255, 248, 218, 0.75);
  border-radius: 6px;
  background: #d86135;
  color: #fffaf2;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
}

.champion-unlock-badge {
  position: absolute;
  z-index: 3;
  top: 11px;
  right: 12px;
  border: 1px solid rgba(212, 231, 255, 0.7);
  border-radius: 6px;
  background: rgba(38, 92, 167, 0.92);
  color: #f3f8ff;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-shadow: none;
}

.champion-art.has-new .champion-name {
  top: 37px;
}

.season-version-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mechanic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.mechanic-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.mechanic-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mechanic-card-header img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
}

.mechanic-card-header h2 {
  margin: 0;
  font-size: 17px;
}

.mechanic-description {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.mechanic-card.has-splash {
  padding: 0;
  overflow: hidden;
}

.mechanic-splash {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
}

.mechanic-card.has-splash .mechanic-card-body {
  padding: 14px 16px 16px;
  display: grid;
  gap: 10px;
}

.mechanic-stage {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.mechanic-stage-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.mechanic-wish {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.mechanic-wish img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex: none;
}

.mechanic-wish strong {
  display: block;
  font-size: 13.5px;
}

.mechanic-wish p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ---- Skill scaling chips (物理/法术加成) ---- */

.scale-chip {
  display: inline-block;
  margin: 0 2px;
  border-radius: 5px;
  padding: 0 5px;
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1.6;
  vertical-align: 1px;
  white-space: nowrap;
}

.scale-chip-ad {
  color: #b04a12;
  background: rgba(216, 97, 53, 0.16);
}

.scale-chip-ap {
  color: #2d5fc0;
  background: rgba(77, 125, 214, 0.16);
}

:root[data-theme="dark"] .scale-chip-ad {
  color: #ffab7e;
  background: rgba(216, 97, 53, 0.26);
}

:root[data-theme="dark"] .scale-chip-ap {
  color: #9dbdff;
  background: rgba(77, 125, 214, 0.28);
}
