@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --bg: #0b131c;
  --bg-alt: #101b27;
  --surface: #142434;
  --surface-2: #1a2d3f;
  --accent: #f6c454;
  --accent-2: #93d2f3;
  --text: #f6f2eb;
  --muted: #b4c2cc;
  --border: #2a3f52;
  --good: #8ef0b7;
  --mid: #f3c164;
  --bad: #ff8a8a;
}

@media (max-width: 900px) {
  .set-duel-rankings-page .set-duel-right-meta {
    display: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, rgba(246, 196, 84, 0.23), transparent 56%),
    radial-gradient(circle at 18% 18%, rgba(147, 210, 243, 0.3), transparent 52%),
    radial-gradient(circle at 88% 82%, rgba(86, 165, 228, 0.16), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.uk-conversion-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(180, 83, 9, 0.16));
  color: #f8e7c2;
}

.set-page .page.with-banner.has-uk-conversion-notice {
  padding-top: 12px;
}

.card-rankings-page .page.with-banner.has-card-confidence-notice {
  padding-top: 12px;
}

.card-opportunities-page .page.with-banner.has-card-confidence-notice {
  padding-top: 12px;
}

.slab-opportunities-page .page.with-banner.has-card-confidence-notice {
  padding-top: 12px;
}

.uk-conversion-notice-text {
  font-size: 0.93rem;
  line-height: 1.45;
}

.uk-conversion-notice-close {
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(15, 23, 42, 0.28);
  color: #f8e7c2;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.uk-conversion-notice-close:hover {
  background: rgba(15, 23, 42, 0.45);
}

.top-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  height: 56px;
  background: rgba(15, 20, 24, 0.92);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.top-banner.is-scrolled {
  background: rgba(15, 20, 24, 0.18);
  border-bottom-color: rgba(44, 59, 71, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.banner-title {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  word-spacing: 0;
  text-transform: none;
  color: transparent;
  background: linear-gradient(
    110deg,
    #dff2ff 0%,
    #dff2ff 10%,
    #e7bd67 26%,
    #f6c454 38%,
    #f6c454 62%,
    #e7bd67 74%,
    #dff2ff 90%,
    #dff2ff 100%
  );
  background-size: 200% 100%;
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 10px rgba(246, 196, 84, 0.2);
  text-decoration: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: title-shimmer 3.6s linear infinite;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

@keyframes title-shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: -200% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .banner-title {
    animation: none;
  }
}

.banner-left {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-right {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-view-mode-indicator {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(154, 176, 206, 0.42);
  background: rgba(148, 163, 184, 0.16);
  color: #d6e2f3;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.admin-view-mode-indicator.is-preview {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.18);
  color: #ffe8b0;
}

.banner-search {
  margin-right: 16px;
}

.banner-notification-wrap {
  position: relative;
}

.banner-notification-button,
.banner-notification-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: transparent;
  padding: 0;
  opacity: 0.72;
  cursor: pointer;
  transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.banner-notification-button:hover,
.banner-notification-button:focus-visible,
.banner-notification-link:hover,
.banner-notification-link:focus-visible {
  opacity: 0.96;
  border-color: var(--accent-2);
  background: rgba(147, 210, 243, 0.12);
  outline: none;
}

.banner-notification-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.banner-notification-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 0;
  background: #fdda0d;
  color: #0f1418;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(15, 20, 24, 0.94), 0 0 10px rgba(245, 158, 11, 0.28);
}

.banner-notification-badge[hidden] {
  display: none;
}

.banner-notification-dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  width: min(288px, calc(100vw - 24px));
  max-height: min(420px, calc(100vh - 78px));
  overflow: auto;
  display: none;
  background: #1c2a39;
  border: 1px solid rgba(154, 176, 206, 0.28);
  border-radius: 4px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
  z-index: 36;
}

.banner-notification-dropdown.open {
  display: block;
}

.notification-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(154, 176, 206, 0.18);
}

.notification-dropdown-head strong {
  color: #f3f7fd;
  font-size: 0.86rem;
}

.notification-dropdown-head button {
  border: 0;
  background: transparent;
  color: #f3f7fd;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.notification-dropdown-head button:hover,
.notification-dropdown-head button:focus-visible {
  color: var(--accent);
  outline: none;
}

.notification-list {
  display: grid;
}

.notification-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 18px;
  gap: 7px;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(154, 176, 206, 0.14);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-dot {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
  background: transparent;
}

.notification-item.is-unread .notification-dot {
  background: #9b5cff;
}

.notification-copy {
  min-width: 0;
}

.notification-copy strong {
  display: block;
  color: #f3f7fd;
  font-size: 0.86rem;
  line-height: 1.25;
}

.notification-copy p {
  margin: 5px 0 0;
  color: #aeb9ca;
  font-size: 0.78rem;
  line-height: 1.32;
}

.notification-time {
  display: block;
  margin-top: 5px;
  color: #8b98aa;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.notification-dismiss-button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #aeb9ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  opacity: 0.72;
}

.notification-dismiss-button:hover,
.notification-dismiss-button:focus-visible {
  opacity: 1;
  color: #f3f7fd;
  background: rgba(154, 176, 206, 0.14);
  outline: none;
}

.notification-empty {
  padding: 18px 14px;
  color: #aeb9ca;
  font-size: 0.84rem;
}

.profile-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.profile-button:hover {
  border-color: var(--accent-2);
  background: rgba(147, 210, 243, 0.12);
}

.profile-button.is-pro {
  position: relative;
  overflow: visible;
}

.profile-button.is-pro::after {
  content: "PRO";
  position: absolute;
  top: calc(100% - 12px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.53rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  line-height: 1;
  padding: 3px 5px 3px 6px;
  border-radius: 999px;
  color: #f6e9ff;
  border: 1px solid rgba(232, 190, 255, 0.45);
  background:
    linear-gradient(120deg, rgba(51, 22, 72, 0.95), rgba(88, 40, 119, 0.95) 45%, rgba(170, 130, 43, 0.9) 100%);
  box-shadow:
    0 0 0 1px rgba(22, 10, 32, 0.5) inset,
    0 4px 12px rgba(26, 12, 42, 0.45),
    0 0 12px rgba(235, 196, 86, 0.28);
  text-shadow: 0 0 10px rgba(255, 232, 169, 0.34);
  animation: pro-glisten 2.6s ease-in-out infinite;
  pointer-events: none;
}

.profile-wrap {
  position: relative;
}

.profile-icon {
  width: 20px;
  height: 20px;
  position: relative;
  display: inline-block;
}

.profile-icon::before,
.profile-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
}

.profile-icon::before {
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--text);
}

.profile-icon::after {
  top: 12px;
  width: 18px;
  height: 8px;
  border: 2px solid var(--text);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}

.profile-button.has-avatar .profile-icon {
  display: none;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.banner-search {
  position: relative;
}

.banner-search-input {
  width: 220px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 24, 0.6);
  color: var(--text);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .banner-search-input {
    width: 160px;
  }
}

@media (max-width: 768px) {
  .banner-title {
    font-size: 0;
    letter-spacing: 0;
    gap: 0;
    text-shadow: none;
    animation: none;
    background: none;
    color: transparent;
  }

  .banner-search {
    display: none;
  }

  .admin-view-mode-indicator {
    display: none;
  }

  .banner-right {
    right: 14px;
  }

  .banner-notification-dropdown {
    right: 0;
  }
}

.banner-search-input:focus {
  outline: none;
  border-color: var(--accent-2);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  display: none;
  max-height: 260px;
  overflow: auto;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  z-index: 30;
}

.search-dropdown.open {
  display: block;
}

.search-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
}

.search-option span {
  color: var(--muted);
  font-size: 0.75rem;
}

.search-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.menu-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-button:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.locale-flag {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.76;
}

.locale-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.locale-flag.is-active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px rgba(147, 210, 243, 0.35);
  opacity: 1;
}

.menu-icon {
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  display: inline-block;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

.menu-dropdown {
  position: absolute;
  top: 44px;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-width: 190px;
  display: none;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.menu-dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}

.menu-dropdown .menu-section-label {
  margin: 10px 10px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #9ab0ce;
}

.menu-dropdown .menu-section-label:first-child {
  margin-top: 2px;
}

.menu-dropdown .menu-section-label:not(:first-child) {
  padding-top: 6px;
}

.menu-dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.menu-dropdown.open {
  display: block;
}

.profile-dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  display: none;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  z-index: 35;
}

.profile-dropdown.open {
  display: block;
}

.profile-dropdown a,
.profile-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: rgba(255, 255, 255, 0.06);
}

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

.with-banner {
  padding-top: 24px;
}

.portfolio-page .page.with-banner {
  padding-top: 12px;
}

.home {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-page .home-hero {
  position: relative;
  z-index: 0;
  isolation: isolate;
  align-items: flex-start;
  margin-bottom: 0;
}

.home-page .home-hero > div:first-child {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-inline: auto;
}

.home-page .home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 16px;
  width: min(420px, 100%);
}

.metric-card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 0;
}

/* Tablet: hide Quick actions and keep Latest sets + Top sets on one row. */
@media (max-width: 980px) and (min-width: 701px) {
  .home-page .home-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .home-page .home-grid .home-card:first-child {
    display: none;
  }
}

.home-featured-cards + .home-grid {
  margin-top: 0;
}

.home-card {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.home-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.search-wrap {
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}

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

.top-investments-page .hero > div {
  width: 100%;
}

.set-rankings-page .hero .subhead {
  max-width: none;
  white-space: nowrap;
}

.card-rankings-page .hero .subhead,
.card-opportunities-page .hero .subhead,
.slab-opportunities-page .hero .subhead,
.card-rankings-page .comparison-head.stacked p,
.card-opportunities-page .comparison-head.stacked p {
  max-width: none;
  white-space: nowrap;
}

.card-rankings-page .hero {
  align-items: flex-end;
}

.card-rankings-hero-controls {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 34px;
  flex-wrap: nowrap;
}

.supply-metric-control {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  color: #9ab0ce;
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.supply-metric-control .duel-filter-select {
  min-width: 150px;
}

.card-rankings-supply-metric {
  flex: 0 0 auto;
}

.card-rankings-top-actions {
  display: contents;
}

.card-rankings-filter-row {
  display: contents;
}

.slab-opportunities-top-actions,
.slab-opportunities-filter-row,
.grading-opportunities-top-actions,
.grading-opportunities-filter-row {
  display: contents;
}

.card-rankings-page .card-rankings-top-actions > .sr-only {
  display: none;
}

.slab-opportunities-page .slab-opportunities-top-actions > .sr-only {
  display: none;
}

.grading-opportunities-page .grading-opportunities-top-actions > .sr-only {
  display: none;
}

.card-rankings-page .duel-opportunity-links {
  order: 2;
}

.card-rankings-page .card-rankings-supply-metric {
  order: 3;
}

.card-rankings-page .duel-leaderboard-controls {
  order: 4;
}

.card-rankings-page #cardRankingsSortBy {
  order: 5;
}

.slab-opportunities-page .duel-opportunity-links {
  order: 2;
}

.slab-opportunities-page .slab-opportunities-supply-metric {
  order: 3;
}

.slab-opportunities-page .duel-leaderboard-controls {
  order: 4;
}

.slab-opportunities-page #slabOpportunitiesSortBy {
  order: 5;
}

.grading-opportunities-page .duel-opportunity-links {
  order: 2;
}

.grading-opportunities-page .grading-opportunities-supply-metric {
  order: 3;
}

.grading-opportunities-page .grading-low-pop-control {
  order: 4;
}

.grading-opportunities-page #gradingOpportunitiesSortBy {
  order: 5;
}

.card-opportunities-page .hero {
  align-items: flex-end;
}

.slab-opportunities-page .hero {
  align-items: flex-end;
}

.grading-opportunities-page .hero {
  align-items: flex-end;
}

.card-rankings-hero-confidence-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}

.card-rankings-hero-confidence-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.card-rankings-hero-confidence.conf-badge {
  font-size: 1.25rem;
  line-height: 1;
  padding: 12px 18px;
  min-width: 96px;
  justify-content: center;
}

.grading-opportunities-page .hero .subhead {
  max-width: none;
  white-space: normal;
}

@media (max-width: 1200px) {
  .card-rankings-page .hero .subhead,
  .card-opportunities-page .hero .subhead,
  .slab-opportunities-page .hero .subhead {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.portfolio-analysis-page .hero .subhead {
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.home-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.home-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.home-list a {
  color: var(--text);
  text-decoration: none;
}

.home-top-play-set-blur {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.home-top-play-price-blur {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.home-list a.specialty-set {
  color: #d995ad;
}

#homeLatestSets li {
  display: block;
}

#homeLatestSets .series-date {
  margin-left: 0;
}

.home-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(246, 196, 84, 0.15), rgba(147, 210, 243, 0.08));
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin-top: 24px;
}

.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 14, 18, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1400;
}

.auth-overlay[hidden] {
  display: none;
}

.auth-modal {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100dvh - 48px);
  margin: 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: grid;
  gap: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: auth-pop 0.25s ease;
}

.auth-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.auth-actions {
  display: grid;
  gap: 12px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.auth-field input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent-2);
}

.auth-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.auth-provider:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 196, 84, 0.6);
  background: rgba(246, 196, 84, 0.12);
}

.auth-provider.google:hover {
  border-color: rgba(66, 133, 244, 0.7);
  background: rgba(66, 133, 244, 0.12);
}

.auth-provider.discord:hover {
  border-color: rgba(88, 101, 242, 0.7);
  background: rgba(88, 101, 242, 0.12);
}

.auth-provider.google,
.auth-provider.discord {
  color: #ffffff;
}

.auth-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #111;
  background: #ffffff;
}

.auth-icon.google {
  background: conic-gradient(#4285f4 0 25%, #34a853 25% 50%, #fbbc05 50% 75%, #ea4335 75% 100%);
  border: none;
}

.auth-icon.email {
  background: rgba(147, 210, 243, 0.7);
  color: #0f1418;
  border: none;
}

.auth-icon.discord {
  background: #5865f2;
  color: #fff;
  border: none;
}

.auth-toggle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.auth-toggle button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.auth-status {
  min-height: 18px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.auth-status.is-error {
  color: var(--bad);
}

.auth-status.is-success {
  color: var(--good);
}

.auth-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Clerk social button label color */
.cl-socialButtonsProviderButtonText,
.cl-socialButtonsProviderButton__google .cl-socialButtonsProviderButtonText,
.cl-socialButtonsProviderButton__discord .cl-socialButtonsProviderButtonText {
  color: #ffffff !important;
}

/* Extra specificity for Clerk-rendered auth dialog */
.cl-card .cl-socialButtonsProviderButtonText,
.cl-modalContent .cl-socialButtonsProviderButtonText,
.cl-rootBox .cl-socialButtonsProviderButtonText,
.cl-cardBox .cl-socialButtonsProviderButtonText {
  color: #ffffff !important;
}

/* Force Clerk modal to true viewport center */
.cl-modalBackdrop {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
}

.cl-modalContent,
.cl-rootBox,
.cl-cardBox {
  margin: 0 auto !important;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .page {
  pointer-events: none;
  user-select: none;
}

@keyframes auth-pop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pro-glisten {
  0% {
    box-shadow:
      0 0 0 1px rgba(22, 10, 32, 0.5) inset,
      0 4px 12px rgba(26, 12, 42, 0.45),
      0 0 8px rgba(235, 196, 86, 0.2);
    filter: brightness(0.96);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(22, 10, 32, 0.5) inset,
      0 6px 15px rgba(26, 12, 42, 0.5),
      0 0 16px rgba(235, 196, 86, 0.42);
    filter: brightness(1.08);
  }
  100% {
    box-shadow:
      0 0 0 1px rgba(22, 10, 32, 0.5) inset,
      0 4px 12px rgba(26, 12, 42, 0.45),
      0 0 8px rgba(235, 196, 86, 0.2);
    filter: brightness(0.96);
  }
}

@media (max-width: 900px) {
  .home-metrics {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

body:not(.home-page) .page.with-banner {
  position: relative;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.hero .subhead {
  max-width: min(920px, 100%);
}

.hero-back-link {
  position: absolute;
  top: 0;
  right: 0;
}

h1 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  margin: 0 0 12px;
}

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

.set-logo {
  height: 64px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  flex-shrink: 0;
}

.home-page .home-brand-title {
  position: relative;
  z-index: 0;
  display: inline-block;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(2.7rem, 5.2vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: #f8fbff;
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.22),
    0 0 30px rgba(255, 255, 255, 0.1);
}

.home-page .home-brand-title::before,
.home-page .home-brand-title::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

.home-page .home-brand-title::before {
  width: 160%;
  height: 180%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 34%, rgba(255, 255, 255, 0) 70%);
  filter: blur(16px);
}

.home-page .home-brand-title::after {
  width: 190%;
  height: 220%;
  background:
    conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0.18) 0deg,
      rgba(255, 255, 255, 0.02) 14deg,
      rgba(255, 255, 255, 0) 38deg,
      rgba(255, 255, 255, 0.12) 52deg,
      rgba(255, 255, 255, 0.01) 64deg,
      rgba(255, 255, 255, 0) 98deg,
      rgba(255, 255, 255, 0.11) 124deg,
      rgba(255, 255, 255, 0.02) 142deg,
      rgba(255, 255, 255, 0) 182deg,
      rgba(255, 255, 255, 0.15) 204deg,
      rgba(255, 255, 255, 0.02) 222deg,
      rgba(255, 255, 255, 0) 262deg,
      rgba(255, 255, 255, 0.12) 286deg,
      rgba(255, 255, 255, 0.02) 304deg,
      rgba(255, 255, 255, 0) 346deg,
      rgba(255, 255, 255, 0.18) 360deg
    );
  opacity: 0.45;
  filter: blur(10px);
  animation: none;
}

.home-page .home-brand-subtitle,
.home-page .subhead.home-subhead,
.home-page .home-actions {
  position: relative;
  z-index: 1;
}

.home-page .home-benchmark,
.home-page .home-franchise-chart,
.home-page .home-benchmark-action,
.home-page .home-top-plays,
.home-page .home-featured-cards,
.home-page .home-grid,
.home-page .home-banner {
  position: relative;
  z-index: 2;
}

@keyframes home-title-rays-rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.home-page .home-brand-subtitle {
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  margin: 0 0 4px;
}

.home-page .subhead.home-subhead {
  text-align: center;
  width: 100%;
  max-width: none;
  margin: 4px auto 0;
}

.home-page .home-subhead-line {
  display: block;
  width: fit-content;
  margin: 0 auto;
  white-space: nowrap;
}

.home-top-plays .comparison-head {
  justify-content: center;
}

.home-top-plays .comparison-head h3 {
  text-align: center;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  background: linear-gradient(
    105deg,
    rgba(246, 196, 84, 0.84) 0%,
    rgba(255, 227, 144, 1) 18%,
    rgba(246, 196, 84, 0.84) 36%,
    rgba(147, 210, 243, 0.92) 52%,
    rgba(246, 196, 84, 0.84) 68%,
    rgba(255, 227, 144, 1) 82%,
    rgba(246, 196, 84, 0.84) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shimmer 3.6s linear infinite;
}

.comparison.home-top-plays {
  margin-bottom: 0;
}

.home-featured-cards {
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 18px;
  padding: 20px 10px;
}

.comparison.home-featured-cards {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin-top: 2px;
  margin-bottom: 2px;
}

.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-featured-slot {
  background: transparent;
  border: 0;
  border-radius: 18px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: none;
}

.home-featured-slot h3 {
  margin: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  background: linear-gradient(
    105deg,
    rgba(246, 196, 84, 0.84) 0%,
    rgba(255, 227, 144, 1) 18%,
    rgba(246, 196, 84, 0.84) 36%,
    rgba(147, 210, 243, 0.92) 52%,
    rgba(246, 196, 84, 0.84) 68%,
    rgba(255, 227, 144, 1) 82%,
    rgba(246, 196, 84, 0.84) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shimmer 3.6s linear infinite;
}

.home-featured-target {
  min-height: 0;
}

.home-featured-card-link {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-featured-card-main {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-featured-card-image-wrap {
  border-radius: 0;
  overflow: visible;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  aspect-ratio: auto;
}

.home-featured-card-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 7px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  transform-origin: center center;
}

.home-featured-card-main:hover .home-featured-card-image {
  box-shadow: none;
  transform: translateY(-1px) scale(1.03);
}

.home-featured-card-image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ab0ce;
  font-weight: 600;
}

.home-featured-card-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 12px;
  text-align: center;
}

.home-featured-card-meta > div {
  margin: 0;
}

.home-featured-card-name {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: #edf3ff;
  line-height: 1.2;
}

.home-featured-card-set {
  margin: 0;
  color: #9ab0ce;
  font-size: 0.9rem;
  line-height: 1.2;
}

.home-featured-card-why-link {
  color: #f5d27f;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
}

.home-featured-card-why-link:hover {
  color: #ffe5a6;
  text-decoration: underline;
}

.home-featured-empty {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ab0ce;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 900px) {
  .home-featured-cards {
    padding-left: 0;
    padding-right: 0;
  }

  .home-featured-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-featured-slot {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .home-featured-card-main {
    width: 100%;
  }

  .home-featured-card-image-wrap {
    width: 100%;
    max-width: min(520px, 92vw);
    margin: 0 auto;
  }

  .home-featured-card-image {
    width: 100%;
    max-height: 58vh;
    margin: 0 auto;
  }

  .home-featured-target {
    min-height: 0;
  }
}


.home-page .page.with-banner {
  padding-top: 24px;
}

.home-benchmark {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 20px;
}

.home-benchmark .comparison-head {
  margin-bottom: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.home-benchmark .comparison-head h3 {
  text-align: center;
  width: 100%;
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  line-height: 1.2;
}

.home-benchmark-note {
  margin: 10px 0 0;
  text-align: center;
  font-weight: 600;
}

.home-benchmark-action {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 1px auto 8px;
  padding: 0;
  width: fit-content;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.home-conversion-copy {
  display: grid;
  gap: 8px;
  text-align: center;
  max-width: 72ch;
}

.home-conversion-copy h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.home-conversion-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.9vw, 1.08rem);
  line-height: 1.45;
}

.home-benchmark-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(135deg, rgba(246, 196, 84, 0.25), rgba(147, 210, 243, 0.2));
  border: 1px solid rgba(246, 196, 84, 0.55);
  border-radius: 14px;
  padding: 12px 20px;
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  font-weight: 700;
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 8px rgba(255, 215, 95, 0.34),
    0 0 16px rgba(255, 195, 55, 0.22);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  animation: cta-heartbeat-glow 1.8s linear infinite;
}

.home-benchmark-button:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 196, 84, 0.9);
  background: linear-gradient(135deg, rgba(246, 196, 84, 0.34), rgba(147, 210, 243, 0.26));
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 10px rgba(255, 215, 95, 0.38),
    0 0 18px rgba(255, 195, 55, 0.26);
}

@keyframes cta-heartbeat-glow {
  0% {
    box-shadow:
      inset 0 -1px 0 rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      0 0 8px rgba(255, 215, 95, 0.34),
      0 0 16px rgba(255, 195, 55, 0.22);
  }
  10% {
    box-shadow:
      inset 0 -1px 0 rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 12px rgba(255, 215, 95, 0.46),
      0 0 20px rgba(255, 195, 55, 0.29);
  }
  15% {
    box-shadow:
      inset 0 -1px 0 rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      0 0 8px rgba(255, 215, 95, 0.34),
      0 0 16px rgba(255, 195, 55, 0.22);
  }
  21% {
    box-shadow:
      inset 0 -1px 0 rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      0 0 14px rgba(255, 215, 95, 0.52),
      0 0 23px rgba(255, 195, 55, 0.33);
  }
  27% {
    box-shadow:
      inset 0 -1px 0 rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 8px rgba(255, 215, 95, 0.34),
      0 0 16px rgba(255, 195, 55, 0.22);
  }
  100% {
    box-shadow:
      inset 0 -1px 0 rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      0 0 8px rgba(255, 215, 95, 0.34),
      0 0 16px rgba(255, 195, 55, 0.22);
  }
}

.home-franchise-chart .comparison-head {
  display: flex;
  justify-content: center;
}

.comparison.home-franchise-chart {
  margin-bottom: 0;
}

.home-franchise-chart .comparison-head h3 {
  margin: 0 0 10px;
  width: auto;
  font-size: 1.3rem;
  line-height: 1.3;
  text-align: center;
}

.franchise-bars {
  display: grid;
  gap: 10px;
}

.franchise-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.franchise-label {
  font-weight: 600;
}

.franchise-bar-track {
  width: 100%;
  background: linear-gradient(180deg, rgba(14, 24, 34, 0.72), rgba(10, 18, 26, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.franchise-bar-track.pokemon-track {
  overflow: visible;
}

.franchise-bar {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  font-weight: 700;
  color: #121a21;
  background: linear-gradient(100deg, #b5cbff 0%, #8eb2f4 52%, #5e88dc 100%);
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.franchise-bar.pokemon-brand {
  background: linear-gradient(100deg, #ffd974 0%, #f6c454 48%, #7fc7f0 100%);
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 8px rgba(255, 215, 95, 0.34),
    0 0 16px rgba(255, 195, 55, 0.22);
}

.franchise-bar.alt-brand {
  background: linear-gradient(100deg, #e5c88e 0%, #caa972 52%, #a48352 100%);
}

.franchise-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 52%);
  pointer-events: none;
}

.home-benchmark-chart {
  display: grid;
  gap: 12px;
}

.home-benchmark-chart.vertical {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: 0;
  gap: 14px;
}

.benchmark-columns {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 20px;
  align-items: end;
  padding: 0 10px 28px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(20% - 1px),
      rgba(255, 255, 255, 0.08) calc(20% - 1px),
      rgba(255, 255, 255, 0.08) 20%
    );
  width: 100%;
  min-width: 0;
}

.benchmark-bar {
  width: 100%;
  min-height: 28px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: #10181f;
  font-weight: 700;
  font-size: 1.02rem;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(12, 18, 24, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 6px 14px rgba(0, 0, 0, 0.24);
}

.benchmark-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.benchmark-bar > span {
  position: relative;
  z-index: 3;
}

.benchmark-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.benchmark-bar-wrap {
  height: 220px;
  display: flex;
  align-items: flex-end;
}

.benchmark-label {
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.benchmark-bar.pokemon {
  background: linear-gradient(180deg, #ffe083 0%, #f6c454 52%, #d49d26 100%);
  box-shadow:
    inset 0 0 0 1px rgba(12, 18, 24, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 10px rgba(255, 215, 95, 0.45),
    0 0 22px rgba(255, 195, 55, 0.3),
    0 6px 14px rgba(0, 0, 0, 0.24);
}

.benchmark-bar.facebook {
  background: linear-gradient(180deg, #95beff 0%, #6f97ea 55%, #4f6ec0 100%);
}

.benchmark-bar.sp500 {
  background: linear-gradient(180deg, #ff9e9a 0%, #e06767 58%, #b14444 100%);
}

@media (max-width: 900px) {
  .home-page .home-subhead-line {
    width: 100%;
    white-space: normal;
  }

  .home-page .home-brand-title::before {
    width: min(140%, calc(100vw - 28px));
  }

  .home-page .home-brand-title::after {
    width: min(150%, calc(100vw - 28px));
  }

  .home-benchmark-chart.vertical {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .benchmark-columns {
    height: 230px;
    border-left: 0;
  }

  .franchise-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .home-benchmark-action {
    padding: 14px;
  }

  .home-benchmark-button {
    width: 100%;
    max-width: 320px;
  }

  .set-logo {
    height: 52px;
    max-width: 140px;
  }

  .grid.specialty-product-grid {
    grid-template-columns: 1fr;
  }

  .hypothetical-box-card,
  .grid.specialty-product-grid .product-card-etb,
  .grid.specialty-product-grid .product-card-bundle,
  .grid.specialty-product-grid .product-card-pack {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 480px) {
  .home-page .home-grid {
    grid-template-columns: 1fr;
  }

  .home-page .home-card {
    min-width: 0;
  }

  .home-benchmark {
    padding: 14px 10px;
    gap: 14px;
  }

  .home-benchmark .comparison-head h3 {
    font-size: clamp(1.02rem, 5.2vw, 1.28rem);
    line-height: 1.24;
  }

  .home-benchmark-chart {
    gap: 8px;
  }

  .benchmark-columns {
    height: 216px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0 4px 22px;
    border-right: 0;
  }

  .benchmark-bar-wrap {
    height: 190px;
  }

  .benchmark-bar {
    min-height: 24px;
    padding: 0 5px;
    font-size: 0.72rem;
  }

  .benchmark-label {
    font-size: 0.7rem;
    white-space: nowrap;
  }
}

.set-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.set-meta .set-meta-refresh-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: inherit;
  text-decoration: none;
  box-shadow: none;
}

.set-meta .set-meta-refresh-link:hover,
.set-meta .set-meta-refresh-link:focus-visible {
  color: #ffe09a;
  text-decoration: underline;
  transform: none;
}

.set-status-row {
  position: relative;
  width: 100%;
}

.set-status-actions {
  position: absolute;
  right: 0;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.set-status-row .set-status-back-link {
  color: var(--accent);
  text-decoration: none;
}

.set-hero-main {
  width: 100%;
}

.eval-label-mobile {
  display: none;
}

@media (max-width: 960px) {
  .set-page .eval-label-desktop {
    display: none;
  }

  .set-page .eval-label-mobile {
    display: inline;
  }
}

.subhead {
  color: var(--muted);
  max-width: 520px;
  margin: 0;
}

.source {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}

.home-page .home-actions .home-link {
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246, 196, 84, 0.58);
  background:
    linear-gradient(145deg, rgba(246, 196, 84, 0.18), rgba(147, 210, 243, 0.08)),
    linear-gradient(180deg, rgba(11, 24, 41, 0.92), rgba(9, 20, 34, 0.92));
  color: #f6df9a;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 1px rgba(246, 196, 84, 0.16) inset,
    0 4px 14px rgba(5, 10, 20, 0.34),
    0 0 10px rgba(246, 196, 84, 0.22);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.home-page .home-actions .home-link:hover,
.home-page .home-actions .home-link:focus-visible {
  border-color: rgba(246, 196, 84, 0.88);
  background:
    linear-gradient(145deg, rgba(246, 196, 84, 0.26), rgba(147, 210, 243, 0.12)),
    linear-gradient(180deg, rgba(12, 26, 44, 0.95), rgba(10, 22, 36, 0.95));
  color: #ffe9ad;
  box-shadow:
    0 0 0 1px rgba(246, 196, 84, 0.24) inset,
    0 8px 22px rgba(5, 10, 20, 0.4),
    0 0 14px rgba(246, 196, 84, 0.3);
  transform: translateY(-1px);
}

.refresh-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.refresh-link.is-active {
  border-color: rgba(247, 204, 96, 0.72);
  color: rgba(255, 228, 150, 0.98);
  box-shadow: 0 0 0 1px rgba(247, 204, 96, 0.26) inset;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(147, 210, 243, 0.55);
  background: linear-gradient(135deg, rgba(147, 210, 243, 0.24), rgba(147, 210, 243, 0.12));
  color: #eaf6ff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.detail-link:hover,
.detail-link:focus-visible {
  border-color: rgba(147, 210, 243, 0.85);
  background: linear-gradient(135deg, rgba(147, 210, 243, 0.3), rgba(147, 210, 243, 0.18));
  box-shadow: 0 10px 22px rgba(8, 16, 30, 0.35);
  transform: translateY(-1px);
}

.source a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.ancillary-hero-main {
  width: 100%;
}

.ancillary-status-row {
  position: relative;
  width: 100%;
}

.ancillary-template-page .ancillary-status-row .refresh-link {
  position: absolute;
  right: 0;
  top: 12px;
  color: var(--accent);
  text-decoration: none;
}

#boxHypotheticalCard {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  text-align: right;
  margin: 0;
  display: flex;
  align-items: center;
  min-height: 100%;
  line-height: 1.35;
}

#boxHypotheticalCard[hidden] {
  display: none !important;
}


.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-bottom: 24px;
}

.grid.specialty-product-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
}

.hypothetical-box-card {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 164%;
  max-width: 620px;
  background: linear-gradient(145deg, rgba(78, 40, 48, 0.84), rgba(58, 30, 37, 0.84)) !important;
  border: 1px solid rgba(166, 111, 122, 0.3) !important;
  padding: 10px 16px;
  min-height: 0;
  border-radius: 18px;
  position: relative;
  --hypo-edge-gap: 24px;
  --hypo-price-width: 96px;
}

.hypothetical-box-card .card-head h2 {
  font-size: 1.08rem;
  margin: 0;
}

.hypothetical-box-card .hypo-note {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.35;
}

.hypothetical-content {
  display: block;
  padding-right: calc(var(--hypo-price-width) + (var(--hypo-edge-gap) * 2));
}

.hypothetical-box-card .hypothetical-value {
  margin: 0;
  white-space: nowrap;
  font-size: 1.45rem;
  width: var(--hypo-price-width);
  text-align: right;
  position: absolute;
  right: var(--hypo-edge-gap);
  top: 50%;
  transform: translateY(-50%);
}

.grid.specialty-product-grid .product-card-etb {
  grid-column: 1;
  grid-row: 2;
}

.grid.specialty-product-grid .product-card-bundle {
  grid-column: 2;
  grid-row: 2;
}

.grid.specialty-product-grid .product-card-pack {
  grid-column: 3;
  grid-row: 2;
}

.specialty-page-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(217, 149, 173, 0.14);
  border: 1px solid rgba(217, 149, 173, 0.5);
  color: #d995ad;
  white-space: nowrap;
}

.specialty-page-badge[hidden] {
  display: none !important;
}

.sets-specialty-legend {
  position: absolute;
  top: 10px;
  right: 14px;
}

.sets-main-legend {
  position: absolute;
  top: 10px;
  right: 126px;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.1);
}

.card {
  background: linear-gradient(145deg, rgba(26, 45, 64, 0.94), rgba(17, 31, 45, 0.94));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.clickable-product-card {
  cursor: pointer;
}

.clickable-product-card:hover,
.clickable-product-card:focus-visible {
  border-color: rgba(147, 210, 243, 0.7);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 34px;
}

.card h2 {
  margin: 0;
  font-size: 1.3rem;
}

.product-trend {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d9e8f5;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

.product-trend-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.product-trend-value {
  letter-spacing: 0.01em;
}

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

.trade-side {
  min-height: 220px;
}

.trade-rows {
  display: grid;
  gap: 10px;
}

.trade-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1.6fr 1.3fr 84px auto;
  gap: 8px;
  align-items: center;
  background: rgba(14, 24, 36, 0.55);
}

.trade-row select,
.trade-row input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(147, 210, 243, 0.35);
  background: rgba(8, 16, 26, 0.85);
  color: var(--text);
  padding: 7px 9px;
}

.trade-remove {
  border: 1px solid rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}

.trade-line-values {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.86rem;
}

.trade-totals {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.trade-totals p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trade-summary .value {
  font-size: 1.25rem;
}

.trade-analyser-page .hero .subhead {
  max-width: none;
}

@media (min-width: 900px) {
  .trade-analyser-page .hero .subhead {
    white-space: nowrap;
  }
}

@media (max-width: 960px) {
  .trade-grid {
    grid-template-columns: 1fr;
  }
  .trade-row {
    grid-template-columns: 1fr 1fr;
  }
  .trade-row .trade-qty,
  .trade-row .trade-remove {
    width: 100%;
  }
}

.pack-set-link {
  color: inherit;
  text-decoration: none;
}

.pack-set-link:hover,
.pack-set-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.tag {
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(246, 196, 84, 0.12);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246, 196, 84, 0.2);
}

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

.product-cart-link {
  position: absolute;
  right: 14px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.product-cart-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.9;
}

.product-cart-link[hidden] {
  display: none !important;
}

.eval-buy-link {
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.pack-eval .eval-buy-link {
  right: 20px;
  top: 20px;
  z-index: 2;
}

.eval-buy-link[hidden] {
  display: none !important;
}

.eval-cart-icon {
  position: static;
  width: 30px;
  height: 30px;
  object-fit: contain;
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(84%) sepia(37%) saturate(898%) hue-rotate(332deg) brightness(101%) contrast(93%);
}

.eval-buy-now {
  display: none;
}

.prediction,
.etb-eval,
.bundle-eval,
.pack-eval {
  position: relative;
}

.detail-link.inline-detail {
  margin-left: 10px;
  vertical-align: middle;
}

.stat-right {
  text-align: right;
}

.label {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.tooltip {
  position: relative;
  cursor: help;
  display: inline-block;
}

.buy-target-panel.tooltip {
  display: grid;
}

.tooltip-hint {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(148, 163, 184, 0.65);
  text-underline-offset: 2px;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  background: rgba(15, 20, 24, 0.95);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  width: max-content;
  max-width: 240px;
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate(-50%, 4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.tooltip:hover::after,
.tooltip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.tooltip.tooltip-left::after {
  left: auto;
  right: 0;
  transform: translate(-10px, 4px);
}

.tooltip.tooltip-left:hover::after,
.tooltip.tooltip-left:focus-visible::after {
  transform: translate(-10px, 0);
}

.value {
  margin: 6px 0 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.op-good {
  color: var(--good);
}

.op-mid {
  color: var(--mid);
}

.op-neutral {
  color: var(--text);
}

.op-bad {
  color: var(--bad);
}

.comparison {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 24px;
}

.guide-page .guide-hero > div {
  width: min(1180px, 100%);
}

.guide-page .guide-subtitle {
  margin: 0;
  max-width: none;
  color: var(--muted);
  line-height: 1.65;
}

.guide-page .guide-document {
  padding: 28px 30px;
}

.guide-page .guide-launch-notice {
  margin: 2px 0 18px;
  padding: 14px 18px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.55;
  color: #f7f1d9;
  border: 1px solid rgba(246, 196, 84, 0.55);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(246, 196, 84, 0.18), rgba(147, 210, 243, 0.14));
  box-shadow: 0 0 18px rgba(246, 196, 84, 0.18);
}

.guide-page .guide-document h2 {
  margin: 6px 0 12px;
  font-size: 1.18rem;
  color: #f6dca5;
}

.guide-page .guide-document h2:not(:first-child) {
  margin-top: 26px;
}

.guide-page .guide-document h3 {
  margin: 14px 0 8px;
  font-size: 1.02rem;
  color: #e9f5ff;
}

.guide-page .guide-document p,
.guide-page .guide-document li {
  margin: 0 0 10px;
  max-width: none;
  color: var(--muted);
  line-height: 1.68;
}

.guide-page .guide-document ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

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

.comparison-head.stacked {
  align-items: flex-start;
  flex-direction: column;
  position: relative;
}

.tab-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}

.set-duel-rankings-page .comparison-head.stacked > .tab-row {
  margin-top: 0;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  justify-content: flex-end;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sort-select {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent-2);
}

.tab {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.tab.active {
  background: rgba(246, 196, 84, 0.18);
  border-color: rgba(246, 196, 84, 0.4);
  color: var(--accent);
}

.refresh-tab {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.refresh-button {
  position: absolute;
  top: 0;
  right: 0;
  border: 1px solid rgba(147, 210, 243, 0.5);
  background: rgba(147, 210, 243, 0.12);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.legend-item {
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.legend.hidden {
  display: none;
}

.series-header {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7fa5bd;
  font-weight: 700;
  margin-top: 8px;
}

.series-header:first-child {
  margin-top: 0;
}

.series-item a {
  color: var(--text);
  text-decoration: none;
}

.set-analysis-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 10px;
  opacity: 0.38;
  vertical-align: -3px;
  transition: opacity 140ms ease, transform 140ms ease;
}

.set-analysis-icon-link:hover,
.set-analysis-icon-link:focus-visible {
  opacity: 0.78;
  transform: translateY(-1px);
  outline: none;
}

.set-analysis-icon-link img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  filter: invert(1) brightness(1.55);
}

.hot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 14px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(252, 112, 51, 0.45);
  background: rgba(252, 112, 51, 0.14);
  color: #ffbe7a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hot-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  object-fit: contain;
}

.volcanic-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 14px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(98, 22, 26, 0.9);
  background: rgba(16, 4, 6, 0.92);
  color: #d88c94;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 1px rgba(38, 10, 13, 0.75);
}

.volcanic-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  object-fit: contain;
}

.warm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 14px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 183, 66, 0.45);
  background: rgba(245, 183, 66, 0.14);
  color: #ffd78a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.warm-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  object-fit: contain;
}

.series-item a.specialty-set {
  color: #d995ad;
}

.series-tag.specialty-set {
  color: #d995ad;
  border-color: rgba(217, 149, 173, 0.5);
  background: rgba(217, 149, 173, 0.14);
}

.series-date {
  color: var(--accent);
}

.comparison-head h3 {
  margin: 0;
  font-size: 1.3rem;
}

.heading-note {
  display: inline-block;
  margin-left: 6px;
  color: #8fa1b8;
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0;
}

.comparison-head p {
  margin: 0;
  color: var(--muted);
}

.deal-calc-section {
  margin-top: 0;
  margin-bottom: 24px;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(124, 157, 220, 0.38);
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(29, 46, 84, 0.82),
    rgba(49, 64, 108, 0.78) 55%,
    rgba(88, 66, 124, 0.72)
  );
  padding: 12px;
  transition:
    width 360ms cubic-bezier(0.22, 1, 0.36, 1),
    max-width 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.deal-calc-section.is-open {
  width: min(100%, 840px);
  max-width: 840px;
}

.deal-calc-teaser {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  padding-inline: 0;
}

.deal-calc-teaser p {
  margin: 0;
  color: var(--muted);
  flex: 0 1 auto;
  min-width: 0;
}

.deal-calc-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 6px 8px;
  margin: 0;
  cursor: pointer;
}

.deal-calc-toggle:hover {
  border-color: rgba(168, 186, 235, 0.55);
}

.deal-calc-panel {
  margin-top: 0;
  border-top: 1px solid transparent;
  padding-top: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: scale(0.94);
  transform-origin: center center;
  pointer-events: none;
  transition:
    max-height 340ms ease,
    opacity 260ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 340ms ease,
    padding-top 340ms ease,
    border-top-color 340ms ease;
  width: 100%;
  box-sizing: border-box;
}

.deal-calc-panel.is-open {
  margin-top: 12px;
  border-top-color: rgba(168, 186, 235, 0.3);
  padding-top: 12px;
  max-height: 260px;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.deal-calc-section.is-open .deal-calc-panel.is-open {
  width: 100%;
  margin-left: 0;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

.deal-calc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  width: 100%;
}

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

.deal-calc-field span {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.deal-calc-field select,
.deal-calc-field input {
  border-radius: 10px;
  border: 1px solid rgba(149, 178, 234, 0.36);
  background: rgba(25, 38, 70, 0.64);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

#dealCalcPrice::-webkit-outer-spin-button,
#dealCalcPrice::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#dealCalcPrice {
  -moz-appearance: textfield;
  appearance: textfield;
}

.deal-calc-result {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  text-align: center;
}

.deal-calc-result p {
  margin: 0;
}

.deal-calc-result .result-opportunity {
  font-weight: 700;
}

@media (max-width: 900px) {
  .deal-calc-form {
    grid-template-columns: 1fr;
  }

  .portfolio-analysis-page #analysisSummary.portfolio-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

.table {
  display: grid;
  gap: 14px;
}

.investment-table .row {
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr)) 1.35fr 0.2fr;
}

.investment-table .row div:nth-child(5) {
  text-align: right;
}

.investment-table .row div:nth-child(6) {
  text-align: right;
}

.investment-table .row div:nth-child(2),
.investment-table .row div:nth-child(3),
.investment-table .row div:nth-child(4) {
  text-align: center;
  padding-left: 0;
}

.investment-cart-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.card-rankings-table .row {
  grid-template-columns: 0.34fr 1.58fr 0.86fr 0.86fr 0.86fr 0.86fr 0.86fr 0.8fr 0.16fr;
  margin-right: 0;
}

.card-rankings-table .row div:first-child {
  text-align: left;
}

.card-rankings-table .row div:last-child {
  text-align: right;
  padding-right: 0;
}

.rankings-conf-col {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.rankings-conf-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  width: auto;
  padding-right: 0;
}

.rankings-cart-icon {
  position: static;
  width: 17px;
  height: 17px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(84%) sepia(37%) saturate(898%) hue-rotate(332deg) brightness(101%) contrast(93%);
  opacity: 0.95;
  pointer-events: none;
}

.rankings-cart-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.rankings-cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.rankings-actions-col {
  flex-direction: column;
  gap: 5px;
  line-height: 1;
}

.search-builder-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(203, 213, 225, 0.7);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.search-builder-plus:hover,
.search-builder-plus:focus-visible {
  color: #ffd44d;
  outline: none;
  transform: translateY(-1px);
}

.search-builder-plus.is-active {
  color: #ffd44d;
  font-weight: 700;
}

.search-builder-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.44);
  color: var(--muted);
}

.search-builder-bar.is-empty {
  justify-content: center;
}

.search-builder-bar[hidden] {
  display: none;
}

.search-builder-summary {
  color: #ffd44d;
  font-weight: 800;
}

.search-builder-bar.is-empty .search-builder-summary {
  width: 100%;
  text-align: center;
}

.search-builder-placeholder-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  margin-right: 4px;
  color: rgba(203, 213, 225, 0.7);
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  vertical-align: -3px;
  animation: search-builder-plus-hint 1.35s steps(1, end) infinite;
}

@keyframes search-builder-plus-hint {
  0%,
  49% {
    color: rgba(203, 213, 225, 0.7);
    transform: translateY(0);
  }

  50%,
  99% {
    color: #ffcf24;
    transform: translateY(2px);
  }

  100% {
    color: rgba(203, 213, 225, 0.7);
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .card-rankings-page .hero {
    align-items: flex-start;
  }

  .card-rankings-hero-controls {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 24px;
  }
}

.search-builder-query {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-builder-open,
.search-builder-clear {
  flex: 0 0 auto;
}

.search-builder-open[hidden],
.search-builder-clear[hidden],
.search-builder-bar.is-empty .search-builder-open,
.search-builder-bar.is-empty .search-builder-clear {
  display: none !important;
}

.search-builder-open {
  margin-left: auto;
}

.card-rankings-card-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.card-rankings-name-line {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.card-rankings-rarity-inline {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f0cf7a;
  white-space: nowrap;
}

.card-rankings-set-line {
  font-size: 0.84rem;
  color: rgba(197, 225, 255, 0.84);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.card-rankings-mobile-thumb,
.card-rankings-mobile-set {
  display: none;
}

.card-rankings-desktop-elo {
  display: inline;
}

.card-rankings-header-mobile-set {
  display: none;
}

.card-rankings-header-desktop-elo {
  display: inline;
}

.card-rankings-table .row div:nth-child(3),
.card-rankings-table .row div:nth-child(4),
.card-rankings-table .row div:nth-child(5),
.card-rankings-table .row div:nth-child(6),
.card-rankings-table .row div:nth-child(7),
.card-rankings-table .row div:nth-child(8) {
  text-align: center;
}

.card-rankings-table .row:not(.header) div:nth-child(3),
.card-rankings-table .row:not(.header) div:nth-child(4),
.card-rankings-table .row:not(.header) div:nth-child(5),
.card-rankings-table .row:not(.header) div:nth-child(6),
.card-rankings-table .row:not(.header) div:nth-child(7),
.card-rankings-table .row:not(.header) div:nth-child(8) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-rankings-table .row.card-rankings-limited-blur {
  opacity: 0.88;
}

.card-rankings-table .row.card-rankings-limited-blur div:nth-child(6),
.card-rankings-table .row.card-rankings-limited-blur div:nth-child(8) {
  filter: blur(4.5px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.set-pages-limited-mode .investment-table .row:not(.header):not([data-row="box"]) div:nth-child(3),
.set-pages-limited-mode .investment-table .row:not(.header):not([data-row="box"]) div:nth-child(4),
.set-pages-limited-mode .investment-table .row:not(.header):not([data-row="box"]) div:nth-child(5),
.set-pages-limited-mode .investment-table .row:not(.header):not([data-row="box"]) div:nth-child(6),
.set-pages-limited-mode #etbPrediction7y,
.set-pages-limited-mode #etbTodayEval,
.set-pages-limited-mode #etbTargetValue,
.set-pages-limited-mode #bundlePrediction7y,
.set-pages-limited-mode #bundleTodayEval,
.set-pages-limited-mode #bundleTargetValue,
.set-pages-limited-mode #packPrediction7y,
.set-pages-limited-mode #packTodayEval,
.set-pages-limited-mode #packTargetValue,
.set-pages-limited-mode #etbOpportunity,
.set-pages-limited-mode #bundleOpportunity,
.set-pages-limited-mode #packOpportunity,
.set-pages-limited-mode #etbAcceptableBuy,
.set-pages-limited-mode #etbAcceptableSell,
.set-pages-limited-mode #bundleAcceptableBuy,
.set-pages-limited-mode #bundleAcceptableSell,
.set-pages-limited-mode #packAcceptableBuy,
.set-pages-limited-mode #packAcceptableSell,
.set-pages-limited-mode #etbAcceptableBuyMeta,
.set-pages-limited-mode #etbAcceptableSellMeta,
.set-pages-limited-mode #bundleAcceptableBuyMeta,
.set-pages-limited-mode #bundleAcceptableSellMeta,
.set-pages-limited-mode #packAcceptableBuyMeta,
.set-pages-limited-mode #packAcceptableSellMeta,
.set-pages-limited-mode .target-market-ratio,
.set-pages-limited-mode .target-time-estimate,
.set-pages-limited-mode .buy-strength,
.set-pages-limited-mode .sell-strength {
  filter: blur(4.5px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.set-pages-limited-mode #boxTargetPanels .target-market-ratio,
.set-pages-limited-mode #boxTargetPanels .target-time-estimate,
.set-pages-limited-mode #boxTargetPanels .buy-strength,
.set-pages-limited-mode #boxTargetPanels .sell-strength {
  filter: none;
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
}

.set-pages-limited-mode #ancillaryDetailLink {
  display: none !important;
}

.conf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.conf-badge.conf-none {
  color: #8ea0b9;
  background: rgba(142, 160, 185, 0.12);
  border-color: rgba(142, 160, 185, 0.28);
}

.conf-badge.conf-spectrum {
  color: #f6fbff;
  background: hsl(var(--conf-h, 0), 78%, 26%);
  border-color: hsl(var(--conf-h, 0), 88%, 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.conf-badge.conf-gold {
  color: #231300;
  background: linear-gradient(130deg, #ffed85 0%, #f9d95f 28%, #ffeaa4 54%, #e7b83f 74%, #ffe389 100%);
  border-color: rgba(247, 209, 94, 0.95);
  box-shadow: 0 0 8px rgba(246, 198, 60, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  position: relative;
  overflow: hidden;
}

.conf-badge.conf-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.55) 45%, transparent 72%);
  transform: translateX(-130%);
  animation: confShine 2.6s ease-in-out infinite;
}

@keyframes confShine {
  0% {
    transform: translateX(-130%);
  }
  60% {
    transform: translateX(130%);
  }
  100% {
    transform: translateX(130%);
  }
}

.top-investments-page .rankings-table .row {
  grid-template-columns: 0.24fr 1.25fr 1.05fr 1fr 0.85fr 0.95fr 0.8fr 0.16fr;
}

.top-investments-page .rankings-table .row div:nth-child(2),
.top-investments-page .rankings-table .row div:nth-child(3),
.top-investments-page .rankings-table .row div:nth-child(4) {
  text-align: center;
  white-space: normal;
}

.top-investments-page .rankings-table .row div:nth-child(5),
.top-investments-page .rankings-table .row div:nth-child(6) {
  text-align: center;
}

.top-investments-page .rankings-table .row:not(.header) div:nth-child(5),
.top-investments-page .rankings-table .row:not(.header) div:nth-child(6) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-investments-page .rankings-table .row div:nth-child(8) {
  text-align: right;
}

.top-investments-page .rankings-table .row div:nth-child(7) {
  text-align: right;
}

.speculative-picks-page .rankings-table .row {
  grid-template-columns: 0.24fr 1.45fr 1.05fr 0.85fr 0.85fr 0.82fr 0.88fr 0.16fr;
}

.speculative-picks-page .rankings-table .row div:nth-child(4),
.speculative-picks-page .rankings-table .row div:nth-child(5),
.speculative-picks-page .rankings-table .row div:nth-child(6) {
  text-align: center;
}

.speculative-picks-page .rankings-table .row:not(.header) div:nth-child(4),
.speculative-picks-page .rankings-table .row:not(.header) div:nth-child(5),
.speculative-picks-page .rankings-table .row:not(.header) div:nth-child(6) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.speculative-picks-page .speculative-set-cell {
  line-height: 1.18;
}

.speculative-picks-page .speculative-product-inline {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.15;
  text-transform: none;
  letter-spacing: normal;
}

.top-investments-page .rankings-table .row.investment-row-limited-blur div:nth-child(2),
.top-investments-page .rankings-table .row.investment-row-limited-blur div:nth-child(4),
.top-investments-page .rankings-table .row.investment-row-limited-blur div:nth-child(5),
.top-investments-page .rankings-table .row.investment-row-limited-blur div:nth-child(6),
.top-investments-page .rankings-table .row.investment-row-limited-blur div:nth-child(7),
.top-investments-page .rankings-table .row.investment-row-limited-blur div:nth-child(8) {
  filter: blur(4.5px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.top-investments-page .rankings-table .row.investment-row-top-blur div:nth-child(2),
.top-investments-page .rankings-table .row.investment-row-top-blur div:nth-child(3),
.top-investments-page .rankings-table .row.investment-row-top-blur div:nth-child(4),
.top-investments-page .rankings-table .row.investment-row-top-blur div:nth-child(5),
.top-investments-page .rankings-table .row.investment-row-top-blur div:nth-child(6),
.top-investments-page .rankings-table .row.investment-row-top-blur div:nth-child(7),
.top-investments-page .rankings-table .row.investment-row-top-blur div:nth-child(8) {
  filter: blur(5.5px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

.alerts-page .rankings-table .row {
  grid-template-columns: 1fr 1.25fr 1.05fr 1fr 0.95fr 1fr 0.95fr 0.9fr 0.22fr;
}

.alerts-page .rankings-table .row div:nth-child(2),
.alerts-page .rankings-table .row div:nth-child(3),
.track-record-page .rankings-table .row div:nth-child(2),
.track-record-page .rankings-table .row div:nth-child(3) {
  text-align: center;
  white-space: normal;
}

.alerts-page .rankings-table .row {
  gap: 16px;
}

.alerts-page .rankings-table .row div:nth-child(4),
.alerts-page .rankings-table .row div:nth-child(5),
.alerts-page .rankings-table .row div:nth-child(6),
.alerts-page .rankings-table .row div:nth-child(7) {
  text-align: center;
}

.alerts-page .rankings-table .row div:nth-child(3),
.alerts-page .rankings-table .row div:nth-child(4),
.alerts-page .rankings-table .row div:nth-child(5),
.alerts-page .rankings-table .row div:nth-child(6),
.alerts-page .rankings-table .row div:nth-child(7) {
  transform: translateX(8px);
}

.alerts-page .rankings-table .row div:nth-child(8),
.alerts-page .rankings-table .row div:nth-child(9),
.track-record-page .rankings-table .row div:nth-child(4),
.track-record-page .rankings-table .row div:nth-child(5),
.track-record-page .rankings-table .row div:nth-child(6),
.track-record-page .rankings-table .row div:nth-child(7),
.track-record-page .rankings-table .row div:nth-child(8) {
  text-align: right;
}

.alerts-page .rankings-table .row .rankings-cart-col {
  justify-content: flex-end;
  transform: none;
}

/* Alerts: prevent medium-width overlap by collapsing Product earlier while keeping Latest price visible. */
@media (max-width: 1200px) and (min-width: 901px) {
  .alerts-page .rankings-table .row {
    grid-template-columns: 0.95fr 1.45fr 0.9fr 0.85fr 0.9fr 0.85fr 0.8fr 0.22fr;
    gap: 12px;
  }

  .alerts-page .rankings-table .row div:nth-child(3) {
    display: none;
  }

  .alerts-page .rankings-table .row div:nth-child(4),
  .alerts-page .rankings-table .row div:nth-child(5),
  .alerts-page .rankings-table .row div:nth-child(6),
  .alerts-page .rankings-table .row div:nth-child(7) {
    transform: none;
  }

  .alerts-page .rankings-table .row div:nth-child(4),
  .alerts-page .rankings-table .row div:nth-child(5),
  .alerts-page .rankings-table .row div:nth-child(6),
  .alerts-page .rankings-table .row div:nth-child(7) {
    text-align: center;
  }

  .alerts-page .rankings-table .row div:nth-child(8) {
    text-align: right;
  }

  .alerts-page .rankings-table .alerts-date-full {
    display: inline;
  }

  .alerts-page .rankings-table .alerts-date-short {
    display: none;
  }
}

/* Alerts date mode: once we switch to short date, never switch back on smaller widths. */
@media (max-width: 1024px) {
  .alerts-page .rankings-table .alerts-date-full {
    display: none !important;
  }

  .alerts-page .rankings-table .alerts-date-short {
    display: inline !important;
    white-space: nowrap;
  }
}

.alerts-date-short,
.alerts-product-inline {
  display: none;
}

.home-page .home-top-plays .rankings-table .row {
  grid-template-columns: 0.44fr 1.6fr 1.2fr 1fr 0.9fr 0.9fr;
}

.home-page .home-top-plays .rankings-table .row div {
  text-align: center;
}

.home-page .home-top-plays .rankings-table .row .rankings-conf-col {
  justify-content: center;
}

.home-page .home-top-plays .rankings-table .row .rankings-conf-cell {
  justify-content: center;
  width: 100%;
}

.home-top-play-product-inline {
  display: none;
}

.top-investment-set-inline {
  display: none;
}

.card-opportunities-table .row {
  grid-template-columns: 0.34fr 1.58fr 0.86fr 0.86fr 0.86fr 0.86fr 0.86fr 0.86fr 0.16fr;
}

.card-opportunities-table .row div:first-child {
  text-align: left;
}

.card-opportunities-table .row div:last-child {
  text-align: right;
  padding-right: 0;
}

.card-opportunities-table .row div:nth-child(3),
.card-opportunities-table .row div:nth-child(4),
.card-opportunities-table .row div:nth-child(5),
.card-opportunities-table .row div:nth-child(6),
.card-opportunities-table .row div:nth-child(7) {
  text-align: center;
}

.card-opportunities-table .row:not(.header) div:nth-child(3),
.card-opportunities-table .row:not(.header) div:nth-child(4),
.card-opportunities-table .row:not(.header) div:nth-child(5),
.card-opportunities-table .row:not(.header) div:nth-child(6),
.card-opportunities-table .row:not(.header) div:nth-child(7) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-opportunities-table .row div:nth-child(8) {
  text-align: right;
}

.slab-opportunities-table .row {
  grid-template-columns: 0.3fr 1.82fr 0.76fr 0.84fr 0.8fr 0.72fr 0.8fr 0.74fr 0.8fr 0.16fr;
}

.slab-opportunities-table .row div:first-child {
  text-align: left;
}

.slab-opportunities-table .row div:last-child {
  text-align: right;
  padding-right: 0;
}

.slab-opportunities-table .row div:nth-child(3),
.slab-opportunities-table .row div:nth-child(4),
.slab-opportunities-table .row div:nth-child(5),
.slab-opportunities-table .row div:nth-child(6),
.slab-opportunities-table .row div:nth-child(7),
.slab-opportunities-table .row div:nth-child(8) {
  text-align: center;
}

.slab-opportunities-table .row:not(.header) div:nth-child(3),
.slab-opportunities-table .row:not(.header) div:nth-child(4),
.slab-opportunities-table .row:not(.header) div:nth-child(5),
.slab-opportunities-table .row:not(.header) div:nth-child(6),
.slab-opportunities-table .row:not(.header) div:nth-child(7),
.slab-opportunities-table .row:not(.header) div:nth-child(8) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.slab-opportunities-table .row div:nth-child(9) {
  text-align: right;
}

.slab-opportunities-table .row:not(.header) div:nth-child(9) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.what-to-rip-table .row {
  grid-template-columns: 0.35fr minmax(160px, 1.35fr) 0.45fr 0.75fr 0.85fr 0.85fr 0.75fr 0.55fr 0.7fr 0.75fr 0.75fr;
  align-items: center;
}

.what-to-rip-table .row div:nth-child(3),
.what-to-rip-table .row div:nth-child(4),
.what-to-rip-table .row div:nth-child(5),
.what-to-rip-table .row div:nth-child(6),
.what-to-rip-table .row div:nth-child(7),
.what-to-rip-table .row div:nth-child(8),
.what-to-rip-table .row div:nth-child(9),
.what-to-rip-table .row div:nth-child(10),
.what-to-rip-table .row div:nth-child(11) {
  text-align: center;
}

.what-to-rip-series {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.15;
}

.what-to-rip-roi {
  font-weight: 700;
}

.what-to-rip-roi.is-good {
  color: #6bf5a2;
}

.what-to-rip-roi.is-mid {
  color: #ffd44d;
}

.what-to-rip-roi.is-bad {
  color: #ff7a7a;
}

.card-set-ratio.is-good {
  color: #6bf5a2;
}

.card-set-ratio.is-mid {
  color: #ffd44d;
}

.card-set-ratio.is-bad {
  color: #ff7a7a;
}

.what-to-rip-overall {
  font-weight: 800;
}

.what-to-rip-overall.is-good {
  color: #6bf5a2;
}

.what-to-rip-overall.is-mid {
  color: #ffd44d;
}

.what-to-rip-overall.is-neutral {
  color: #9ab0ce;
}

.what-to-rip-overall.is-bad {
  color: #ff7a7a;
}

@media (max-width: 1120px) and (min-width: 761px) {
  .what-to-rip-table .row {
    grid-template-columns: 0.35fr minmax(150px, 1.55fr) 0.5fr 0.7fr 0.7fr 0.75fr 0.75fr 0.75fr;
  }

  .what-to-rip-table .row div:nth-child(5),
  .what-to-rip-table .row div:nth-child(7),
  .what-to-rip-table .row div:nth-child(9) {
    display: none;
  }
}

@media (max-width: 760px) {
  .what-to-rip-table .row {
    grid-template-columns: 0.35fr minmax(0, 1.35fr) 0.7fr 0.8fr;
    gap: 10px;
    padding: 10px 10px;
  }

  .what-to-rip-table .row div:nth-child(3) {
    display: none;
  }

  .what-to-rip-table .row div:nth-child(4) {
    text-align: center;
  }

  .what-to-rip-table .row div:nth-child(5) {
    display: none;
  }

  .what-to-rip-table .row div:nth-child(6) {
    display: none;
  }

  .what-to-rip-table .row div:nth-child(7) {
    display: none;
  }

  .what-to-rip-table .row div:nth-child(8) {
    display: none;
  }

  .what-to-rip-table .row div:nth-child(9) {
    display: none;
  }

  .what-to-rip-table .row div:nth-child(10) {
    display: none;
  }

  .what-to-rip-table .row div:nth-child(11) {
    text-align: right;
  }
}

.slab-mobile-card-wrap {
  display: none;
}

.slab-desktop-card-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.slab-opportunities-page .slab-desktop-card-col .card-rankings-set-line {
  display: block;
  width: 100%;
  text-align: left;
}

.slab-opportunities-page .slab-opportunities-table .row:not(.header) div:nth-child(2) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

.slab-opportunities-page .slab-opportunities-table .row:not(.header) div:nth-child(2) .card-rankings-name-line,
.slab-opportunities-page .slab-opportunities-table .row:not(.header) div:nth-child(2) .card-rankings-set-line {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  margin-left: 0;
  padding-left: 0;
}

.grading-opportunities-table .row {
  grid-template-columns: 0.34fr 1.56fr 0.86fr 0.86fr 0.82fr 0.88fr 0.84fr 0.76fr 0.8fr 0.76fr 0.16fr;
}

.grading-opportunities-table .row div:first-child {
  text-align: left;
}

.grading-opportunities-table .row div:last-child {
  text-align: right;
  padding-right: 0;
}

.grading-opportunities-table .row div:nth-child(3),
.grading-opportunities-table .row div:nth-child(4),
.grading-opportunities-table .row div:nth-child(5),
.grading-opportunities-table .row div:nth-child(6),
.grading-opportunities-table .row div:nth-child(7),
.grading-opportunities-table .row div:nth-child(8),
.grading-opportunities-table .row div:nth-child(9) {
  text-align: center;
}

.grading-opportunities-table .row:not(.header) div:nth-child(3),
.grading-opportunities-table .row:not(.header) div:nth-child(4),
.grading-opportunities-table .row:not(.header) div:nth-child(5),
.grading-opportunities-table .row:not(.header) div:nth-child(6),
.grading-opportunities-table .row:not(.header) div:nth-child(7),
.grading-opportunities-table .row:not(.header) div:nth-child(8),
.grading-opportunities-table .row:not(.header) div:nth-child(9) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.grading-opportunities-table .row div:nth-child(2) {
  padding-right: 4px;
}

.grading-opportunities-table .row div:nth-child(3) {
  padding-left: 4px;
}

.grading-opportunities-table .row div:nth-child(10) {
  text-align: right;
  padding-right: 0;
}

.gem-rate-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.12;
}

.gem-rate-sample {
  font-size: 0.72rem;
  color: #9ab0ce;
}

.gem-rate-low-sample {
  color: #9ab0ce;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  cursor: help;
  position: relative;
}

.gem-rate-tooltip-anchor[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  background: rgba(15, 23, 42, 0.96);
  color: #dbe8ff;
  border: 1px solid rgba(147, 210, 243, 0.35);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.72rem;
  line-height: 1.15;
  white-space: nowrap;
  z-index: 15;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.42);
}

.abnormal-data-muted {
  color: #8ea0b9;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  cursor: help;
  position: relative;
}

.psa10-anomaly-flag {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  margin-bottom: 0;
  line-height: 1;
  position: relative;
  cursor: help;
  vertical-align: baseline;
}

.psa10-anomaly-flag img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  opacity: 0.95;
}

.set-duel-rows {
  display: grid;
  gap: 14px;
}

.set-duel-row {
  border: 1px solid rgba(91, 128, 166, 0.34);
  border-radius: 14px;
  background: rgba(8, 26, 44, 0.76);
  padding: 12px;
}

.set-duel-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  min-width: 0;
}

.set-duel-rank {
  min-width: 48px;
  font-size: 1.05rem;
  font-weight: 800;
  color: rgba(238, 248, 255, 0.98);
}

.set-duel-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.set-duel-value-rank {
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(230, 239, 250, 0.96);
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(186, 206, 230, 0.4);
  background: rgba(194, 214, 237, 0.14);
}

.set-duel-right-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 1 auto;
}

.set-duel-conf-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.set-duel-value-rank-gold {
  color: #fff4c8;
  border-color: rgba(246, 196, 84, 0.86);
  background: linear-gradient(135deg, rgba(255, 224, 128, 0.42), rgba(173, 126, 18, 0.34));
  box-shadow:
    0 0 10px rgba(246, 196, 84, 0.34),
    inset 0 1px 0 rgba(255, 245, 210, 0.45);
}

.set-duel-value-rank-silver {
  color: #f3f8ff;
  border-color: rgba(184, 198, 218, 0.86);
  background: linear-gradient(135deg, rgba(215, 226, 241, 0.42), rgba(126, 144, 166, 0.34));
  box-shadow:
    0 0 10px rgba(184, 198, 218, 0.34),
    inset 0 1px 0 rgba(244, 249, 255, 0.45);
}

.set-duel-value-rank-bronze {
  color: #ffe2cf;
  border-color: rgba(214, 142, 100, 0.86);
  background: linear-gradient(135deg, rgba(218, 152, 114, 0.42), rgba(138, 82, 50, 0.34));
  box-shadow:
    0 0 10px rgba(214, 142, 100, 0.34),
    inset 0 1px 0 rgba(255, 229, 212, 0.45);
}

.set-duel-title {
  font-weight: 800;
  font-size: 1.02rem;
  color: rgba(236, 246, 255, 0.96);
}

.set-duel-sub {
  margin-top: 3px;
  color: rgba(182, 199, 220, 0.94);
  font-size: 0.86rem;
}

.set-duel-cards {
  display: flex;
  gap: 10px;
  overflow: visible;
  padding: 2px 6px 2px 6px;
  align-items: flex-start;
}

.set-duel-card {
  flex: 1 1 0;
  min-width: 82px;
  max-width: 108px;
  text-align: center;
}

.set-duel-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 0.72;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid rgba(123, 160, 198, 0.34);
  background: rgba(13, 24, 37, 0.8);
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.set-duel-card img:hover {
  box-shadow:
    0 0 10px rgba(245, 208, 92, 0.32),
    0 0 18px rgba(245, 208, 92, 0.2);
  transform: translateY(-1px) scale(1.02);
}

.set-duel-card-meta {
  margin-top: 4px;
  font-size: 0.78rem;
  color: rgba(212, 224, 239, 0.92);
  font-weight: 700;
}

@media (max-width: 900px) {
  .set-duel-row {
    overflow: hidden;
  }

  .set-duel-cards {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding: 2px 4px 8px;
    gap: 8px;
  }

  .set-duel-cards::-webkit-scrollbar {
    height: 6px;
  }

  .set-duel-cards::-webkit-scrollbar-thumb {
    background: rgba(133, 174, 212, 0.38);
    border-radius: 999px;
  }

  .set-duel-card {
    flex: 0 0 clamp(84px, 23vw, 104px);
    min-width: 0;
    max-width: none;
    scroll-snap-align: start;
  }
}

@media (max-width: 1220px) and (min-width: 901px) {
  .set-duel-row {
    overflow: hidden;
  }

  .set-duel-head {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .set-duel-right-meta {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .set-duel-cards {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding: 2px 4px 8px;
    gap: 8px;
  }

  .set-duel-cards::-webkit-scrollbar {
    height: 6px;
  }

  .set-duel-cards::-webkit-scrollbar-thumb {
    background: rgba(133, 174, 212, 0.38);
    border-radius: 999px;
  }

  .set-duel-card {
    flex: 0 0 clamp(84px, 12vw, 104px);
    min-width: 0;
    max-width: none;
    scroll-snap-align: start;
  }
}

.portfolio-search-shell {
  display: grid;
  width: 100%;
  gap: 12px;
  grid-template-areas: "set product price qty add";
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.2fr) minmax(110px, 0.85fr) 88px auto;
  align-items: end;
}

.portfolio-page:not(.portfolio-analysis-page) .comparison {
  container-type: inline-size;
}

.portfolio-overview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
}

.portfolio-overview-grid > * {
  min-width: 0;
}

@media (max-width: 1320px) {
  .portfolio-analysis-page #analysisSummary.portfolio-overview-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .portfolio-analysis-page #analysisSummary.portfolio-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@container (max-width: 640px) {
  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (min-width: 641px) and (max-width: 980px) {
  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(7) {
    grid-column: 4;
    grid-row: 1;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(4) {
    grid-column: 1;
    grid-row: 2;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(5) {
    grid-column: 2;
    grid-row: 2;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(6) {
    grid-column: 3;
    grid-row: 2;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(12) {
    grid-column: 4;
    grid-row: 2;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(8) {
    grid-column: 1;
    grid-row: 3;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(9) {
    grid-column: 2;
    grid-row: 3;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(10) {
    grid-column: 3;
    grid-row: 3;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid > :nth-child(11) {
    grid-column: 4;
    grid-row: 3;
  }
}

.portfolio-overview-spacer {
  min-height: 1px;
}

.portfolio-analysis-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  min-height: 1px;
  min-width: 0;
}

.portfolio-analysis-btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  min-width: 0;
  border-radius: 9px;
  border: 1px solid rgba(255, 224, 128, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 214, 0.62),
    inset 0 -1px 0 rgba(124, 82, 11, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 215, 112, 0.94), rgba(226, 160, 36, 0.94));
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3d2606;
  text-shadow: 0 1px 0 rgba(255, 240, 183, 0.45);
  transition: transform 140ms ease, box-shadow 180ms ease, filter 180ms ease;
  animation: portfolio-analysis-outline-shimmer 2.6s ease-in-out infinite;
}

.portfolio-analysis-btn:hover {
  animation: none;
  color: #2e1b03;
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 214, 0.8),
    inset 0 -1px 0 rgba(124, 82, 11, 0.48),
    0 10px 18px rgba(140, 97, 16, 0.3),
    0 0 30px rgba(255, 221, 128, 0.5);
}

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

.portfolio-inner-shell.overview-immature {
  border-color: rgba(236, 178, 92, 0.42);
  background: linear-gradient(160deg, rgba(158, 114, 52, 0.34), rgba(180, 132, 58, 0.28));
}

.portfolio-inner-shell.overview-maturing {
  border-color: rgba(224, 220, 200, 0.28);
  background: linear-gradient(160deg, rgba(84, 86, 88, 0.28), rgba(96, 98, 100, 0.22));
}

.portfolio-inner-shell.overview-mature {
  border-color: rgba(122, 216, 170, 0.42);
  background: linear-gradient(160deg, rgba(34, 98, 70, 0.38), rgba(44, 118, 80, 0.32));
}

.portfolio-inner-shell.overview-sellable {
  border-color: rgba(246, 203, 88, 0.74);
  background: rgba(7, 21, 36, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(248, 214, 120, 0.28),
    0 0 0 0 rgba(248, 214, 120, 0.0);
  animation: portfolio-sellable-outline-shimmer 2.6s ease-in-out infinite;
}

@keyframes portfolio-sellable-outline-shimmer {
  0% {
    border-color: rgba(238, 193, 72, 0.62);
    box-shadow:
      inset 0 0 0 1px rgba(248, 214, 120, 0.22),
      0 0 0 0 rgba(248, 214, 120, 0.0);
  }
  50% {
    border-color: rgba(255, 220, 120, 0.9);
    box-shadow:
      inset 0 0 0 1px rgba(255, 226, 142, 0.38),
      0 0 14px rgba(255, 220, 120, 0.26);
  }
  100% {
    border-color: rgba(238, 193, 72, 0.62);
    box-shadow:
      inset 0 0 0 1px rgba(248, 214, 120, 0.22),
      0 0 0 0 rgba(248, 214, 120, 0.0);
  }
}

@keyframes portfolio-cta-shimmer {
  0% {
    background-position: 0% 0%, 210% 0%;
  }
  100% {
    background-position: 0% 0%, -25% 0%;
  }
}

@keyframes portfolio-analysis-outline-shimmer {
  0% {
    box-shadow:
      inset 0 1px 0 rgba(255, 247, 214, 0.62),
      inset 0 -1px 0 rgba(124, 82, 11, 0.42),
      0 0 0 rgba(255, 220, 120, 0);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 247, 214, 0.7),
      inset 0 -1px 0 rgba(124, 82, 11, 0.46),
      0 0 14px rgba(255, 220, 120, 0.28);
  }
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 247, 214, 0.62),
      inset 0 -1px 0 rgba(124, 82, 11, 0.42),
      0 0 0 rgba(255, 220, 120, 0);
  }
}

.portfolio-field {
  display: grid;
  gap: 6px;
  position: relative;
  min-width: 0;
}

.portfolio-field-set {
  grid-area: set;
}

.portfolio-field-product {
  grid-area: product;
}

.portfolio-field-price {
  grid-area: price;
}

.portfolio-field-qty {
  grid-area: qty;
}

.portfolio-field > span {
  font-size: 0.8rem;
  color: rgba(191, 209, 231, 0.92);
  font-weight: 700;
}

.portfolio-field > input,
.portfolio-field > select {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(111, 143, 183, 0.45);
  background: rgba(11, 32, 56, 0.95);
  color: rgba(241, 245, 249, 0.96);
  padding: 10px 12px;
  font-size: 0.9rem;
  min-height: 42px;
}

.portfolio-field > input:focus,
.portfolio-field > select:focus {
  outline: none;
  border-color: rgba(245, 208, 92, 0.72);
  box-shadow: 0 0 0 3px rgba(245, 208, 92, 0.18);
}

.portfolio-search-option {
  border: 0;
  width: 100%;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

#portfolioAddBtn {
  grid-area: add;
  align-self: end;
  justify-self: stretch;
  min-width: 92px;
  min-height: 42px;
  padding: 10px 14px;
  white-space: nowrap;
}

.portfolio-rows {
  display: grid;
  gap: 14px;
}

.portfolio-sort-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portfolio-sort-label {
  font-size: 0.78rem;
  color: rgba(189, 204, 224, 0.92);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.portfolio-sort-select {
  min-width: 168px;
  border-radius: 10px;
  border: 1px solid rgba(111, 143, 183, 0.45);
  background: rgba(11, 32, 56, 0.95);
  color: rgba(241, 245, 249, 0.96);
  padding: 8px 10px;
  font-size: 0.86rem;
  font-weight: 700;
}

.portfolio-sort-select:focus {
  outline: none;
  border-color: rgba(245, 208, 92, 0.72);
  box-shadow: 0 0 0 3px rgba(245, 208, 92, 0.18);
}

.portfolio-analysis-table .head,
.portfolio-analysis-table .row {
  grid-template-columns: 1.4fr 1fr 0.6fr 1fr 1fr 1fr;
}

.analysis-set-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.analysis-set-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analysis-product-inline {
  display: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(182, 199, 220, 0.94);
}

.portfolio-analysis-table .head {
  display: grid;
  gap: 12px;
  padding: 0 12px 8px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.portfolio-analysis-shift {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.portfolio-analysis-page #analysisSummary.portfolio-overview-grid {
  margin-top: 6px;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.portfolio-analysis-page #analysisSummary .portfolio-inner-shell {
  border-radius: 14px;
  border: 1px solid rgba(91, 128, 166, 0.28);
  background: rgba(7, 21, 36, 0.62);
  padding: 11px 13px;
}

.portfolio-analysis-page #analysisSummary .portfolio-inner-shell .label {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.portfolio-analysis-page #analysisSummary .portfolio-inner-shell .value {
  margin-top: 6px;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.portfolio-analysis-upside-compare {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(190px, 260px) auto minmax(190px, 260px);
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.portfolio-analysis-upside-card {
  border: 1px solid rgba(91, 128, 166, 0.32);
  border-radius: 14px;
  background: rgba(7, 21, 36, 0.62);
  min-height: 112px;
  padding: 11px 14px 10px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 3px;
}

.portfolio-analysis-upside-card .label {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(188, 204, 226, 0.9);
}

.portfolio-analysis-upside-card .value {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.08;
}

.portfolio-analysis-upside-card .value + .value {
  font-size: 1.02rem;
  opacity: 0.95;
}

.portfolio-analysis-upside-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 40px;
  position: relative;
}

.portfolio-analysis-upside-gain {
  margin-top: 12px;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: rgba(233, 241, 252, 0.94);
}

.portfolio-analysis-upside-gain .gain-amount {
  color: var(--good);
}

.portfolio-analysis-upside-gain .gain-note {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(177, 196, 218, 0.9);
}

.portfolio-analysis-upside-arrow::before {
  content: "";
  display: block;
  width: 50px;
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(251, 216, 83, 0.98), rgba(236, 187, 27, 0.98));
  box-shadow:
    0 0 10px rgba(249, 207, 63, 0.28),
    inset 0 0 0 1px rgba(255, 235, 157, 0.3);
}

.portfolio-analysis-upside-arrow::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 24px solid rgba(249, 207, 63, 0.98);
  filter: drop-shadow(0 0 8px rgba(249, 207, 63, 0.24));
}

.portfolio-analysis-shift-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(111, 143, 183, 0.32);
  background: rgba(7, 21, 36, 0.5);
}

.portfolio-analysis-shift-row .label {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(177, 196, 218, 0.9);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 700;
}

.portfolio-analysis-shift-row .value {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.portfolio-analysis-plan-actions {
  margin-bottom: 8px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.portfolio-analysis-plan-link {
  margin-left: auto;
}

#analysisMatchTypesBtn.is-active {
  border-color: rgba(245, 208, 92, 0.78);
  box-shadow: 0 0 0 2px rgba(245, 208, 92, 0.18);
}

.portfolio-analysis-arrow {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.8);
}

.portfolio-positions-head {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.portfolio-positions-head .portfolio-sort-wrap {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
}

.portfolio-positions-head h3 {
  margin: 0;
  flex-shrink: 0;
}

.portfolio-shell .set-duel-head {
  align-items: flex-start;
}

.portfolio-meta-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.portfolio-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.portfolio-head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.portfolio-signal-box {
  min-width: 340px;
  min-height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(111, 143, 183, 0.45);
  background: rgba(15, 34, 53, 0.9);
  padding: 8px 12px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.portfolio-signal-box .signal-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(173, 194, 219, 0.92);
  font-weight: 700;
}

.portfolio-signal-box .signal-value {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.portfolio-signal-box .signal-action {
  margin: 0;
  justify-self: end;
  font-size: 0.82rem;
  font-weight: 800;
}

.portfolio-signal-box.op-good {
  border-color: rgba(111, 229, 157, 0.55);
  background: rgba(20, 57, 43, 0.9);
}

.portfolio-signal-box.op-mid {
  border-color: rgba(246, 196, 84, 0.55);
  background: rgba(61, 49, 26, 0.9);
}

.portfolio-signal-box.op-neutral {
  border-color: rgba(111, 143, 183, 0.45);
  background: rgba(15, 34, 53, 0.9);
}

.portfolio-signal-box.op-bad {
  border-color: rgba(239, 102, 102, 0.55);
  background: rgba(65, 29, 29, 0.9);
}

.portfolio-signal-box.op-good .signal-value {
  color: var(--good);
}

.portfolio-signal-box.op-mid .signal-value {
  color: var(--mid);
}

.portfolio-signal-box.op-neutral .signal-value {
  color: var(--text);
}

.portfolio-signal-box.op-bad .signal-value {
  color: var(--bad);
}

.portfolio-remove-btn {
  border-radius: 999px;
  border: 1px solid rgba(111, 143, 183, 0.4);
  background: rgba(15, 34, 53, 0.86);
  color: rgba(227, 236, 247, 0.95);
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.portfolio-edit-btn {
  border-radius: 999px;
  border: 1px solid rgba(111, 143, 183, 0.4);
  background: rgba(15, 34, 53, 0.86);
  color: rgba(227, 236, 247, 0.95);
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.portfolio-sold-btn {
  border-radius: 999px;
  border: 1px solid rgba(245, 208, 92, 0.46);
  background: rgba(67, 53, 20, 0.56);
  color: rgba(249, 229, 169, 0.96);
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.portfolio-title-actions {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.portfolio-overview-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-page .comparison-head.stacked.portfolio-overview-head {
  flex-direction: row;
  align-items: center;
}

.portfolio-overview-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.portfolio-edit-modal[hidden] {
  display: none;
}

.portfolio-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 18px;
}

.portfolio-edit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 11, 17, 0.76);
  backdrop-filter: blur(3px);
}

.portfolio-edit-panel {
  position: relative;
  width: min(760px, 96vw);
  border-radius: 14px;
  border: 1px solid rgba(111, 143, 183, 0.38);
  background: rgba(7, 21, 36, 0.95);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.portfolio-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portfolio-edit-head h3 {
  margin: 0;
}

.portfolio-edit-close {
  border: 1px solid rgba(111, 143, 183, 0.4);
  background: rgba(15, 34, 53, 0.86);
  color: rgba(227, 236, 247, 0.95);
  border-radius: 10px;
  min-width: 30px;
  height: 30px;
  cursor: pointer;
}

.portfolio-edit-sub {
  margin: 0;
  color: rgba(182, 199, 220, 0.94);
  font-size: 0.86rem;
}

.portfolio-edit-table {
  border: 1px solid rgba(91, 128, 166, 0.32);
  border-radius: 12px;
  overflow: hidden;
}

.portfolio-edit-table-head,
.portfolio-edit-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
}

#portfolioEditModal .portfolio-edit-table-head,
#portfolioEditModal .portfolio-edit-row {
  grid-template-columns: minmax(180px, 1.3fr) minmax(130px, 1fr) minmax(90px, 0.8fr) 44px;
}

.portfolio-edit-table-head {
  background: rgba(14, 36, 58, 0.8);
  color: rgba(189, 204, 224, 0.94);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.portfolio-edit-row {
  border-top: 1px solid rgba(91, 128, 166, 0.22);
}

.portfolio-edit-row input {
  border-radius: 10px;
  border: 1px solid rgba(111, 143, 183, 0.42);
  background: rgba(11, 32, 56, 0.92);
  color: rgba(241, 245, 249, 0.96);
  padding: 8px 9px;
  font: inherit;
  width: 100%;
}

.portfolio-edit-row .portfolio-entry-remove {
  justify-self: end;
  border: 1px solid rgba(111, 143, 183, 0.38);
  background: rgba(15, 34, 53, 0.86);
  color: rgba(227, 236, 247, 0.95);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

#portfolioSoldModal .portfolio-edit-table-head,
#portfolioSoldModal .portfolio-edit-row {
  grid-template-columns: 1.3fr 1fr 0.8fr;
}

#portfolioSoldHistoryModal .portfolio-edit-table-head,
#portfolioSoldHistoryModal .portfolio-edit-row {
  grid-template-columns: 1fr 1.65fr 0.55fr 0.95fr 1fr 44px;
  padding-right: 6px;
}

#portfolioSoldHistoryModal .portfolio-edit-table-head > div:nth-child(3),
#portfolioSoldHistoryModal .portfolio-edit-row > div:nth-child(3) {
  text-align: center;
}

#portfolioSoldHistoryModal .portfolio-edit-table-head > div:nth-child(4),
#portfolioSoldHistoryModal .portfolio-edit-table-head > div:nth-child(5),
#portfolioSoldHistoryModal .portfolio-edit-row > div:nth-child(4),
#portfolioSoldHistoryModal .portfolio-edit-row > div:nth-child(5) {
  text-align: right;
}

#portfolioSoldHistoryModal .portfolio-edit-table-head > div:last-child {
  visibility: hidden;
}

#portfolioSoldHistoryModal .portfolio-edit-row > div:last-child {
  display: flex;
  justify-content: flex-end;
}

.portfolio-sale-delete-btn {
  justify-self: end;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(111, 143, 183, 0.38);
  background: rgba(15, 34, 53, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.portfolio-sale-delete-btn img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  opacity: 0.92;
}

.portfolio-sale-delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.portfolio-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.portfolio-edit-error {
  margin: 0 auto 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bad);
}

.portfolio-inner-shells {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  width: 100%;
}

.portfolio-inner-shell {
  border: 1px solid rgba(91, 128, 166, 0.28);
  border-radius: 12px;
  background: rgba(7, 21, 36, 0.62);
  padding: 10px 12px;
  min-width: 0;
}

.portfolio-inner-shell.portfolio-shell-positive {
  border-color: rgba(111, 229, 157, 0.34);
  background: rgba(28, 66, 49, 0.38);
}

.portfolio-inner-shell.portfolio-shell-negative {
  border-color: rgba(239, 102, 102, 0.34);
  background: rgba(84, 34, 34, 0.36);
}

.portfolio-inner-shell.portfolio-shell-neutral {
  border-color: rgba(111, 143, 183, 0.28);
  background: rgba(7, 21, 36, 0.62);
}

.portfolio-inner-shell .label {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(177, 196, 218, 0.9);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 700;
}

.portfolio-inner-shell .value {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: rgba(240, 247, 255, 0.97);
  overflow-wrap: anywhere;
}

.portfolio-inner-shell .value .value-sub {
  margin-left: 6px;
  font-size: 0.74em;
  font-weight: 700;
  color: rgba(189, 204, 224, 0.92);
  white-space: nowrap;
}

.portfolio-inner-shell .value.diff-positive {
  color: var(--good);
}

.portfolio-inner-shell .value.diff-negative {
  color: var(--bad);
}

.portfolio-inner-shell .value.diff-neutral {
  color: var(--muted);
}

.card-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: block;
  padding: 22px;
  background: rgba(5, 10, 16, 0.78);
  backdrop-filter: blur(5px);
}

.card-preview-modal[hidden] {
  display: none;
}

.card-preview-image {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(440px, 88vw);
  max-height: calc(100dvh - 44px);
  height: auto;
  aspect-ratio: 0.72;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(245, 208, 92, 0.7);
  box-shadow:
    0 0 0 1px rgba(245, 208, 92, 0.5),
    0 18px 44px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(245, 208, 92, 0.24);
  background: rgba(8, 16, 25, 0.9);
  transform: translate(-50%, -50%) perspective(1100px) rotateX(0deg) rotateY(0deg);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.12s ease-out;
}

.diff-positive {
  color: var(--good);
  font-weight: 700;
}

.diff-negative {
  color: var(--bad);
  font-weight: 700;
}

.diff-neutral {
  color: var(--muted);
}

.slab-metric-mid {
  color: var(--mid);
  font-weight: 700;
}

.set-rankings-table {
  --set-mid-shift: 0px;
  --set-mid-bias: 40px;
}

.set-rankings-table .row {
  grid-template-columns: 0.5fr 1.3fr 1.2fr 1fr 1fr 1fr 1.1fr;
}

.set-rankings-table .row div:nth-child(2),
.set-rankings-table .row div:nth-child(3) {
  text-align: center;
  white-space: normal;
}

.set-rankings-table .row div:nth-child(4),
.set-rankings-table .row div:nth-child(5),
.set-rankings-table .row div:nth-child(6) {
  text-align: center;
  transform: translateX(calc(var(--set-mid-shift) + var(--set-mid-bias)));
}

.set-rankings-table .row div:nth-child(7) {
  text-align: right;
}


.row {
  display: grid;
  grid-template-columns: 0.6fr 1.2fr 1.2fr 1fr 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid transparent;
}

.row:not(.header) {
  margin-bottom: 8px;
}

.clickable-product-row {
  cursor: pointer;
}

.clickable-product-row:hover {
  border-color: rgba(147, 210, 243, 0.45);
}

.row:last-child {
  margin-bottom: 0;
}

.row.header {
  background: transparent;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.row div {
  min-width: 0;
}

.inline-detail-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

.inline-detail-link:hover {
  text-decoration: underline;
}

.series-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  width: fit-content;
}

.series-tag.series-swsh {
  background: rgba(147, 210, 243, 0.18);
  border-color: rgba(147, 210, 243, 0.3);
  color: #cfe8f6;
}

.series-tag.series-sv {
  background: rgba(197, 154, 255, 0.16);
  border-color: rgba(197, 154, 255, 0.3);
  color: #e4d2ff;
}

.series-tag.series-mega {
  background: rgba(244, 236, 120, 0.24);
  border-color: rgba(244, 236, 120, 0.42);
  color: #fff4b6;
}


.top-cards {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 24px;
}

.top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.promo-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.ancillary-pack-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 24px;
}

.ancillary-pack-grid .card-head {
  padding-right: 0;
}

.ancillary-pack-grid .card-head .tag {
  margin-left: auto;
}

.ancillary-packs-section {
  margin-bottom: 24px;
}

.top-card {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 10px;
}

.set-page .top-card {
  background: transparent;
  border-color: transparent;
  padding: 0;
}

.top-card img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.top-meta h4 {
  margin: 0;
  font-size: 1rem;
}

.top-meta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.top-price {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.empty {
  color: var(--muted);
}

.set-stats,
.prediction,
.etb-eval,
.bundle-eval,
.pack-eval {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 24px;
}

.section-break {
  margin: 28px 0 24px;
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0),
    rgba(15, 23, 42, 0.28),
    rgba(15, 23, 42, 0)
  );
}

.ancillary-containing-section {
  padding: 0;
  margin-bottom: 24px;
}

.ancillary-containing-title {
  margin: 0 0 8px;
}

.ancillary-containing-meta {
  margin: 0 0 14px;
  color: var(--muted);
}

.ancillary-containing-list {
  display: grid;
  gap: 14px;
}

.ancillary-containing-item {
  margin-bottom: 0;
}

.clickable-ancillary-section {
  cursor: pointer;
}

.set-directory {
  position: relative;
  padding-top: 20px;
}

.sets-type-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.set-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.prediction .set-grid,
.etb-eval .set-grid,
.bundle-eval .set-grid,
.pack-eval .set-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.etb-value-breakdown-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.set-card {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.buy-target-panel {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(246, 196, 84, 0.45);
  background: linear-gradient(135deg, rgba(246, 196, 84, 0.16), rgba(147, 210, 243, 0.1));
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 4px;
}

.buy-target-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  grid-column: 1 / -1;
}

.target-market-ratio {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--accent-2);
  white-space: nowrap;
}

.buy-target-value {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  grid-column: 1 / -1;
}

.buy-target-value.target-good {
  color: var(--good);
}

.buy-target-value.target-bad {
  color: var(--bad);
}

.buy-target-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text);
  opacity: 0.88;
  grid-column: 1;
  grid-row: 3;
  align-self: end;
}

.buy-target-meta.target-good {
  color: var(--good);
  opacity: 1;
}

.buy-target-meta.target-bad {
  color: var(--bad);
  opacity: 1;
}

.buy-strength {
  margin: 0;
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
  align-self: center;
  text-align: right;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #f3cf7c;
}

.sell-strength {
  margin: 0;
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
  align-self: center;
  text-align: right;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #f3cf7c;
}

.buy-strength-strong {
  color: #f3cf7c;
}

.buy-strength-weak {
  color: #f3cf7c;
}

.buy-strength-ignore {
  color: #f3cf7c;
}

.buy-strength-avoid {
  color: #f3cf7c;
}

.sell-strength-hoard {
  color: #f3cf7c;
}

.sell-strength-hold {
  color: #f3cf7c;
}

.sell-strength-fine {
  color: #f3cf7c;
}

.sell-strength-now {
  color: #f3cf7c;
}

.target-time-estimate {
  margin: 0;
  grid-column: 1;
  grid-row: 4;
  align-self: center;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.95;
}

.target-panels {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.target-panels .buy-target-panel {
  margin-top: 0;
}

.split-metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
}

.split-metric-col {
  display: grid;
  gap: 4px;
}

.split-metric-left {
  text-align: left;
}

.split-metric-right {
  text-align: right;
}

.budget-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  display: grid;
  gap: 12px;
}

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

.budget-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.budget-input {
  width: 180px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.budget-range-values {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.budget-range-values .budget-input {
  width: 120px;
}

.budget-slider-dual {
  position: relative;
  width: 100%;
  height: 24px;
}

.budget-slider-dual::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 999px;
  background: rgba(147, 210, 243, 0.28);
}

.budget-slider-dual::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: calc(var(--range-min-pct, 0) * 1%);
  width: calc((var(--range-max-pct, 100) - var(--range-min-pct, 0)) * 1%);
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(246, 196, 84, 0.45);
}

.budget-slider-dual .budget-slider {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 24px;
  margin: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.budget-slider-dual .budget-slider::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: var(--accent);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.budget-slider-dual .budget-slider::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: var(--accent);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.budget-slider {
  width: 100%;
  accent-color: var(--accent);
}

.budget-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.budget-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.top-investments-page .budget-results .row {
  grid-template-columns: 0.56fr 1.34fr 1.2fr 0.95fr 0.95fr 0.8fr;
}

.top-investments-page .budget-results .row div:nth-child(1) {
  text-align: left;
}

.top-investments-page .budget-results .row div:nth-child(2),
.top-investments-page .budget-results .row div:nth-child(3) {
  text-align: left;
}

.top-investments-page .budget-results .row div:nth-child(4),
.top-investments-page .budget-results .row div:nth-child(5),
.top-investments-page .budget-results .row div:nth-child(6) {
  text-align: right;
}

.top-investments-page .budget-results .row:not(.header) div:nth-child(4),
.top-investments-page .budget-results .row:not(.header) div:nth-child(5),
.top-investments-page .budget-results .row:not(.header) div:nth-child(6) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.top-investments-page .budget-results .budget-set-meta {
  display: none;
}

.top-investments-page .budget-opp-desktop {
  display: inline;
}

.top-investments-page .budget-opp-mobile {
  display: none;
}

.budget-narrative {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 0.95rem;
}

.footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.muted {
  color: #8ea1ad;
}

@media (max-width: 900px) {
  .ancillary-pack-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .promo-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .set-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  /* Set overview: keep 3-across on tablet/medium widths. */
  .set-page .set-stats .set-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .prediction .set-grid,
  .etb-eval .set-grid,
  .bundle-eval .set-grid,
  .pack-eval .set-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  #boxHypotheticalCard {
    grid-column: 2;
    justify-self: end;
    text-align: right;
  }

  .budget-summary {
    grid-template-columns: 1fr;
  }

  .target-panels {
    grid-template-columns: 1fr;
  }

  .split-metric-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .split-metric-right {
    text-align: left;
  }

  .ancillary-template-page .set-stats .split-overview-card .split-metric-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
  }

  .ancillary-template-page .set-stats .split-overview-card .split-metric-left .value {
    text-align: left;
  }

  .ancillary-template-page .set-stats .split-overview-card .split-metric-right {
    text-align: right;
  }
}

/* Set overview: jump directly from 3-across to 1-across on true mobile. */
@media (max-width: 640px) {
  .set-page .set-stats .set-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 800px) {
  .set-page .set-stats .set-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .set-page .set-stats .set-card {
    display: grid;
    align-items: initial;
    justify-content: initial;
    gap: 6px;
    padding: 14px 14px;
  }

  .set-page .set-stats .set-card .label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .set-page .set-stats .set-card .value {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.1;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 800px) {
  .stats,
  .metrics {
    grid-template-columns: 1fr;
  }

  .ancillary-template-page .ancillary-pack-grid .card .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
  }

  .ancillary-template-page .ancillary-pack-grid .card .stat-right {
    text-align: right;
  }

  .home-page .home-top-plays .rankings-table .row {
    grid-template-columns: 32px minmax(0, 1fr) minmax(72px, auto);
    gap: 10px;
    padding: 10px 10px;
  }

  .home-page .home-top-plays .rankings-table .row div:nth-child(1) {
    grid-column: 1;
    text-align: left;
  }

  .home-page .home-top-plays .rankings-table .row:not(.header) div:nth-child(2) {
    grid-column: 2;
    text-align: left;
    line-height: 1.2;
    font-size: 0.94rem;
  }

  .home-page .home-top-plays .rankings-table .row.header div:nth-child(2) {
    grid-column: 2;
    text-align: left;
    line-height: 1.2;
    font-size: inherit;
  }

  .home-page .home-top-plays .rankings-table .row div:nth-child(3),
  .home-page .home-top-plays .rankings-table .row div:nth-child(4),
  .home-page .home-top-plays .rankings-table .row div:nth-child(5) {
    display: none;
  }

  .home-page .home-top-plays .rankings-table .row div:nth-child(6) {
    grid-column: 3;
    text-align: right;
    white-space: nowrap;
  }

  .home-page .home-top-plays .home-top-play-product-inline {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.15;
    color: var(--muted);
    text-transform: none;
    letter-spacing: normal;
  }

  .home-page .home-top-plays .rankings-table .row.header {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .top-investments-page .comparison-head .legend {
    display: none !important;
  }

  .top-investments-page .rankings-table .row {
    grid-template-columns: 32px minmax(0, 0.92fr) minmax(98px, auto) minmax(84px, auto) 22px;
    gap: 10px;
    padding: 10px 10px;
  }

  .top-investments-page .rankings-table .row div:nth-child(1) {
    grid-column: 1;
    text-align: left;
  }

  .top-investments-page .rankings-table .row div:nth-child(2),
  .top-investments-page .rankings-table .row div:nth-child(3),
  .top-investments-page .rankings-table .row div:nth-child(6) {
    display: none !important;
  }

  .top-investments-page .rankings-table .row div:nth-child(4) {
    display: block !important;
    grid-column: 2;
    text-align: left;
  }

  .top-investments-page .rankings-table .row:not(.header) div:nth-child(4) {
    line-height: 1.2;
    font-size: 0.94rem;
  }

  .top-investments-page .rankings-table .row div:nth-child(5) {
    display: flex !important;
    grid-column: 3;
    justify-content: center;
    align-items: center;
    text-align: center;
    white-space: nowrap;
  }

  .top-investments-page .rankings-table .row div:nth-child(7) {
    display: flex !important;
    grid-column: 4;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
  }

  .top-investments-page .rankings-table .row div:nth-child(8) {
    display: flex !important;
    grid-column: 5;
    justify-content: flex-end;
    align-items: center;
  }

  .top-investments-page .rankings-table .row.header {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .top-investments-page .top-investment-set-inline {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.15;
    color: var(--muted);
    text-transform: none;
    letter-spacing: normal;
  }

  .top-investments-page .top-investment-set-inline.specialty-set {
    color: #d995ad;
  }

  .speculative-picks-page .rankings-table .row {
    grid-template-columns: 32px minmax(0, 1fr) 88px 104px 92px 22px;
  }

  .speculative-picks-page .rankings-table .row div:nth-child(2) {
    display: block !important;
    grid-column: 2;
    text-align: left;
  }

  .speculative-picks-page .rankings-table .row div:nth-child(4) {
    display: none !important;
  }

  .speculative-picks-page .rankings-table .row div:nth-child(5) {
    display: flex !important;
    grid-column: 3;
    justify-content: center;
    align-items: center;
  }

  .speculative-picks-page .rankings-table .row div:nth-child(6) {
    display: flex !important;
    grid-column: 4;
    justify-content: center;
    align-items: center;
  }

  .speculative-picks-page .rankings-table .row div:nth-child(7) {
    display: flex !important;
    grid-column: 5;
    justify-content: center;
    align-items: center;
  }

  .speculative-picks-page .rankings-table .row div:nth-child(8) {
    grid-column: 6;
  }

  @media (max-width: 620px) {
    .top-investments-page .rankings-table .row {
      grid-template-columns: 32px minmax(0, 1fr) minmax(62px, auto) 22px;
    }

    .speculative-picks-page .rankings-table .row {
      grid-template-columns: 32px minmax(0, 1fr) 104px 92px 22px;
    }

    .top-investments-page .rankings-table .row div:nth-child(5) {
      display: none !important;
    }

    .speculative-picks-page .rankings-table .row div:nth-child(5) {
      display: none !important;
    }

    .speculative-picks-page .rankings-table .row div:nth-child(6) {
      grid-column: 3;
    }

    .top-investments-page .rankings-table .row div:nth-child(7) {
      grid-column: 3;
    }

    .speculative-picks-page .rankings-table .row div:nth-child(7) {
      grid-column: 4;
    }

    .top-investments-page .rankings-table .row div:nth-child(8) {
      grid-column: 4;
    }

    .speculative-picks-page .rankings-table .row div:nth-child(8) {
      grid-column: 5;
    }
  }

  .top-investments-page .budget-results .row {
    grid-template-columns: minmax(0, 1.95fr) minmax(82px, 0.88fr) minmax(70px, 0.74fr) !important;
    gap: 12px;
    padding: 10px 10px;
  }

  .top-investments-page .budget-results .row div:nth-child(1),
  .top-investments-page .budget-results .row div:nth-child(3) {
    display: none !important;
  }

  .top-investments-page .budget-results .row div:nth-child(2) {
    display: block !important;
    grid-column: 1;
    text-align: left;
    min-width: 0;
  }

  .top-investments-page .budget-results .row div:nth-child(4) {
    display: flex !important;
    grid-column: 2;
    justify-content: flex-end;
    align-items: center;
    text-align: right;
    white-space: nowrap;
  }

  .top-investments-page .budget-results .row div:nth-child(6) {
    display: flex !important;
    grid-column: 3;
    justify-content: flex-end;
    align-items: center;
    text-align: right;
    white-space: nowrap;
  }

  .top-investments-page .budget-results .row div:nth-child(5) {
    display: none !important;
  }

  .top-investments-page .budget-results .row.header {
    font-size: 0.64rem;
    letter-spacing: 0.06em;
  }

  .top-investments-page .budget-opp-desktop {
    display: none;
  }

  .top-investments-page .budget-opp-mobile {
    display: inline;
  }

  .top-investments-page .budget-results .row .budget-set-cell > a {
    display: block;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-investments-page .budget-results .row .budget-set-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.15;
    color: var(--muted);
    text-transform: none;
    letter-spacing: normal;
  }

  .top-investments-page .duel-pager {
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
  }

  .top-investments-page .duel-pager .refresh-link {
    padding: 5px 9px;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .top-investments-page #topInvestmentsPageInfo {
    white-space: nowrap;
    font-size: 0.9rem;
  }

  .alerts-page .rankings-table .row {
    grid-template-columns: 72px minmax(140px, 1fr) minmax(86px, auto) minmax(86px, auto) 24px;
    gap: 14px;
    padding: 10px 10px;
  }

  .alerts-page .rankings-table .row div:nth-child(1) {
    grid-column: 1;
    text-align: left;
    white-space: nowrap;
  }

  .alerts-page .rankings-table .row:not(.header) div:nth-child(2) {
    grid-column: 2;
    text-align: left;
    line-height: 1.2;
    font-size: 0.93rem;
  }

  .alerts-page .rankings-table .row.header div:nth-child(2) {
    text-align: left;
    justify-self: start;
  }

  .alerts-page .rankings-table .row div:nth-child(3),
  .alerts-page .rankings-table .row div:nth-child(4),
  .alerts-page .rankings-table .row div:nth-child(5),
  .alerts-page .rankings-table .row div:nth-child(8) {
    display: none;
  }

  .alerts-page .rankings-table .row div:nth-child(6) {
    grid-column: 3;
    text-align: center;
    white-space: nowrap;
  }

  .alerts-page .rankings-table .row div:nth-child(7) {
    grid-column: 4;
    text-align: center;
    white-space: nowrap;
  }

  .alerts-page .rankings-table .row div:nth-child(9) {
    grid-column: 5;
    text-align: right;
  }

  .alerts-page .rankings-table .row .rankings-cart-col {
    justify-content: flex-end;
    align-items: center;
  }

  .alerts-page .rankings-table .alerts-date-full {
    display: none;
  }

  .alerts-page .rankings-table .alerts-date-short {
    display: inline;
  }

  .alerts-page .rankings-table .alerts-product-inline {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.15;
    color: var(--muted);
    text-transform: none;
    letter-spacing: normal;
  }

  .alerts-page .rankings-table .row.header {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .alerts-page #alertsPager.duel-pager {
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
  }

  .alerts-page #alertsPager .duel-filter-select {
    min-width: 0;
    width: auto;
    padding: 6px 12px;
  }

  .alerts-page #alertsPageInfo {
    white-space: nowrap;
    font-size: 0.9rem;
  }

  .set-directory .sets-type-legend {
    position: relative;
    width: 100%;
    height: 0;
    margin: 0;
  }

  .set-directory .sets-main-legend,
  .set-directory .sets-specialty-legend {
    position: absolute;
    top: 10px;
    right: 14px;
  }

  .set-directory .sets-main-legend {
    right: 126px;
  }

  .set-directory > ul {
    margin-top: 40px !important;
  }

  .set-status-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .set-status-actions {
    position: static;
    top: auto;
    right: auto;
    display: flex;
    flex-wrap: wrap;
  }

  .set-page #productCards .card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "head head"
      "stats stats"
      "metrics trend";
    row-gap: 12px;
    column-gap: 12px;
  }

  .set-page #productCards .card .card-head {
    grid-area: head;
  }

  .set-page #productCards .card .stats {
    grid-area: stats;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }

  .set-page #productCards .card .metrics {
    grid-area: metrics;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: end;
  }

  .set-page #productCards .card .product-trend {
    grid-area: trend;
    position: static;
    right: auto;
    bottom: auto;
    align-self: end;
    justify-self: end;
    margin: 0;
  }

  .set-page .investment-table .row {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 0.95fr) 22px;
    gap: 10px;
    padding: 10px 10px;
  }

  .set-page .investment-table .row div:nth-child(1) {
    grid-column: 1;
    text-align: left;
    line-height: 1.2;
  }

  .set-page .investment-table .row div:nth-child(2),
  .set-page .investment-table .row div:nth-child(5) {
    display: none !important;
  }

  .set-page .investment-table .row div:nth-child(3) {
    display: block !important;
    grid-column: 2;
    text-align: center;
    white-space: nowrap;
  }

  .set-page .investment-table .row div:nth-child(4) {
    display: block !important;
    grid-column: 3;
    text-align: center;
    white-space: nowrap;
  }

  .set-page .investment-table .row div:nth-child(6) {
    display: flex !important;
    grid-column: 4;
    justify-content: flex-end;
    align-items: center;
  }

  .set-page .investment-table .row.header {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .set-rankings-page .hero .subhead {
    white-space: normal;
    overflow-wrap: anywhere;
  }


  .set-grid {
    grid-template-columns: 1fr;
  }

  .set-stats .set-grid {
    gap: 10px;
  }

  .set-stats .set-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
  }

  .set-stats .set-card .label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .set-stats .set-card .value {
    margin: 0;
    font-size: 1.02rem;
    text-align: right;
    white-space: nowrap;
  }

  .ancillary-template-page .set-stats .split-overview-card {
    display: block;
    align-items: initial;
    justify-content: initial;
    gap: 0;
  }

  .ancillary-template-page .set-stats .split-overview-card .split-metric-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
  }

  .ancillary-template-page .set-stats .split-overview-card .split-metric-left .value {
    text-align: left;
  }

  .ancillary-template-page .set-stats .split-overview-card .split-metric-right .value {
    text-align: right;
  }

  .ancillary-template-page .set-stats .split-overview-card .split-metric-col .label,
  .ancillary-template-page .set-stats .split-overview-card .split-metric-col .value {
    margin: 0;
  }

  .prediction .set-grid,
  .etb-eval .set-grid,
  .bundle-eval .set-grid,
  .pack-eval .set-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .set-page .prediction .comparison-head h3,
  .set-page .etb-eval .comparison-head h3,
  .set-page .bundle-eval .comparison-head h3,
  .set-page .pack-eval .comparison-head h3 {
    padding-right: 34px;
    line-height: 1.2;
  }

  .set-page .prediction .comparison-head h3 .muted,
  .set-page .etb-eval .comparison-head h3 .muted,
  .set-page .bundle-eval .comparison-head h3 .muted,
  .set-page .pack-eval .comparison-head h3 .muted {
    display: block;
    margin-top: 4px;
  }

  .prediction .set-grid .set-card,
  .etb-eval .set-grid .set-card,
  .bundle-eval .set-grid .set-card,
  .pack-eval .set-grid .set-card {
    padding: 12px 12px;
  }

  .prediction .set-grid .set-card .label,
  .etb-eval .set-grid .set-card .label,
  .bundle-eval .set-grid .set-card .label,
  .pack-eval .set-grid .set-card .label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .prediction .set-grid .set-card .value,
  .etb-eval .set-grid .set-card .value,
  .bundle-eval .set-grid .set-card .value,
  .pack-eval .set-grid .set-card .value {
    font-size: 1.02rem;
  }

  #boxHypotheticalCard {
    grid-column: 1;
    justify-self: start;
    text-align: left;
  }

  .budget-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .budget-input {
    width: 100%;
  }

  .budget-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .ancillary-pack-grid {
    grid-template-columns: 1fr;
  }

  .promo-grid {
    grid-template-columns: 1fr;
  }

  .tab-row {
    flex-direction: column;
    align-items: stretch;
  }

  .sort-control {
    position: static;
    margin-left: 0;
  }

  .card-rankings-table .row {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  .card-rankings-table .row div:nth-child(3),
  .card-rankings-table .row div:nth-child(4),
  .card-rankings-table .row div:nth-child(5),
  .card-rankings-table .row div:nth-child(6),
  .card-rankings-table .row div:nth-child(7),
  .card-rankings-table .row div:nth-child(8),
  .card-rankings-table .row div:nth-child(9),
  .card-rankings-table .row div:nth-child(10),
  .card-rankings-table .row div:nth-child(11) {
    display: none;
  }

  .set-rankings-page .set-rankings-table .row {
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 10px;
  }

  .set-rankings-page .set-rankings-table .row div:nth-child(1) {
    text-align: left;
  }

  .set-rankings-page .set-rankings-table .row div:nth-child(2) {
    text-align: left;
    line-height: 1.2;
  }

  .set-rankings-page .set-rankings-table .row div:nth-child(7) {
    text-align: right;
    white-space: nowrap;
  }

  .set-rankings-page .set-rankings-table .row div:nth-child(3),
  .set-rankings-page .set-rankings-table .row div:nth-child(4),
  .set-rankings-page .set-rankings-table .row div:nth-child(5),
  .set-rankings-page .set-rankings-table .row div:nth-child(6) {
    display: none;
  }

  .set-rankings-page .set-rankings-table .row.header {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

}
.duel-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.card-duel-page .hero {
  position: relative;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: center;
}

.duel-top-prompt {
  margin: -8px auto 12px;
  text-align: center;
  color: rgba(226, 232, 240, 0.95);
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  font-weight: 700;
}

.duel-top-prompt.duel-top-prompt-plays {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  background: linear-gradient(
    105deg,
    rgba(246, 196, 84, 0.84) 0%,
    rgba(255, 227, 144, 1) 18%,
    rgba(246, 196, 84, 0.84) 36%,
    rgba(147, 210, 243, 0.92) 52%,
    rgba(246, 196, 84, 0.84) 68%,
    rgba(255, 227, 144, 1) 82%,
    rgba(246, 196, 84, 0.84) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shimmer 3.6s linear infinite;
}

.duel-hero-prompt {
  flex: 0 1 auto;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.card-duel-page .duel-header-actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.duel-top-subprompt {
  margin: -14px auto 16px;
  text-align: center;
  color: rgba(183, 199, 220, 0.95);
  font-size: clamp(0.86rem, 1.15vw, 1rem);
  font-weight: 600;
  line-height: 1.4;
}

.duel-word-good {
  color: #6fe08d;
}

.duel-word-bad {
  color: #ff7a7a;
}

.duel-word-draw {
  color: #7fc8ff;
}

.duel-label {
  color: rgba(241, 245, 249, 0.98);
}

.duel-status-below {
  margin: 2px auto 14px;
  text-align: center;
}

.duel-status-row {
  position: relative;
  width: 100%;
}

.duel-draw-wrap .duel-refresh-inline {
  grid-column: 3;
  justify-self: end;
  align-self: center;
  border-color: rgba(246, 196, 84, 0.72);
  color: rgba(255, 228, 150, 0.98);
  box-shadow: 0 0 0 1px rgba(247, 204, 96, 0.26) inset;
}

.duel-seeding-note {
  display: block;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 3px auto 8px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8e8ad;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(246, 197, 82, 0.42);
  background: linear-gradient(180deg, rgba(78, 56, 20, 0.34), rgba(56, 40, 14, 0.24));
}
.duel-seeding-note[hidden] {
  display: none !important;
}

.duel-showcase {
  padding: 18px 0 26px;
  background: transparent;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

.duel-showcase .comparison-head {
  display: none;
}

.duel-draw-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 2px;
  gap: 8px;
}

.duel-draw-button {
  grid-column: 2;
  justify-self: center;
  min-width: 86px;
  padding: 7px 14px;
  font-size: 0.9rem;
  color: #e9f6ff;
  border-color: rgba(120, 196, 255, 0.55);
  background: linear-gradient(180deg, rgba(36, 87, 128, 0.82), rgba(24, 63, 97, 0.82));
  box-shadow: 0 10px 24px rgba(44, 133, 214, 0.22);
}

.duel-draw-button:hover {
  border-color: rgba(152, 212, 255, 0.78);
  background: linear-gradient(180deg, rgba(46, 101, 145, 0.9), rgba(30, 74, 112, 0.9));
}

.duel-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, max-content);
  align-items: center;
  justify-content: center;
  justify-items: stretch;
  overflow: visible;
}

.duel-card {
  position: relative;
  justify-self: center;
  width: clamp(300px, 31vw, 430px);
  aspect-ratio: 745 / 1040;
  background: transparent;
  border: 0;
  padding: 0;
  display: block;
  overflow: visible;
}

.duel-image {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(250, 220, 120, 0.2);
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.45);
  background: rgba(10, 24, 40, 0.35);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.duel-card:hover .duel-image {
  border-color: rgba(255, 220, 120, 0.7);
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.45), 0 0 22px rgba(255, 207, 92, 0.5);
}

.duel-elo-fx {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0) scale(0.74);
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  contain: layout paint;
  font-size: clamp(2.2rem, 6vw, 4.1rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-shadow:
    0 2px 16px rgba(2, 8, 18, 0.7),
    0 0 22px rgba(2, 8, 18, 0.55);
}

.duel-elo-fx.is-gain {
  color: rgba(93, 247, 175, 0.98);
}

.duel-elo-fx.is-loss {
  color: rgba(255, 108, 108, 0.98);
}

.duel-elo-fx.is-show {
  animation: duelEloDeltaPop 980ms cubic-bezier(0.18, 0.76, 0.25, 1) both;
}

@keyframes duelEloDeltaPop {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.74);
  }
  16% {
    opacity: 0.96;
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(1.22);
  }
}

.duel-detail {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 170px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.duel-card-left .duel-detail {
  right: calc(100% + 12px);
  text-align: right;
}

.duel-card-right .duel-detail {
  left: calc(100% + 12px);
}

.duel-card h4 {
  margin: 0 0 6px;
  font-size: 1.16rem;
  line-height: 1.1;
  color: rgba(241, 245, 249, 0.97);
}

.duel-meta {
  margin: 0 0 4px;
  color: rgba(203, 213, 225, 0.95);
  font-size: 1rem;
}

.duel-detail .refresh-link {
  margin-top: 8px;
  width: 100%;
}

.duel-card-cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  text-decoration: none;
}

.duel-card-left .duel-card-cart-link {
  margin-left: auto;
}

.duel-card-right .duel-card-cart-link {
  margin-right: auto;
}

.duel-card-cart-icon {
  width: 19px;
  height: 19px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(84%) sepia(37%) saturate(898%) hue-rotate(332deg) brightness(101%) contrast(93%);
  opacity: 0.98;
}

.duel-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.duel-leaderboard-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.duel-leaderboard-head {
  align-items: center;
  gap: 10px;
}

.duel-leaderboard-subhead {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.duel-leaderboard-subhead h3 {
  margin: 0;
}

.duel-opportunity-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.duel-opportunity-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(246, 194, 62, 0.44);
  background: linear-gradient(140deg, rgba(17, 43, 71, 0.92), rgba(28, 63, 98, 0.9));
  color: #f8e3a3;
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.duel-opportunity-link:hover {
  border-color: rgba(246, 194, 62, 0.72);
  box-shadow: 0 8px 20px rgba(15, 32, 52, 0.35), 0 0 12px rgba(246, 194, 62, 0.2);
  transform: translateY(-1px);
}

.price-filter-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #9ab0ce;
}

.price-filter-control strong {
  color: #d8e7ff;
}

.price-filter-control input[type="range"] {
  width: 170px;
}

.duel-filter-select {
  min-width: 150px;
  border-radius: 999px;
  border: 1px solid rgba(111, 143, 183, 0.45);
  background: rgba(11, 32, 56, 0.95);
  color: rgba(241, 245, 249, 0.96);
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1320px) and (min-width: 901px) {
  .card-rankings-page .comparison-head {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(240px, 1fr) auto;
    grid-template-areas:
      "search links price price"
      ". . supply sort";
    gap: 10px 12px;
    align-items: center;
  }

  .card-rankings-page #cardRankingsSearch {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }

  .card-rankings-page .duel-opportunity-links {
    grid-area: links;
    justify-self: start;
    flex-wrap: nowrap;
  }

  .card-rankings-page .duel-leaderboard-controls {
    display: contents;
    margin-left: 0 !important;
  }

  .card-rankings-page .price-filter-control {
    grid-area: price;
    justify-self: end;
    width: min(290px, 100%);
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .card-rankings-page .price-filter-control input[type="range"] {
    width: 100%;
    min-width: 0;
  }

  .card-rankings-page .card-rankings-supply-metric {
    grid-area: supply;
    justify-self: end;
  }

  .card-rankings-page #cardRankingsSortBy {
    grid-area: sort;
    justify-self: end;
  }

  .slab-opportunities-page .comparison-head {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(240px, 1fr) auto;
    grid-template-areas:
      "search links price price"
      ". . supply sort";
    gap: 10px 12px;
    align-items: center;
  }

  .slab-opportunities-page .slab-opportunities-top-actions,
  .slab-opportunities-page .slab-opportunities-filter-row {
    display: contents;
  }

  .slab-opportunities-page #slabOpportunitiesSearch {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }

  .slab-opportunities-page .duel-opportunity-links {
    grid-area: links;
    justify-self: start;
    flex-wrap: nowrap;
  }

  .slab-opportunities-page .duel-leaderboard-controls {
    display: contents;
    margin-left: 0 !important;
  }

  .slab-opportunities-page .price-filter-control {
    grid-area: price;
    justify-self: end;
    width: min(290px, 100%);
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .slab-opportunities-page .price-filter-control input[type="range"] {
    width: 100%;
    min-width: 0;
  }

  .slab-opportunities-page .slab-opportunities-supply-metric {
    grid-area: supply;
    justify-self: end;
  }

  .slab-opportunities-page #slabOpportunitiesSortBy {
    grid-area: sort;
    justify-self: end;
  }

  .grading-opportunities-page .comparison-head {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(240px, 1fr) auto;
    grid-template-areas:
      "search links lowpop lowpop"
      ". . supply sort";
    gap: 10px 12px;
    align-items: center;
  }

  .grading-opportunities-page .grading-opportunities-top-actions,
  .grading-opportunities-page .grading-opportunities-filter-row {
    display: contents;
  }

  .grading-opportunities-page #gradingOpportunitiesSearch {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }

  .grading-opportunities-page .duel-opportunity-links {
    grid-area: links;
    justify-self: start;
    flex-wrap: nowrap;
  }

  .grading-opportunities-page .grading-low-pop-control {
    grid-area: lowpop;
    justify-self: end;
    margin-left: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
  }

  .grading-opportunities-page .grading-opportunities-supply-metric {
    grid-area: supply;
    justify-self: end;
  }

  .grading-opportunities-page #gradingOpportunitiesSortBy {
    grid-area: sort;
    justify-self: end;
  }
}

@media (max-width: 900px) {
  .card-rankings-page .comparison-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "search links sort"
      "filters filters filters";
    gap: 8px;
    align-items: center;
  }

  .card-rankings-page .comparison-head > .sr-only,
  .card-rankings-page .card-rankings-top-actions > .sr-only {
    display: none;
  }

  .card-rankings-page .card-rankings-top-actions {
    display: contents;
  }

  .card-rankings-page .card-rankings-filter-row {
    grid-area: filters;
    display: grid;
    grid-template-columns: auto minmax(92px, 1fr) minmax(0, auto);
    grid-template-areas: "priceLabel priceScale supply";
    gap: 8px;
    align-items: center;
    min-width: 0;
    width: 100%;
  }

  .card-rankings-page #cardRankingsSearch {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }

  .card-rankings-page .duel-opportunity-links {
    grid-area: links;
    display: inline-flex;
    gap: 6px;
    width: auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-self: end;
  }

  .card-rankings-page .duel-opportunity-link {
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.005em;
    white-space: nowrap;
  }

  .card-rankings-page .duel-leaderboard-controls {
    display: contents;
    margin-left: 0 !important;
  }

  .card-rankings-page .price-filter-control {
    display: contents;
  }

  .card-rankings-page .price-filter-control span {
    grid-area: priceLabel;
    white-space: nowrap;
  }

  .card-rankings-page .price-filter-control input[type="range"] {
    grid-area: priceScale;
    width: 100% !important;
    min-width: 0;
    justify-self: stretch;
  }

  .card-rankings-page .card-rankings-supply-metric {
    grid-area: supply;
    justify-self: end;
    gap: 6px;
    min-width: 0;
  }

  .card-rankings-page .card-rankings-supply-metric .supply-metric-label {
    font-size: 0.84rem;
    letter-spacing: 0;
  }

  .card-rankings-page .card-rankings-supply-metric .duel-filter-select {
    min-width: 122px;
    max-width: 128px;
  }

  .card-rankings-page #cardRankingsSortBy {
    grid-area: sort;
    justify-self: end;
    min-width: 118px;
    width: auto;
  }

  .slab-opportunities-page .comparison-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "search links sort"
      "filters filters filters";
    gap: 8px;
    align-items: center;
  }

  .slab-opportunities-page .comparison-head > .sr-only,
  .slab-opportunities-page .slab-opportunities-top-actions > .sr-only {
    display: none;
  }

  .slab-opportunities-page .slab-opportunities-top-actions {
    display: contents;
  }

  .slab-opportunities-page .slab-opportunities-filter-row {
    grid-area: filters;
    display: grid;
    grid-template-columns: auto minmax(92px, 1fr) minmax(0, auto);
    grid-template-areas: "priceLabel priceScale supply";
    gap: 8px;
    align-items: center;
    min-width: 0;
    width: 100%;
  }

  .slab-opportunities-page #slabOpportunitiesSearch {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }

  .slab-opportunities-page .duel-opportunity-links {
    grid-area: links;
    display: inline-flex;
    gap: 6px;
    width: auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-self: end;
  }

  .slab-opportunities-page .duel-opportunity-link {
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.005em;
    white-space: nowrap;
  }

  .slab-opportunities-page .duel-leaderboard-controls {
    display: contents;
    margin-left: 0 !important;
  }

  .slab-opportunities-page .price-filter-control {
    display: contents;
  }

  .slab-opportunities-page .price-filter-control span {
    grid-area: priceLabel;
    white-space: nowrap;
  }

  .slab-opportunities-page .price-filter-control input[type="range"] {
    grid-area: priceScale;
    width: 100% !important;
    min-width: 0;
    justify-self: stretch;
  }

  .slab-opportunities-page .slab-opportunities-supply-metric {
    grid-area: supply;
    justify-self: end;
    gap: 6px;
    min-width: 0;
  }

  .slab-opportunities-page .slab-opportunities-supply-metric .supply-metric-label {
    font-size: 0.84rem;
    letter-spacing: 0;
  }

  .slab-opportunities-page .slab-opportunities-supply-metric .duel-filter-select {
    min-width: 122px;
    max-width: 128px;
  }

  .slab-opportunities-page #slabOpportunitiesSortBy {
    grid-area: sort;
    justify-self: end;
    min-width: 118px;
    width: auto;
  }

  .grading-opportunities-page .comparison-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "search links sort"
      "filters filters filters";
    gap: 8px;
    align-items: center;
  }

  .grading-opportunities-page .comparison-head > .sr-only,
  .grading-opportunities-page .grading-opportunities-top-actions > .sr-only {
    display: none;
  }

  .grading-opportunities-page .grading-opportunities-top-actions {
    display: contents;
  }

  .grading-opportunities-page .grading-opportunities-filter-row {
    grid-area: filters;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, auto);
    grid-template-areas: "lowpop spacer supply";
    gap: 8px;
    align-items: center;
    min-width: 0;
    width: 100%;
  }

  .grading-opportunities-page #gradingOpportunitiesSearch {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }

  .grading-opportunities-page .duel-opportunity-links {
    grid-area: links;
    display: inline-flex;
    gap: 6px;
    width: auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-self: end;
  }

  .grading-opportunities-page .duel-opportunity-link {
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.005em;
    white-space: nowrap;
  }

  .grading-opportunities-page .grading-low-pop-control {
    grid-area: lowpop;
    margin-left: 0 !important;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
  }

  .grading-opportunities-page .grading-low-pop-control strong {
    font-size: 0.74rem;
    letter-spacing: 0.01em;
  }

  .grading-opportunities-page .grading-opportunities-supply-metric {
    grid-area: supply;
    justify-self: end;
    gap: 6px;
    min-width: 0;
  }

  .grading-opportunities-page .grading-opportunities-supply-metric .supply-metric-label {
    font-size: 0.84rem;
    letter-spacing: 0;
  }

  .grading-opportunities-page .grading-opportunities-supply-metric .duel-filter-select {
    min-width: 122px;
    max-width: 128px;
  }

  .grading-opportunities-page #gradingOpportunitiesSortBy {
    grid-area: sort;
    justify-self: end;
    min-width: 118px;
    width: auto;
  }
}

.card-duel-page .rankings-table .row {
  grid-template-columns: 56px 74px minmax(0, 1.42fr) 0.8fr 0.84fr 0.72fr 0.78fr 24px;
  gap: 4px;
}

.card-duel-page .rankings-table .row div:first-child {
  text-align: left;
}

.card-duel-page .rankings-table .row div:last-child {
  text-align: right;
}

.card-duel-page .rankings-table .row div:nth-child(3),
.card-duel-page .rankings-table .row div:nth-child(4),
.card-duel-page .rankings-table .row div:nth-child(5),
.card-duel-page .rankings-table .row div:nth-child(6),
.card-duel-page .rankings-table .row div:nth-child(7) {
  text-align: center;
}

.card-duel-page .rankings-table .row div:nth-child(2) {
  padding-right: 0;
}

.card-duel-page .rankings-table .row div:nth-child(3) {
  text-align: left;
  padding-left: 0;
  transform: translateX(-6px);
}

.card-duel-page .rankings-table .row.header div:nth-child(3) {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
}

.card-duel-page .rankings-table .row:not(.header) div:nth-child(4),
.card-duel-page .rankings-table .row:not(.header) div:nth-child(5),
.card-duel-page .rankings-table .row:not(.header) div:nth-child(6),
.card-duel-page .rankings-table .row:not(.header) div:nth-child(7) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-duel-page .rankings-table .row:not(.header) div:nth-child(3) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.card-duel-page .rankings-table .row .rankings-conf-col,
.card-duel-page .rankings-table .row .rankings-conf-cell,
.card-duel-page .rankings-table .row .rankings-cart-col {
  justify-content: center;
}

.duel-name-hover {
  cursor: zoom-in;
  text-decoration: underline dotted rgba(148, 163, 184, 0.65);
  text-underline-offset: 2px;
}

.duel-card-name-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.duel-card-number {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f1d68a;
  line-height: 1.15;
}

.duel-rank-card-thumb-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 66px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(250, 220, 120, 0.25);
  background: rgba(9, 22, 37, 0.82);
  box-shadow: 0 4px 14px rgba(2, 8, 18, 0.35);
}

.duel-card-preview-trigger {
  cursor: zoom-in;
}

.duel-rank-card-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.duel-rank-card-thumb-fallback {
  font-size: 0.8rem;
  color: rgba(182, 196, 214, 0.8);
  font-weight: 700;
}

.duel-rank-mobile-stack {
  display: inline-block;
}

.duel-rank-mobile-num {
  font-weight: 800;
}

.duel-rank-mobile-local {
  display: none;
}

.duel-set-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.15;
}

.duel-set-card-name {
  color: #f1f5f9;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.12;
}

.duel-set-name {
  color: #dbe7ff;
}

.duel-set-series {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #cfe8f6;
}

.duel-set-series.series-swsh {
  color: #cfe8f6;
}

.duel-set-series.series-sv {
  color: #e4d2ff;
}

.duel-set-series.series-mega {
  color: #fff4b6;
}

.duel-hover-preview {
  position: fixed;
  z-index: 2000;
  width: 180px;
  max-width: 42vw;
  pointer-events: none;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.94);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.45);
}

.duel-hover-preview img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.duel-hover-preview .duel-hover-preview-loading {
  display: none;
  width: 100%;
  aspect-ratio: 5 / 7;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(147, 210, 243, 0.22);
  background:
    radial-gradient(circle at 50% 28%, rgba(147, 210, 243, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(15, 32, 52, 0.96), rgba(6, 15, 29, 0.96));
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  margin-top: 0;
}

.duel-hover-preview.is-loading .duel-hover-preview-loading {
  display: flex;
}

.duel-hover-preview.is-loading img {
  display: none;
}

.duel-hover-preview div {
  margin-top: 6px;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.95);
  text-align: left;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.duel-hover-preview-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duel-hover-preview-conf {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.duel-hover-preview-conf .conf-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
}

@media (max-width: 1100px) {
  .portfolio-search-shell {
    grid-template-areas:
      "set set product add"
      "price qty . add";
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) 110px;
  }

  #portfolioAddBtn {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .portfolio-analysis-page #analysisSummary.portfolio-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-duel-page .hero {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .duel-hero-prompt {
    position: static;
    transform: none;
    white-space: nowrap;
    text-align: center;
  }

  .card-duel-page .duel-top-prompt.duel-top-prompt-plays {
    font-size: clamp(1.18rem, 5.2vw, 1.68rem);
    line-height: 1.12;
    white-space: nowrap;
  }

  .duel-header-actions {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    justify-content: center;
  }

  .duel-showcase .comparison-head {
    display: none !important;
  }

  .duel-grid {
    grid-template-columns: repeat(2, max-content);
    gap: 10px;
    justify-content: center;
    justify-items: center;
  }

  .duel-card-left .duel-detail,
  .duel-card-right .duel-detail {
    display: none !important;
  }

  .portfolio-search-shell {
    grid-template-areas:
      "set set set add"
      "product price qty add";
    grid-template-columns: minmax(0, 1.5fr) minmax(120px, 0.9fr) 88px 110px;
  }

  .portfolio-page .comparison-head.stacked.portfolio-overview-head {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .portfolio-page .comparison-head.stacked.portfolio-overview-head h3 {
    margin: 0;
    white-space: nowrap;
  }

  .portfolio-page .portfolio-overview-actions {
    margin-left: auto;
    flex: 0 0 auto;
  }

  .portfolio-page .portfolio-positions-head {
    align-items: flex-start;
  }

  .portfolio-page .portfolio-positions-head .portfolio-sort-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    align-items: start;
    gap: 4px 8px;
    margin-left: 0;
    width: min(360px, 100%);
    white-space: normal;
  }

  .portfolio-page .portfolio-sort-wrap label[for="portfolioSortSelect"] {
    grid-column: 1;
    grid-row: 1;
  }

  .portfolio-page .portfolio-sort-wrap #portfolioSortSelect {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
  }

  .portfolio-page .portfolio-sort-wrap label[for="portfolioTypeFilterSelect"] {
    grid-column: 2;
    grid-row: 1;
  }

  .portfolio-page .portfolio-sort-wrap #portfolioTypeFilterSelect {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    width: 100%;
  }

  .portfolio-page .portfolio-sort-wrap .portfolio-sort-label {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    line-height: 1.1;
  }

  .portfolio-field-set {
    grid-area: set;
  }

  .portfolio-field-product {
    grid-area: product;
  }

  .portfolio-field-price {
    grid-area: price;
  }

  .portfolio-field-qty {
    grid-area: qty;
  }

  #portfolioAddBtn {
    grid-area: add;
    width: 100%;
  }

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

  .portfolio-head-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .portfolio-signal-box {
    min-width: 0;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .portfolio-signal-box .signal-action {
    justify-self: start;
  }

  .portfolio-page .portfolio-rows .portfolio-shell .set-duel-head {
    position: relative;
    padding-right: 64px;
  }

  .portfolio-page .portfolio-rows .portfolio-shell .portfolio-head-actions {
    position: absolute;
    top: 2px;
    right: 0;
    margin-left: 0;
    width: auto;
    justify-content: flex-end;
    z-index: 2;
  }

  .portfolio-page .portfolio-rows .portfolio-shell .portfolio-signal-box {
    min-width: 0;
    min-height: 0;
    width: auto;
    border: 0;
    background: transparent;
    padding: 0;
    display: block;
  }

  .portfolio-page .portfolio-rows .portfolio-shell .portfolio-signal-box .signal-eyebrow,
  .portfolio-page .portfolio-rows .portfolio-shell .portfolio-signal-box .signal-action {
    display: none;
  }

  .portfolio-page .portfolio-rows .portfolio-shell .portfolio-signal-box .signal-value {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    text-align: right;
  }

  .portfolio-page .portfolio-rows .portfolio-meta-inline {
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
  }

  .portfolio-page .portfolio-rows .portfolio-meta-inline .series-date {
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  .alerts-page .rankings-table .row {
    grid-template-columns: 66px minmax(0, 1fr) minmax(74px, auto) 24px;
  }

  .alerts-page .rankings-table .row div:nth-child(7) {
    display: none;
  }

  .alerts-page .rankings-table .row div:nth-child(9) {
    grid-column: 4;
  }
}

@media (max-width: 560px) {
  .set-directory .hot-badge,
  .set-directory .warm-badge,
  .set-directory .volcanic-badge {
    padding: 0;
    gap: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin-left: 10px;
  }

  .set-directory .hot-badge span,
  .set-directory .warm-badge span,
  .set-directory .volcanic-badge span {
    display: none;
  }

  .set-directory .hot-icon,
  .set-directory .warm-icon,
  .set-directory .volcanic-icon {
    width: 13px;
    height: 13px;
  }

  .set-directory .volcanic-badge img {
    transform: scale(1.12);
    transform-origin: center;
  }

  .portfolio-analysis-upside-compare {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .portfolio-analysis-upside-arrow {
    transform: rotate(90deg);
    margin: -4px auto;
  }

  .card-duel-page .page.with-banner {
    padding-left: 8px;
    padding-right: 8px;
  }

  .card-duel-page .comparison.duel-showcase {
    padding: 10px 8px 12px;
  }

  .duel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    justify-content: stretch;
    justify-items: stretch;
    width: 100%;
  }

  .duel-card {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .card-duel-page .duel-leaderboard-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .card-duel-page .duel-opportunity-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    flex-wrap: nowrap;
  }

  .card-duel-page .duel-leaderboard-subhead {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .card-duel-page .duel-leaderboard-subhead h3 {
    white-space: nowrap;
  }

  .card-duel-page .duel-leaderboard-controls {
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-duel-page .duel-opportunity-link {
    width: 100%;
    min-width: 0;
    padding: 6px 4px;
    font-size: 0.68rem;
    letter-spacing: 0.005em;
  }

  .card-duel-page .duel-filter-select {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .card-duel-page .rankings-table .row {
    grid-template-columns: 34px 60px minmax(0, 1fr) minmax(48px, auto) 22px;
    gap: 6px;
    align-items: center;
  }

  .card-duel-page .rankings-table .row div:nth-child(4),
  .card-duel-page .rankings-table .row div:nth-child(5),
  .card-duel-page .rankings-table .row div:nth-child(7) {
    display: none !important;
  }

  .card-duel-page .rankings-table .row div:nth-child(1) {
    grid-column: 1;
    text-align: left;
  }

  .card-duel-page .rankings-table .row div:nth-child(2) {
    grid-column: 2;
    text-align: center;
    padding-right: 0;
  }

  .card-duel-page .rankings-table .row div:nth-child(3) {
    grid-column: 3;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    transform: none;
    padding-left: 0;
    min-width: 0;
  }

  .card-duel-page .rankings-table .row div:nth-child(6) {
    grid-column: 4;
    text-align: right;
    display: block !important;
    white-space: nowrap;
  }

  .card-duel-page .rankings-table .row div:nth-child(8) {
    grid-column: 5;
    text-align: right;
  }

  .card-duel-page .rankings-table .row .duel-rank-card-thumb-wrap {
    width: 58px;
    height: 80px;
  }

  .card-duel-page .rankings-table .row .duel-rank-mobile-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 80px;
    line-height: 1.05;
  }

  .card-duel-page .rankings-table .row .duel-rank-mobile-num {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(241, 245, 249, 0.98);
  }

  .card-duel-page .rankings-table .row .duel-rank-mobile-local {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #f6c454;
    letter-spacing: 0.01em;
  }

  .card-duel-page .rankings-table .row .duel-set-stack {
    gap: 2px;
    min-width: 0;
  }

  .card-duel-page .rankings-table .row .duel-set-name {
    font-size: 0.96rem;
    line-height: 1.18;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .card-duel-page .rankings-table .row .duel-set-card-name {
    font-size: 0.98rem;
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .card-duel-page .rankings-table .row .duel-set-series {
    font-size: 0.82rem;
    line-height: 1.14;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .slab-opportunities-page .slab-opportunities-table .row {
    grid-template-columns: 36px minmax(0, 1fr) minmax(58px, auto) 22px;
    gap: 6px;
    align-items: center;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(3),
  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(4),
  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(5),
  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(6),
  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(7),
  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(8) {
    display: none !important;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(1) {
    grid-column: 1;
    text-align: left;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(2) {
    grid-column: 2;
    text-align: left;
    min-width: 0;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(9) {
    grid-column: 3;
    text-align: right;
    white-space: nowrap;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(10) {
    grid-column: 4;
    text-align: right;
  }

  .slab-opportunities-page .slab-mobile-card-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .slab-opportunities-page .slab-desktop-card-col {
    display: none !important;
  }

  .slab-opportunities-page .slab-mobile-card-wrap .duel-rank-card-thumb-wrap {
    width: 56px;
    height: 78px;
    flex: 0 0 auto;
  }

  .slab-opportunities-page .slab-mobile-card-wrap .duel-set-stack {
    gap: 2px;
    min-width: 0;
  }

  .slab-opportunities-page .slab-mobile-card-wrap .duel-set-name {
    font-size: 0.96rem;
    line-height: 1.18;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .slab-opportunities-page .slab-mobile-card-wrap .duel-set-series {
    font-size: 0.82rem;
    line-height: 1.14;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .slab-opportunities-page .slab-opportunities-table .row .duel-rank-mobile-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 78px;
    line-height: 1.05;
  }

  .slab-opportunities-page .slab-opportunities-table .row .duel-rank-mobile-num {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(241, 245, 249, 0.98);
  }

  .slab-opportunities-page .slab-opportunities-table .row .duel-rank-mobile-local {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #f6c454;
    letter-spacing: 0.01em;
  }

  .portfolio-page:not(.portfolio-analysis-page) .portfolio-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .head,
  .portfolio-analysis-page .portfolio-analysis-sellable-table .row {
    grid-template-columns: minmax(0, 1fr) 52px 112px;
    gap: 8px;
    align-items: center;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head {
    align-items: end;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .head {
    align-items: center;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(2),
  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(4),
  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(5),
  .portfolio-analysis-page .portfolio-analysis-sellable-table .row > div:nth-child(2),
  .portfolio-analysis-page .portfolio-analysis-sellable-table .row > div:nth-child(4),
  .portfolio-analysis-page .portfolio-analysis-sellable-table .row > div:nth-child(5) {
    display: none !important;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(1),
  .portfolio-analysis-page .portfolio-analysis-sellable-table .row > div:nth-child(1) {
    grid-column: 1;
    text-align: left;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .row > div:nth-child(3) {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 800;
    color: rgba(241, 245, 249, 0.98);
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(3) {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(6),
  .portfolio-analysis-page .portfolio-analysis-sellable-table .row > div:nth-child(6) {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    white-space: nowrap;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .analysis-product-inline {
    display: block;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(6) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head,
  .portfolio-analysis-page .portfolio-analysis-plan-table .row {
    grid-template-columns: minmax(0, 1fr) 52px 112px;
    gap: 8px;
    align-items: center;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(2),
  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(4),
  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(5),
  .portfolio-analysis-page .portfolio-analysis-plan-table .row > div:nth-child(2),
  .portfolio-analysis-page .portfolio-analysis-plan-table .row > div:nth-child(4),
  .portfolio-analysis-page .portfolio-analysis-plan-table .row > div:nth-child(5) {
    display: none !important;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(1),
  .portfolio-analysis-page .portfolio-analysis-plan-table .row > div:nth-child(1) {
    grid-column: 1;
    text-align: left;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .row > div:nth-child(3) {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 800;
    color: rgba(241, 245, 249, 0.98);
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(3) {
    grid-column: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(6),
  .portfolio-analysis-page .portfolio-analysis-plan-table .row > div:nth-child(6) {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    white-space: nowrap;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .analysis-product-inline {
    display: block;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(1),
  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(3),
  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(6) {
    color: var(--muted) !important;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    align-self: end;
    grid-row: 1;
    margin: 0;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(1) {
    justify-content: flex-start;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(3) {
    justify-content: center;
  }

  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div:nth-child(6) {
    justify-content: flex-end;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(1),
  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(3),
  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div:nth-child(6) {
    color: var(--muted) !important;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    min-height: 18px;
    display: flex;
    align-items: center;
    align-self: center;
    grid-row: 1;
    margin: 0;
  }

  .portfolio-analysis-upside-card .value {
    font-size: 1.48rem;
  }

  .portfolio-overview-spacer {
    display: none;
  }

  .portfolio-search-shell {
    grid-template-areas:
      "set"
      "product"
      "price"
      "qty"
      "add";
    grid-template-columns: 1fr;
  }
}

/* Keep full portfolio-analysis tables on mid-size screens; mobile collapse stays <=560px only. */
@media (min-width: 561px) and (max-width: 980px) {
  .portfolio-analysis-page .portfolio-analysis-sellable-table .head,
  .portfolio-analysis-page .portfolio-analysis-sellable-table .row,
  .portfolio-analysis-page .portfolio-analysis-plan-table .head,
  .portfolio-analysis-page .portfolio-analysis-plan-table .row {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .head > div,
  .portfolio-analysis-page .portfolio-analysis-sellable-table .row > div,
  .portfolio-analysis-page .portfolio-analysis-plan-table .head > div,
  .portfolio-analysis-page .portfolio-analysis-plan-table .row > div {
    display: block !important;
    grid-column: auto !important;
    text-align: left !important;
  }

  .portfolio-analysis-page .portfolio-analysis-sellable-table .analysis-product-inline,
  .portfolio-analysis-page .portfolio-analysis-plan-table .analysis-product-inline {
    display: none !important;
  }
}

.site-disclaimer-footer,
.site-disclaimer-top {
  width: min(1200px, calc(100% - 40px));
  margin: 20px auto 18px;
  padding: 12px 14px;
  border: 1px solid rgba(147, 210, 243, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(7, 20, 34, 0.76), rgba(5, 15, 27, 0.84));
  color: rgba(190, 206, 223, 0.9);
  font-size: 0.78rem;
  line-height: 1.45;
  box-sizing: border-box;
}

.site-disclaimer-footer p,
.site-disclaimer-top p {
  margin: 0;
  text-align: center;
}

.site-disclaimer-top p + p {
  margin-top: 8px;
}

.site-disclaimer-footer p a,
.site-disclaimer-top p a {
  color: #dbeafe;
  text-decoration: none;
  font-weight: 600;
}

.site-disclaimer-footer p a:hover,
.site-disclaimer-footer p a:focus-visible,
.site-disclaimer-top p a:hover,
.site-disclaimer-top p a:focus-visible {
  color: #f6c454;
  text-decoration: underline;
}

.site-disclaimer-top {
  margin: 0 auto 12px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(180, 83, 9, 0.16));
  color: #f8e7c2;
}

.site-disclaimer-top p a {
  color: #f8e7c2;
  text-decoration: underline;
  text-decoration-color: rgba(248, 231, 194, 0.5);
}

.site-disclaimer-top p a:hover,
.site-disclaimer-top p a:focus-visible {
  color: #fff4d6;
  text-decoration-color: rgba(255, 244, 214, 0.85);
}

.site-disclaimer-footer-links {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.site-disclaimer-footer-links a {
  color: #dbeafe;
  text-decoration: none;
  font-weight: 600;
}

.site-disclaimer-footer-links a:hover,
.site-disclaimer-footer-links a:focus-visible {
  color: #f6c454;
  text-decoration: underline;
}

.page > .comparison:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .card-rankings-page .card-rankings-table .row {
    grid-template-columns: 34px 60px minmax(0, 1fr) minmax(96px, auto) minmax(90px, auto) 22px;
    gap: 10px;
    align-items: center;
  }

  .card-rankings-page .card-rankings-table .row div:nth-child(5),
  .card-rankings-page .card-rankings-table .row div:nth-child(6),
  .card-rankings-page .card-rankings-table .row div:nth-child(7) {
    display: none !important;
  }

  .card-rankings-page .card-rankings-table .row div:nth-child(1) {
    grid-column: 1;
    text-align: left;
  }

  .card-rankings-page .card-rankings-table .row div:nth-child(2) {
    grid-column: 2;
    text-align: center;
    padding-right: 0;
  }

  .card-rankings-page .card-rankings-table .row div:nth-child(3) {
    grid-column: 3;
    text-align: left;
    min-width: 0;
  }

  .card-rankings-page .card-rankings-table .row:not(.header) div:nth-child(3) {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left;
    padding-left: 0;
    transform: none;
    min-width: 0;
  }

  .card-rankings-page .card-rankings-table .row div:nth-child(4) {
    grid-column: 4;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .card-rankings-page .card-rankings-table .row div:nth-child(8) {
    grid-column: 5;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .card-rankings-page .card-rankings-table .row div:nth-child(9) {
    grid-column: 6;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
  }

  .card-rankings-page .card-rankings-mobile-thumb {
    display: inline-flex;
  }

  .card-rankings-page .card-rankings-mobile-thumb.duel-rank-card-thumb-wrap {
    width: 58px;
    height: 80px;
    flex: 0 0 auto;
  }

  .card-rankings-page .card-rankings-mobile-set {
    display: inline-flex;
  }

  .card-rankings-page .card-rankings-mobile-set.duel-set-stack {
    gap: 2px;
    min-width: 0;
  }

  .card-rankings-page .card-rankings-mobile-set .duel-set-name {
    font-size: 0.96rem;
    line-height: 1.18;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .card-rankings-page .card-rankings-mobile-set .duel-set-series {
    font-size: 0.82rem;
    line-height: 1.14;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .card-rankings-page .card-rankings-desktop-card-col {
    display: none !important;
  }

  .card-rankings-page .card-rankings-desktop-elo {
    display: none !important;
  }

  .card-rankings-page .card-rankings-table .row .duel-rank-mobile-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 80px;
    line-height: 1.05;
  }

  .card-rankings-page .card-rankings-table .row .duel-rank-mobile-num {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(241, 245, 249, 0.98);
  }

  .card-rankings-page .card-rankings-table .row .duel-rank-mobile-local {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #f6c454;
    letter-spacing: 0.01em;
  }

  .card-rankings-page .card-rankings-table .row.header div {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .card-rankings-page .card-rankings-table .row.header .tooltip-hint {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-rankings-page .card-rankings-table .row.header .tooltip::after {
    display: none;
  }

  .card-rankings-page .card-rankings-table .row.header div:nth-child(3) {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    grid-column: 3;
  }

  .card-rankings-page .card-rankings-header-desktop-elo {
    display: none;
  }

  .card-rankings-page .card-rankings-header-mobile-set {
    display: inline;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
  }

  @media (max-width: 700px) {
    .card-rankings-page .card-rankings-table .row {
      grid-template-columns: 34px 60px minmax(0, 1fr) minmax(58px, auto) 22px;
    }

    .card-rankings-page .card-rankings-table .row div:nth-child(4) {
      display: none !important;
    }

    .card-rankings-page .card-rankings-table .row div:nth-child(8) {
      grid-column: 4;
    }

    .card-rankings-page .card-rankings-table .row div:nth-child(9) {
      grid-column: 5;
    }
  }
}

@media (max-width: 560px) {
  .card-rankings-page .hero,
  .grading-opportunities-page .hero,
  .slab-opportunities-page .hero {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
  }

  .card-rankings-page .hero > div:first-child,
  .grading-opportunities-page .hero > div,
  .slab-opportunities-page .hero > div {
    width: 100%;
    min-width: 0;
  }

  .card-rankings-page .hero h1,
  .grading-opportunities-page .hero h1,
  .slab-opportunities-page .hero h1 {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.12;
    font-size: clamp(2rem, 9.2vw, 2.75rem);
  }

  .card-rankings-page .hero .subhead,
  .grading-opportunities-page .hero .subhead,
  .slab-opportunities-page .hero .subhead {
    max-width: none;
    white-space: normal !important;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .card-rankings-page .card-rankings-hero-controls,
  .card-rankings-page .card-rankings-hero-confidence-wrap,
  .grading-opportunities-page .card-rankings-hero-confidence-wrap,
  .slab-opportunities-page .card-rankings-hero-confidence-wrap {
    margin-left: 0;
    align-self: flex-start;
    min-width: 0;
  }

  .card-rankings-page .card-rankings-hero-controls {
    width: 100%;
  }

  .card-rankings-page .card-rankings-hero-confidence-wrap,
  .grading-opportunities-page .card-rankings-hero-confidence-wrap,
  .slab-opportunities-page .card-rankings-hero-confidence-wrap {
    display: none !important;
  }

  .card-rankings-page .page.with-banner {
    padding-left: 8px;
    padding-right: 8px;
  }

  .card-rankings-page .comparison {
    padding: 10px 8px 12px;
  }

  .grading-opportunities-page .page.with-banner,
  .slab-opportunities-page .page.with-banner {
    padding-left: 8px;
    padding-right: 8px;
  }

  .grading-opportunities-page .comparison,
  .slab-opportunities-page .comparison {
    padding: 10px 8px 12px;
  }

}

.grading-header-mobile-set,
.slab-header-mobile-set {
  display: none;
}

.grading-header-mobile-price,
.slab-header-mobile-price {
  display: none;
}

.grading-header-desktop-price,
.slab-header-desktop-price {
  display: inline;
}

.grading-header-desktop-upside,
.slab-header-desktop-signal {
  display: inline;
}

@media (max-width: 900px) {
  .grading-opportunities-page .grading-opportunities-table .row {
    grid-template-columns: 34px 60px minmax(0, 1fr) minmax(96px, auto) minmax(90px, auto) 22px;
    gap: 10px;
    align-items: center;
  }

  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(4),
  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(5),
  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(6),
  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(7),
  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(8) {
    display: none !important;
  }

  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(1) {
    grid-column: 1;
    text-align: left;
  }

  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(2) {
    grid-column: 2;
    text-align: center;
    padding-right: 0;
  }

  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(3) {
    grid-column: 3;
    text-align: left;
    min-width: 0;
  }

  .grading-opportunities-page .grading-opportunities-table .row:not(.header) div:nth-child(3) {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left;
    padding-left: 0;
    transform: none;
    min-width: 0;
  }

  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(10) {
    grid-column: 5;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(11) {
    grid-column: 6;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
  }

  .grading-opportunities-page .grading-opportunities-table .row div:nth-child(9) {
    grid-column: 4;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .grading-opportunities-page .grading-mobile-thumb.duel-rank-card-thumb-wrap {
    width: 58px;
    height: 80px;
    flex: 0 0 auto;
  }

  .grading-opportunities-page .grading-mobile-set.duel-set-stack {
    display: inline-flex;
    gap: 2px;
    min-width: 0;
  }

  .grading-opportunities-page .grading-mobile-set .duel-set-name {
    font-size: 0.96rem;
    line-height: 1.18;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .grading-opportunities-page .grading-mobile-set .duel-set-series {
    font-size: 0.82rem;
    line-height: 1.14;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .grading-opportunities-page .grading-opportunities-table .row .duel-rank-mobile-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 80px;
    line-height: 1.05;
  }

  .grading-opportunities-page .grading-opportunities-table .row .duel-rank-mobile-num {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(241, 245, 249, 0.98);
  }

  .grading-opportunities-page .grading-opportunities-table .row .duel-rank-mobile-local {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #f6c454;
    letter-spacing: 0.01em;
  }

  .grading-opportunities-page .grading-opportunities-table .row.header div {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .grading-opportunities-page .grading-opportunities-table .row.header div:nth-child(3) {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    grid-column: 3;
  }

  .grading-opportunities-page .grading-header-desktop-price {
    display: none;
  }

  .grading-opportunities-page .grading-header-desktop-upside {
    display: none;
  }

  .grading-opportunities-page .grading-header-mobile-set {
    display: inline;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
  }

  .grading-opportunities-page .grading-header-mobile-price {
    display: inline;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
  }

  .slab-opportunities-page .slab-opportunities-table .row {
    grid-template-columns: 34px 60px minmax(0, 1fr) minmax(96px, auto) minmax(90px, auto) 22px;
    gap: 10px;
    align-items: center;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(4),
  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(5),
  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(6),
  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(7) {
    display: none !important;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(1) {
    grid-column: 1;
    text-align: left;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(2) {
    grid-column: 2;
    text-align: center;
    padding-right: 0;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(3) {
    grid-column: 3;
    text-align: left;
    min-width: 0;
  }

  .slab-opportunities-page .slab-opportunities-table .row:not(.header) div:nth-child(3) {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left;
    padding-left: 0;
    transform: none;
    min-width: 0;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(9) {
    grid-column: 5;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(10) {
    grid-column: 6;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
  }

  .slab-opportunities-page .slab-opportunities-table .row div:nth-child(8) {
    grid-column: 4;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .slab-opportunities-page .slab-mobile-thumb.duel-rank-card-thumb-wrap {
    width: 58px;
    height: 80px;
    flex: 0 0 auto;
  }

  .slab-opportunities-page .slab-mobile-set.duel-set-stack {
    display: inline-flex;
    gap: 2px;
    min-width: 0;
  }

  .slab-opportunities-page .slab-mobile-set .duel-set-name {
    font-size: 0.96rem;
    line-height: 1.18;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .slab-opportunities-page .slab-mobile-set .duel-set-series {
    font-size: 0.82rem;
    line-height: 1.14;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .slab-opportunities-page .slab-opportunities-table .row .duel-rank-mobile-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 80px;
    line-height: 1.05;
  }

  .slab-opportunities-page .slab-opportunities-table .row .duel-rank-mobile-num {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(241, 245, 249, 0.98);
  }

  .slab-opportunities-page .slab-opportunities-table .row .duel-rank-mobile-local {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #f6c454;
    letter-spacing: 0.01em;
  }

  .slab-opportunities-page .slab-opportunities-table .row.header div {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .slab-opportunities-page .slab-opportunities-table .row.header div:nth-child(3) {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    grid-column: 3;
  }

  .slab-opportunities-page .slab-header-desktop-price {
    display: none;
  }

  .slab-opportunities-page .slab-header-desktop-signal {
    display: none;
  }

  .slab-opportunities-page .slab-header-mobile-set {
    display: inline;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
  }

  .slab-opportunities-page .slab-header-mobile-price {
    display: inline;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
  }

  @media (max-width: 700px) {
    .grading-opportunities-page .grading-opportunities-table .row {
      grid-template-columns: 34px 60px minmax(0, 1fr) minmax(58px, auto) 22px;
    }

    .grading-opportunities-page .grading-opportunities-table .row div:nth-child(9) {
      display: none !important;
    }

    .grading-opportunities-page .grading-opportunities-table .row div:nth-child(10) {
      grid-column: 4;
    }

    .grading-opportunities-page .grading-opportunities-table .row div:nth-child(11) {
      grid-column: 5;
    }

    .slab-opportunities-page .slab-opportunities-table .row {
      grid-template-columns: 34px 60px minmax(0, 1fr) minmax(58px, auto) 22px;
    }

    .slab-opportunities-page .slab-opportunities-table .row div:nth-child(8) {
      display: none !important;
    }

    .slab-opportunities-page .slab-opportunities-table .row div:nth-child(9) {
      grid-column: 4;
    }

    .slab-opportunities-page .slab-opportunities-table .row div:nth-child(10) {
      grid-column: 5;
    }
  }
}

.content-generator-shell {
  max-width: 1320px;
}

.content-generator-hero {
  align-items: center;
}

.content-generator-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.content-generator-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(340px, 1fr) minmax(430px, 430px);
  gap: 22px;
  align-items: start;
}

.content-generator-secondary {
  margin-top: 38px;
  padding-top: 34px;
  border-top: 1px solid rgba(154, 176, 206, 0.18);
}

.content-generator-controls {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(154, 176, 206, 0.22);
  background: rgba(12, 19, 33, 0.54);
  border-radius: 8px;
}

.content-generator-control-group,
.content-generator-copy-block {
  display: grid;
  gap: 8px;
}

.content-generator-control-label,
.content-generator-copy-block span {
  color: #9ab0ce;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.content-generator-format-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(134, 239, 172, 0.34);
  border-radius: 8px;
  color: #e7f9ef;
  background: rgba(34, 197, 94, 0.12);
  font-weight: 800;
}

.content-generator-copy-block {
  padding-top: 12px;
  border-top: 1px solid rgba(154, 176, 206, 0.16);
}

.content-generator-copy-block strong {
  color: #f8fbff;
  line-height: 1.25;
}

.content-generator-copy-block p {
  margin: 0;
  color: #c8d4e5;
  line-height: 1.45;
}

.content-generator-voice-tools {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(154, 176, 206, 0.16);
}

.content-generator-voice-tools span {
  color: #9ab0ce;
  font-size: 0.88rem;
  line-height: 1.35;
}

.content-generator-voice-tools span.is-error {
  color: #fca5a5;
}

.content-generator-spoken-name {
  display: grid;
  gap: 5px;
}

.content-generator-spoken-name input,
.content-generator-pronunciation input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(154, 176, 206, 0.3);
  border-radius: 6px;
  padding: 7px 9px;
  background: rgba(4, 10, 20, 0.52);
  color: #f8fbff;
  font: inherit;
}

.content-generator-spoken-name input:focus,
.content-generator-pronunciation input:focus {
  outline: 2px solid rgba(106, 231, 255, 0.34);
  outline-offset: 1px;
}

.content-generator-spoken-name input:disabled,
.content-generator-pronunciation input:disabled {
  opacity: 0.56;
}

.content-generator-credit-link {
  color: #86efac;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.content-generator-credit-link:hover,
.content-generator-credit-link:focus-visible {
  color: #b7f7ca;
  text-decoration: underline;
}

.content-generator-voice-tools audio {
  width: 100%;
}

.content-generator-rotation {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(154, 176, 206, 0.2);
  border-radius: 8px;
  background: rgba(8, 14, 25, 0.38);
  min-width: 0;
}

.content-generator-rotation-head,
.content-generator-rotation-current {
  display: grid;
  gap: 6px;
}

.content-generator-rotation-head span,
.content-generator-rotation-current span {
  color: #9ab0ce;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.content-generator-rotation-head strong {
  color: #86efac;
  font-size: 1rem;
}

.content-generator-rotation-current {
  padding: 12px;
  border: 1px solid rgba(134, 239, 172, 0.24);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.08);
}

.content-generator-rotation-current strong {
  color: #f8fbff;
  font-size: 1.08rem;
  line-height: 1.15;
}

.content-generator-rotation-current small {
  color: #aab7c8;
  line-height: 1.35;
}

.content-generator-rotation-list-wrap {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid rgba(154, 176, 206, 0.16);
}

.content-generator-rotation-list {
  display: grid;
  gap: 0;
  max-height: 470px;
  overflow: auto;
  padding-right: 4px;
  color: #9ab0ce;
  font-size: 0.86rem;
  line-height: 1.35;
  scrollbar-color: rgba(134, 239, 172, 0.38) rgba(154, 176, 206, 0.1);
}

.content-generator-rotation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(76px, auto);
  gap: 2px 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(154, 176, 206, 0.12);
}

.content-generator-rotation-row:last-child {
  border-bottom: 0;
}

.content-generator-rotation-row strong {
  color: #dce8f7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-generator-rotation-row span {
  grid-column: 1;
  color: #9ab0ce;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-generator-rotation-row small {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #86efac;
  font-size: 0.72rem;
  font-weight: 900;
}

.content-generator-preview-wrap {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.content-video-frame {
  --content-accent: #6ae7ff;
  --content-accent-rgb: 106, 231, 255;
  --content-accent-soft: #b7f3ff;
  --content-accent-soft-rgb: 183, 243, 255;
  --content-card-y: 8px;
  position: relative;
  isolation: isolate;
  width: min(430px, 100%);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(158deg, rgba(7, 14, 26, 0.98) 0%, rgba(18, 25, 38, 0.98) 45%, rgba(25, 39, 42, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  color: #f8fbff;
  padding: clamp(18px, 5%, 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: clamp(10px, 2.6%, 18px);
}

.content-video-shared-player {
  position: absolute;
  z-index: 10;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.content-video-frame.has-shared-player > :not(.content-video-shared-player):not(.content-video-play) {
  visibility: hidden;
}

.content-video-frame-grading {
  --content-accent: #ff6b8a;
  --content-accent-rgb: 255, 107, 138;
  --content-accent-soft: #ff9cae;
  --content-accent-soft-rgb: 255, 156, 174;
}

.content-video-frame-slab {
  --content-accent: #ffd21f;
  --content-accent-rgb: 255, 210, 31;
  --content-accent-soft: #fff06a;
  --content-accent-soft-rgb: 255, 240, 106;
}

.content-video-frame.is-playing .content-card-art-wrap {
  animation: contentPreviewCardFloat 3.2s ease-in-out infinite;
}

.content-video-frame.is-playing .content-video-bg-a {
  animation: contentPreviewBgPulse 4.5s ease-in-out infinite;
}

.content-video-frame.is-outro .content-video-topline,
.content-video-frame.is-outro .content-card-stage,
.content-video-frame.is-outro .content-video-copy,
.content-video-frame.is-outro .content-video-metrics,
.content-video-frame.is-outro .content-video-footer {
  opacity: 0.12;
  transform: scale(0.985);
  filter: blur(1.4px);
}

.content-video-bg {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  opacity: 0.82;
}

.content-video-bg-a {
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(248, 213, 91, 0.26), transparent 34%),
    radial-gradient(circle at 84% 24%, rgba(var(--content-accent-rgb), 0.24), transparent 30%),
    radial-gradient(circle at 52% 78%, rgba(var(--content-accent-soft-rgb), 0.18), transparent 36%);
}

.content-video-bg-b {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.05) 70%);
}

.content-video-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: clamp(0.9rem, 2.8vw, 1.08rem);
  color: rgba(248, 251, 255, 0.82);
  font-size: clamp(0.72rem, 2.2vw, 0.84rem);
  font-weight: 800;
  transition: opacity 900ms ease, transform 900ms ease, filter 900ms ease;
}

.content-video-topline strong {
  color: var(--content-accent-soft);
  text-transform: uppercase;
}

.content-video-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  height: clamp(0.9rem, 2.8vw, 1.08rem);
  font-size: clamp(1rem, 3.1vw, 1.22rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.content-video-brand span {
  color: transparent;
  background: linear-gradient(
    110deg,
    #f8fbff 0%,
    var(--content-accent-soft) 18%,
    var(--content-accent) 42%,
    var(--content-accent) 60%,
    var(--content-accent-soft) 82%,
    #f8fbff 100%
  );
  background-size: 200% 100%;
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 10px rgba(var(--content-accent-rgb), 0.24);
  animation: title-shimmer 3.6s linear infinite;
}

.content-video-brand img {
  width: 1.9em;
  height: 1.9em;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(134, 239, 172, 0.28));
}

.content-card-stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(5vw, 22px) 0;
  transition: opacity 900ms ease, transform 900ms ease, filter 900ms ease;
}

.content-card-glow {
  position: absolute;
  width: 84%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--content-accent-soft-rgb), 0.32), rgba(var(--content-accent-rgb), 0.16) 48%, transparent 68%);
  filter: blur(8px);
}

.content-card-art-wrap {
  position: relative;
  width: min(84%, 330px);
  aspect-ratio: 734 / 1024;
  transform: rotate(-3deg) translateY(var(--content-card-y));
  border-radius: 4.5%;
  filter:
    drop-shadow(0 0 7px rgba(var(--content-accent-rgb), 0.72))
    drop-shadow(0 0 15px rgba(var(--content-accent-rgb), 0.26))
    drop-shadow(0 24px 42px rgba(0, 0, 0, 0.46));
}

.content-video-frame.has-long-title .content-card-art-wrap {
  width: min(78%, 306px);
}

.content-card-art-wrap::before,
.content-card-art-wrap::after,
.content-card-neon-edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.content-card-art-wrap::before {
  content: "";
  z-index: 5;
  border: 2px solid rgba(var(--content-accent-rgb), 0.92);
  box-shadow:
    inset 0 0 5px rgba(var(--content-accent-rgb), 0.36),
    0 0 8px rgba(var(--content-accent-rgb), 0.82),
    0 0 18px rgba(var(--content-accent-rgb), 0.48),
    0 0 30px rgba(var(--content-accent-rgb), 0.22);
  animation: contentCardNeonPulse 1.65s ease-in-out infinite;
}

.content-card-art-wrap::after {
  content: "";
  z-index: 6;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(255, 255, 255, 0.74) 30%, rgba(var(--content-accent-rgb), 0.74) 38%, transparent 50%),
    linear-gradient(180deg, transparent 0 58%, rgba(var(--content-accent-rgb), 0.62) 68%, transparent 80%);
  background-size: 240% 100%, 100% 240%;
  background-position: -90% 0, 0 120%;
  padding: 2px;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: contentCardEdgeRun 2.3s ease-in-out infinite;
  filter:
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.42))
    drop-shadow(0 0 9px rgba(var(--content-accent-rgb), 0.58));
}

.content-card-neon-edge {
  z-index: 7;
  border: 1px solid rgba(var(--content-accent-soft-rgb), 0.68);
  box-shadow:
    inset 0 0 10px rgba(var(--content-accent-rgb), 0.2),
    0 0 12px rgba(var(--content-accent-rgb), 0.34);
  animation: contentCardBluePulse 2.4s ease-in-out infinite;
}

.content-card-art-wrap img {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4.5%;
  display: block;
}

@keyframes contentPreviewCardFloat {
  0%,
  100% {
    transform: rotate(-3deg) translateY(var(--content-card-y)) scale(1);
  }
  50% {
    transform: rotate(-2deg) translateY(calc(var(--content-card-y) - 8px)) scale(1.025);
  }
}

@keyframes contentPreviewBgPulse {
  0%,
  100% {
    opacity: 0.74;
  }
  50% {
    opacity: 1;
  }
}

@keyframes contentCardNeonPulse {
  0%,
  100% {
    opacity: 0.76;
    box-shadow:
      0 0 8px rgba(106, 231, 255, 0.72),
      0 0 18px rgba(106, 231, 255, 0.42),
      0 0 30px rgba(106, 231, 255, 0.18);
  }
  50% {
    opacity: 1;
    box-shadow:
      0 0 12px rgba(106, 231, 255, 0.96),
      0 0 28px rgba(106, 231, 255, 0.66),
      0 0 46px rgba(106, 231, 255, 0.3);
  }
}

@keyframes contentCardEdgeRun {
  0% {
    background-position: -120% 0, 0 135%;
    opacity: 0.22;
  }
  18% {
    opacity: 0.95;
  }
  48% {
    background-position: 135% 0, 0 135%;
    opacity: 0.72;
  }
  52% {
    background-position: 135% 0, 0 135%;
    opacity: 0.18;
  }
  58% {
    background-position: 135% 0, 0 135%;
    opacity: 0.92;
  }
  90% {
    background-position: 135% 0, 0 -120%;
    opacity: 0.72;
  }
  100% {
    background-position: 135% 0, 0 -120%;
    opacity: 0.2;
  }
}

@keyframes contentCardBluePulse {
  0%,
  100% {
    opacity: 0.52;
  }
  50% {
    opacity: 0.9;
  }
}


.content-video-copy {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  transition: opacity 900ms ease, transform 900ms ease, filter 900ms ease;
}

.content-video-kicker {
  margin: 0;
  color: var(--content-accent-soft);
  font-size: clamp(0.78rem, 2.4vw, 0.92rem);
  font-weight: 900;
  text-transform: uppercase;
}

.content-video-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.55rem, 6.5vw, 2.35rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.content-video-copy p:last-child {
  margin: 0;
  color: #c8d4e5;
  font-size: clamp(0.86rem, 2.8vw, 1rem);
  font-weight: 700;
}

.content-video-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  transition: opacity 900ms ease, transform 900ms ease, filter 900ms ease;
}

.content-video-metrics div {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 9px 8px;
  background: rgba(4, 10, 20, 0.52);
  text-align: center;
}

.content-video-metrics span {
  display: block;
  color: #9ab0ce;
  font-size: clamp(0.62rem, 1.9vw, 0.72rem);
  font-weight: 900;
  text-transform: uppercase;
}

.content-video-metrics strong {
  display: block;
  color: #fff5c2;
  font-size: clamp(1rem, 3.4vw, 1.22rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-align: center;
}

.content-video-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(248, 251, 255, 0.78);
  font-size: clamp(0.68rem, 2.1vw, 0.8rem);
  font-weight: 800;
  transition: opacity 900ms ease, transform 900ms ease, filter 900ms ease;
}

.content-video-footer strong {
  color: #ffffff;
}

.content-video-outro {
  position: absolute;
  z-index: 18;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 34px;
  text-align: center;
  color: #f8fbff;
  background:
    radial-gradient(circle at 50% 40%, rgba(var(--content-accent-soft-rgb), 0.18), transparent 42%),
    linear-gradient(160deg, rgba(3, 8, 18, 0.82), rgba(8, 17, 30, 0.9));
  opacity: 0;
  pointer-events: none;
  transform: scale(1.035);
  transition: opacity 1050ms ease, transform 1050ms cubic-bezier(0.16, 1, 0.3, 1);
}

.content-video-frame.is-outro .content-video-outro {
  opacity: 1;
  transform: scale(1);
}

.content-video-outro img {
  width: clamp(74px, 24%, 112px);
  height: auto;
  filter:
    drop-shadow(0 0 12px rgba(var(--content-accent-rgb), 0.38))
    drop-shadow(0 16px 30px rgba(0, 0, 0, 0.34));
}

.content-video-outro strong {
  color: #ffffff;
  font-size: clamp(2.2rem, 11vw, 3.5rem);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: 0;
}

.content-video-outro span {
  color: #c8d4e5;
  font-size: clamp(0.9rem, 3.2vw, 1.08rem);
  font-weight: 850;
}

.content-video-outro small {
  color: var(--content-accent-soft);
  font-size: clamp(0.86rem, 2.8vw, 1rem);
  font-weight: 950;
}

.content-video-play {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: clamp(58px, 10%, 78px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #f8fbff;
  background: rgba(3, 8, 18, 0.68);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  opacity: 0.68;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.content-video-frame.has-audio .content-video-play {
  opacity: 1;
  pointer-events: auto;
}

.content-video-play:hover,
.content-video-play:focus-visible {
  border-color: rgba(var(--content-accent-rgb), 0.78);
  transform: translateX(-50%) translateY(-1px);
  outline: none;
}

.content-video-play:disabled {
  cursor: default;
  color: rgba(248, 251, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
}

.content-video-play-icon {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid var(--content-accent-soft);
}

.content-video-frame.is-playing .content-video-play-icon {
  width: 10px;
  height: 14px;
  border-top: 0;
  border-bottom: 0;
  border-left: 4px solid var(--content-accent-soft);
  border-right: 4px solid var(--content-accent-soft);
}

.content-video-progress {
  position: absolute;
  z-index: 21;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  opacity: 0;
}

.content-video-frame.has-audio .content-video-progress {
  opacity: 1;
}

.content-video-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--content-accent-soft), var(--content-accent));
  box-shadow: 0 0 14px rgba(var(--content-accent-rgb), 0.62);
}

.content-generator-publishing {
  display: grid;
  gap: 16px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(154, 176, 206, 0.18);
}

.content-generator-publishing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.content-generator-publishing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.content-generator-publishing-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.content-generator-publishing-head p,
.content-generator-publishing-card p {
  margin: 5px 0 0;
  color: #9ab0ce;
  line-height: 1.38;
}

.content-generator-publishing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.content-generator-publishing-card {
  padding: 14px;
  border: 1px solid rgba(154, 176, 206, 0.2);
  border-radius: 8px;
  background: rgba(8, 14, 25, 0.38);
}

.content-generator-publishing-card strong {
  display: block;
  margin-top: 5px;
  color: #f8fbff;
  font-size: 1.02rem;
}

.content-generator-mode-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.content-generator-mode-option {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(154, 176, 206, 0.22);
  border-radius: 8px;
  background: rgba(10, 18, 30, 0.72);
  color: #9ab0ce;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.content-generator-mode-option:hover,
.content-generator-mode-option:focus-visible {
  color: #f8fbff;
  border-color: rgba(96, 239, 190, 0.55);
}

.content-generator-mode-option.is-active {
  color: #ffffff;
  border-color: rgba(96, 239, 190, 0.72);
  background: rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 0 1px rgba(96, 239, 190, 0.1), 0 0 18px rgba(96, 239, 190, 0.12);
}

.content-generator-publish-list {
  display: grid;
  gap: 10px;
}

.content-generator-publish-list.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.content-generator-publish-empty {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(154, 176, 206, 0.18);
  border-radius: 8px;
  color: #9ab0ce;
  background: rgba(8, 14, 25, 0.32);
}

.content-generator-publish-empty strong {
  color: #ffffff;
  font-size: 0.92rem;
}

.content-generator-publish-empty span,
.content-generator-publish-empty small {
  color: inherit;
}

.content-generator-publish-empty.is-error {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.34);
}

.content-generator-publish-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(154, 176, 206, 0.18);
  border-radius: 8px;
  background: rgba(8, 14, 25, 0.36);
}

.content-generator-publish-row span {
  color: #86efac;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.content-generator-publish-row strong {
  display: block;
  margin-top: 3px;
  color: #f8fbff;
  line-height: 1.2;
}

.content-generator-publish-row p,
.content-generator-publish-row small {
  display: block;
  margin: 5px 0 0;
  color: #9ab0ce;
  line-height: 1.32;
}

.content-generator-pronunciation {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.content-generator-pronunciation label {
  display: grid;
  flex: 1 1 260px;
  gap: 4px;
  min-width: 0;
}

.content-generator-pronunciation label span {
  color: #9ab0ce;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.content-generator-pronunciation > small {
  flex-basis: 100%;
  margin: 0;
}

.content-generator-publish-stage {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(154, 176, 206, 0.16);
  border-radius: 8px;
  background: rgba(3, 8, 15, 0.34);
}

.content-generator-publish-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.content-generator-publish-stage-head span {
  color: #86efac;
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.content-generator-publish-stage-head small {
  margin: 0;
  color: #f8fbff;
  font-weight: 900;
}

.content-generator-publish-stage-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(154, 176, 206, 0.18);
}

.content-generator-publish-stage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60efff, #86efac);
  box-shadow: 0 0 12px rgba(96, 239, 255, 0.36);
}

.content-generator-publish-stage > small {
  margin: 0;
  color: #9ab0ce;
}

.content-generator-publish-link {
  color: #86efac;
  font-weight: 900;
  text-decoration: none;
}

.content-generator-publish-link:hover,
.content-generator-publish-link:focus-visible {
  color: #b7f7ca;
  text-decoration: underline;
  outline: none;
}

.content-generator-platform-copy-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.content-generator-platform-copy {
  border: 1px solid rgba(154, 176, 206, 0.14);
  border-radius: 6px;
  background: rgba(4, 9, 16, 0.36);
}

.content-generator-platform-copy summary {
  padding: 7px 9px;
  color: #86efac;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.content-generator-platform-copy p {
  margin: 0;
  padding: 0 9px 9px;
  color: #c9d7ec;
  white-space: pre-wrap;
}

.content-generator-publish-video {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(134, 239, 172, 0.2);
  border-radius: 8px;
  background: rgba(5, 10, 18, 0.42);
}

.content-generator-publish-video video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  background: #050a12;
}

.content-generator-buffer-url {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.content-generator-buffer-url span {
  color: #86efac;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.content-generator-buffer-url code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 8px 9px;
  border: 1px solid rgba(154, 176, 206, 0.18);
  border-radius: 6px;
  color: #d7e5ff;
  background: rgba(2, 6, 12, 0.52);
  font-size: 0.78rem;
}

.content-generator-publish-row-meta {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 7px;
  text-align: right;
}

@media (max-width: 1100px) {
  .content-generator-workspace {
    grid-template-columns: minmax(240px, 320px) minmax(320px, 1fr);
  }

  .content-generator-rotation-list {
    max-height: 360px;
  }

  .content-generator-preview-wrap {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 860px) {
  .content-generator-workspace {
    grid-template-columns: 1fr;
  }

  .content-generator-controls {
    order: 2;
  }

  .content-generator-rotation {
    order: 3;
  }

  .content-generator-preview-wrap {
    order: 1;
    grid-column: auto;
  }

  .content-generator-publishing-head {
    display: grid;
  }

  .content-generator-publishing-actions {
    justify-content: flex-start;
  }

  .content-generator-publishing-grid,
  .content-generator-publish-row {
    grid-template-columns: 1fr;
  }

  .content-generator-publish-video {
    grid-template-columns: 1fr;
  }

  .content-generator-publish-video video {
    max-width: 180px;
  }

  .content-generator-publish-row-meta {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .content-generator-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .content-video-frame {
    width: min(100%, 390px);
  }
}
