:root {
  --palette-50: #f8f9fa;
  --palette-100: #e9ecef;
  --palette-200: #dee2e6;
  --palette-300: #ced4da;
  --palette-400: #adb5bd;
  --palette-500: #6c757d;
  --palette-600: #495057;
  --palette-700: #343a40;
  --palette-800: #212529;
  --bg: #121315;
  --navbar-bg: #353b41;
  --gallery-navbar-bg: #2c3136;
  --dropdown-bg: #22262a;
  --card-bg: #22262a;
  --surface: var(--card-bg);
  --surface-strong: var(--card-bg);
  --surface-soft: rgba(173, 181, 189, 0.12);
  --text: var(--palette-50);
  --heading: var(--palette-50);
  --muted: var(--palette-400);
  --line: rgba(218, 180, 95, 0.26);
  --red: #cf2424;
  --red-dark: #7f1716;
  --banned-stamp-red: #ff1717;
  --gold: #dab45f;
  --gold-bright: #f2d185;
  --green: #75c76b;
  --blue: #1eaee6;
  --chart-blue: #1685d8;
  --chart-green: #58aa1c;
  --chart-red: #a91a1a;
  --chart-yellow: #d7d532;
  --hero-accent: #dab45f;
  --shadow: 0 18px 50px rgba(33, 37, 41, 0.52);
  --nav-height: 58px;
  --hero-panel-height: 380px;
  --hero-profile-art-width: var(--gallery-card-width);
  --deck-panel-height: 680px;
  --summary-panel-height: 430px;
  --distribution-chart-height: 300px;
  --metrics-chart-height: 180px;
  --gallery-card-width: 268.4px;
  --gallery-card-gap: 8px;
  --page-inline-gutter: 10vw;
  --radius: 8px;
  --site-navigation-font-size: 0.95rem;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-heading: var(--font-sans);
  --font-condensed: var(--font-sans);
  --font-display: var(--font-sans);
}

/* Base */
* {
  box-sizing: border-box;
  scrollbar-color: var(--palette-400) var(--palette-800);
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

body.is-mobile-nav-open {
  overflow: hidden;
}

button,
input,
select,
textarea,
code,
pre,
kbd,
samp {
  font: inherit;
}

button {
  color: inherit;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: #212529;
}

::-webkit-scrollbar-thumb {
  background: var(--palette-400);
  border: 2px solid #212529;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--palette-300);
}

/* Layout */
.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
}

.main-view {
  display: block;
  grid-column: 1 / -1;
  gap: 22px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 28px var(--page-inline-gutter);
  background: var(--bg);
}

.route-status {
  grid-column: 1 / -1;
  margin: 20px var(--page-inline-gutter) 0;
  padding: 18px 20px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--red);
  border-radius: var(--radius);
}

.route-status strong {
  display: block;
  font-size: 1.05rem;
}

.route-status p {
  margin: 6px 0 14px;
  color: var(--muted);
}

.route-status[hidden] {
  display: none;
}

.route-prerender {
  width: min(920px, calc(100% - (2 * var(--page-inline-gutter))));
  margin: 28px auto;
  padding: 24px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.route-prerender h1 {
  margin: 0 0 10px;
}

.route-prerender p,
.route-prerender li,
.route-prerender-breadcrumbs {
  color: var(--muted);
}

.route-prerender nav a,
.route-prerender li a {
  color: var(--palette-200);
}

.route-prerender nav a + a {
  margin-left: 14px;
}

.route-prerender ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.route-prerender-breadcrumbs {
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.route-skeleton-card {
  min-height: 390px;
  pointer-events: none;
}

.route-skeleton-block,
.route-skeleton-line {
  background: var(--surface-soft);
  animation: route-skeleton-pulse 1.2s ease-in-out infinite alternate;
}

.route-skeleton-block {
  width: 100%;
  aspect-ratio: 0.716;
  border-radius: 10px;
}

.route-skeleton-line {
  display: block;
  width: 72%;
  height: 16px;
  margin: 14px auto 0;
  border-radius: 999px;
}

.route-skeleton-line.is-short {
  width: 42%;
  height: 12px;
  margin-top: 10px;
}

.detail-view.is-route-loading .hero-profile-row > :not(.hero-overview),
.detail-view.is-route-loading .metrics-average-row,
.detail-view.is-route-loading .stats-panel {
  display: none;
}

@keyframes route-skeleton-pulse {
  from {
    opacity: 0.48;
  }
  to {
    opacity: 0.9;
  }
}

.not-found-page {
  display: grid;
  min-height: 100vh;
  padding: 32px 20px;
  place-items: center;
}

.not-found-card {
  width: min(100%, 620px);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.not-found-brand {
  width: min(100%, 330px);
  height: auto;
}

.not-found-code {
  margin: 28px 0 4px;
  color: var(--gold);
  font-size: clamp(2.8rem, 10vw, 5rem);
  font-weight: 800;
  line-height: 1;
}

.not-found-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
}

.not-found-card > p:last-of-type {
  margin: 0;
  color: var(--muted);
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.not-found-actions a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-view {
  position: relative;
  isolation: isolate;
  padding-top: 28px;
  background: transparent;
}

.detail-view > :not(.hero-backdrop) {
  position: relative;
  z-index: 1;
}

.hero-backdrop {
  position: fixed;
  z-index: 0;
  inset: var(--nav-height) 0 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

.hero-backdrop::before,
.hero-backdrop::after {
  position: absolute;
  content: "";
}

.hero-backdrop::before {
  inset: -5vw;
  background-image: var(--hero-backdrop-image, none);
  background-position: center 22%;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(6px) saturate(0.78) contrast(0.92);
  opacity: 0;
  transform: scale(1.06);
}

.hero-backdrop.has-hero-art::before {
  opacity: 0.84;
}

.hero-backdrop::after {
  inset: 0;
  background: rgba(18, 19, 21, 0.56);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  min-height: 0;
}

.detail-view .content-grid {
  width: 100%;
  max-width: 1540px;
  margin-inline: auto;
}

.about-view {
  display: grid;
  align-items: start;
  padding-block: clamp(28px, 5vw, 64px);
}

.about-content {
  display: grid;
  width: min(100%, 920px);
  margin-inline: auto;
  padding: clamp(24px, 5vw, 52px);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-heading {
  padding-bottom: clamp(24px, 4vw, 38px);
  text-align: center;
}

.about-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-heading h1 {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1;
}

.about-heading > p:last-child {
  max-width: 720px;
  margin: 18px auto 0;
  color: #ced4da;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.6;
}

.about-section {
  padding-block: clamp(22px, 3vw, 30px);
  border-top: 1px solid rgba(218, 180, 95, 0.22);
}

.about-section:last-child {
  padding-bottom: 0;
}

.about-section h2 {
  margin: 0 0 10px;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 400;
}

.about-section p {
  margin: 0;
  color: #ced4da;
  font-size: 1rem;
  line-height: 1.65;
}

.hero-layout-grid {
  --hero-detail-gap: 20px;
  --collapsed-detail-panel-height: 54px;
  display: grid;
  grid-template-columns: max-content repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto minmax(0, 1fr);
  align-items: stretch;
  justify-content: start;
  gap: var(--hero-detail-gap);
  width: 100%;
  max-width: 1540px;
  min-width: 0;
  min-height: var(--hero-card-panel-height, 462px);
  margin-inline: auto;
}

.hero-layout-grid:has(.filter-panel[open]),
.hero-layout-grid:has(.average-panel[open]) {
  grid-template-rows:
    calc(var(--hero-card-panel-height, 462px) - var(--collapsed-detail-panel-height) - var(--hero-detail-gap))
    auto;
  min-height: 0;
}

.hero-layout-grid:has(.deck-metrics-panel[open]):not(:has(.filter-panel[open])):not(:has(.average-panel[open])) {
  grid-template-rows: auto auto;
  min-height: 0;
}

.hero-profile-row,
.metrics-average-row {
  display: contents;
}

.hero-profile-row > section,
.hero-profile-row > details {
  min-height: 0;
}

.hero-profile-row > .hero-overview {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: start;
  height: auto;
  min-height: 0;
}

.hero-layout-grid:has(.filter-panel[open]) .hero-profile-row > .hero-overview,
.hero-layout-grid:has(.average-panel[open]) .hero-profile-row > .hero-overview,
.hero-layout-grid:has(.deck-metrics-panel[open]):not(:has(.filter-panel[open])):not(:has(.average-panel[open])) .hero-profile-row > .hero-overview {
  grid-row: 1 / 3;
}

.hero-profile-row > .filter-panel {
  grid-column: 2;
  grid-row: 1;
  height: auto;
}

.hero-profile-row > .average-panel {
  grid-column: 3;
  grid-row: 1;
  width: 100%;
  height: auto;
}

.hero-profile-row > .average-panel[open] {
  overflow: visible;
}

.hero-profile-row > .filter-panel[open] {
  min-height: 0;
  overflow: visible;
  contain: size;
}

.hero-profile-row > .filter-panel:not([open]) {
  align-self: start;
}

.hero-profile-row > .average-panel:not([open]) {
  align-self: start;
}

.hero-profile-row > .filter-panel[hidden] {
  display: none;
}

.hero-profile-row > .hero-empty-message {
  grid-column: 2 / -1;
  grid-row: 1;
}

.metrics-average-row {
  min-width: 0;
  min-height: 0;
}

.metrics-average-row > .deck-metrics-panel {
  grid-column: 2 / -1;
  grid-row: 2;
  align-self: start;
  width: 100%;
}

.metrics-average-row > details[open].deck-metrics-panel {
  --charts-panel-height: calc(var(--hero-card-panel-height, 462px) - var(--collapsed-detail-panel-height) - var(--hero-detail-gap));
  --metrics-chart-height: max(180px, calc(var(--charts-panel-height) - 104px));
  height: var(--charts-panel-height);
  min-height: 0;
}

.main-stack {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
  min-height: 0;
}

.side-stack {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-self: start;
  gap: 22px;
  height: calc(var(--hero-panel-height) + var(--deck-panel-height) + 20px);
  min-height: 0;
  overflow: hidden;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--summary-panel-height);
  align-items: stretch;
  gap: 20px;
  min-width: 0;
  min-height: 0;
}

.summary-strip > section {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.metric-cache {
  display: none;
}

.landing-view,
.format-view {
  display: grid;
  align-content: start;
  gap: 28px;
}

.landing-view > *,
.format-view > * {
  width: 100%;
  max-width: 1540px;
  margin-inline: auto;
}

.route-hero {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: center;
  min-height: 0;
  padding: 0 0 28px;
  border-bottom: 1px solid rgba(218, 180, 95, 0.24);
  text-align: center;
}

.landing-view .route-hero {
  padding: 34px 0 62px;
}

.landing-brand {
  display: block;
  width: min(72%, 590px);
  color: inherit;
  text-decoration: none;
}

.landing-brand:hover {
  text-decoration: none;
}

.route-hero .landing-brand h1 {
  width: 100%;
  max-width: none;
  line-height: 0;
}

.landing-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.route-hero h1 {
  max-width: 980px;
  margin: 0;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5.8rem);
  font-weight: 900;
  line-height: 0.94;
}

.route-hero p {
  max-width: 720px;
  margin: 0;
  color: #dee2e6;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  text-align: center;
}

.route-hero .landing-source {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
  margin-top: 19px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.landing-source strong {
  color: var(--heading);
  font-size: inherit;
}

.directory-section {
  display: grid;
  gap: 18px;
}

.format-directory-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.format-heading-tools.format-directory-navbar {
  width: 100%;
  min-width: 0;
  min-height: 70px;
  justify-content: flex-start;
  padding: 14px clamp(18px, 2.5vw, 28px);
  background: var(--gallery-navbar-bg);
  border-bottom: 1px solid var(--line);
}

.format-filters-panel {
  min-width: 0;
}

.format-filters-panel > .format-filters-summary {
  display: none;
}

.format-directory-card > .hero-directory-grid {
  padding: clamp(18px, 2.5vw, 28px);
  padding-bottom: 0;
}

.format-directory-card > .format-hero-summary {
  padding: 20px clamp(18px, 2.5vw, 28px) 18px;
}

.directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.directory-title {
  display: grid;
  gap: 8px;
  max-width: 820px;
  min-width: 0;
}

.directory-heading .format-page-title {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.5rem);
  line-height: 1.05;
}

.directory-heading p {
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.format-heading-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 12px 16px;
  min-width: min(100%, 560px);
}

.format-directory-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-start;
  gap: 8px;
}

.format-filter-reset-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  color: var(--gold);
  background: var(--dropdown-bg);
  border: 1px solid rgba(218, 180, 95, 0.34);
  border-radius: 7px;
  cursor: pointer;
  font-size: 1.34rem;
  line-height: 1;
}

.format-filter-reset-button:hover,
.format-filter-reset-button:focus-visible {
  color: #f8f9fa;
  background: rgba(218, 180, 95, 0.1);
  border-color: rgba(218, 180, 95, 0.64);
}

.format-directory-filters label {
  display: block;
  width: 190px;
}

.format-directory-filters .format-filter-reset-button span {
  display: block;
  color: inherit;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: inherit;
  line-height: 1;
  text-transform: none;
  transform: translateY(-1px);
}

.format-directory-filters select {
  min-height: 42px;
  padding: 0 12px;
}

.directory-heading .format-page-description {
  max-width: 760px;
  margin: 0;
  color: #dee2e6;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
}

.format-hero-summary {
  margin: 0;
  padding-block: 20px 10px;
  color: var(--muted);
  text-align: center;
}

.format-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.format-card,
.hero-directory-card {
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.format-card:hover,
.hero-directory-card:hover {
  border-color: rgba(242, 209, 133, 0.64);
  text-decoration: none;
  transform: translateY(-2px);
}

.format-card {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 12px;
  grid-template-rows: auto 1fr auto auto;
  min-height: 260px;
  padding: 22px;
  overflow: hidden;
  text-align: center;
  transition: border-color 160ms ease, transform 160ms ease;
}

.format-card::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(18, 19, 21, 0.7);
  content: "";
  pointer-events: none;
}

.format-card-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.format-card-backdrop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  filter: saturate(0.82) contrast(0.96);
  transform: scale(1.02);
}

.format-card > :not(.format-card-backdrop) {
  position: relative;
  z-index: 2;
}

.format-card strong {
  color: var(--heading);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.05rem);
  line-height: 1.04;
}

.format-card-description {
  align-self: end;
  margin: 0;
  color: #dee2e6;
  font-size: 0.96rem;
  line-height: 1.45;
  text-align: center;
}

.format-card em,
.format-card small,
.hero-directory-body em {
  color: var(--muted);
  font-style: normal;
}

.hero-directory-body strong {
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.1;
}

.hero-directory-body em {
  font-size: 0.95rem;
  line-height: 1.2;
}

.format-card small {
  align-self: end;
}

.format-card em,
.format-card small {
  text-align: center;
}

.hero-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--gallery-card-width)), var(--gallery-card-width)));
  justify-content: space-between;
  gap: 16px var(--gallery-card-gap);
}

.hero-directory-card {
  --hero-card-accent: var(--gold);
  display: grid;
  grid-template-rows: auto auto;
  justify-self: start;
  width: min(100%, var(--gallery-card-width));
  overflow: visible;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.hero-directory-card:hover {
  transform: none;
}

.hero-directory-card.is-empty {
  opacity: 0.72;
}

.hero-directory-card.is-empty .hero-directory-art img,
.hero-directory-card.is-empty .hero-directory-fallback,
.hero-overview-art.is-empty-hero img,
.hero-overview-art.is-empty-hero .thumb-fallback {
  filter: grayscale(1) contrast(0.92) brightness(0.74);
}

.hero-directory-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 0.716;
  overflow: hidden;
  min-width: 0;
  background: #343a40;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(33, 37, 41, 0.42);
}

.hero-directory-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-directory-card a {
  color: inherit;
  text-decoration: none;
}

.hero-directory-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 14px;
  overflow: hidden;
  color: #212529;
  background: color-mix(in srgb, var(--hero-card-accent) 72%, #f8f9fa);
  border-radius: 10px;
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-align: center;
}

.hero-directory-body {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 8px 0 0;
  text-align: center;
}

.directory-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid rgba(218, 180, 95, 0.22);
  border-radius: var(--radius);
}

.hero-overview,
.table-panel,
.summary-pitch-card,
.distribution-panel,
.cost-panel,
.deck-metrics-panel,
.filter-panel,
.average-panel {
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.hero-overview,
.table-panel,
.summary-pitch-card,
.distribution-panel,
.cost-panel,
.deck-metrics-panel,
.filter-panel,
.average-panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Navigation */
.top-nav {
  position: sticky;
  z-index: 12;
  top: 0;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--nav-height);
  padding: 0 var(--page-inline-gutter);
  color: #f8f9fa;
  background: var(--navbar-bg);
  border-bottom: 1px solid rgba(218, 180, 95, 0.22);
  box-shadow: 0 8px 24px rgba(33, 37, 41, 0.42);
}

.nav-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-wordmark {
  display: block;
  flex: 0 0 auto;
  width: min(144px, 100%);
  max-height: 32px;
  height: auto;
  object-fit: contain;
}

.nav-links {
  display: grid;
  grid-auto-columns: max-content;
  grid-auto-flow: column;
  flex: 0 0 auto;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: 40px;
  margin-left: auto;
  min-width: 0;
}

.nav-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a,
.nav-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-height);
  min-height: var(--nav-height);
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 0;
  font-weight: 400;
  white-space: nowrap;
}

.nav-links a {
  color: #e9ecef;
  font-family: var(--font-condensed);
  font-size: var(--site-navigation-font-size);
  text-transform: none;
}

.nav-links .nav-support-link {
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--gold-bright);
  text-decoration: none;
}

.nav-links a.is-active-route {
  color: var(--gold);
  background: transparent;
  border-color: transparent;
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.nav-actions a {
  color: #212529;
  background: var(--gold);
  border-color: #f8f9fa;
  box-shadow: inset 0 0 0 1px rgba(248, 249, 250, 0.22);
}

.nav-actions a:hover {
  color: #f8f9fa;
  text-decoration: none;
}

.nav-menu-toggle {
  display: none;
  place-items: center;
  flex: 0 0 auto;
  width: var(--nav-height);
  height: var(--nav-height);
  padding: 0;
  color: var(--gold);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.nav-menu-toggle span {
  display: block;
  grid-area: 1 / 1;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition:
    opacity 160ms ease,
    transform 220ms ease;
}

.nav-menu-toggle span:nth-child(1) {
  transform: translateY(-8px);
}

.nav-menu-toggle span:nth-child(3) {
  transform: translateY(8px);
}

.mobile-nav-layer {
  position: fixed;
  top: var(--nav-height);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 11;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 260ms;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(33, 37, 41, 0.44);
  border: 0;
  opacity: 0;
  cursor: default;
  transition: opacity 220ms ease;
}

.mobile-nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  align-content: start;
  width: 90vw;
  height: 100%;
  overflow: auto;
  color: #f8f9fa;
  background: var(--navbar-bg);
  border-left: 1px solid rgba(248, 249, 250, 0.18);
  box-shadow: -18px 0 34px rgba(33, 37, 41, 0.42);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.22, 0.82, 0.28, 1);
}

body.is-mobile-nav-open .mobile-nav-layer {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

body.is-mobile-nav-open .mobile-nav-backdrop {
  opacity: 1;
}

body.is-mobile-nav-open .mobile-nav-drawer {
  transform: translateX(0);
}

body.is-mobile-nav-open .nav-menu-toggle span:nth-child(1) {
  transform: rotate(45deg);
}

body.is-mobile-nav-open .nav-menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.is-mobile-nav-open .nav-menu-toggle span:nth-child(3) {
  transform: rotate(-45deg);
}

.mobile-nav-links {
  display: grid;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 0 18px;
  color: #f8f9fa;
  border-bottom: 1px solid rgba(248, 249, 250, 0.14);
  text-decoration: none;
}

.mobile-nav-links a:hover {
  color: var(--gold-bright);
}

.mobile-nav-links a.is-active-route {
  color: var(--gold);
  background: transparent;
}

.mobile-nav-links a.is-active-route span {
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.mobile-nav-links span {
  min-width: 0;
  overflow: hidden;
  font-size: var(--site-navigation-font-size);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-nav-links .nav-support-link span {
  font-weight: 700;
}

/* Filters */
.filter-panel {
  padding: 16px;
}

.hero-profile-row > .filter-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-panel:not([open]) > :not(summary) {
  display: none;
}

.filter-panel:not([open]) {
  gap: 0;
}

.filter-results-heading {
  min-width: 0;
}

.filter-results-heading h2,
.filter-results-heading p {
  margin: 0;
}

.filter-panel .filter-results-heading h2,
.average-panel .average-summary h2,
.deck-metrics-panel > .collapsible-summary h2 {
  overflow-wrap: anywhere;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.15;
}

.filter-results-heading p {
  margin-top: 5px;
  color: #ced4da;
  font-size: 0.9rem;
  line-height: 1.35;
}

.filter-summary .filter-results-heading {
  flex: 1 1 auto;
}

.filters {
  display: grid;
  grid-template-areas:
    "source period card reset";
  grid-template-columns: minmax(140px, 170px) minmax(140px, 190px) minmax(0, 1fr) auto;
  align-items: end;
  justify-content: start;
  gap: 12px 14px;
  min-width: 0;
}

.hero-profile-row .filters {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  overflow: visible;
  width: 100%;
}

@media (min-width: 1081px) {
  .hero-profile-row > .filter-panel[open] {
    position: relative;
    height: 100%;
  }

  .hero-profile-row > .filter-panel[open] .filters {
    position: absolute;
    top: 66px;
    right: 0;
    bottom: 16px;
    left: 16px;
    width: auto;
    height: auto;
    padding-right: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
}

.hero-profile-row > .filter-panel .filters {
  grid-template-areas:
    "source"
    "period"
    "card"
    "reset";
  grid-template-columns: 1fr;
  align-content: start;
  align-items: stretch;
  justify-content: stretch;
}

.filters > label:nth-of-type(1) {
  grid-area: source;
}

.filters > label:nth-of-type(2) {
  grid-area: period;
}

.filter-reset-button {
  grid-area: reset;
  min-width: 92px;
  min-height: 42px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span,
.card-filter-panel legend,
.card-filter-footer span,
.source-box span,
.summary-pitch-heading span,
.collapsible-summary span,
th {
  color: var(--heading);
  font-family: var(--font-condensed);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

select,
input[type="search"] {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: #f8f9fa;
  background: var(--surface-soft);
  border: 1px solid rgba(218, 180, 95, 0.38);
  border-radius: 7px;
  outline: none;
}

select {
  background: var(--dropdown-bg);
}

select:disabled,
input[type="search"]:disabled {
  cursor: progress;
  opacity: 0.68;
}

select option {
  color: #f8f9fa;
  background: var(--dropdown-bg);
}

select option:disabled,
select option.is-empty-option,
select option[data-selectable="false"],
select option[data-has-decks="false"] {
  color: rgba(248, 249, 250, 0.34);
  background: var(--dropdown-bg);
}

select:focus,
input[type="search"]:focus,
button:focus-visible {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(218, 180, 95, 0.28);
}

button:focus-visible {
  outline: none;
}

input::placeholder {
  color: rgba(248, 249, 250, 0.54);
}

.card-filter-panel {
  grid-area: card;
  display: grid;
  grid-template-areas:
    "legend legend legend"
    "entry list footer";
  grid-template-columns: minmax(290px, 360px) minmax(220px, 1fr) minmax(150px, auto);
  align-items: end;
  gap: 8px 12px;
  min-width: 0;
  padding-top: 0;
  border-top: 0;
}

.hero-profile-row > .filter-panel .card-filter-panel {
  grid-template-areas:
    "legend"
    "entry"
    "list"
    "footer";
  grid-template-columns: 1fr;
  align-items: stretch;
  padding-top: 12px;
  border-top: 1px solid rgba(218, 180, 95, 0.18);
}

.card-filter-panel legend {
  grid-area: legend;
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.card-filter-entry {
  grid-area: entry;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(118px, 148px);
  gap: 8px;
  min-width: 0;
}

.card-filter-entry select,
.card-filter-entry input[type="search"] {
  min-height: 38px;
}

.card-filter-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 7px;
}

.card-filter-list {
  grid-area: list;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  overflow-x: auto;
  overflow-y: hidden;
}

.hero-profile-row > .filter-panel .card-filter-list {
  align-items: stretch;
  flex-direction: column;
  max-height: 132px;
  overflow-x: hidden;
  overflow-y: auto;
}

.card-filter-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  color: #f8f9fa;
  background: rgba(33, 37, 41, 0.42);
  border: 1px solid rgba(218, 180, 95, 0.32);
  border-radius: 7px;
}

.card-filter-chip em {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  color: #212529;
  background: var(--gold);
  border-radius: 5px;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.card-filter-chip.is-without em {
  color: #f8f9fa;
  background: var(--red-dark);
}

.card-filter-chip strong {
  overflow: hidden;
  font-size: 0.83rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-filter-remove {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #f8f9fa;
  background: transparent;
  border: 1px solid rgba(248, 249, 250, 0.22);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}

.card-filter-remove:hover {
  background: rgba(248, 249, 250, 0.1);
}

.card-filter-empty {
  margin: 0;
  color: #adb5bd;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: nowrap;
}

.hero-profile-row > .filter-panel .card-filter-empty {
  white-space: normal;
}

.card-filter-footer {
  grid-area: footer;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.hero-profile-row > .filter-panel .card-filter-footer {
  justify-content: space-between;
  white-space: normal;
}

.source-box {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(218, 180, 95, 0.24);
}

.source-box strong {
  overflow: hidden;
  color: #f8f9fa;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-box a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  color: #e9ecef;
  border: 1px solid rgba(218, 180, 95, 0.26);
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.source-box a:hover {
  color: #f8f9fa;
  background: rgba(218, 180, 95, 0.12);
  border-color: rgba(218, 180, 95, 0.42);
  text-decoration: none;
}

/* Buttons */
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-height: 38px;
  color: #212529;
  background: var(--gold);
  border: 1px solid #f8f9fa;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(248, 249, 250, 0.22);
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.icon-button:hover {
  background: var(--gold-bright);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.35;
}

.ghost-button {
  min-height: 38px;
  padding: 0 13px;
  color: #e9ecef;
  background: rgba(218, 180, 95, 0.08);
  border: 1px solid rgba(218, 180, 95, 0.42);
  border-radius: 7px;
  cursor: pointer;
}

.ghost-button:hover {
  color: #212529;
  background: var(--gold);
}

.text-button {
  min-height: 30px;
  padding: 0;
  color: var(--gold-bright);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
}

.text-button:hover {
  text-decoration: underline;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Hero */
.hero-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  color: #f8f9fa;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-overview-media {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 16px;
  background: var(--surface-strong);
  border: 1px solid color-mix(in srgb, var(--hero-accent) 80%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-overview-art {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  align-self: start;
  width: var(--hero-profile-art-width);
  max-width: 100%;
  aspect-ratio: 0.716;
  background: #343a40;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(33, 37, 41, 0.42);
}

.hero-overview-art img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-primary-image {
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.hero-primary-image.is-loaded {
  opacity: 1;
}

.hero-primary-placeholder {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: #343a40;
  font-weight: 900;
  opacity: 1;
  transition: opacity 180ms ease-out;
}

.hero-primary-image.is-loaded + .hero-primary-placeholder {
  opacity: 0;
}

.hero-empty-message {
  max-width: 860px;
  margin: 4px auto 0;
  color: #f8f9fa;
  font-family: var(--font-heading);
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.bar {
  height: 10px;
  overflow: hidden;
  background: rgba(248, 249, 250, 0.08);
  border: 1px solid rgba(218, 180, 95, 0.16);
  border-radius: 999px;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: inherit;
}

/* Stats Table */
.table-panel {
  display: flex;
  flex-direction: column;
  height: auto;
  overflow: visible;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(218, 180, 95, 0.22);
}

.cards-toolbar {
  position: static;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 0;
  background: var(--navbar-bg);
  border-bottom: 1px solid rgba(218, 180, 95, 0.28);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 14px 24px rgba(33, 37, 41, 0.22);
}

.panel-heading h2,
.panel-heading p {
  margin: 0;
}

.panel-heading h2 {
  overflow-wrap: anywhere;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.15;
}

.panel-heading p {
  margin-top: 5px;
  color: #ced4da;
}

.cards-heading {
  min-width: min(320px, 100%);
}

.results-heading {
  flex: 1 1 auto;
}

.cards-toolbar-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.results-sort-control {
  order: 1;
  width: min(176px, 100%);
  flex: 0 0 164px;
}

.export-csv-button {
  order: 2;
  flex: 0 0 auto;
  white-space: nowrap;
}

.card-view-tabs {
  order: 3;
  display: flex;
  align-items: flex-end;
  align-self: flex-end;
  gap: 0;
  margin-bottom: -1px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.card-view-tab {
  position: relative;
  z-index: 1;
  min-height: 36px;
  margin-top: 6px;
  padding: 0 16px;
  color: #ced4da;
  background: rgba(33, 37, 41, 0.88);
  border: 1px solid rgba(218, 180, 95, 0.24);
  border-bottom-color: rgba(218, 180, 95, 0.2);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 400;
  box-shadow: inset 0 1px 0 rgba(248, 249, 250, 0.08);
}

.card-view-tab:hover {
  color: #f8f9fa;
  border-color: rgba(218, 180, 95, 0.42);
  border-bottom-color: rgba(218, 180, 95, 0.24);
}

.card-view-tab.is-active {
  z-index: 2;
  min-height: 42px;
  margin-top: 0;
  color: #f8f9fa;
  background: rgba(52, 58, 64, 0.96);
  border-color: rgba(218, 180, 95, 0.38);
  border-bottom-color: rgba(52, 58, 64, 0.96);
  box-shadow:
    inset 0 2px 0 var(--gold),
    0 -8px 22px rgba(33, 37, 41, 0.22);
}

.card-view-tab:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cards-browser {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  min-height: 0;
  background: rgba(33, 37, 41, 0.26);
  border-top: 1px solid rgba(218, 180, 95, 0.38);
}

.card-type-tabs {
  position: sticky;
  top: calc(var(--nav-height) + 14px);
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  max-height: calc(100vh - var(--nav-height) - 28px);
  overflow: auto;
  background: var(--navbar-bg);
  border-right: 1px solid rgba(218, 180, 95, 0.2);
}

.card-type-tab {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  color: #ced4da;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
}

.card-type-tab:hover {
  color: #f8f9fa;
}

.card-type-tab.is-active {
  color: #212529;
  background: var(--gold);
  border-color: #f8f9fa;
}

.card-type-label {
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-type-icon {
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.card-type-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.card-type-icon-equipment,
.card-type-icon-weapon,
.card-type-icon-companion,
.card-type-icon-action,
.card-type-icon-attack-action,
.card-type-icon-instant,
.card-type-icon-defense-reaction,
.card-type-icon-attack-reaction,
.card-type-icon-resource,
.card-type-icon-block {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
}

.card-type-icon-equipment {
  -webkit-mask: url("/assets/card-type-equipment.png") center / contain no-repeat;
  mask: url("/assets/card-type-equipment.png") center / contain no-repeat;
}

.card-type-icon-weapon {
  -webkit-mask: url("/assets/card-type-weapon.png") center / contain no-repeat;
  mask: url("/assets/card-type-weapon.png") center / contain no-repeat;
}

.card-type-icon-companion {
  -webkit-mask: url("/assets/card-type-companion.png") center / contain no-repeat;
  mask: url("/assets/card-type-companion.png") center / contain no-repeat;
}

.card-type-icon-action {
  -webkit-mask: url("/assets/card-type-action.png") center / contain no-repeat;
  mask: url("/assets/card-type-action.png") center / contain no-repeat;
}

.card-type-icon-attack-action {
  -webkit-mask: url("/assets/card-type-attack-action.png") center / contain no-repeat;
  mask: url("/assets/card-type-attack-action.png") center / contain no-repeat;
}

.card-type-icon-instant {
  -webkit-mask: url("/assets/card-type-instant.png") center / contain no-repeat;
  mask: url("/assets/card-type-instant.png") center / contain no-repeat;
}

.card-type-icon-defense-reaction {
  -webkit-mask: url("/assets/card-type-defense-reaction.png") center / contain no-repeat;
  mask: url("/assets/card-type-defense-reaction.png") center / contain no-repeat;
}

.card-type-icon-attack-reaction {
  -webkit-mask: url("/assets/card-type-attack-reaction.png") center / contain no-repeat;
  mask: url("/assets/card-type-attack-reaction.png") center / contain no-repeat;
}

.card-type-icon-resource {
  -webkit-mask: url("/assets/card-type-resource.png") center / contain no-repeat;
  mask: url("/assets/card-type-resource.png") center / contain no-repeat;
}

.card-type-icon-block {
  -webkit-mask: url("/assets/card-type-block.png") center / contain no-repeat;
  mask: url("/assets/card-type-block.png") center / contain no-repeat;
}

.card-type-top-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 42px;
  min-height: 42px;
  margin-top: 0;
  padding: 0 12px;
  color: #dee2e6;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  text-align: left;
}

.card-type-top-button:hover,
.card-type-top-button:focus-visible {
  color: #f8f9fa;
}

.card-type-top-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.card-type-top-button .card-type-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-results {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-gallery {
  display: grid;
  gap: 28px;
  padding: 18px;
  overflow: visible;
}

.card-gallery[hidden],
.table-wrap[hidden] {
  display: none;
}

.gallery-card {
  display: grid;
  grid-template-rows: auto auto;
  align-self: start;
  justify-self: start;
  width: min(100%, var(--gallery-card-width));
  min-width: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.gallery-card:hover {
  transform: none;
}

.gallery-card.is-banned {
  border-color: transparent;
}

.gallery-card-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 0.716;
  overflow: hidden;
  background: #212529;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(33, 37, 41, 0.42);
}

.card-art-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card-art-link:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: -4px;
}

.gallery-card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button.card-hover-name {
  position: absolute;
  z-index: 4;
  bottom: 12px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(88%, 192px);
  min-height: 28px;
  padding: 2px 8px;
  overflow: hidden;
  color: transparent;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: text;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  white-space: nowrap;
}

.card-filter-apply-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.card-hover-name-text {
  display: block;
  transform: translateY(-2px);
}

.gallery-card:hover button.card-hover-name,
.hero-directory-card:hover button.card-hover-name,
.hero-overview-art:hover button.card-hover-name,
button.card-hover-name.is-copied,
button.card-hover-name:focus-visible {
  color: #f8f9fa;
  background: var(--navbar-bg);
  border-color: var(--line);
}

.gallery-card.is-nonlegal:hover .gallery-card-name,
.gallery-card.is-nonlegal .gallery-card-name.is-copied,
.gallery-card.is-nonlegal .gallery-card-name:focus-visible {
  color: var(--red-dark);
}

.gallery-card.is-banned:hover .gallery-card-name,
.gallery-card.is-banned .gallery-card-name.is-copied,
.gallery-card.is-banned .gallery-card-name:focus-visible {
  color: var(--banned-stamp-red);
}

.gallery-card.is-card-label-suppressed button.card-hover-name:not(.is-copied):not(:focus-visible),
.hero-directory-card.is-card-label-suppressed button.card-hover-name:not(.is-copied):not(:focus-visible),
.hero-overview-art.is-card-label-suppressed button.card-hover-name:not(.is-copied):not(:focus-visible) {
  color: transparent;
  background: transparent;
  border-color: transparent;
}

.gallery-card.is-banned .gallery-card-art img,
tbody tr.is-banned .card-hover-preview img {
  filter: grayscale(1) contrast(0.92) brightness(0.74);
}

.gallery-card.is-banned .gallery-card-art::after,
tbody tr.is-banned .card-hover-preview::after {
  content: "BANNED";
  position: absolute;
  z-index: 2;
  top: 38%;
  left: 50%;
  width: 76%;
  padding: 8px 12px 9px;
  color: var(--banned-stamp-red);
  background: rgba(33, 37, 41, 0.82);
  border: 5px solid #6c757d;
  border-radius: 8px;
  box-shadow:
    0 3px 0 rgba(33, 37, 41, 0.78),
    0 13px 26px rgba(33, 37, 41, 0.56);
  font-family: var(--font-condensed);
  font-size: 2.28rem;
  font-weight: 900;
  line-height: 0.9;
  pointer-events: none;
  text-align: center;
  text-shadow: 0 2px 0 rgba(33, 37, 41, 0.72);
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-24deg);
}

.gallery-card-body {
  display: grid;
  gap: 7px;
  padding: 8px 0 0;
}

.gallery-card-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  min-height: 54px;
}

.gallery-inclusion {
  display: grid;
  align-items: center;
  justify-content: start;
  gap: 3px;
  min-height: 36px;
  min-width: 0;
  padding: 4px 2px;
  color: #f8f9fa;
  background: transparent;
  border: 0;
  line-height: 1;
  text-align: left;
}

.gallery-inclusion-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.gallery-inclusion-main strong {
  overflow: hidden;
  color: #f8f9fa;
  font-size: 1.52rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-inclusion-main em {
  color: #f8f9fa;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 650;
}

.gallery-card-secondary-stats {
  display: grid;
  gap: 4px;
  justify-items: end;
  min-width: 70px;
}

.gallery-decks,
.gallery-average-copies,
.gallery-synergy {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  color: #f8f9fa;
  font-size: 0.9rem;
  line-height: 1.05;
  white-space: nowrap;
}

.gallery-decks strong,
.gallery-average-copies strong,
.gallery-synergy strong {
  font-weight: 900;
}

.gallery-decks em,
.gallery-average-copies em,
.gallery-synergy em {
  color: #f8f9fa;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 650;
}

.gallery-inclusion .gallery-decks {
  justify-content: flex-start;
}

.gallery-synergy.synergy-positive strong {
  color: var(--green);
}

.gallery-synergy.synergy-negative strong {
  color: var(--red-dark);
}

.card-hover-name.is-copied::after {
  content: attr(data-copy-feedback);
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 6px);
  padding: 4px 7px;
  color: #212529;
  background: var(--gold);
  border-radius: 5px;
  box-shadow: 0 10px 20px rgba(33, 37, 41, 0.38);
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.empty-card-view {
  grid-column: 1 / -1;
  margin: 0;
  padding: 34px 16px;
  color: #ced4da;
  text-align: center;
}

.table-wrap {
  overflow: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid rgba(218, 180, 95, 0.22);
  text-align: left;
  vertical-align: middle;
}

th {
  z-index: 1;
  background: #343a40;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-sort-button::after {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  opacity: 0;
}

.table-sort-button.is-active::after {
  opacity: 1;
}

th[aria-sort="ascending"] .table-sort-button::after {
  border-bottom: 6px solid var(--gold);
}

th[aria-sort="descending"] .table-sort-button::after {
  border-top: 6px solid var(--gold);
}

.table-sort-button:hover,
.table-sort-button:focus-visible,
.table-sort-button.is-active {
  color: var(--gold);
}

.card-type-section {
  display: grid;
  gap: 14px;
  scroll-margin-top: calc(var(--nav-height) + 18px);
}

.card-type-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(218, 180, 95, 0.22);
}

.card-type-section-heading h3 {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
}

.card-type-section-heading span {
  color: var(--heading);
  font-family: var(--font-condensed);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.gallery-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--gallery-card-width)), var(--gallery-card-width)));
  grid-auto-rows: max-content;
  justify-content: space-evenly;
  align-content: start;
  align-items: start;
  gap: 16px var(--gallery-card-gap);
}

.card-type-table-section {
  scroll-margin-top: calc(var(--nav-height) + 18px);
}

.card-type-table-section td {
  padding: 18px 12px 10px;
  background: rgba(33, 37, 41, 0.9);
  border-bottom-color: rgba(242, 209, 133, 0.34);
}

.card-type-table-section span {
  color: #f8f9fa;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
}

.card-type-table-section em {
  margin-left: 10px;
  color: var(--heading);
  font-family: var(--font-condensed);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

tbody tr:hover {
  background: rgba(218, 180, 95, 0.12);
}

tbody tr.is-nonlegal .card-name {
  color: var(--red-dark);
}

tbody tr.is-banned {
  background: rgba(73, 80, 87, 0.12);
}

.card-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  overflow: visible;
}

.card-cell:hover,
.card-cell:focus-within {
  z-index: 3;
}

.thumb {
  flex: 0 0 auto;
  width: 38px;
  height: 52px;
  overflow: hidden;
  background: #212529;
  border: 1px solid rgba(218, 180, 95, 0.42);
  border-radius: 5px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-hover-preview {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: calc(100% + 16px);
  display: grid;
  place-items: center;
  width: var(--gallery-card-width);
  aspect-ratio: 0.716;
  overflow: hidden;
  background: #212529;
  border: 1px solid rgba(242, 209, 133, 0.58);
  border-radius: 9px;
  box-shadow: 0 18px 46px rgba(33, 37, 41, 0.62);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.card-hover-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-cell:hover .card-hover-preview,
.card-cell:focus-within .card-hover-preview {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.thumb-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 8px;
  overflow: hidden;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-align: center;
}

.gallery-card-art .thumb-fallback,
.hero-overview-art .thumb-fallback,
.card-hover-preview .thumb-fallback {
  padding: 14px;
  font-size: 0.95rem;
}

.thumb .thumb-fallback {
  padding: 3px;
  font-size: 0.48rem;
  line-height: 1;
}

.card-name {
  display: block;
  overflow-wrap: anywhere;
  color: #f8f9fa;
  font-weight: 850;
  text-decoration: none;
}

a.card-name:hover,
a.card-name:focus-visible {
  color: var(--gold);
  text-decoration: none;
}

.card-meta {
  display: block;
  margin-top: 2px;
  color: #ced4da;
  font-size: 0.78rem;
}

.legality-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  color: #f8f9fa;
  background: rgba(248, 249, 250, 0.22);
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: none;
  vertical-align: middle;
}

.legality-badge.legality-banned {
  background: var(--red-dark);
}

.legality-badge.legality-not-legal {
  color: #212529;
  background: var(--gold);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #212529;
  background: var(--gold);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.badge.deck {
  color: #f8f9fa;
  background: #495057;
}

.badge.equipment {
  color: #212529;
  background: #dee2e6;
}

.appearance {
  display: grid;
  gap: 7px;
  min-width: 112px;
}

.appearance strong {
  font-size: 0.92rem;
}

.bar {
  width: 100%;
}

.synergy-positive {
  color: var(--green);
  font-weight: 850;
}

.synergy-negative {
  color: var(--red-dark);
  font-weight: 850;
}

.empty-row {
  padding: 34px 16px;
  color: #ced4da;
  text-align: center;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 24px var(--page-inline-gutter) 28px;
  color: #adb5bd;
  background: #343a40;
  border-top: 1px solid rgba(218, 180, 95, 0.24);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: #e9ecef;
  font-size: var(--site-navigation-font-size);
  font-weight: 650;
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #adb5bd;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer-disclaimer {
  display: grid;
  gap: 4px;
  max-width: 980px;
  color: #ced4da;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
}

.footer-disclaimer p {
  margin: 0;
}

.copy-toast {
  position: fixed;
  z-index: 40;
  right: auto;
  bottom: 28px;
  left: 50%;
  max-width: min(92vw, 520px);
  padding: 14px 18px;
  color: var(--cream);
  background: rgba(52, 58, 64, 0.95);
  border: 1px solid rgba(218, 180, 95, 0.35);
  border-radius: 7px;
  box-shadow: 0 18px 48px rgba(33, 37, 41, 0.5), 0 0 24px rgba(33, 37, 41, 0.5);
  font-size: 0.98rem;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Pitch */
.summary-pitch-card {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
}

.summary-pitch-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.summary-pitch-heading strong {
  margin-top: 0;
  color: var(--heading);
  font-size: 0.92rem;
  line-height: 1.2;
  text-align: right;
  white-space: normal;
}

.pitch-bars {
  display: grid;
  min-width: 0;
}

.pitch-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--pitch-bucket-count, 3), var(--chart-column-width));
  align-items: end;
  justify-content: center;
  gap: 5px;
  min-height: var(--distribution-chart-height);
  padding: 14px 8px 0;
  background-color: rgba(33, 37, 41, 0.28);
  border: 1px solid rgba(248, 249, 250, 0.16);
  border-radius: 7px;
}

.chart-grid {
  position: absolute;
  z-index: 0;
  inset: 14px 8px 24px;
  pointer-events: none;
}

.chart-grid-line {
  position: absolute;
  display: block;
}

.chart-grid-line.is-horizontal {
  top: var(--chart-line-position);
  right: 0;
  left: 0;
  border-top: 1px solid rgba(248, 249, 250, 0.14);
}

.chart-grid-line.is-vertical {
  top: 0;
  bottom: 0;
  left: var(--chart-line-position);
  border-left: 1px solid rgba(248, 249, 250, 0.08);
}

.pitch-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  height: calc(var(--distribution-chart-height) - 24px);
  min-width: 0;
  outline: none;
}

/* Chart colors are intentionally independent from the site theme. */
.pitch-red {
  --pitch-color: var(--chart-red);
}

.pitch-yellow {
  --pitch-color: var(--chart-yellow);
}

.pitch-blue {
  --pitch-color: var(--chart-blue);
}

.pitch-fill {
  display: block;
  width: 100%;
  min-height: 3px;
  height: var(--pitch-height);
  background: var(--pitch-color);
  border-radius: 4px 4px 0 0;
}

.pitch-bars.is-distribution-animating .pitch-fill {
  animation: pitch-bar-adjust 420ms cubic-bezier(0.18, 0.86, 0.32, 1);
}

.pitch-bar.is-empty .pitch-fill {
  background: rgba(248, 249, 250, 0.16);
}

.pitch-tooltip {
  position: absolute;
  z-index: 2;
  bottom: 34px;
  left: 50%;
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 112px;
  min-height: 32px;
  padding: 0 12px;
  color: #f8f9fa;
  background: #212529;
  border: 1px solid rgba(248, 249, 250, 0.95);
  box-shadow: 0 12px 18px rgba(33, 37, 41, 0.58);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 8px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  white-space: nowrap;
}

.pitch-bar:hover .pitch-tooltip,
.pitch-bar:focus .pitch-tooltip,
.pitch-bar:focus-visible .pitch-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pitch-bar:hover,
.pitch-bar:focus,
.pitch-bar:focus-visible {
  z-index: 3;
}

.pitch-tooltip span:first-child,
.cost-tooltip span:first-child {
  text-align: left;
}

.pitch-bar:focus-visible .pitch-fill {
  box-shadow: 0 0 0 2px rgba(248, 249, 250, 0.8);
}

.pitch-bar.is-edge-start .pitch-tooltip {
  left: 0;
  transform: translate(0, 8px);
}

.pitch-bar.is-edge-start:hover .pitch-tooltip,
.pitch-bar.is-edge-start:focus .pitch-tooltip,
.pitch-bar.is-edge-start:focus-visible .pitch-tooltip {
  transform: translate(0, 0);
}

.pitch-bar.is-edge-end .pitch-tooltip {
  right: 0;
  left: auto;
  transform: translate(0, 8px);
}

.pitch-bar.is-edge-end:hover .pitch-tooltip,
.pitch-bar.is-edge-end:focus .pitch-tooltip,
.pitch-bar.is-edge-end:focus-visible .pitch-tooltip {
  transform: translate(0, 0);
}

.pitch-bar em {
  color: #e9ecef;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  text-align: center;
}

/* Distributions */
.distribution-panel,
.cost-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.collapsible-panel {
  padding: 18px;
}

.collapsible-panel:not([open]) {
  padding-block: 14px;
}

.collapsible-panel:not([open]) > .collapsible-summary {
  align-items: center;
  min-height: 24px;
}

.filter-panel.collapsible-panel {
  padding: 16px;
}

.filter-panel.collapsible-panel:not([open]) {
  padding-block: 14px;
}

.collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  cursor: pointer;
  list-style: none;
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.collapsible-summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.collapsible-panel[open] > .collapsible-summary::after {
  transform: rotate(225deg);
}

.filter-panel > .filter-summary {
  position: relative;
  padding-right: 24px;
}

.filter-panel > .filter-summary::after {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%) rotate(45deg);
}

.filter-panel[open] > .filter-summary::after {
  transform: translateY(-50%) rotate(225deg);
}

.collapsible-summary:hover::after,
.collapsible-summary:focus-visible::after {
  border-color: #f8f9fa;
}

.collapsible-summary:focus-visible {
  outline: 2px solid rgba(242, 209, 133, 0.72);
  outline-offset: 6px;
}

.collapsible-summary h2 {
  min-width: 0;
  margin: 0;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}

.hero-layout-grid .collapsible-panel > .collapsible-summary {
  min-height: 52px;
  margin: -18px -18px 0;
  padding: 14px 18px;
  background: var(--gallery-navbar-bg);
  border-bottom: 1px solid var(--line);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.hero-layout-grid .filter-panel > .filter-summary {
  margin: -16px -16px 0;
  padding: 14px 40px 14px 16px;
}

.hero-layout-grid .filter-panel > .filter-summary::after {
  right: 18px;
}

.hero-layout-grid .collapsible-panel:not([open]) > .collapsible-summary {
  margin-top: -14px;
  margin-bottom: -14px;
  border-radius: calc(var(--radius) - 1px);
}

.deck-metrics-panel {
  --distribution-chart-height: var(--metrics-chart-height);
  --chart-column-width: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 18px;
  overflow: visible;
}

.deck-metrics-panel[open] {
  padding-bottom: 9px;
}

.deck-metrics-panel:not([open]) > :not(summary) {
  display: none;
}

.deck-metrics-panel:not([open]) {
  gap: 0;
}

.deck-metrics-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.deck-metrics-grid {
  display: grid;
  width: max-content;
  min-width: max-content;
  margin-inline: auto;
  grid-template-areas: "pitch cost type";
  grid-template-columns: max-content max-content 420px;
  grid-template-rows: auto;
  align-items: start;
  gap: 18px;
}

#pitch {
  grid-area: pitch;
}

#costPanel {
  grid-area: cost;
}

#distributions {
  --distribution-chart-height: var(--metrics-chart-height);
  grid-area: type;
  align-self: stretch;
  grid-template-rows: auto minmax(0, 1fr);
}

.deck-metric-block {
  position: relative;
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.deck-metric-block + .deck-metric-block {
  padding-left: 18px;
  border-left: 1px solid rgba(218, 180, 95, 0.22);
}

.distribution-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.distribution-heading span {
  color: var(--heading);
  font-family: var(--font-condensed);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.distribution-heading strong {
  color: var(--heading);
  font-size: 0.86rem;
  text-align: right;
}

.distribution-block {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.distribution-block h2 {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}

.type-distribution {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: var(--distribution-chart-height);
}

.type-wheel {
  position: relative;
  width: min(100%, max(240px, calc(var(--distribution-chart-height) - 60px)));
  aspect-ratio: 1;
  min-width: 0;
  transform: translateX(16px);
}

.type-pie {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(150px, 68%, 240px);
  aspect-ratio: 1;
  background: #212529;
  border: 1px solid rgba(248, 249, 250, 0.72);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(33, 37, 41, 0.34);
  transform: translate(-50%, -50%);
}

.type-slice-map {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: clamp(150px, 68%, 240px);
  aspect-ratio: 1;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.type-slice-hit {
  outline: none;
}

.type-pie-slice {
  fill: var(--distribution-color);
  pointer-events: all;
  stroke: rgba(248, 249, 250, 0.82);
  stroke-width: 0.5;
}

.type-slice-tooltip {
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.type-slice-hit:hover .type-slice-tooltip,
.type-slice-hit:focus .type-slice-tooltip,
.type-slice-hit:focus-visible .type-slice-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.type-slice-tooltip rect {
  fill: #212529;
  stroke: rgba(248, 249, 250, 0.95);
  stroke-width: 1;
  shape-rendering: crispEdges;
  filter: drop-shadow(0 12px 18px rgba(33, 37, 41, 0.58));
}

.type-slice-tooltip text {
  fill: #f8f9fa;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
}

.type-distribution.is-distribution-animating .type-pie {
  animation: type-wheel-adjust 440ms cubic-bezier(0.2, 0.84, 0.28, 1);
}

.type-distribution.is-distribution-animating.is-distribution-entering .type-pie {
  animation: type-wheel-enter 440ms cubic-bezier(0.18, 0.86, 0.32, 1);
}

.type-label-lines {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.type-label-line {
  fill: none;
  stroke: var(--distribution-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 0.45;
}

.type-distribution.is-distribution-animating .type-label-line {
  animation: type-line-draw 440ms ease-out both;
  stroke-dasharray: 24;
}

.type-pie-labels {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.type-pie-label {
  position: absolute;
  top: var(--label-y);
  z-index: 1;
  display: block;
  width: max-content;
  max-width: 150px;
  padding-inline: 2px;
  color: var(--distribution-color);
  background: var(--card-bg);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.15;
  overflow-wrap: normal;
  text-shadow: 0 1px 2px rgba(33, 37, 41, 0.72);
  transform: translateY(-50%);
  word-break: normal;
}

.type-distribution.is-distribution-animating .type-pie-label {
  animation: type-label-settle 360ms ease-out both;
}

.type-pie-label.is-right {
  left: var(--label-x);
  text-align: left;
}

.type-pie-label.is-left {
  right: calc(100% - var(--label-x));
  text-align: right;
}

.type-pie-label strong {
  font: inherit;
}

.cost-distribution {
  min-width: 0;
}

.cost-distribution.is-unavailable .distribution-empty {
  color: #ced4da;
  background: rgba(33, 37, 41, 0.24);
  border-style: solid;
}

.cost-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cost-bucket-count, 10), var(--chart-column-width));
  align-items: end;
  justify-content: center;
  gap: 5px;
  min-height: var(--distribution-chart-height);
  padding: 14px 8px 0;
  background-color: rgba(33, 37, 41, 0.28);
  border: 1px solid rgba(248, 249, 250, 0.16);
  border-radius: 7px;
}

.cost-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  height: calc(var(--distribution-chart-height) - 24px);
  min-width: 0;
  outline: none;
}

.cost-fill {
  display: block;
  width: 100%;
  min-height: 3px;
  height: var(--cost-height);
  background: var(--gold);
  border-radius: 4px 4px 0 0;
}

.cost-distribution.is-distribution-animating .cost-fill {
  animation: cost-bar-adjust 420ms cubic-bezier(0.18, 0.86, 0.32, 1);
}

.cost-bar.is-empty .cost-fill {
  background: rgba(248, 249, 250, 0.16);
}

.cost-tooltip {
  position: absolute;
  z-index: 2;
  bottom: 34px;
  left: 50%;
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 112px;
  min-height: 32px;
  padding: 0 12px;
  color: #f8f9fa;
  background: #212529;
  border: 1px solid rgba(248, 249, 250, 0.95);
  box-shadow: 0 12px 18px rgba(33, 37, 41, 0.58);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 8px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  white-space: nowrap;
}

.cost-bar:hover .cost-tooltip,
.cost-bar:focus .cost-tooltip,
.cost-bar:focus-visible .cost-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cost-bar:hover,
.cost-bar:focus,
.cost-bar:focus-visible {
  z-index: 3;
}

.cost-bar:focus-visible .cost-fill {
  box-shadow: 0 0 0 2px rgba(248, 249, 250, 0.8);
}

.cost-bar.is-edge-start .cost-tooltip {
  left: 0;
  transform: translate(0, 8px);
}

.cost-bar.is-edge-start:hover .cost-tooltip,
.cost-bar.is-edge-start:focus .cost-tooltip,
.cost-bar.is-edge-start:focus-visible .cost-tooltip {
  transform: translate(0, 0);
}

.cost-bar.is-edge-end .cost-tooltip {
  right: 0;
  left: auto;
  transform: translate(0, 8px);
}

.cost-bar.is-edge-end:hover .cost-tooltip,
.cost-bar.is-edge-end:focus .cost-tooltip,
.cost-bar.is-edge-end:focus-visible .cost-tooltip {
  transform: translate(0, 0);
}

.cost-bar em {
  color: #e9ecef;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  text-align: center;
}

.distribution-empty {
  display: grid;
  place-items: center;
  min-height: var(--distribution-chart-height);
  margin: 0;
  padding: 16px;
  color: #adb5bd;
  background: rgba(33, 37, 41, 0.24);
  border: 1px dashed rgba(218, 180, 95, 0.24);
  border-radius: 7px;
  font-size: 0.82rem;
  text-align: center;
}

@keyframes pitch-bar-adjust {
  from {
    height: var(--pitch-start-height, 0%);
    filter: brightness(1.18);
  }

  to {
    height: var(--pitch-height);
    filter: brightness(1);
  }
}

@keyframes cost-bar-adjust {
  from {
    height: var(--cost-start-height, 0%);
    filter: brightness(1.18);
  }

  to {
    height: var(--cost-height);
    filter: brightness(1);
  }
}

@keyframes type-wheel-adjust {
  from {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0.94) rotate(-8deg);
  }

  68% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.025) rotate(1.5deg);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@keyframes type-wheel-enter {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(-12deg);
  }

  68% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.025) rotate(1.5deg);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@keyframes type-line-draw {
  from {
    opacity: 0;
    stroke-dashoffset: 24;
  }

  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes type-label-settle {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 5px));
  }

  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-skeleton-block,
  .route-skeleton-line {
    animation: none;
  }

  .hero-primary-image,
  .hero-primary-placeholder {
    transition: none;
  }

  .pitch-bars.is-distribution-animating .pitch-fill,
  .cost-distribution.is-distribution-animating .cost-fill,
  .type-distribution.is-distribution-animating .type-pie,
  .type-distribution.is-distribution-animating.is-distribution-entering .type-pie,
  .type-distribution.is-distribution-animating .type-label-line,
  .type-distribution.is-distribution-animating .type-pie-label {
    animation: none;
  }
}

/* Average Deck */
.average-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: auto;
  min-height: 0;
}

.average-body {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.average-panel[open] .average-body {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.average-panel:not([open]) > :not(summary) {
  display: none;
}

.average-panel:not([open]) {
  grid-template-rows: auto;
  gap: 0;
}

.average-panel:not([open]) .average-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.average-summary {
  align-items: baseline;
}

.average-summary > div,
.average-summary > h2 {
  min-width: 0;
}

.average-summary strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
}

.average-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.average-actions .ghost-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.fabrary-export-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: #212529;
  border: 1px solid rgba(218, 180, 95, 0.32);
  border-radius: 7px;
}

.fabrary-export-help[hidden] {
  display: none;
}

.fabrary-export-help .ghost-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: #e9ecef;
  font-size: 0.82rem;
  text-decoration: none;
}

.average-panel p {
  margin: 0;
  color: #ced4da;
  font-size: 0.86rem;
  line-height: 1.45;
}

#averageDeckList {
  display: block;
  align-self: stretch;
  height: 100%;
  max-height: none;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 14px;
  color: #f8f9fa;
  background: #212529;
  border: 1px solid rgba(218, 180, 95, 0.22);
  border-radius: 7px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Responsive */
@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .top-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links {
    justify-content: flex-end;
  }

  .filters {
    grid-template-areas:
      "period source reset"
      "card card card";
    grid-template-columns: minmax(140px, 190px) minmax(140px, 170px) auto;
    justify-content: start;
  }

  .card-filter-panel {
    grid-template-columns: minmax(290px, 360px) minmax(0, 1fr) minmax(150px, auto);
    padding-top: 12px;
    border-top: 1px solid rgba(218, 180, 95, 0.18);
  }

  .source-box {
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: start;
    gap: 8px 12px;
    min-width: 0;
  }

  .hero-layout-grid,
  .hero-layout-grid:has(.filter-panel[open]),
  .hero-layout-grid:has(.average-panel[open]),
  .hero-layout-grid:has(.deck-metrics-panel[open]):not(:has(.filter-panel[open])):not(:has(.average-panel[open])) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: start;
    min-height: 0;
  }

  .hero-layout-grid .hero-profile-row > .hero-overview,
  .hero-layout-grid:has(.filter-panel[open]) .hero-profile-row > .hero-overview,
  .hero-layout-grid:has(.average-panel[open]) .hero-profile-row > .hero-overview,
  .hero-layout-grid:has(.deck-metrics-panel[open]):not(:has(.filter-panel[open])):not(:has(.average-panel[open])) .hero-profile-row > .hero-overview,
  .hero-profile-row > .hero-empty-message,
  .hero-profile-row > .filter-panel,
  .hero-profile-row > .average-panel,
  .metrics-average-row > .deck-metrics-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .hero-profile-row > .filter-panel {
    height: auto;
    max-height: none;
    overflow: visible;
    contain: none;
  }

  .hero-profile-row > .filter-panel[open] {
    height: auto;
    max-height: none;
    overflow: visible;
    contain: none;
  }

  .hero-profile-row > .average-panel {
    height: auto;
  }

  .hero-profile-row > .average-panel[open] {
    overflow: visible;
  }

  .hero-profile-row .filters {
    overflow: visible;
  }

  .metrics-average-row > details[open].deck-metrics-panel,
  .metrics-average-row > .deck-metrics-panel {
    --metrics-chart-height: 180px;
    height: auto;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .format-card-grid {
    grid-template-columns: 1fr;
  }

  .directory-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-heading p {
    text-align: left;
  }

  .format-heading-tools,
  .format-directory-filters {
    justify-content: flex-start;
  }

  .table-panel,
  .cost-panel,
  details[open].deck-metrics-panel,
  details[open].average-panel,
  .deck-metrics-panel,
  .average-panel {
    height: auto;
  }

  .hero-overview,
  .side-stack {
    height: auto;
  }

  .card-gallery,
  .table-wrap {
    max-height: none;
    overflow: visible;
  }

  .side-stack {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .site-footer {
    gap: 16px;
  }
}

@media (max-width: 720px) {
  :root {
    --page-inline-gutter: 16px;
    --site-navigation-font-size: 1rem;
  }

  .top-nav {
    align-items: flex-start;
    padding: 0 var(--page-inline-gutter);
  }

  .top-nav {
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .nav-brand {
    flex: 1 1 auto;
  }

  .nav-links,
  .nav-actions {
    flex: 1 1 100%;
    width: auto;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .top-nav .nav-links {
    display: none;
  }

  .nav-menu-toggle {
    display: grid;
  }

  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
  }

  .nav-brand {
    min-width: 0;
  }

  .nav-links a,
  .nav-actions a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  #distributions {
    --distribution-chart-height: var(--metrics-chart-height);
  }

  .deck-metrics-scroll {
    overflow: visible;
  }

  .deck-metrics-grid {
    width: 100%;
    min-width: 0;
    margin-inline: 0;
    grid-template-areas:
      "pitch"
      "cost"
      "type";
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .deck-metric-block + .deck-metric-block {
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid rgba(218, 180, 95, 0.22);
    border-left: 0;
  }

  .cost-chart {
    grid-template-columns: repeat(var(--cost-bucket-count, 10), minmax(0, 1fr));
  }

  .type-wheel {
    width: min(100%, 240px);
    transform: none;
  }

  .main-view {
    padding: 18px var(--page-inline-gutter);
  }

  .detail-view {
    padding-top: 18px;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .route-hero {
    min-height: 0;
    padding: 0 0 24px;
  }

  .landing-view .route-hero {
    padding: 21px 0 39px;
  }

  .route-hero .landing-source {
    margin-top: 7.5px;
    font-size: 0.82rem;
  }

  .route-hero h1 {
    font-size: 2.75rem;
  }

  .landing-view .route-hero > p:not(.landing-source) {
    font-size: 1.05rem;
  }

  .directory-heading .format-page-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .format-card strong {
    font-size: clamp(1.75rem, 7vw, 2.05rem);
  }

  .hero-directory-grid {
    grid-template-columns: minmax(0, min(100%, var(--gallery-card-width)));
    justify-content: center;
    justify-items: center;
  }

  .hero-directory-card {
    justify-self: center;
  }

  .gallery-section-grid {
    grid-template-columns: minmax(0, min(100%, var(--gallery-card-width)));
    justify-content: center;
    justify-items: center;
  }

  .gallery-card {
    justify-self: center;
  }

  .site-footer {
    padding: 20px var(--page-inline-gutter);
  }

  #averageDeckList {
    max-height: 320px;
  }

  .format-heading-tools,
  .format-directory-filters {
    width: 100%;
    min-width: 0;
  }

  .format-filters-panel {
    width: 100%;
  }

  .format-filters-panel > .format-filters-summary {
    display: flex;
    justify-content: flex-end;
    min-height: 54px;
    padding: 14px 18px;
    background: var(--gallery-navbar-bg);
    border-bottom: 1px solid var(--line);
  }

  .format-filters-summary::after {
    display: none;
    content: none;
  }

  .format-filters-icon {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: var(--gold);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .format-filters-icon-line {
    transform-box: view-box;
    transform-origin: center;
    transition: opacity 160ms ease, transform 220ms ease;
  }

  .format-filters-icon-line:nth-child(1) {
    transform: translateY(-7px);
  }

  .format-filters-icon-line:nth-child(3) {
    transform: translateY(7px);
  }

  .format-filters-icon-knobs {
    fill: var(--gallery-navbar-bg);
    transition: opacity 160ms ease;
  }

  .format-filters-panel[open] .format-filters-icon-line:nth-child(1) {
    transform: rotate(45deg);
  }

  .format-filters-panel[open] .format-filters-icon-line:nth-child(2),
  .format-filters-panel[open] .format-filters-icon-knobs {
    opacity: 0;
  }

  .format-filters-panel[open] .format-filters-icon-line:nth-child(3) {
    transform: rotate(-45deg);
  }

  .format-directory-filters label {
    flex: 1 1 190px;
    width: auto;
    min-width: min(100%, 190px);
  }

  .filters {
    grid-template-areas:
      "period"
      "source"
      "card"
      "reset";
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .card-filter-panel,
  .card-filter-entry {
    grid-template-areas:
      "legend"
      "entry"
      "list"
      "footer";
    grid-template-columns: 1fr;
  }

  .card-filter-entry {
    grid-template-areas: none;
  }

  .card-filter-list {
    align-items: stretch;
    flex-direction: column;
    max-height: 132px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .card-filter-empty {
    white-space: normal;
  }

  .card-filter-footer {
    justify-content: space-between;
    white-space: normal;
  }

  .source-box {
    flex: 1 1 100%;
    width: auto;
    max-width: 100%;
    gap: 7px 10px;
  }

  .hero-overview {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-overview-media {
    justify-self: center;
    width: 100%;
  }

  .hero-overview-art {
    justify-self: center;
    width: min(100%, var(--hero-profile-art-width));
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .cards-toolbar {
    gap: 12px;
  }

  .cards-toolbar-controls {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .results-sort-control {
    flex: 1 1 auto;
    width: 100%;
  }

  .card-view-tabs {
    align-self: flex-end;
    justify-content: flex-end;
    margin-bottom: -1px;
    padding: 0;
  }

  .card-view-tab {
    flex: 0 1 auto;
  }

  .cards-browser {
    grid-template-columns: 1fr;
  }

  .card-type-tabs {
    grid-auto-columns: minmax(146px, 1fr);
    grid-auto-flow: column;
    grid-template-columns: none;
    width: 100%;
    max-width: 100%;
    gap: 0;
    padding: 0 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(218, 180, 95, 0.2);
    overflow-x: auto;
  }

  .card-gallery {
    gap: 22px;
    padding: 12px;
  }

  .gallery-section-grid {
    gap: 12px var(--gallery-card-gap);
  }

  .gallery-card-body {
    padding: 8px 0 0;
  }

  .gallery-card button.card-hover-name,
  .hero-directory-card button.card-hover-name,
  .hero-overview-art button.card-hover-name,
  .gallery-card.is-card-label-suppressed button.card-hover-name:not(.is-copied):not(:focus-visible),
  .hero-directory-card.is-card-label-suppressed button.card-hover-name:not(.is-copied):not(:focus-visible),
  .hero-overview-art.is-card-label-suppressed button.card-hover-name:not(.is-copied):not(:focus-visible) {
    color: #f8f9fa;
    background: var(--navbar-bg);
    border-color: var(--line);
  }

  .gallery-card.is-nonlegal .gallery-card-name {
    color: var(--red-dark);
  }

  .gallery-card.is-banned .gallery-card-name {
    color: var(--banned-stamp-red);
  }

  .gallery-card-stats {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  tbody tr {
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  tbody tr:hover {
    background: rgba(218, 180, 95, 0.12);
  }

  th,
  td {
    padding: 8px 0;
  }

  td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--heading);
    font-family: var(--font-condensed);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  td:first-child {
    display: block;
    padding-top: 0;
  }

  td:first-child::before {
    content: none;
  }

  .card-type-table-section {
    padding: 0;
    background: transparent;
  }

  .card-type-table-section td {
    display: block;
    padding: 0 0 10px;
    background: transparent;
  }

  .card-type-table-section td::before {
    content: none;
  }

  .card-type-table-section em {
    display: block;
    margin: 4px 0 0;
  }

  .card-cell {
    min-width: 0;
  }

  .appearance {
    min-width: 116px;
  }

  .content-grid {
    gap: 16px;
  }
}
