.ad-placements-v2 {
  --bg: #090c12;
  --bg-2: #0b0f16;
  --surface: #0e131c;
  --card: #10151f;
  --card-2: #141a26;
  --border: rgba(140, 160, 190, 0.11);
  --border-hi: rgba(150, 172, 205, 0.22);
  --text-1: #e8ebf1;
  --text-2: #98a1b2;
  --text-mut: #6b7384;
  --text-faint: #474e5c;
  --gold: #fbbf24;
  --gold-soft: #f0b429;
  --blue: #5b9bf3;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(91, 155, 243, 0.08), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(251, 191, 36, 0.05), transparent 28%),
    linear-gradient(rgba(150, 170, 200, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 170, 200, 0.018) 1px, transparent 1px);
  background-size: auto, auto, 52px 52px, 52px 52px;
  color: var(--text-1);
  font-family: "Inter", system-ui, sans-serif;
  padding: 58px 0 72px;
}

.ad-placements-shell {
  width: min(100% - 48px, 1160px);
  margin: 0 auto;
}

.ad-placements-hero {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.ad-placements-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.08);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0 15px;
}

.ad-placements-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.55);
}

.ad-placements-title {
  margin: 22px 0 0;
  color: var(--text-1);
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 800;
  line-height: 1.02;
}

.ad-placements-title span {
  background: linear-gradient(180deg, #fcd34d, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ad-placements-lede {
  max-width: 620px;
  margin: 16px auto 0;
  color: var(--text-2);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.55;
}

.ad-placements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.ad-placement-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  border: 1px solid var(--border-hi);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 0%, rgba(91, 155, 243, 0.05), transparent 38%),
    rgba(16, 21, 31, 0.86);
  color: inherit;
  overflow: hidden;
  padding: 22px;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ad-placement-card:hover,
.ad-placement-card:focus-visible {
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow: 0 30px 64px -54px rgba(0, 0, 0, 1);
  transform: translateY(-2px);
}

.ad-placement-card:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.38);
  outline-offset: 3px;
}

.ad-placement-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.ad-placement-card__title {
  margin: 0;
  color: var(--text-1);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.ad-placement-card__description {
  margin: 7px 0 0;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}

.ad-placement-card__badge {
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.08);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 7px 9px;
  text-transform: uppercase;
}

.ad-placement-card__preview {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin: 24px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(9, 12, 18, 0.42);
  padding: 20px;
}

.ad-placement-card__preview > * {
  width: 100%;
}

.ad-placement-card__highlights {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ad-placement-card__highlights li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 8px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}

.ad-placement-card__highlights li::before {
  content: "◆";
  color: var(--gold);
  font-size: 10px;
  line-height: 1.8;
}

.ad-placement-card__cta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 24px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.ad-placements-empty {
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  background: rgba(16, 21, 31, 0.86);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  padding: 24px;
}

.ad-placements-actions {
  margin-top: 28px;
}

.ad-placements-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  background: var(--card-2);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 800;
  padding: 0 18px;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.ad-placements-back:hover {
  border-color: rgba(150, 172, 205, 0.38);
  background: #172031;
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .ad-placements-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ad-placements-v2 {
    padding: 34px 0 48px;
  }

  .ad-placements-shell {
    width: min(100% - 18px, 1160px);
  }

  .ad-placements-hero {
    margin-bottom: 22px;
  }

  .ad-placements-pill {
    min-height: 26px;
    font-size: 10px;
    padding: 0 12px;
  }

  .ad-placements-title {
    margin-top: 16px;
    font-size: 34px;
  }

  .ad-placements-lede {
    margin-top: 12px;
    font-size: 13.5px;
  }

  .ad-placements-grid {
    gap: 14px;
  }

  .ad-placement-card {
    border-radius: 14px;
    padding: 14px;
  }

  .ad-placement-card__header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .ad-placement-card__title {
    font-size: 16px;
  }

  .ad-placement-card__description {
    margin-top: 5px;
    font-size: 12.5px;
  }

  .ad-placement-card__badge {
    width: fit-content;
    font-size: 9px;
    padding: 6px 8px;
  }

  .ad-placement-card__preview {
    margin-top: 12px;
    padding: 9px;
  }

  .ad-placement-card__highlights {
    gap: 7px;
    margin-top: 12px;
  }

  .ad-placement-card__highlights li {
    font-size: 11.5px;
  }

  .ad-placement-card__highlights li:nth-child(n + 3) {
    display: none;
  }

  .ad-placement-card__cta {
    margin-top: 15px;
    font-size: 12px;
  }

  .ad-placements-actions {
    margin-top: 18px;
  }

  .ad-placements-back {
    min-height: 40px;
    font-size: 12px;
    padding: 0 15px;
  }
}
@layer components {

    /* --- Layout & Containers --- */
    .page-container {
        @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8;
    }

    .section-container {
        @apply mb-12;
    }

    /* --- Cards --- */
    .card {
        @apply bg-gray-900/60 border border-gray-700/50 rounded-xl shadow-xl backdrop-blur-sm relative overflow-hidden;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    }

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        pointer-events: none;
    }

    .card-hover {
        @apply transition-all duration-300 hover:border-yellow-400/50 hover:bg-gray-800/60;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    }

    .card-hover:hover {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 15px rgba(251, 191, 36, 0.1), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
    }

    .card-header {
        @apply px-6 py-4 border-b border-gray-700 flex items-center justify-between;
    }

    .card-body {
        @apply p-6;
    }

    /* --- Typography --- */
    .page-title {
        @apply text-3xl md:text-4xl font-bold text-gray-100 mb-6;
    }

    .section-title {
        @apply text-2xl font-bold text-gray-100 mb-6 flex items-center gap-2;
    }

    .text-gradient-gold {
        @apply text-transparent bg-clip-text bg-gradient-to-r from-yellow-400 to-yellow-200;
    }

    /* Shared button and badge primitives live in app/assets/tailwind/application.css. */

    /* --- Forms --- */
    .form-group {
        @apply mb-6;
    }

    .form-label {
        @apply block text-sm font-medium text-gray-300 mb-2;
    }

    .form-input {
        @apply block w-full rounded-lg bg-gray-900 border-gray-700 text-gray-100 shadow-sm focus:border-yellow-500 focus:ring-yellow-500 sm:text-sm placeholder-gray-500;
    }

    .form-select {
        @apply block w-full rounded-lg bg-gray-900 border-gray-700 text-gray-100 shadow-sm focus:border-yellow-500 focus:ring-yellow-500 sm:text-sm;
    }

    /* --- Tables --- */
    .table-container {
        @apply overflow-x-auto rounded-lg border border-gray-700;
    }

    .table-base {
        @apply min-w-full divide-y divide-gray-700;
    }

    .table-head {
        @apply bg-gray-800;
    }

    .table-th {
        @apply px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider;
    }

    .table-body {
        @apply bg-gray-900/50 divide-y divide-gray-800;
    }

    .table-td {
        @apply px-6 py-4 whitespace-nowrap text-sm text-gray-300;
    }

    .table-row-hover {
        @apply hover:bg-gray-800/50 transition-colors;
    }

    /* --- Headers --- */
    .section-header {
        @apply text-sm font-black text-gray-400 uppercase tracking-[0.2em] mb-6 pl-4 border-l-4 border-yellow-500 bg-gray-800/40 py-2 rounded-r-lg flex items-center;
    }

    /* --- Premium Character Card (Series Page) --- */
    .character-card-premium {
        @apply relative overflow-hidden rounded-2xl bg-gray-900 border border-gray-800 shadow-2xl transition-all duration-500 group cursor-pointer;
        aspect-ratio: 4/5;
    }

    .character-card-premium:hover {
        @apply border-yellow-500 shadow-yellow-500/10 -translate-y-2;
    }

    .character-card-premium .avatar-container {
        @apply absolute inset-0 w-full h-full overflow-hidden;
    }

    .character-card-premium .avatar-image {
        @apply w-full h-full object-cover grayscale-[0.2] group-hover:grayscale-0 transition-all duration-700 group-hover:scale-105;
    }

    .character-card-premium .content-overlay {
        @apply absolute inset-x-0 bottom-0 p-5 bg-black/80 backdrop-blur-md border-t border-gray-800/50 transform translate-y-1 transition-transform duration-300 group-hover:translate-y-0;
    }

    .character-card-premium .character-name {
        @apply text-lg font-black text-white mb-0.5 group-hover:text-yellow-400 transition-colors tracking-tight uppercase leading-none;
    }

    .character-card-premium .character-level {
        @apply text-[10px] font-black text-yellow-500/80 uppercase tracking-[0.15em] flex items-center gap-1.5;
    }

    .character-card-premium .main-badge {
        @apply absolute top-4 left-4 z-20 px-3 py-1 rounded-md bg-yellow-500 text-[9px] font-black text-black uppercase tracking-widest shadow-xl border border-yellow-400/50;
    }

    /* --- Game-specific Features --- */
    .rarity-inferior {
        color: #64748b;
    }

    .rarity-common {
        color: #9ca3af;
    }

    .rarity-uncommon {
        color: #10b981;
    }

    .rarity-rare {
        color: #3b82f6;
    }

    .rarity-epic {
        color: #a855f7;
    }

    .rarity-legendary {
        color: #f59e0b;
    }


    /* System Background Utility */
    .bg-system-grid {
        background-color: #0b0d11;
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
        background-size: 40px 40px;
        background-attachment: fixed;
    }
}

/* Shimmer animation for teaser elements */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer 3s ease-in-out infinite;
}
.for-authors-v2 {
  --bg: #090c12;
  --bg-2: #0b0f16;
  --surface: #0e131c;
  --nav: #0d111a;
  --card: #10151f;
  --card-2: #141a26;
  --slot: #131925;
  --border: rgba(140, 160, 190, 0.11);
  --border-hi: rgba(150, 172, 205, 0.22);
  --text-1: #e8ebf1;
  --text-2: #98a1b2;
  --text-mut: #6b7384;
  --text-faint: #474e5c;
  --gold: #fbbf24;
  --gold-soft: #f0b429;
  --blue: #5b9bf3;
  --green: #4ade80;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.08), transparent 28%),
    radial-gradient(circle at 50% 88%, rgba(251, 191, 36, 0.055), transparent 28%),
    linear-gradient(rgba(150, 170, 200, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 170, 200, 0.018) 1px, transparent 1px);
  background-size: auto, auto, 52px 52px, 52px 52px;
  color: var(--text-1);
  font-family: "Inter", system-ui, sans-serif;
}

.for-authors-shell {
  width: min(100% - 48px, 1160px);
  margin: 0 auto;
}

.for-authors-hero {
  padding: 74px 0 46px;
  text-align: center;
}

.for-authors-title {
  margin: 0;
  color: var(--text-1);
  font-size: clamp(48px, 7vw, 76px);
  font-weight: 800;
  line-height: 0.95;
}

.for-authors-title span {
  color: var(--gold);
}

.for-authors-lede {
  max-width: 680px;
  margin: 24px auto 0;
  color: var(--text-2);
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.55;
}

.for-authors-console {
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.05), transparent 34%),
    rgba(16, 21, 31, 0.86);
  box-shadow: 0 30px 70px -52px rgba(0, 0, 0, 1);
  padding: 20px;
}

.for-authors-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.for-authors-tab {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 16px 18px;
  text-align: left;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.for-authors-tab:hover,
.for-authors-tab--active {
  border-color: rgba(150, 172, 205, 0.22);
  border-bottom-color: var(--gold);
  background: rgba(20, 26, 38, 0.78);
}

.for-authors-tab--active {
  box-shadow: inset 0 -1px 0 rgba(251, 191, 36, 0.4);
}

.for-authors-tab__icon,
.for-authors-feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 9px;
  background: rgba(251, 191, 36, 0.09);
  color: var(--gold);
}

.for-authors-tab h3,
.for-authors-feature h4 {
  margin: 0;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.for-authors-tab p,
.for-authors-feature p {
  margin: 5px 0 0;
  color: var(--text-mut);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.for-authors-panels {
  padding: 34px 22px 18px;
}

.for-authors-panel h3 {
  margin: 0;
  color: var(--text-1);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.for-authors-panel-title--gold {
  color: var(--gold);
}

.for-authors-panel__intro {
  max-width: 880px;
  margin: 12px 0 26px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
}

.for-authors-native-preview {
  position: relative;
  margin-top: 28px;
}

.for-authors-native-preview__badge {
  position: absolute;
  top: -13px;
  right: 16px;
  z-index: 2;
  border: 1px solid rgba(150, 172, 205, 0.28);
  border-radius: 6px;
  background: #1a2333;
  color: var(--text-mut);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 7px 9px;
  text-transform: uppercase;
}

.for-authors-panel-actions {
  margin-top: 22px;
}

.for-authors-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 0 20px;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.for-authors-button:hover {
  transform: translateY(-1px);
}

.for-authors-button--primary {
  border: 0;
  background: linear-gradient(180deg, #fcd34d, #f0a92a);
  color: #1d1607;
  box-shadow: 0 18px 32px -22px rgba(251, 191, 36, 0.82);
}

.for-authors-button--outline {
  border: 1px solid rgba(251, 191, 36, 0.48);
  background: rgba(251, 191, 36, 0.08);
  color: var(--gold);
}

.for-authors-feature-list {
  display: grid;
  gap: 12px;
}

.for-authors-feature {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(16, 21, 31, 0.62);
  padding: 16px;
}

.for-authors-request-box {
  margin-top: 22px;
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  background: rgba(20, 26, 38, 0.78);
  padding: 20px;
}

.for-authors-request-box h4 {
  margin: 0;
  color: var(--text-1);
  font-size: 18px;
  font-weight: 800;
}

.for-authors-request-box p {
  margin: 8px 0 18px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.55;
}

.for-authors-ready {
  padding: 84px 0 64px;
  text-align: center;
}

.for-authors-ready h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.for-authors-ready__lede {
  max-width: 430px;
  margin: 14px auto 30px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.for-authors-cta-box {
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  background: rgba(16, 21, 31, 0.88);
  padding: 26px;
  text-align: center;
}

.for-authors-cta-box .for-authors-button {
  width: 100%;
}

.for-authors-cta-note,
.for-authors-cta-link-row {
  margin: 14px 0 0;
  color: var(--text-mut);
  font-size: 12px;
  line-height: 1.45;
}

.for-authors-cta-link-row a {
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .for-authors-tabs {
    grid-template-columns: 1fr;
  }

  .for-authors-tab {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .for-authors-shell {
    width: min(100% - 20px, 1160px);
  }

  .for-authors-hero {
    padding: 44px 0 30px;
  }

  .for-authors-title {
    font-size: 48px;
  }

  .for-authors-lede {
    font-size: 15px;
  }

  .for-authors-console {
    padding: 10px;
  }

  .for-authors-panels {
    padding: 24px 10px 12px;
  }

  .for-authors-panel h3 {
    font-size: 22px;
  }

  .for-authors-feature {
    padding: 14px;
  }

  .for-authors-ready {
    padding: 58px 0 46px;
  }
}
body.home-page-body {
  background-color: #090c12;
  background-image:
    linear-gradient(rgba(150, 170, 200, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 170, 200, 0.018) 1px, transparent 1px);
  background-size: 52px 52px;
}

.site-navbar--home {
  border-color: rgba(140, 160, 190, 0.11);
  background: rgba(13, 17, 26, 0.78);
  backdrop-filter: blur(18px);
}

.home-marketing {
  --bg: #090c12;
  --bg-2: #0b0f16;
  --surface: #0e131c;
  --nav: #0d111a;
  --card: #10151f;
  --card-2: #141a26;
  --slot: #131925;
  --border: rgba(140, 160, 190, 0.11);
  --border-hi: rgba(150, 172, 205, 0.22);
  --text-1: #e8ebf1;
  --text-2: #98a1b2;
  --text-mut: #6b7384;
  --text-faint: #474e5c;
  --gold: #fbbf24;
  --gold-soft: #f0b429;
  --blue: #5b9bf3;
  --green: #4ade80;
  --epic: #c084fc;

  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(150, 170, 200, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 170, 200, 0.018) 1px, transparent 1px);
  background-size: 52px 52px;
  color: var(--text-1);
  font-family: "Inter", system-ui, sans-serif;
}

.home-marketing *,
.home-marketing *::before,
.home-marketing *::after {
  box-sizing: border-box;
}

.home-shell {
  width: min(100% - 48px, 1240px);
  margin: 0 auto;
}

.home-shell--narrow {
  width: min(100% - 48px, 1160px);
}

.home-hero {
  padding: 96px 0 122px;
  background:
    radial-gradient(circle at 68% 10%, rgba(91, 155, 243, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(11, 15, 22, 0.18), rgba(9, 12, 18, 0));
}

.home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(500px, 1.05fr);
  gap: 72px;
  align-items: center;
}

.home-hero__copy {
  max-width: 580px;
}

.home-section-label {
  margin: 0 0 22px;
  color: var(--gold-soft);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.home-section-label--muted {
  color: var(--text-mut);
}

.home-hero__title {
  margin: 0;
  color: var(--text-1);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.98;
}

.home-hero__title span {
  color: var(--gold);
}

.home-hero__lede {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--text-2);
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.65;
}

.home-hero__lede strong {
  color: var(--text-1);
  font-weight: 800;
}

.home-hero__lede span {
  color: var(--blue);
  font-weight: 700;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.home-actions--center {
  justify-content: center;
}

.home-marketing .home-button,
.home-marketing .btn-primary,
.home-marketing .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease, background 180ms ease;
}

.home-marketing .btn-primary {
  border: 1px solid rgba(251, 191, 36, 0.46);
  background: linear-gradient(180deg, #fcd34d, #f0a92a);
  color: #161207;
  box-shadow: 0 12px 28px -16px rgba(251, 191, 36, 0.95);
}

.home-marketing .btn-primary:hover {
  border-color: rgba(251, 191, 36, 0.66);
  background: linear-gradient(180deg, #fde68a, #f0a92a);
  color: #161207;
  box-shadow: 0 18px 34px -16px rgba(251, 191, 36, 1);
  transform: translateY(-1px);
}

.home-marketing .btn-secondary {
  border: 1px solid var(--border-hi);
  background: var(--card-2);
  color: var(--text-1);
  box-shadow: none;
}

.home-marketing .btn-secondary:hover {
  border-color: rgba(150, 172, 205, 0.38);
  background: #172031;
  color: #fff;
  transform: translateY(-1px);
}

.home-card,
.home-character-card,
.home-series-card,
.home-spotlight {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.home-card:hover,
.home-series-card:hover,
.home-spotlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px -34px rgba(0, 0, 0, 0.9);
}

.home-stat-chip-row {
  display: grid;
  gap: 12px;
}

.home-stat-chip-row--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.home-stat-chip {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--slot);
  padding: 13px 14px;
  text-align: center;
}

.home-stat-chip span {
  display: block;
  color: var(--text-mut);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.home-stat-chip strong {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.home-character-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  justify-self: end;
  overflow: hidden;
  background: rgba(16, 21, 31, 0.9);
  box-shadow: 0 30px 60px -48px rgba(0, 0, 0, 1);
}

.home-character-card__header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: start;
  gap: 10px;
  padding: 20px 18px 14px;
  text-align: center;
}

.home-character-card__identity h2 {
  margin: 0;
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
}

.home-character-card__identity p {
  margin: 8px 0 0;
  color: var(--text-mut);
  font-size: 11px;
  font-weight: 700;
}

.home-character-card__identity span {
  color: var(--text-faint);
  margin: 0 6px;
}

.home-preview-chip {
  justify-self: end;
  border: 1px solid rgba(91, 155, 243, 0.55);
  border-radius: 5px;
  padding: 5px 8px 4px;
  color: var(--blue);
  background: rgba(91, 155, 243, 0.08);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.home-reading-panel {
  margin: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--slot);
  padding: 8px 10px;
  color: var(--text-mut);
  font-size: 10px;
  font-weight: 700;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.home-reading-panel--looking-back {
  border-color: rgba(251, 191, 36, 0.32);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.06);
}

.home-reading-row {
  display: grid;
  grid-template-columns: minmax(168px, 0.78fr) minmax(130px, 1fr);
  align-items: center;
  gap: 10px;
}

.home-reading-status {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  background: #101728;
  padding: 7px 10px;
  white-space: nowrap;
  transition: border-color 180ms ease, background-color 180ms ease, padding-right 180ms ease;
}

.home-reading-status--looking-back {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.1);
}

.home-reading-status__icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--gold);
}

.home-reading-status__label {
  flex: 0 0 auto;
  color: var(--text-mut);
  font-weight: 700;
}

.home-reading-status--looking-back .home-reading-status__label,
.home-reading-status--looking-back .home-reading-status__separator {
  color: var(--gold-soft);
}

.home-reading-status__separator {
  flex: 0 0 auto;
  color: var(--text-faint);
}

.home-reading-status__chapter {
  min-width: 0;
  overflow: hidden;
  color: var(--text-1);
  font-weight: 800;
  text-overflow: ellipsis;
}

.home-reading-controls {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
}

.home-reading-arrow {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  background: #131b2e;
  color: var(--text-mut);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.home-reading-arrow:hover:not(:disabled),
.home-reading-arrow:focus-visible:not(:disabled) {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.1);
  color: var(--gold);
  outline: none;
}

.home-reading-arrow:disabled {
  cursor: default;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-faint);
  opacity: 0.62;
}

.home-reading-slider {
  --home-preview-progress: 100%;

  position: relative;
  height: 24px;
  border-radius: 999px;
}

.home-reading-slider::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-50%);
}

.home-reading-slider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: var(--home-preview-progress);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #f0a92a);
  transform: translateY(-50%);
}

.home-reading-slider__remainder {
  position: absolute;
  top: 50%;
  right: 0;
  left: var(--home-preview-progress);
  z-index: 1;
  display: none;
  height: 4px;
  background: repeating-linear-gradient(90deg, rgba(251, 191, 36, 0.32) 0 5px, transparent 5px 9px);
  transform: translateY(-50%);
}

.home-reading-panel--looking-back .home-reading-slider__remainder {
  display: block;
}

.home-reading-slider__input {
  position: absolute;
  z-index: 4;
  inset: -6px -2px;
  width: calc(100% + 4px);
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.home-reading-slider__tick {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: var(--home-preview-tick);
  width: 5px;
  height: 5px;
  border: 1px solid rgba(251, 191, 36, 0.74);
  border-radius: 999px;
  background: #232a37;
  transform: translate(-50%, -50%);
}

.home-reading-slider__marker {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 0;
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 7px rgba(251, 191, 36, 0.9);
  transform: translate(50%, -50%);
}

.home-reading-slider__knob {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: var(--home-preview-progress);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.65);
  transform: translate(-50%, -50%);
  transition: left 220ms ease;
}

.home-character-tabs {
  display: flex;
  gap: 0;
  margin: 18px 14px 0;
  border-bottom: 1px solid var(--border);
  padding: 0 4px;
  overflow: hidden;
}

.home-character-tabs span {
  position: relative;
  flex: 1 1 0;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--text-mut);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 0 8px 11px;
  text-align: center;
  white-space: nowrap;
}

.home-character-tabs .active {
  border-bottom-color: currentColor;
  color: var(--gold);
}

.home-character-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 174px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
}

.home-equipment-column {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 9px;
  min-width: 0;
}

.home-equipment-bottom-row {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}

.home-equipment-slot {
  --slot-preview-color: var(--blue);

  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid var(--slot-preview-color);
  border-radius: 8px;
  background: var(--slot);
  color: inherit;
  padding: 6px 7px;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.home-equipment-slot:hover,
.home-equipment-slot:focus-visible {
  z-index: 10;
  background: rgba(20, 26, 38, 0.96);
  transform: translateY(-1px);
}

.home-equipment-slot:focus-visible {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.28);
}

.home-equipment-slot--inferior {
  --slot-preview-color: #64748b;
}

.home-equipment-slot--common {
  --slot-preview-color: #9d9d9d;
}

.home-equipment-slot--uncommon {
  --slot-preview-color: #1eff00;
}

.home-equipment-slot--rare {
  --slot-preview-color: #0070dd;
}

.home-equipment-slot--epic {
  --slot-preview-color: #a335ee;
}

.home-equipment-slot--legendary {
  --slot-preview-color: #ff8000;
}

.home-equipment-slot__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--slot-preview-color);
  border-radius: 7px;
  color: var(--slot-preview-color);
  background: rgba(0, 0, 0, 0.12);
}

.home-equipment-slot__copy,
.home-equipment-slot__label,
.home-equipment-slot__name,
.home-equipment-slot__empty-label,
.home-equipment-slot__empty-initial {
  display: block;
  min-width: 0;
}

.home-equipment-slot__label {
  color: var(--text-mut);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-transform: uppercase;
}

.home-equipment-slot__name {
  margin-top: 3px;
  overflow: hidden;
  color: var(--slot-preview-color);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-equipment-slot--empty {
  border-style: dashed;
  border-color: rgba(150, 172, 205, 0.18);
  background: rgba(19, 25, 37, 0.62);
}

.home-equipment-slot--empty .home-equipment-slot__icon {
  border-color: rgba(150, 172, 205, 0.16);
  color: var(--text-faint);
  background: rgba(0, 0, 0, 0.12);
}

.home-equipment-slot__empty-initial {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.home-equipment-slot__empty-label {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.home-character-portrait {
  position: relative;
  z-index: 1;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 7px;
  background: #0b0f16;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.12);
}

.home-character-portrait__link {
  display: block;
  width: 100%;
  height: 100%;
}

.home-character-portrait__link:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.72);
  outline-offset: -3px;
}

.home-character-portrait__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.home-character-portrait__fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  background: linear-gradient(180deg, #151c29, #0d111a);
}

.home-panel-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 0 14px 14px;
}

.home-panel-stat-grid .home-stat-chip {
  padding: 10px 6px;
}

.home-panel-stat-grid .home-stat-chip strong {
  margin-top: 6px;
  color: var(--text-1);
  font-size: 16px;
}

.home-section {
  padding: 76px 0;
}

.home-section--center {
  text-align: center;
}

.home-section-title {
  margin: 0;
  color: var(--text-1);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

.home-section-subtitle {
  max-width: 640px;
  margin: 14px auto 0;
  color: var(--text-2);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.55;
}

.home-section-subtitle--left {
  margin-left: 0;
  margin-right: 0;
}

.home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.home-section-head--stacked {
  display: block;
  max-width: 610px;
}

.home-text-link {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.home-text-link:hover {
  color: #8bbcff;
}

.home-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 52px;
  text-align: left;
}

.home-step-card,
.home-feature-card {
  padding: 28px;
}

.home-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  margin-bottom: 22px;
}

.home-icon-tile--gold {
  border: 1px solid rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.11);
  color: var(--gold);
}

.home-icon-tile--blue {
  border: 1px solid rgba(91, 155, 243, 0.4);
  background: rgba(91, 155, 243, 0.11);
  color: var(--blue);
}

.home-icon-tile--green {
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
}

.home-step-card p {
  margin: 0 0 12px;
  color: var(--text-mut);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.home-step-card h3,
.home-feature-card h3 {
  margin: 0;
  color: var(--text-1);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.home-step-card span,
.home-feature-card p {
  display: block;
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.55;
}

.home-series-rotator {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
  margin-top: 24px;
  max-width: 920px;
}

.home-series-rotator .home-series-card {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  visibility: hidden;
}

.home-series-rotator .home-series-card.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.home-series-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 920px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
}

.home-series-card:hover {
  border-color: rgba(91, 155, 243, 0.68);
}

.home-series-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  min-height: 144px;
  overflow: hidden;
  border: 1px solid rgba(150, 172, 205, 0.16);
  border-radius: 8px;
  background: #0b0f16;
}

.home-series-card__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.home-series-card__thumb-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(93, 84, 196, 0.3);
}

.home-series-card__body h3,
.home-spotlight__body h3 {
  margin: 0;
  color: var(--gold);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.home-byline {
  margin: 7px 0 0;
  color: var(--text-mut);
  font-size: 13px;
  font-weight: 600;
}

.home-byline strong {
  color: var(--gold-soft);
  font-weight: 800;
}

.home-series-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  color: var(--text-mut);
  font-size: 12px;
  font-weight: 600;
}

.home-series-card__meta strong {
  color: var(--blue);
  font-weight: 800;
}

.home-series-rotator__controls {
  display: flex;
  grid-column: 1;
  grid-row: 2;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.home-series-rotator__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.home-series-rotator__dot span {
  display: block;
  width: 20px;
  height: 5px;
  border-radius: 999px;
  background: rgba(150, 172, 205, 0.22);
  transition: background-color 180ms ease, box-shadow 180ms ease, width 180ms ease;
}

.home-series-rotator__dot:hover span,
.home-series-rotator__dot:focus-visible span {
  background: rgba(91, 155, 243, 0.58);
}

.home-series-rotator__dot.is-active span {
  width: 26px;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.24);
}

.home-spotlight {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  overflow: hidden;
  padding: 34px;
  background:
    radial-gradient(circle at 100% 0%, rgba(91, 155, 243, 0.12), transparent 34%),
    var(--card);
}

.home-spotlight::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  background: rgba(91, 155, 243, 0.12);
  filter: blur(52px);
  pointer-events: none;
}

.home-spotlight__portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(150, 172, 205, 0.16);
  border-radius: 10px;
  background: #0b0f16;
}

.home-spotlight__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  border-radius: 6px;
  background: var(--gold);
  padding: 5px 8px 4px;
  color: #151006;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.home-spotlight__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.home-spotlight__fallback {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  background: linear-gradient(180deg, #151c29, #0d111a);
}

.home-spotlight__body {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 610px;
}

.home-spotlight__body h3 {
  color: var(--text-1);
  font-size: 32px;
}

.home-spotlight__body > p:not(.home-byline) {
  margin: 22px 0 0;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
}

.home-spotlight__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.home-spotlight__actions span {
  color: var(--text-mut);
  font-size: 12px;
  font-weight: 700;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 52px;
  text-align: left;
}

.home-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 44px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.home-stats-strip__item {
  padding: 26px 18px;
  text-align: center;
}

.home-stats-strip__item + .home-stats-strip__item {
  border-left: 1px solid var(--border);
}

.home-stats-strip__item strong {
  display: block;
  color: var(--gold);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
}

.home-stats-strip__item span {
  display: block;
  margin-top: 12px;
  color: var(--text-mut);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.home-section--faqs {
  padding-top: 48px;
  padding-bottom: 78px;
}

.home-faq-list {
  display: grid;
  gap: 10px;
}

.home-faq-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(16, 21, 31, 0.86);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.home-faq-item:hover {
  border-color: var(--border-hi);
  transform: translateY(-1px);
}

.home-faq-item[open] {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(20, 26, 38, 0.92);
}

.home-faq-item summary {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.home-faq-item summary::-webkit-details-marker {
  display: none;
}

.home-faq-item summary:focus {
  outline: none;
}

.home-faq-item summary:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.28);
  outline-offset: -4px;
}

.home-faq-item h3 {
  margin: 0;
  color: var(--text-1);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
}

.home-faq-toggle {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.055);
}

.home-faq-toggle::before,
.home-faq-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 999px;
  background: var(--gold);
  content: "";
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.home-faq-toggle::before {
  width: 10px;
  height: 2px;
}

.home-faq-toggle::after {
  width: 2px;
  height: 10px;
}

.home-faq-item[open] .home-faq-toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) scaleY(0.2);
}

.home-faq-answer {
  border-top: 1px solid var(--border);
  padding: 0 18px 17px;
}

.home-faq-answer p {
  margin: 15px 0 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.62;
}

.home-inline-link,
.home-faq-more a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.home-inline-link:hover,
.home-faq-more a:hover {
  color: #8bbcff;
}

.home-faq-more {
  margin: 20px 0 0;
  color: var(--text-mut);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

.home-final-cta {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 96px 0 102px;
  text-align: center;
}

.home-final-cta::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -180px;
  width: 520px;
  height: 260px;
  background: rgba(251, 191, 36, 0.11);
  filter: blur(68px);
  transform: translateX(-50%);
  pointer-events: none;
}

.home-final-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 610px;
}

.home-final-cta h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.home-final-cta p {
  margin: 18px auto 0;
  color: var(--text-2);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}

body.home-page-body .site-footer {
  border-color: rgba(140, 160, 190, 0.11);
  background: #0d111a;
}

body.home-page-body .site-footer > div {
  width: min(100% - 48px, 1240px);
  margin: 0 auto;
  padding: 36px 0;
}

body.home-page-body .footer-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 0 16px rgba(93, 84, 196, 0.28);
}

body.home-page-body .footer-brand-mark img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

@media (min-width: 1600px) {
  .home-shell {
    width: min(100% - 96px, 1360px);
  }

  .home-shell--narrow {
    width: min(100% - 96px, 1240px);
  }

  .home-hero {
    padding: 108px 0 136px;
  }

  .home-hero__grid {
    grid-template-columns: minmax(0, 620px) minmax(640px, 680px);
    gap: 112px;
    justify-content: center;
  }

  .home-hero__copy {
    max-width: 620px;
  }

  .home-hero__title {
    font-size: 64px;
  }

  .home-hero__lede {
    max-width: 580px;
    font-size: 17.5px;
  }

  .home-actions {
    margin-top: 32px;
  }

  .home-stat-chip {
    padding: 15px 16px;
  }

  .home-character-card {
    max-width: 680px;
  }

  .home-character-card__header {
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    padding: 24px 22px 16px;
  }

  .home-character-card__identity h2 {
    font-size: 25px;
  }

  .home-character-card__identity p {
    font-size: 12px;
  }

  .home-reading-panel {
    margin: 0 22px;
    padding: 9px 12px;
    font-size: 11px;
  }

  .home-character-tabs {
    margin: 20px 18px 0;
  }

  .home-character-tabs span {
    font-size: 12px;
  }

  .home-character-stage {
    grid-template-columns: minmax(0, 1fr) 196px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .home-equipment-column {
    gap: 10px;
  }

  .home-equipment-bottom-row {
    gap: 10px;
  }

  .home-equipment-slot {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    min-height: 48px;
    padding: 7px 8px;
  }

  .home-equipment-slot__icon {
    width: 32px;
    height: 32px;
  }

  .home-equipment-slot__name {
    font-size: 11.5px;
  }

  .home-panel-stat-grid {
    gap: 9px;
    padding: 0 18px 18px;
  }

  .home-panel-stat-grid .home-stat-chip {
    padding: 12px 8px;
  }

  .home-panel-stat-grid .home-stat-chip strong {
    font-size: 18px;
  }

  .home-section {
    padding: 88px 0;
  }

  .home-section-title {
    font-size: 38px;
  }

  .home-step-grid,
  .home-feature-grid {
    gap: 22px;
  }

  .home-step-card,
  .home-feature-card {
    padding: 32px;
  }

  .home-series-card {
    max-width: 920px;
    grid-template-columns: 146px minmax(0, 1fr);
    gap: 28px;
    padding: 26px;
  }

  .home-series-card__thumb {
    width: 146px;
    min-height: 176px;
  }

  .home-spotlight {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 46px;
    padding: 42px;
  }

  .home-final-cta__inner {
    max-width: 680px;
  }

  body.home-page-body .site-footer > div {
    width: min(100% - 96px, 1360px);
  }
}

@media (max-width: 980px) {
  .home-hero__grid,
  .home-spotlight {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding-top: 64px;
  }

  .home-hero__copy,
  .home-character-card {
    max-width: none;
  }

  .home-character-card {
    justify-self: stretch;
  }

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

  .home-spotlight__portrait {
    max-width: 300px;
  }
}

@media (max-width: 760px) {
  .home-shell,
  .home-shell--narrow {
    width: min(100% - 28px, 1120px);
  }

  .home-hero__title {
    font-size: 44px;
  }

  .home-character-stage {
    grid-template-columns: 1fr;
  }

  .home-character-portrait {
    width: min(220px, 100%);
    margin: 0 auto;
    order: -1;
  }

  .home-reading-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .home-reading-status,
  .home-reading-controls {
    grid-column: 1 / -1;
  }

  .home-panel-stat-grid,
  .home-stat-chip-row--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-section-head {
    display: block;
  }

  .home-text-link {
    display: inline-flex;
    margin-top: 16px;
  }

  .home-series-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .home-shell,
  .home-shell--narrow {
    width: min(100% - 24px, 1120px);
  }

  .home-hero {
    padding-top: 34px;
    padding-bottom: 40px;
  }

  .home-hero__grid {
    gap: 28px;
  }

  .home-section-label {
    margin-bottom: 18px;
    font-size: 10px;
    letter-spacing: 0.15em;
  }

  .home-hero__title {
    max-width: 360px;
    font-size: 34px;
    line-height: 1.02;
  }

  .home-hero__lede {
    margin-top: 18px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .home-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
  }

  .home-marketing .home-button,
  .home-marketing .btn-primary,
  .home-marketing .btn-secondary {
    min-height: 42px;
    padding: 0 12px;
    font-size: 12px;
  }

  .home-stat-chip-row {
    gap: 8px;
  }

  .home-stat-chip-row--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
  }

  .home-stat-chip {
    border-radius: 8px;
    padding: 10px 8px;
  }

  .home-stat-chip span {
    font-size: 7.5px;
    letter-spacing: 0.14em;
  }

  .home-stat-chip strong {
    margin-top: 6px;
    font-size: 19px;
  }

  .home-character-card {
    border-radius: 12px;
    display: block;
  }

  .home-character-card__header {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 6px;
    padding: 12px 10px 8px;
  }

  .home-character-card__identity h2 {
    font-size: 18px;
  }

  .home-character-card__identity p {
    margin-top: 5px;
    font-size: 9px;
  }

  .home-preview-chip {
    padding: 4px 6px 3px;
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .home-reading-panel {
    margin: 0 8px;
    border-radius: 8px;
    padding: 5px 6px;
    font-size: 7.8px;
  }

  .home-reading-panel--looking-back {
    border-color: rgba(251, 191, 36, 0.16);
    box-shadow: none;
  }

  .home-reading-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .home-reading-status {
    min-height: 22px;
    gap: 4px;
    border-radius: 7px;
    padding: 5px 7px;
  }

  .home-reading-status--looking-back {
    border-color: rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.055);
  }

  .home-reading-status__icon svg {
    width: 9px;
    height: 9px;
  }

  .home-reading-status__label {
    font-weight: 800;
  }

  .home-reading-status__chapter {
    white-space: nowrap;
  }

  .home-reading-controls {
    grid-template-columns: 20px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 5px;
    min-width: 0;
  }

  .home-reading-arrow {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    font-size: 14px;
  }

  .home-reading-slider {
    grid-column: auto;
    min-width: 0;
    height: 14px;
  }

  .home-reading-slider::before,
  .home-reading-slider::after,
  .home-reading-slider__remainder {
    height: 2px;
  }

  .home-reading-slider__tick {
    width: 3px;
    height: 3px;
    border-color: rgba(251, 191, 36, 0.5);
  }

  .home-reading-slider__marker {
    width: 2px;
    height: 9px;
    opacity: 0.72;
    box-shadow: 0 0 4px rgba(251, 191, 36, 0.48);
  }

  .home-reading-slider__knob {
    width: 8px;
    height: 8px;
    box-shadow: 0 0 5px rgba(251, 191, 36, 0.42);
  }

  .home-character-tabs {
    margin: 11px 8px 0;
    padding: 0;
  }

  .home-character-tabs span {
    padding: 0 3px 8px;
    font-size: 8.5px;
  }

  .home-character-stage {
    grid-template-columns: minmax(0, 0.88fr) minmax(92px, 106px) minmax(0, 0.88fr);
    gap: 5px;
    padding: 8px;
  }

  .home-equipment-column {
    gap: 5px;
  }

  .home-equipment-bottom-row {
    gap: 5px;
  }

  .home-equipment-slot {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 5px;
    min-height: 28px;
    border-radius: 7px;
    padding: 4px;
  }

  .home-equipment-slot__icon {
    width: 18px;
    height: 18px;
    border-radius: 6px;
  }

  .home-equipment-slot__icon svg {
    width: 12px;
    height: 12px;
  }

  .home-equipment-slot__label {
    font-size: 6px;
    letter-spacing: 0.1em;
  }

  .home-equipment-slot__name {
    margin-top: 2px;
    font-size: 7.5px;
  }

  .home-equipment-slot__empty-label {
    margin-top: 2px;
    font-size: 6px;
    letter-spacing: 0.12em;
  }

  .home-character-portrait {
    width: auto;
    margin: 0;
    order: 0;
    border-radius: 6px;
  }

  .home-panel-stat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    padding: 0 8px 8px;
  }

  .home-panel-stat-grid .home-stat-chip {
    padding: 7px 3px;
  }

  .home-panel-stat-grid .home-stat-chip span {
    font-size: 6px;
  }

  .home-panel-stat-grid .home-stat-chip strong {
    margin-top: 4px;
    font-size: 12px;
  }

  .home-section {
    padding: 40px 0;
  }

  .home-section-title {
    font-size: 24px;
  }

  .home-section-subtitle {
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.45;
  }

  .home-section-head {
    margin-bottom: 18px;
  }

  .home-step-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 26px;
  }

  .home-step-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    padding: 14px;
  }

  .home-step-card .home-icon-tile {
    grid-row: 1 / span 2;
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 9px;
  }

  .home-step-card p {
    margin: 0 0 5px;
    font-size: 8px;
    letter-spacing: 0.14em;
  }

  .home-step-card h3 {
    font-size: 14px;
  }

  .home-step-card span {
    display: none;
  }

  .home-section--features .home-section-subtitle {
    display: none;
  }

  .home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 22px;
  }

  .home-feature-card {
    display: block;
    min-height: 92px;
    padding: 12px;
  }

  .home-feature-card .home-icon-tile {
    width: 30px;
    height: 30px;
    margin: 0 0 11px;
    border-radius: 8px;
  }

  .home-feature-card h3 {
    font-size: 12.5px;
    line-height: 1.2;
  }

  .home-feature-card p {
    display: none;
  }

  .home-series-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .home-series-card__thumb {
    width: 72px;
    min-height: 90px;
  }

  .home-series-card__thumb-logo {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .home-series-card__body h3 {
    font-size: 17px;
  }

  .home-byline {
    margin-top: 5px;
    font-size: 11.5px;
  }

  .home-series-card__meta {
    gap: 8px 10px;
    margin-top: 10px;
    padding-top: 10px;
    font-size: 10px;
  }

  .home-spotlight {
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
  }

  .home-spotlight__portrait {
    width: 86px;
    max-width: none;
    border-radius: 8px;
  }

  .home-spotlight__tag {
    left: 8px;
    top: 8px;
    border-radius: 5px;
    padding: 4px 6px 3px;
    font-size: 7px;
  }

  .home-spotlight__body h3 {
    font-size: 20px;
  }

  .home-spotlight__body > p:not(.home-byline) {
    display: none;
  }

  .home-spotlight__body .home-stat-chip-row--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
  }

  .home-spotlight__body .home-stat-chip {
    display: flex;
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    padding: 8px 5px;
  }

  .home-spotlight__body .home-stat-chip span {
    font-size: 6.5px;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .home-spotlight__body .home-stat-chip strong {
    font-size: 15px;
  }

  .home-spotlight__actions {
    margin-top: 12px;
  }

  .home-spotlight__actions span {
    display: none;
  }

  .home-spotlight__actions .home-button {
    width: 100%;
    min-height: 38px;
  }

  .home-stats-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
  }

  .home-stats-strip__item {
    padding: 14px 6px;
  }

  .home-stats-strip__item strong {
    font-size: 24px;
  }

  .home-stats-strip__item span {
    margin-top: 7px;
    font-size: 6.5px;
    line-height: 1.15;
  }

  .home-stats-strip__item + .home-stats-strip__item {
    border-left: 1px solid var(--border);
    border-top: 0;
  }

  .home-section--faqs {
    padding-top: 30px;
    padding-bottom: 42px;
  }

  .home-faq-list {
    gap: 8px;
  }

  .home-faq-item {
    border-radius: 10px;
  }

  .home-faq-item summary {
    gap: 10px;
    padding: 13px 14px;
  }

  .home-faq-item h3 {
    font-size: 13.5px;
  }

  .home-faq-toggle {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  .home-faq-answer {
    padding: 0 14px 13px;
  }

  .home-faq-answer p,
  .home-faq-more {
    font-size: 12.5px;
    line-height: 1.52;
  }

  .home-faq-more {
    margin-top: 14px;
  }

  .home-final-cta h2 {
    font-size: 28px;
  }

  .home-final-cta {
    padding: 58px 0 64px;
  }

  .home-final-cta p {
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .home-shell,
  .home-shell--narrow {
    width: min(100% - 20px, 1120px);
  }

  .home-hero__title {
    font-size: 31px;
  }

  .home-hero__lede {
    font-size: 14px;
  }

  .home-character-card__header {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
  }

  .home-character-stage {
    grid-template-columns: minmax(0, 0.82fr) minmax(88px, 96px) minmax(0, 0.82fr);
    gap: 4px;
    padding: 7px;
  }

  .home-equipment-slot {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 4px;
    min-height: 27px;
    padding: 3px;
  }

  .home-equipment-slot__icon {
    width: 16px;
    height: 16px;
  }

  .home-equipment-slot__icon svg {
    width: 11px;
    height: 11px;
  }

  .home-equipment-slot__name {
    font-size: 7px;
  }

  .home-panel-stat-grid {
    gap: 4px;
    padding: 0 7px 7px;
  }

  .home-panel-stat-grid .home-stat-chip strong {
    font-size: 11px;
  }
}
/*
 * Brand overrides for the add-to-homescreen instruction modal
 * (vendored library in public/add-to-homescreen/, shown via
 * features/homescreen_prompt/add_to_homescreen_adapter.js).
 *
 * The library stylesheet is lazy-loaded after this one, so these
 * overrides need !important to win the cascade. Kept deliberately
 * minimal (typography and button colours only) so the library's
 * per-device instruction layouts stay intact.
 */

.adhs-container {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
}

.adhs-container .adhs-button {
  font-family: inherit !important;
  font-weight: 600 !important;
}

.adhs-container .adhs-button.adhs-button-install {
  background-color: #eab308 !important; /* yellow-500, matches .btn-primary */
  color: #111827 !important;            /* gray-900 */
}

.adhs-container .adhs-button.adhs-button-cancel {
  background-color: #374151 !important; /* gray-700, matches .btn-secondary */
  color: #e5e7eb !important;            /* gray-200 */
}
.policy-page {
  --bg: #090c12;
  --surface: #0e131c;
  --card: #10151f;
  --card-2: #141a26;
  --border: rgba(140, 160, 190, 0.11);
  --border-hi: rgba(150, 172, 205, 0.22);
  --text-1: #e8ebf1;
  --text-2: #98a1b2;
  --text-mut: #6b7384;
  --gold: #fbbf24;
  --gold-soft: #f0b429;
  --blue: #5b9bf3;
  min-height: 100vh;
  padding: 72px 0 96px;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.06), transparent 28%),
    linear-gradient(rgba(150, 170, 200, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 170, 200, 0.018) 1px, transparent 1px);
  background-size: auto, 52px 52px, 52px 52px;
  color: var(--text-1);
  font-family: "Inter", system-ui, sans-serif;
}

.policy-page__shell {
  width: min(100% - 40px, 920px);
  margin: 0 auto;
}

.policy-page__hero,
.policy-page__body {
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.045), transparent 32%),
    rgba(16, 21, 31, 0.9);
  box-shadow: 0 30px 70px -54px rgba(0, 0, 0, 1);
}

.policy-page__hero {
  padding: clamp(32px, 5vw, 52px);
  text-align: center;
}

.policy-page__label {
  margin: 0 0 16px;
  color: var(--gold-soft);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.policy-page h1,
.policy-page h2,
.policy-page p,
.policy-page ul {
  margin-top: 0;
}

.policy-page h1 {
  margin-bottom: 14px;
  color: var(--gold);
  font-size: clamp(42px, 7vw, 68px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.98;
}

.policy-page__lede {
  max-width: 680px;
  margin: 0 auto 14px;
  color: var(--text-1);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  line-height: 1.25;
}

.policy-page__hero p:not(.policy-page__label):not(.policy-page__lede) {
  max-width: 690px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
  color: var(--text-2);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
}

.policy-page__body {
  margin-top: 22px;
  padding: clamp(28px, 4vw, 48px);
}

.policy-page__body section + section {
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
}

.policy-page h2 {
  margin-bottom: 14px;
  color: var(--text-1);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.policy-page p,
.policy-page li {
  color: var(--text-2);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.72;
}

.policy-page p {
  margin-bottom: 14px;
}

.policy-page p:last-child,
.policy-page ul:last-child {
  margin-bottom: 0;
}

.policy-page ul {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding-left: 0;
  list-style: none;
}

.policy-page li {
  position: relative;
  padding-left: 22px;
}

.policy-page li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.28);
  content: "";
}

.policy-page strong {
  color: var(--gold);
  font-weight: 800;
}

.policy-art-treatment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  margin: 24px 0;
  align-items: stretch;
}

.policy-art-treatment__entry {
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.92);
}

.policy-art-treatment__rarity-bar {
  height: 3px;
  background: linear-gradient(90deg, #22c55e, rgba(34, 197, 94, 0.2));
}

.policy-art-treatment__entry-body {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 22px 24px 18px;
}

.policy-art-treatment__entry-icon,
.policy-art-treatment__portrait-frame {
  position: relative;
  overflow: hidden;
  border: 2px solid #c9a227;
  background: #02040a;
  box-shadow: inset 0 0 28px rgba(251, 191, 36, 0.08);
}

.policy-art-treatment__entry-icon {
  width: 78px;
  height: 78px;
  border-radius: 12px;
}

.policy-art-treatment__entry-image,
.policy-art-treatment__portrait-image {
  display: block;
  width: 100%;
  height: 100%;
}

.policy-art-treatment__entry-image {
  object-fit: contain;
  padding: 6px;
}

.policy-art-treatment__portrait-image {
  object-fit: cover;
  object-position: center top;
}

.policy-art-treatment__entry-copy h3 {
  margin: 0 0 8px;
  color: #22c55e;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.policy-art-treatment__metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.policy-art-treatment__rarity {
  border-radius: 5px;
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
}

.policy-art-treatment__type {
  color: var(--text-mut);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.policy-art-treatment__note {
  margin: 0 24px 22px;
  border-top: 1px solid rgba(150, 172, 205, 0.18);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  padding-top: 16px;
}

.policy-art-treatment__portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 14px;
  background: rgba(6, 12, 22, 0.7);
  padding: 18px 16px;
}

.policy-art-treatment__portrait-frame {
  width: 132px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(201, 162, 39, 0.15),
    0 18px 30px -22px rgba(251, 191, 36, 0.8);
}

.policy-art-treatment__portrait .artwork-credit {
  margin-top: 12px;
}

.policy-page__contact {
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.045);
  padding: 22px;
}

.policy-page__link {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

.policy-page__link:hover {
  color: #fcd34d;
}

.policy-faq-list {
  display: grid;
  gap: 12px;
}

.policy-faq-item {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(14, 19, 28, 0.72);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.policy-faq-item:hover {
  border-color: var(--border-hi);
  transform: translateY(-1px);
}

.policy-faq-item[open],
.policy-faq-item--contact[open] {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.04);
}

.policy-faq-item > summary {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.policy-faq-item > summary::-webkit-details-marker {
  display: none;
}

.policy-faq-item > summary:focus {
  outline: none;
}

.policy-faq-item > summary:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.34);
  outline-offset: -4px;
}

.policy-faq-item h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 18px;
  line-height: 1.3;
}

.policy-faq-toggle {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 9px;
  background: rgba(251, 191, 36, 0.06);
}

.policy-faq-toggle::before,
.policy-faq-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 999px;
  background: var(--gold);
  content: "";
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, opacity 180ms ease;
}

.policy-faq-toggle::before {
  width: 11px;
  height: 2px;
}

.policy-faq-toggle::after {
  width: 2px;
  height: 11px;
}

.policy-faq-item[open] .policy-faq-toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) scaleY(0.2);
}

.policy-faq-answer {
  border-top: 1px solid var(--border);
  padding: 18px 20px 20px;
}

.policy-faq-item--contact {
  border-color: rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.035);
}

@media (max-width: 640px) {
  .policy-page {
    padding: 32px 0 56px;
  }

  .policy-page__shell {
    width: min(100% - 24px, 920px);
  }

  .policy-page__hero,
  .policy-page__body {
    border-radius: 14px;
  }

  .policy-page__body section + section {
    margin-top: 26px;
    padding-top: 26px;
  }

  .policy-faq-list {
    gap: 10px;
  }

  .policy-faq-item > summary {
    gap: 12px;
    padding: 16px;
  }

  .policy-faq-item h2 {
    font-size: 16px;
  }

  .policy-faq-answer {
    padding: 16px;
  }

  .policy-art-treatment {
    grid-template-columns: 1fr;
  }

  .policy-art-treatment__entry-body {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
  }

  .policy-art-treatment__entry-icon {
    width: 58px;
    height: 58px;
    border-radius: 10px;
  }

  .policy-art-treatment__entry-copy h3 {
    font-size: 17px;
  }

  .policy-art-treatment__note {
    margin-right: 18px;
    margin-left: 18px;
  }

  .policy-art-treatment__portrait-frame {
    width: min(150px, 56vw);
  }
}
body:has(.series-library-v2) {
  background-color: #090c12;
  background-image:
    linear-gradient(rgba(150, 170, 200, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 170, 200, 0.018) 1px, transparent 1px);
  background-size: 52px 52px;
}

.series-library-v2,
.series-library-card {
  --bg: #090c12;
  --surface: #0e131c;
  --card: #10151f;
  --card-2: #141a26;
  --border: rgba(140, 160, 190, 0.11);
  --border-hi: rgba(150, 172, 205, 0.22);
  --text-1: #e8ebf1;
  --text-2: #98a1b2;
  --text-mut: #6b7384;
  --text-faint: #474e5c;
  --gold: #fbbf24;
  --gold-soft: #f0b429;
  --blue: #5b9bf3;
}

.series-library-v2 {
  min-height: calc(100vh - 60px);
  padding: 32px 0 88px;
  color: var(--text-1);
  font-family: "Inter", system-ui, sans-serif;
}

.series-library-v2 *,
.series-library-v2 *::before,
.series-library-v2 *::after {
  box-sizing: border-box;
}

.series-library-shell {
  width: min(100% - 48px, 1280px);
  margin: 0 auto;
}

.series-library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  min-height: 118px;
  padding: 26px 32px;
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  background:
    radial-gradient(circle at 74% 22%, rgba(91, 155, 243, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(20, 26, 38, 0.88), rgba(14, 19, 28, 0.88));
  box-shadow: 0 18px 48px -36px rgba(0, 0, 0, 0.9);
}

.series-library-label {
  margin: 0 0 12px;
  color: var(--text-mut);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.series-library-hero h1 {
  margin: 0;
  color: var(--gold);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.series-library-hero p:last-child {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
}

.series-library-hero__stats {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.series-library-stat {
  min-width: 76px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(16, 21, 31, 0.72);
  text-align: center;
}

.series-library-stat strong {
  display: block;
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.series-library-stat span {
  display: block;
  margin-top: 7px;
  color: var(--text-mut);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.series-library-new-button,
.series-library-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(251, 191, 36, 0.46);
  border-radius: 10px;
  background: linear-gradient(180deg, #fcd34d, #f0a92a);
  color: #161207;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 12px 28px -16px rgba(251, 191, 36, 0.95);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.series-library-new-button:hover,
.series-library-primary-button:hover {
  border-color: rgba(251, 191, 36, 0.66);
  background: linear-gradient(180deg, #fde68a, #f0a92a);
  color: #161207;
  box-shadow: 0 18px 34px -16px rgba(251, 191, 36, 1);
  transform: translateY(-1px);
}

.series-library-search {
  margin: 28px 0 24px;
}

.series-library-search__form {
  width: min(100%, 460px);
}

.series-library-search__field {
  position: relative;
  display: flex;
  align-items: center;
}

.series-library-search__icon {
  position: absolute;
  left: 14px;
  color: var(--text-faint);
  pointer-events: none;
}

.series-library-search__input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  background: rgba(20, 26, 38, 0.72);
  color: var(--text-1);
  padding: 0 42px 0 40px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.series-library-search__input::placeholder {
  color: var(--text-faint);
}

.series-library-search__input:focus {
  border-color: rgba(251, 191, 36, 0.48);
  background: rgba(20, 26, 38, 0.9);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.08);
}

.series-library-search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-mut);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease, color 180ms ease;
}

.series-library-search__clear:hover {
  background: rgba(150, 172, 205, 0.1);
  color: var(--text-1);
}

.series-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap: 24px;
  align-items: stretch;
}

.series-library-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 26px;
  min-height: 232px;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(91, 155, 243, 0.035), transparent 58%),
    var(--card);
  color: var(--text-1);
  padding: 24px;
  text-decoration: none;
  box-shadow: 0 18px 44px -36px rgba(0, 0, 0, 0.85);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.series-library-card--compact {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  min-height: 176px;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 16px 38px -32px rgba(0, 0, 0, 0.9);
}

.series-library-card:hover {
  border-color: rgba(91, 155, 243, 0.5);
  background:
    linear-gradient(90deg, rgba(91, 155, 243, 0.055), transparent 58%),
    var(--card);
  color: var(--text-1);
  box-shadow: 0 24px 54px -38px rgba(91, 155, 243, 0.46);
  transform: translateY(-2px);
}

.series-library-card__thumb {
  position: relative;
  width: 138px;
  aspect-ratio: 2 / 3;
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--border-hi);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 32%, rgba(251, 191, 36, 0.18), transparent 34%),
    linear-gradient(145deg, #181f2d, #0d111a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.series-library-card--compact .series-library-card__thumb {
  width: 92px;
  border-radius: 8px;
}

.series-library-card__thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.series-library-card__thumb-logo {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  opacity: 0.7;
  transform: translate(-50%, -50%);
}

.series-library-card__thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(251, 191, 36, 0.78);
}

.series-library-card__thumb--sponsored {
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(251, 191, 36, 0.36);
  background:
    radial-gradient(circle at 50% 34%, rgba(251, 191, 36, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(251, 191, 36, 0.12), #0d111a);
}

.series-library-card__sponsored-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.08);
  color: var(--gold);
}

.series-library-sponsored-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.13);
  color: var(--gold);
  padding: 0 8px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.series-library-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-top: 2px;
}

.series-library-card__heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.series-library-card--compact .series-library-card__heading-row {
  flex-direction: column;
  gap: 8px;
}

.series-library-card__title {
  margin: 0;
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.18;
  overflow-wrap: anywhere;
  transition: color 180ms ease;
}

.series-library-card--compact .series-library-card__title {
  font-size: 18px;
}

.series-library-card:hover .series-library-card__title {
  color: #fcd34d;
}

.series-library-card__tag {
  flex: 0 0 auto;
  min-height: 24px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 6px;
  background: rgba(20, 26, 38, 0.76);
  color: var(--gold);
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.series-library-card__byline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.series-library-card__disclosure {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border: 1px solid rgba(251, 191, 36, 0.44);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.1);
  color: var(--gold);
  padding: 0 8px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.series-library-card__byline {
  margin: 8px 0 0;
  color: var(--text-mut);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.series-library-card__byline-row .series-library-card__byline {
  margin: 0;
}

.series-library-card__byline strong {
  color: var(--gold-soft);
  font-weight: 800;
}

.series-library-card__description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.series-library-card--compact .series-library-card__description {
  -webkit-line-clamp: 2;
  margin-top: 12px;
  font-size: 13px;
}

.series-library-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-hi);
  color: var(--text-mut);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.series-library-card--compact .series-library-card__meta {
  gap: 8px 12px;
  padding-top: 12px;
  font-size: 11px;
}

.series-library-card__meta strong {
  color: var(--blue);
  font-weight: 800;
}

.series-library-card__placement-label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em;
  min-width: 0;
}

.series-library-card__meta--action {
  align-items: center;
  justify-content: space-between;
}

.series-library-card__cta {
  color: var(--gold);
  font-weight: 800;
  transition: transform 180ms ease, color 180ms ease;
}

.series-library-card:hover .series-library-card__cta {
  color: #fcd34d;
  transform: translateX(2px);
}

.series-library-card--sponsored {
  border-color: var(--series-card-accent-border, rgba(251, 191, 36, 0.32));
  background:
    linear-gradient(90deg, var(--series-card-accent-bg, rgba(251, 191, 36, 0.05)), transparent 58%),
    var(--card);
}

.series-library-card--sponsored:hover {
  border-color: var(--series-card-accent-border-hi, rgba(251, 191, 36, 0.54));
  background:
    linear-gradient(90deg, var(--series-card-accent-soft, rgba(251, 191, 36, 0.07)), transparent 58%),
    var(--card);
}

.series-library-card--sponsored .series-library-card__title,
.series-library-card--sponsored:hover .series-library-card__title,
.series-library-card--sponsored .series-library-card__cta,
.series-library-card--sponsored:hover .series-library-card__cta,
.series-library-card--sponsored .series-library-card__meta strong {
  color: var(--series-card-accent, var(--gold));
}

.series-library-card--sponsored .series-library-card__tag,
.series-library-card--sponsored .series-library-card__disclosure {
  border-color: var(--series-card-accent-border, rgba(251, 191, 36, 0.42));
  color: var(--series-card-accent, var(--gold));
}

.series-library-card--sponsored .series-library-card__disclosure {
  background: var(--series-card-accent-soft, rgba(251, 191, 36, 0.1));
}

.series-library-card--builder-preview,
.series-library-card--placement-preview {
  width: 100%;
  transform: none;
}

@media (min-width: 1280px) {
  .ad-form-layout--series-library {
    grid-template-columns: minmax(0, 1fr) minmax(520px, 560px);
  }

  .ad-form-layout--series-library .series-library-card--builder-preview {
    grid-template-columns: 128px minmax(0, 1fr);
    min-height: 214px;
    padding: 22px;
  }

  .ad-form-layout--series-library .series-library-card--builder-preview .series-library-card__thumb {
    width: 128px;
  }

  .ad-form-layout--series-library .series-library-card--builder-preview .series-library-card__description {
    -webkit-line-clamp: 2;
    font-size: 14px;
  }
}

.series-library-card--admin-preview {
  width: 100%;
  max-width: 860px;
  min-height: 0;
  height: auto;
  transform: none;
}

.series-library-card--admin-preview:hover {
  transform: none;
}

.series-library-card--admin-preview .series-library-card__description {
  -webkit-line-clamp: 2;
}

.series-library-card--admin-preview .series-library-card__meta {
  margin-top: 18px;
}

.series-library-card--builder-preview:hover,
.series-library-card--placement-preview:hover {
  transform: none;
}

@media (min-width: 701px) {
  .series-library-card--placement-preview {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .series-library-card--placement-preview .series-library-card__thumb {
    width: 108px;
  }
}

.series-library-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 24px;
  text-align: center;
}

.series-library-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  background: var(--card);
  color: var(--text-faint);
  box-shadow: 0 18px 48px -34px rgba(0, 0, 0, 0.9);
}

.series-library-empty h3 {
  margin: 24px 0 0;
  color: var(--text-1);
  font-size: 24px;
  font-weight: 800;
}

.series-library-empty p {
  max-width: 460px;
  margin: 10px auto 28px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .series-library-v2 {
    padding-top: 24px;
  }

  .series-library-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .series-library-hero__stats {
    justify-content: flex-start;
  }

  .series-library-new-button {
    justify-self: start;
  }
}

@media (max-width: 700px) {
  .series-library-shell {
    width: min(100% - 20px, 1280px);
  }

  .series-library-hero {
    padding: 22px;
  }

  .series-library-hero h1 {
    font-size: 30px;
  }

  .series-library-search__form {
    width: 100%;
  }

  .series-library-grid {
    gap: 14px;
  }

  .series-library-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    min-height: 176px;
    padding: 16px;
    border-radius: 12px;
  }

  .series-library-card__thumb {
    width: 92px;
    border-radius: 8px;
  }

  .series-library-sponsored-badge {
    left: 8px;
    right: 8px;
    justify-content: center;
    padding: 0 5px;
    font-size: 8px;
  }

  .series-library-card__sponsored-icon {
    width: 38px;
    height: 38px;
  }

  .series-library-card__heading-row {
    flex-direction: column;
    gap: 8px;
  }

  .series-library-card__title {
    font-size: 18px;
  }

  .series-library-card__description {
    -webkit-line-clamp: 2;
    margin-top: 12px;
    font-size: 13px;
  }

  .series-library-card__meta {
    gap: 8px 12px;
    padding-top: 12px;
    font-size: 11px;
  }
}

@media (max-width: 440px) {
  .series-library-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
  }

  .series-library-card__thumb {
    width: 72px;
  }

  .series-library-card__description {
    display: none;
  }
}
:root {
  --bg: #0b0d12;
  --surface: #13161f;
  --surface-2: #181c26;
  --card: #1a1e2a;
  --card-2: #141826;
  --border: rgba(255, 255, 255, 0.07);
  --border-mid: rgba(255, 255, 255, 0.12);
  --gold: #fbbf24;
  --text-1: #e8e9ec;
  --text-2: #8a8d9a;
  --text-3: #5a6072;
  --system-focus-border: rgba(251, 191, 36, 0.3);
  --system-focus-ring: rgba(251, 191, 36, 0.06);
  --system-option-height: 36px;
}

.system-form-shell {
  max-width: 980px;
  margin: 0 auto;
}

.system-form-page-header {
  margin-bottom: 22px;
}

.system-form-page-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.system-form-page-title-row .page-title,
.system-form-page-title {
  margin: 0;
  color: var(--gold);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
}

.system-form-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.07);
  color: var(--gold);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.system-form-page-header .page-subtitle,
.system-form-page-subtitle {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.5;
}

.system-form-page-header .breadcrumb-nav {
  margin-bottom: 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
}

.system-form-page-header .breadcrumb-link {
  color: var(--text-3);
}

.system-form-page-header .breadcrumb-link:hover {
  color: var(--gold);
}

.system-form-page-header .breadcrumb-current {
  color: var(--text-2);
}

.system-form-page-header .breadcrumb-separator {
  color: rgba(90, 96, 114, 0.7);
}

.system-form {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 28px;
  box-shadow: none;
  counter-reset: system-form-card-section;
}

.system-form--embedded {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.system-form--inline {
  width: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  counter-reset: none;
}

.system-form > :first-child {
  margin-top: 0;
}

.system-form .card,
.system-form .manager-column,
.system-form .manager-column-side,
.system-form .manager-column-full {
  border-color: var(--border);
  background: transparent;
  box-shadow: none;
}

.system-form-section,
.system-form .form-section {
  counter-increment: system-form-card-section;
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
  display: block;
}

.system-form > .card {
  counter-increment: system-form-card-section;
}

.system-form > .card > .manager-header::before,
.system-form > .card > .manager-column-full > .manager-header::before,
.system-form > .card > .p-4 > .manager-header::before,
.system-form > .card > .p-4.sm\:p-6 > .manager-header::before {
  content: counter(system-form-card-section, decimal-leading-zero);
  margin-right: 12px;
  color: var(--gold);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 600;
}

.system-form-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.system-form-section-kicker {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.system-form-section-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.system-form-section-copy h2 {
  margin: 0;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.system-form-section-copy p {
  margin: 0;
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.35;
}

.system-form .section-header-sm,
.system-form .manager-title {
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.system-form .section-subtitle,
.system-form .text-help,
.system-form .section-description {
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.45;
}

.system-form .template-settings-display-section + div {
  margin-top: 18px;
}

.form-label,
label.form-label,
.system-form .manager-header label,
.system-form label:not(.system-boolean-label):not(.system-custom-select-option):not([class*="cursor-pointer"]):not([class*="rounded-lg"]):not([class*="flex-1"]) {
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.system-form .form-label abbr,
.system-form .required,
.system-required {
  color: var(--gold);
  text-decoration: none;
}

.form-input,
.form-select,
.form-textarea,
.manager-input,
.input,
.system-form input[type="text"],
.system-form input[type="email"],
.system-form input[type="url"],
.system-form input[type="search"],
.system-form input[type="tel"],
.system-form input[type="number"],
.system-form input[type="date"],
.system-form input[type="datetime-local"],
.system-form input[type="password"],
.system-form input[type="file"],
.system-form textarea,
.system-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--card-2);
  color: var(--text-1);
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.system-form textarea,
.system-form .form-textarea {
  min-height: 108px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.manager-input:focus,
.input:focus,
.system-form input:focus,
.system-form textarea:focus,
.system-form select:focus {
  outline: none;
  border-color: var(--system-focus-border);
  box-shadow: 0 0 0 3px var(--system-focus-ring);
}

.system-form ::placeholder {
  color: rgba(90, 96, 114, 0.75);
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:active,
.form-select:-webkit-autofill,
.form-select:-webkit-autofill:hover,
.form-select:-webkit-autofill:active,
.form-textarea:-webkit-autofill,
.form-textarea:-webkit-autofill:hover,
.form-textarea:-webkit-autofill:active,
.manager-input:-webkit-autofill,
.manager-input:-webkit-autofill:hover,
.manager-input:-webkit-autofill:active,
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:active,
.system-searchable-select-input:-webkit-autofill,
.system-searchable-select-input:-webkit-autofill:hover,
.system-searchable-select-input:-webkit-autofill:active,
.system-form input:-webkit-autofill,
.system-form input:-webkit-autofill:hover,
.system-form input:-webkit-autofill:active,
.system-form textarea:-webkit-autofill,
.system-form textarea:-webkit-autofill:hover,
.system-form textarea:-webkit-autofill:active {
  border-color: var(--border) !important;
  background-color: var(--card-2) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--card-2) inset !important;
  -webkit-text-fill-color: var(--text-1) !important;
  caret-color: var(--text-1) !important;
  transition: background-color 999999s ease-out, color 999999s ease-out, -webkit-text-fill-color 999999s ease-out;
}

.form-input:-webkit-autofill:focus,
.form-select:-webkit-autofill:focus,
.form-textarea:-webkit-autofill:focus,
.manager-input:-webkit-autofill:focus,
.input:-webkit-autofill:focus,
.system-searchable-select-input:-webkit-autofill:focus,
.system-form input:-webkit-autofill:focus,
.system-form textarea:-webkit-autofill:focus {
  border-color: var(--system-focus-border) !important;
  background-color: var(--card-2) !important;
  -webkit-box-shadow:
    0 0 0 1000px var(--card-2) inset,
    0 0 0 3px var(--system-focus-ring) !important;
  -webkit-text-fill-color: var(--text-1) !important;
  caret-color: var(--text-1) !important;
}

.form-input[readonly],
.form-textarea[readonly],
.manager-input[readonly],
.input[readonly],
.system-form input[readonly],
.system-form textarea[readonly] {
  color: var(--text-2);
  cursor: not-allowed;
  opacity: 0.75;
}

.system-form input[type="color"],
.form-input[type="color"],
.manager-input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

.system-form input[type="radio"] {
  accent-color: var(--gold);
}

.system-form [data-sortable-item] {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-2);
  cursor: grab;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.system-form [data-sortable-item]:hover {
  border-color: var(--border-mid);
  background: var(--card);
}

.system-form .drag-handle {
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: 16px;
  color: var(--text-3);
  cursor: grab;
}

.system-form .drag-handle:hover,
.system-form [data-sortable-item]:hover .drag-handle {
  color: var(--text-2);
}

.system-form .drag-handle svg {
  display: none;
}

.system-form .drag-handle::before {
  content: "";
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 4px 0 currentColor,
    0 8px 0 currentColor,
    4px 0 0 currentColor,
    4px 4px 0 currentColor,
    4px 8px 0 currentColor;
}

.system-form .card,
.system-form .rounded-xl.border,
.system-form .rounded-lg.border {
  border-color: var(--border);
}

.system-form .bg-gray-800,
.system-form .bg-gray-800\/20,
.system-form .bg-gray-800\/30,
.system-form .bg-gray-800\/40,
.system-form .bg-gray-800\/50,
.system-form .bg-gray-900,
.system-form .bg-gray-900\/30,
.system-form .bg-gray-900\/40,
.system-form .bg-gray-900\/45,
.system-form .bg-gray-900\/50,
.system-form .bg-gray-950\/35,
.system-form .bg-gray-950\/40 {
  background-color: var(--card-2);
}

.system-form [data-controller~="searchable-select"] {
  width: 100%;
}

.system-form [data-controller~="searchable-select"] [role="button"],
.system-form [data-searchable-select-target~="search"] {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-2);
  color: var(--text-1);
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: none;
}

.system-form [data-searchable-select-target~="search"] {
  padding-left: 36px;
}

.system-form [data-controller~="searchable-select"] [role="button"]:focus,
.system-form [data-searchable-select-target~="search"]:focus {
  outline: none;
  border-color: var(--system-focus-border);
  box-shadow: 0 0 0 3px var(--system-focus-ring);
}

.system-form [data-searchable-select-target~="dropdown"],
.system-form [data-searchable-select-target~="optionsContainer"] {
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.system-form [data-searchable-select-target~="option"] {
  border-left: 0;
  border-radius: 4px;
  color: var(--text-1);
  font-size: 13px;
}

.system-form [data-searchable-select-target~="option"]:hover {
  background: var(--card);
}

.system-form [data-controller~="image-generator"] [data-image-upload-preview-target="dropZone"] {
  border: 1px dashed var(--border-mid);
  border-radius: 8px;
  background: var(--card-2);
}

.system-form [data-controller~="image-generator"] [data-image-upload-preview-target="dropZone"]:hover {
  border-color: rgba(251, 191, 36, 0.3);
  background: var(--card);
}

.system-form [data-controller~="image-generator"] [data-mode],
.system-form [data-image-generator-target="optimizeButton"] {
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.system-form [data-controller~="image-generator"] [data-mode]:hover,
.system-form [data-image-generator-target="optimizeButton"]:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-1);
}

.system-custom-select {
  position: relative;
  width: 100%;
}

.system-custom-select[data-state="open"],
.system-searchable-select[data-state="open"] {
  z-index: 80;
}

.system-custom-select-button {
  display: flex;
  min-height: 42px;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-2);
  color: var(--text-1);
  padding: 10px 12px;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.system-custom-select-button:focus,
.system-custom-select[data-state="open"] .system-custom-select-button {
  outline: none;
  border-color: var(--system-focus-border);
  box-shadow: 0 0 0 3px var(--system-focus-ring);
}

.system-custom-select-button:hover {
  border-color: var(--border-mid);
  background: var(--card);
}

.system-custom-select-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.system-custom-select-label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-custom-select-chevron {
  flex: 0 0 auto;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1;
  transition: color 150ms ease, transform 150ms ease;
}

.system-custom-select[data-state="open"] .system-custom-select-chevron {
  color: var(--gold);
  transform: rotate(180deg);
}

.system-custom-select-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: max-content;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.system-custom-select-option {
  display: grid;
  min-height: var(--system-option-height);
  width: 100%;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-1);
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
  line-height: 1.25;
}

.system-custom-select-option:hover,
.system-custom-select-option:focus {
  outline: none;
  background: var(--card);
}

.system-custom-select-option[data-selected="true"] {
  background: rgba(251, 191, 36, 0.1);
  color: var(--gold);
}

.system-custom-select-check {
  color: var(--gold);
  font-size: 12px;
  line-height: 1;
}

.system-custom-select-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .system-custom-select[data-label-layout="wrap"] .system-custom-select-button,
  .system-custom-select[data-label-layout="wrap"] .system-custom-select-option {
    align-items: flex-start;
  }

  .system-custom-select[data-label-layout="wrap"] .system-custom-select-label,
  .system-custom-select[data-label-layout="wrap"] .system-custom-select-option-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .system-custom-select[data-label-layout="wrap"] .system-custom-select-chevron {
    margin-top: 0.2em;
  }
}

.system-searchable-select {
  position: relative;
  width: 100%;
}

.system-searchable-select-trigger,
.system-searchable-select-input {
  display: flex;
  min-height: 42px;
  width: 100%;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-2);
  color: var(--text-1);
  padding: 10px 36px 10px 12px;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.system-searchable-select-trigger {
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.system-searchable-select-trigger--compact {
  min-height: 38px;
  padding-block: 8px;
}

.system-searchable-select-input {
  display: block;
}

.system-searchable-select .system-searchable-select-input:not(.system-searchable-select-input--embedded) {
  padding-left: 35px !important;
  padding-right: 42px !important;
}

.system-searchable-select-input--embedded {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}

.system-searchable-select-trigger:hover,
.system-searchable-select-input:hover {
  border-color: var(--border-mid);
  background: var(--card);
}

.system-searchable-select-trigger:focus,
.system-searchable-select-input:focus,
.system-searchable-select[data-state="open"] .system-searchable-select-trigger,
.system-searchable-select[data-state="open"] > .relative .system-searchable-select-input {
  outline: none;
  border-color: var(--system-focus-border);
  box-shadow: 0 0 0 3px var(--system-focus-ring);
}

.system-searchable-select-value {
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-searchable-select-value.text-gray-200 {
  color: var(--text-1);
}

.system-searchable-select-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text-3);
  padding: 4px;
  cursor: pointer;
  transition: color 150ms ease;
}

.system-searchable-select-clear:hover,
.system-searchable-select-clear:focus {
  color: var(--text-2);
  outline: none;
}

.system-searchable-select-chevron {
  flex: 0 0 auto;
  color: var(--text-3);
  transition: color 150ms ease, transform 150ms ease;
}

.system-searchable-select[data-state="open"] .system-searchable-select-chevron {
  color: var(--gold);
  transform: rotate(180deg);
}

.system-searchable-select [data-searchable-select-target~="searchIcon"] {
  color: var(--text-3);
}

.system-searchable-select .searchable-select-input.searchable-select-selected {
  padding-left: 35px !important;
}

.system-searchable-select-menu {
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.system-searchable-select-search-panel {
  margin-bottom: 4px;
  padding: 4px;
  border-bottom: 1px solid var(--border);
}

.system-searchable-select-option,
.system-searchable-select-create {
  display: block;
  min-height: var(--system-option-height);
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-1);
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.system-custom-select-option.hidden,
.system-searchable-select-option.hidden,
.system-searchable-select-create.hidden {
  display: none;
}

.system-searchable-select-option--compact {
  padding-block: 8px;
}

.system-searchable-select-option:hover,
.system-searchable-select-option[data-highlighted="true"],
.system-searchable-select-create:hover,
.system-searchable-select-create:focus {
  outline: none;
  background: var(--card);
}

.system-searchable-select-option[data-selected="true"] {
  background: rgba(251, 191, 36, 0.1);
  color: var(--gold);
}

.system-searchable-select-option[data-selected="true"] .text-gray-200 {
  color: var(--gold);
}

.system-searchable-select-option .text-gray-500 {
  color: var(--text-3);
}

.system-searchable-select [data-type-to-search],
.system-searchable-select [data-no-results],
.system-searchable-select [data-loading-results],
.system-searchable-select [data-result-limit] {
  color: var(--text-3);
}

.system-form .form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.system-form .form-actions > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.system-form .btn-secondary,
.system-form a.btn-secondary,
.system-form .btn-ghost {
  border: 1px solid var(--border-mid);
  background: transparent;
  color: var(--text-2);
  box-shadow: none;
}

.system-form .btn-secondary:hover,
.system-form a.btn-secondary:hover,
.system-form .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-1);
}

.system-form .btn-primary,
.system-form input[type="submit"].btn-primary,
.system-form button.btn-primary {
  border: 1px solid rgba(251, 191, 36, 0.5);
  background: var(--gold);
  color: #1a1208;
  font-weight: 600;
  box-shadow: 0 0 0 3px var(--system-focus-ring);
}

.system-form .btn-primary:hover,
.system-form input[type="submit"].btn-primary:hover,
.system-form button.btn-primary:hover {
  border-color: rgba(251, 191, 36, 0.7);
  background: #facc15;
  color: #1a1208;
}

.system-boolean-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-2);
  padding: 14px;
}

.system-boolean-row--disabled {
  opacity: 0.55;
}

.system-boolean-label {
  display: block;
  color: var(--text-1);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}

.system-boolean-description {
  margin: 3px 0 0;
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.4;
}

.system-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  background: var(--card-2);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.system-toggle[data-state="on"] {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--system-focus-ring);
}

.system-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: transform 150ms ease, background-color 150ms ease;
}

.system-toggle[data-state="on"] .system-toggle-thumb {
  transform: translateX(16px);
  background: #1a1208;
}

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

.system-toggle-column {
  min-width: 0;
}

.system-toggle-heading {
  margin: 0 0 8px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.system-reorderable-section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.system-reorderable-column-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.system-reorderable-column-label {
  flex: 0 0 auto;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.system-reorderable-column-line {
  min-width: 20px;
  flex: 1 1 auto;
  border-top: 1px solid var(--border);
}

.system-reorderable-add {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.system-reorderable-add:hover {
  color: #facc15;
}

.system-reorderable-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-2);
  padding: 8px 10px 8px 8px;
  cursor: grab;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.system-reorderable-row:hover {
  border-color: var(--border-mid);
  background: var(--card);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.system-form [data-sortable-item].system-dropdown-open-in-reorderable,
.system-form [data-sortable-item].system-dropdown-open-in-reorderable:hover,
.system-reorderable-row.system-dropdown-open-in-reorderable,
.system-reorderable-row.system-dropdown-open-in-reorderable:hover {
  position: relative;
  z-index: 90;
  transform: none;
}

.system-reorderable-row:active {
  cursor: grabbing;
}

.system-form .effect-fields[data-sortable-item],
.effect-fields.system-reorderable-row {
  align-items: flex-start;
  cursor: default;
}

.system-form .effect-fields[data-sortable-item]:hover,
.effect-fields.system-reorderable-row:hover {
  transform: none;
}

.system-form .effect-fields[data-sortable-item]:active,
.effect-fields.system-reorderable-row:active {
  cursor: default;
}

.effect-fields .form-textarea {
  resize: none;
}

.system-reorderable-fields {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: end;
  gap: 12px;
}

.system-drag-grip {
  display: grid;
  width: 10px;
  height: 14px;
  flex: 0 0 10px;
  grid-template-columns: repeat(2, 2px);
  grid-template-rows: repeat(3, 2px);
  gap: 2px;
  color: var(--text-3);
  cursor: grab;
}

.system-drag-grip::before,
.system-drag-grip::after {
  content: "";
}

.system-drag-grip {
  background-image: radial-gradient(currentColor 1px, transparent 1.2px);
  background-size: 4px 4px;
}

.system-reorderable-row:hover .system-drag-grip {
  color: var(--text-2);
}

.system-row-delete-button {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-3);
  transition: background-color 150ms ease, color 150ms ease;
}

.system-row-delete-button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
}

.system-row-delete-button svg {
  width: 13px;
  height: 13px;
}

.codex-setup-wizard {
  width: min(100%, 1020px);
  margin: 0 auto;
  padding: 24px 16px 40px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.codex-setup-page-header {
  margin-bottom: 20px;
}

.codex-setup-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.codex-setup-title-copy {
  min-width: 0;
}

.codex-setup-title {
  margin: 0;
  color: var(--gold);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.codex-setup-title span {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

.codex-setup-description {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.codex-setup-ghost-link {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.codex-setup-ghost-link:hover,
.codex-setup-ghost-link:focus {
  outline: none;
  border-color: var(--border-mid);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-1);
}

.codex-setup-progress-meter {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.codex-setup-progress-label,
.codex-setup-progress-count,
.codex-setup-panel-number,
.codex-setup-panel-status,
.codex-setup-about-card h2 {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.codex-setup-progress-label {
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.codex-setup-progress-track {
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--card-2);
}

.codex-setup-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.codex-setup-progress-count {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.codex-setup-tab-strip {
  position: relative;
  display: flex;
  gap: 4px;
  margin-top: 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
}

.codex-setup-tab {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
  padding: 10px 14px 12px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  transition: color 150ms ease;
}

.codex-setup-tab-label {
  white-space: nowrap;
}

.codex-setup-tab::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  content: "";
}

.codex-setup-tab:hover {
  color: var(--text-2);
}

.codex-setup-tab-dot {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text-4);
  border-radius: 999px;
  color: var(--text-3);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.codex-setup-tab--complete .codex-setup-tab-dot {
  border-color: var(--gold);
  background: var(--gold);
  color: #ffffff;
}

.codex-setup-tab--current {
  color: var(--gold);
}

.codex-setup-tab--current::after {
  background: var(--gold);
}

.codex-setup-tab--current .codex-setup-tab-dot {
  border-color: var(--gold);
  color: var(--gold);
}

.codex-setup-tab--disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.codex-setup-tab--disabled:hover {
  color: var(--text-3);
}

.codex-setup-content-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 240px;
  gap: 20px;
  max-width: 1020px;
}

.codex-setup-main-panel,
.codex-setup-about-rail {
  min-width: 0;
}

.codex-setup-about-rail {
  position: sticky;
  top: 16px;
  align-self: start;
}

.codex-setup-panel,
.codex-setup-about-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
}

.system-form.codex-setup-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.codex-setup-panel-header {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    var(--surface);
  padding: 14px 20px;
}

.codex-setup-panel-number {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.codex-setup-panel-header h2 {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  color: var(--text-1);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.codex-setup-panel-status {
  flex: 0 0 auto;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.06);
  color: var(--gold);
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.codex-setup-panel-body {
  overflow: visible;
  padding: 16px 20px 20px;
}

.codex-setup-panel-description {
  max-width: 540px;
  margin: 0 0 14px;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.codex-setup-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  background: var(--card-2);
  padding: 12px 20px;
}

.codex-setup-skip-step {
  flex: 0 0 auto;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}

.codex-setup-skip-step:hover,
.codex-setup-skip-step:focus {
  outline: none;
  color: var(--text-2);
}

.codex-setup-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.codex-setup-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.codex-setup-button--ghost {
  border: 1px solid var(--border-mid);
  background: transparent;
  color: var(--text-2);
}

.codex-setup-button--ghost:hover,
.codex-setup-button--ghost:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text-1);
}

.codex-setup-button--primary {
  border: 1px solid rgba(251, 191, 36, 0.5);
  background: var(--gold);
  color: #1a1208;
  box-shadow: 0 0 0 3px var(--system-focus-ring);
}

.codex-setup-button--primary:hover,
.codex-setup-button--primary:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.7);
  background: #facc15;
  color: #1a1208;
}

.codex-setup-about-card {
  padding: 14px;
}

.codex-setup-about-card h2 {
  margin: 0;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.codex-setup-about-card p {
  margin: 9px 0 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.55;
}

.codex-setup-about-card strong {
  color: var(--text-1);
  font-weight: 600;
}

.codex-setup-about-callout {
  display: none;
}

.codex-setup-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-2);
  overflow: visible;
}

.codex-setup-table--select-open {
  position: relative;
  z-index: 40;
}

.codex-setup-rarity-editor {
  width: min(100%, 420px);
}

.codex-setup-stat-editor {
  width: min(100%, 520px);
}

.equipment-editor-layout {
  display: grid;
  max-width: 640px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.equipment-editor-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-2);
  padding: 12px;
}

.equipment-editor-group--bottom {
  grid-column: 1 / -1;
}

.equipment-editor-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 72px;
  gap: 6px;
  padding-bottom: 18px;
}

.equipment-editor-list--bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 0;
}

.equipment-editor-slot-row {
  display: grid;
  min-height: 32px;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  padding: 4px 6px;
}

.equipment-editor-slot-row.sortable-ghost {
  opacity: 0.5;
}

/* Touch-only affordances: hidden on desktop, revealed in the stacked layout below 768px. */
.equipment-editor-count,
.equipment-editor-col-toggle,
.equipment-editor-add-row {
  display: none;
}

.codex-setup-books-editor {
  width: min(100%, 560px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-2);
  overflow: hidden;
}

.codex-setup-book-header,
.codex-setup-book-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 80px 22px;
  align-items: center;
  column-gap: 10px;
}

.codex-setup-book-header {
  min-height: 28px;
  padding: 0 9px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.codex-setup-book-row {
  min-height: 34px;
  border-top: 1px solid var(--border);
  padding: 4px 9px;
}

.codex-setup-book-row:focus-within {
  position: relative;
  z-index: 5;
}

.codex-setup-display-row {
  overflow: visible;
  align-items: flex-start;
}

.codex-setup-display-row:focus-within {
  position: relative;
  z-index: 50;
}

.codex-setup-display-row .system-custom-select[data-state="open"] {
  z-index: 100;
}

.codex-setup-display-row .system-custom-select-menu {
  z-index: 10000;
  min-width: 192px;
}

.codex-setup-display-row .system-custom-select-option {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.codex-setup-display-row-body {
  display: grid;
  flex: 1 1 auto;
  gap: 14px;
}

.codex-setup-display-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem 5.5rem 5.5rem 2rem;
  align-items: end;
  gap: 12px;
}

.codex-setup-display-entry-type-group {
  display: grid;
  gap: 8px;
}

.codex-setup-display-entry-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.codex-setup-display-entry-type-option {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-2);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.codex-setup-display-entry-type-option input {
  width: 14px;
  height: 14px;
  accent-color: var(--gold);
}

.codex-setup-display-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.codex-setup-empty-state {
  max-width: 560px;
  border: 1px dashed var(--border-mid);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--text-3);
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.45;
}

.codex-setup-locked-entry-type input[readonly] {
  color: var(--text-2);
}

.codex-setup-locked-entry-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-3);
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.codex-setup-entry-type-fields {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.codex-setup-entry-type-name {
  min-width: 0;
}

.codex-setup-entry-type-action {
  justify-self: end;
}

.system-form .equipment-editor-input {
  width: 100%;
  min-height: 24px;
  height: 24px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-1);
  padding: 5px 7px;
  font-size: 13px;
  line-height: 1;
}

.system-form .equipment-editor-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 3px var(--system-focus-ring);
}

.codex-setup-table-header,
.codex-setup-table-row {
  display: grid;
  align-items: center;
  column-gap: 8px;
}

.codex-setup-rarity-grid {
  grid-template-columns: 24px minmax(0, 1fr) 42px 28px;
}

.codex-setup-stat-grid {
  grid-template-columns: 24px minmax(128px, 1fr) 116px 42px 28px;
}

.codex-setup-table-header {
  min-height: 28px;
  padding: 0 9px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.codex-setup-table-row {
  position: relative;
  min-height: 40px;
  padding: 5px 9px;
  border-top: 1px solid var(--border);
  background: transparent;
}

.system-form .codex-setup-table-row[data-sortable-item] {
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  cursor: default;
}

.codex-setup-table-row:focus-within {
  z-index: 5;
}

.codex-setup-table-row:has(.system-custom-select[data-state="open"]) {
  z-index: 1000;
}

.codex-setup-table-row--select-open {
  z-index: 1000;
}

.codex-setup-drag-grip,
.equipment-editor-grip {
  display: block;
  position: relative;
  width: 24px;
  height: 28px;
  justify-self: center;
  color: rgba(90, 96, 114, 0.82);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.codex-setup-drag-grip::before,
.equipment-editor-grip::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 6px 0 currentColor,
    0 12px 0 currentColor,
    6px 0 0 currentColor,
    6px 6px 0 currentColor,
    6px 12px 0 currentColor;
  content: "";
  transform: translate(-4px, -7px);
}

.codex-setup-drag-grip:active,
.equipment-editor-grip:active {
  cursor: grabbing;
}

.system-form .codex-setup-drag-grip.drag-handle,
.system-form .equipment-editor-grip.drag-handle {
  display: block;
  position: relative;
  width: 24px;
  height: 28px;
  color: rgba(90, 96, 114, 0.82);
  background-image: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.system-form .codex-setup-drag-grip.drag-handle::before,
.system-form .equipment-editor-grip.drag-handle::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 6px 0 currentColor,
    0 12px 0 currentColor,
    6px 0 0 currentColor,
    6px 6px 0 currentColor,
    6px 12px 0 currentColor;
  content: "";
  transform: translate(-4px, -7px);
}

.system-form .codex-setup-compact-input {
  width: 100%;
  min-height: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.025);
  color: var(--text-1);
  padding: 5px 9px;
  font-size: 13px;
  line-height: 1;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.system-form .codex-setup-compact-input:focus {
  outline: none;
  border-color: var(--system-focus-border);
  box-shadow: 0 0 0 3px var(--system-focus-ring);
}

.system-form .codex-setup-number-input {
  padding-right: 4px;
  padding-left: 4px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.codex-setup-type-select {
  position: relative;
  width: 100%;
  z-index: 1;
}

.codex-setup-type-select .system-custom-select[data-state="open"] {
  z-index: 100;
}

.codex-setup-stat-row .system-custom-select-button {
  min-height: 28px;
  height: 28px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  padding: 5px 8px;
  font-size: 13px;
  line-height: 1;
}

.codex-setup-stat-row .system-custom-select-chevron {
  font-size: 11px;
}

.codex-setup-stat-row .system-custom-select-menu {
  z-index: 10000;
  min-width: 144px;
}

.codex-setup-stat-row .system-custom-select-option {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

.system-form .codex-setup-color-swatch {
  display: inline-block;
  box-sizing: border-box;
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  flex: 0 0 24px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  background: transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

.system-form input[type="color"].codex-setup-color-swatch {
  min-height: 24px;
  height: 24px;
  padding: 0;
}

.system-form .codex-setup-color-swatch:focus {
  outline: none;
  border-color: var(--system-focus-border);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 0 0 4px var(--system-focus-ring);
}

.system-form .codex-setup-color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

.system-form .codex-setup-color-swatch::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.system-form .codex-setup-color-swatch::-moz-color-swatch {
  border: 0;
  border-radius: 999px;
}

.codex-setup-stat-controls {
  display: contents;
}

.codex-setup-stat-field {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: stretch;
}

.codex-setup-stat-field--colour {
  justify-content: center;
}

.codex-setup-stat-mobile-label {
  display: none;
}

.codex-setup-resource-color-placeholder {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  font-size: 13px;
  line-height: 1;
}

.codex-setup-stat-field:not(.codex-setup-stat-field--empty) .codex-setup-resource-color-placeholder {
  display: none;
}

.codex-setup-stat-field--empty .codex-setup-resource-color {
  display: none;
}

.codex-setup-resource-color {
  display: flex;
  width: auto;
  min-width: 24px;
  align-items: center;
  justify-content: center;
}

.codex-setup-resource-color.hidden,
.codex-setup-resource-color-placeholder.hidden {
  display: none;
}

.codex-setup-delete-row {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-3);
  transition: background-color 150ms ease, color 150ms ease;
}

.codex-setup-delete-row:hover,
.codex-setup-delete-row:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
}

.codex-setup-delete-row svg {
  width: 12px;
  height: 12px;
}

.codex-setup-add-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  min-height: 30px;
  border: 1px dashed var(--border-mid);
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.codex-setup-add-row:hover,
.codex-setup-add-row:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.06);
  color: var(--gold);
}

@media (max-width: 900px) {
  .codex-setup-content-grid {
    grid-template-columns: 1fr;
  }

  .codex-setup-about-rail {
    position: static;
  }

  .codex-setup-display-main-grid,
  .codex-setup-display-toggle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .codex-setup-wizard {
    padding: 18px 12px 32px;
  }

  .codex-setup-title-row,
  .codex-setup-panel-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .codex-setup-title-row {
    align-items: flex-start;
  }

  .codex-setup-progress-meter {
    grid-template-columns: 1fr auto;
  }

  .codex-setup-progress-label {
    grid-column: 1 / -1;
  }

  .codex-setup-footer-actions {
    justify-content: stretch;
    width: 100%;
  }

  .codex-setup-button,
  .codex-setup-footer-actions input[type="submit"].codex-setup-button {
    flex: 1 1 auto;
    width: 100%;
  }

  .codex-setup-tab-strip {
    margin-right: -12px;
    margin-left: -12px;
    padding: 0 12px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent);
  }

  .codex-setup-tab-strip::-webkit-scrollbar {
    display: none;
  }

  .codex-setup-tab {
    min-height: 44px;
    padding: 11px 13px 13px;
  }

  .codex-setup-about-rail {
    display: none;
  }

  .codex-setup-about-callout {
    display: block;
    margin: 0 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
  }

  .codex-setup-about-callout summary {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--gold);
    padding: 0 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    list-style: none;
    text-transform: uppercase;
  }

  .codex-setup-about-callout summary::-webkit-details-marker {
    display: none;
  }

  .codex-setup-about-callout p {
    margin: 0;
    border-top: 1px solid var(--border);
    color: var(--text-3);
    padding: 11px 12px 12px;
    font-size: 12px;
    line-height: 1.55;
  }

  .codex-setup-about-callout strong {
    color: var(--text-1);
    font-weight: 600;
  }

  .codex-setup-panel-header {
    padding: 13px 14px;
  }

  .codex-setup-panel-body {
    padding: 14px;
  }

  .codex-setup-panel-footer {
    padding: 12px 14px;
  }

  .codex-setup-rarity-editor,
  .codex-setup-stat-editor {
    width: 100%;
  }

  .codex-setup-rarity-editor .codex-setup-table-header,
  .codex-setup-stat-editor .codex-setup-table-header {
    display: none;
  }

  .codex-setup-rarity-row.codex-setup-rarity-grid {
    grid-template-columns: 28px minmax(0, 1fr) 44px 44px;
    gap: 8px;
    min-height: 54px;
    padding: 5px 8px;
  }

  .codex-setup-rarity-row .codex-setup-drag-grip,
  .codex-setup-rarity-row .codex-setup-delete-row {
    width: 32px;
    height: 44px;
  }

  .codex-setup-rarity-row .codex-setup-drag-grip {
    width: 28px;
  }

  .codex-setup-rarity-row .codex-setup-delete-row {
    justify-self: end;
  }

  .codex-setup-rarity-row .codex-setup-compact-input {
    min-height: 44px;
    height: 44px;
  }

  .codex-setup-stat-editor {
    border: 0;
    background: transparent;
  }

  .codex-setup-stat-editor .codex-setup-table-body {
    display: grid;
    gap: 9px;
  }

  .codex-setup-stat-row.codex-setup-stat-grid {
    grid-template-columns: 28px minmax(0, 1fr) 40px;
    grid-template-areas:
      "grip name remove"
      "controls controls controls";
    align-items: center;
    row-gap: 6px;
    column-gap: 8px;
    min-height: 0;
  }

  .system-form .codex-setup-stat-row[data-sortable-item] {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-2);
    padding: 8px 10px 10px;
  }

  .codex-setup-stat-row .codex-setup-drag-grip {
    grid-area: grip;
    width: 28px;
    height: 44px;
  }

  .codex-setup-stat-row input[id$="_display_name"] {
    grid-area: name;
    min-height: 44px;
    height: 44px;
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.018);
    padding: 0 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
  }

  .codex-setup-stat-row input[id$="_display_name"]::placeholder {
    color: transparent;
  }

  .codex-setup-stat-row input.codex-setup-stat-name-input--empty {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.025);
  }

  .codex-setup-stat-row input[id$="_display_name"]:focus {
    border-color: var(--system-focus-border);
    background: rgba(255, 255, 255, 0.035);
  }

  .codex-setup-stat-row .codex-setup-delete-row {
    grid-area: remove;
    width: 40px;
    height: 44px;
    justify-self: end;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-3);
  }

  .codex-setup-rarity-row .codex-setup-delete-row svg,
  .codex-setup-stat-row .codex-setup-delete-row svg {
    width: 16px;
    height: 16px;
  }

  .codex-setup-stat-row .codex-setup-delete-row:hover,
  .codex-setup-stat-row .codex-setup-delete-row:focus {
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-1);
  }

  .codex-setup-stat-row .codex-setup-stat-controls {
    display: grid;
    grid-area: controls;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-left: 36px;
    padding-right: 48px;
  }

  .codex-setup-stat-row--resource .codex-setup-stat-controls {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    padding-right: 0;
  }

  .codex-setup-stat-row .codex-setup-stat-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .codex-setup-stat-row .codex-setup-stat-field--type {
    width: 100%;
  }

  .codex-setup-stat-row .codex-setup-stat-field--colour {
    flex: 0 0 40px;
    width: 100%;
    align-items: center;
    justify-content: center;
  }

  .codex-setup-stat-row .codex-setup-stat-field--empty {
    display: none;
  }

  .codex-setup-stat-mobile-label {
    display: none;
    color: var(--text-3);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
  }

  .codex-setup-stat-row .codex-setup-compact-input,
  .codex-setup-stat-row .system-custom-select-button {
    min-height: 44px;
    height: 44px;
  }

  .codex-setup-stat-row .system-custom-select-button {
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding-right: 10px;
    padding-left: 10px;
  }

  .codex-setup-stat-row .codex-setup-resource-color {
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .codex-setup-stat-row .codex-setup-resource-color-placeholder {
    display: none;
  }

  .system-form .codex-setup-entry-type-row {
    align-items: stretch;
    padding: 8px;
  }

  .codex-setup-entry-type-fields {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .codex-setup-entry-type-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
  }

  .codex-setup-entry-type-row .form-input {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .codex-setup-entry-type-row .system-row-delete-button {
    width: 40px;
    height: 40px;
    margin-top: 0;
  }

  .codex-setup-entry-type-row .codex-setup-locked-entry-type-badge {
    min-height: 32px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .codex-setup-panel-body > .btn-secondary.btn-sm[data-action="click->nested-form#addItem"] {
    width: 100%;
    min-height: 40px;
  }

  .system-form {
    padding: 18px;
  }

  .system-form.system-form--embedded,
  .system-form.system-form--inline {
    padding: 0;
  }

  .system-form-page-title-row {
    align-items: flex-start;
    gap: 8px;
  }

  .system-form-page-title-row .page-title,
  .system-form-page-title {
    font-size: 24px;
  }

  .system-form-section-header {
    align-items: flex-start;
    gap: 10px;
  }

  .system-form-section-copy {
    display: block;
  }

  .system-form-section-copy p {
    margin-top: 4px;
  }

  .form-input,
  .form-select,
  .form-textarea,
  .manager-input,
  .input,
  .system-form input[type="text"],
  .system-form input[type="email"],
  .system-form input[type="url"],
  .system-form input[type="search"],
  .system-form input[type="tel"],
  .system-form input[type="number"],
  .system-form input[type="date"],
  .system-form input[type="datetime-local"],
  .system-form input[type="password"],
  .system-form textarea,
  .system-form select,
  .system-custom-select-button,
  .system-custom-select-option,
  .system-searchable-select-trigger,
  .system-searchable-select-input,
  .system-searchable-select-option {
    font-size: 16px;
  }

  .system-custom-select-option,
  .system-searchable-select-option {
    min-height: 42px;
  }

  .system-form .form-actions,
  .system-form .form-actions > div {
    align-items: stretch;
    flex-direction: column-reverse;
    width: 100%;
  }

  .system-form .form-actions .btn-primary,
  .system-form .form-actions .btn-secondary,
  .system-form .form-actions .btn-ghost,
  .system-form .form-actions input[type="submit"],
  .system-form .form-actions button {
    width: 100%;
  }

  .system-toggle-grid {
    grid-template-columns: 1fr;
  }

  .system-boolean-row {
    align-items: flex-start;
    gap: 12px;
  }

  .system-reorderable-row {
    align-items: flex-start;
    padding: 10px;
  }

  .system-reorderable-fields {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .system-drag-grip {
    width: 14px;
    height: 18px;
    flex-basis: 14px;
    margin-top: 13px;
  }

  .system-row-delete-button {
    width: 34px;
    height: 34px;
    margin-top: 4px;
  }

  .system-row-delete-button svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 767.98px) {
  /* Stack the three equipment groups into one full-width column on touch. */
  .equipment-editor-layout {
    grid-template-columns: 1fr;
    max-width: none;
    gap: 14px;
  }

  .equipment-editor-group {
    padding: 10px 10px 12px;
  }

  .equipment-editor-group--bottom {
    grid-column: auto;
  }

  .equipment-editor-list,
  .equipment-editor-list--bottom {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    min-height: 0;
    gap: 8px;
    padding-bottom: 0;
  }

  /* Live per-group count beside the header label. */
  .equipment-editor-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  /* The header "+ Add" gives way to a full-width dashed row per group. */
  .equipment-editor-group .system-reorderable-add {
    display: none;
  }

  .equipment-editor-add-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    border: 1px dashed var(--border-mid);
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
  }

  .equipment-editor-add-row:hover,
  .equipment-editor-add-row:focus,
  .equipment-editor-add-row:active {
    outline: none;
    border-color: rgba(251, 191, 36, 0.36);
    background: rgba(251, 191, 36, 0.06);
    color: var(--gold);
  }

  /* Compact one-line slot rows: grip | name | L/R/B toggle | trash. */
  .system-form .equipment-editor-slot-row {
    grid-template-columns: 28px minmax(0, 1fr) auto 40px;
    min-height: 52px;
    gap: 5px;
    padding: 5px 6px;
    background: rgba(255, 255, 255, 0.02);
  }

  .system-form .equipment-editor-slot-row .equipment-editor-grip {
    width: 28px;
    height: 44px;
  }

  .system-form .equipment-editor-input {
    min-height: 44px;
    height: 44px;
    padding: 0 10px;
    font-size: 16px;
  }

  /* Column toggle uses the design system's gold-dim active treatment. */
  .equipment-editor-col-toggle {
    display: inline-flex;
    align-items: stretch;
    height: 44px;
    padding: 2px;
    gap: 2px;
    border: 1px solid var(--border-mid);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
  }

  .equipment-editor-col-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 0 1px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  }

  .equipment-editor-col-option.is-active {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.14);
    color: var(--gold);
  }

  .system-form .equipment-editor-slot-row .system-row-delete-button {
    width: 40px;
    height: 44px;
    margin-top: 0;
    justify-self: center;
  }

  /* Safe-area padding for the wizard shell (status bar / notch). */
  .codex-setup-wizard {
    padding-top: max(18px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  /* Action bar sticks to the bottom, clear of the home indicator. */
  .codex-setup-panel-footer {
    position: sticky;
    bottom: 0;
    z-index: 20;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.3);
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
