/* Per-world look. Tokens stay on .primer-root; this file restyles chrome. */

.primer-root .slide::before {
  border-radius: var(--radius);
}
.primer-root .card {
  border-radius: var(--radius);
}
.primer-root .formula,
.primer-root .overlay .box,
.primer-root .legend p,
.primer-root .nations p,
.primer-root .map-card {
  border-radius: var(--radius);
}

.primer-root .stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ------------------------------------------------------------------ */
/* Deadlands — pulp Weird West                                        */
/* ------------------------------------------------------------------ */

.theme-deadlands .viewport {
  background:
    radial-gradient(1200px 700px at 50% 120%, rgba(196, 74, 50, 0.22), transparent 55%),
    #140c08;
}

.theme-deadlands .slide {
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(212, 160, 86, 0.12), transparent 50%),
    radial-gradient(820px 560px at 110% 120%, rgba(196, 74, 50, 0.2), transparent 52%),
    linear-gradient(165deg, #2a1c12 0%, #120c08 48%, #1c140e 100%);
}

.theme-deadlands .slide::before {
  inset: 16px;
  border: 3px solid #6a4a28;
  box-shadow:
    inset 0 0 0 1px rgba(232, 200, 130, 0.35),
    inset 0 0 40px rgba(20, 8, 4, 0.35),
    0 0 0 8px #1a120c;
  background:
    radial-gradient(circle at 10px 10px, #c4a06a 0 3px, transparent 4px),
    radial-gradient(circle at calc(100% - 10px) 10px, #c4a06a 0 3px, transparent 4px),
    radial-gradient(circle at 10px calc(100% - 10px), #c4a06a 0 3px, transparent 4px),
    radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), #c4a06a 0 3px, transparent 4px);
}
.theme-deadlands .slide::after {
  inset: 28px;
  border: 1px dashed rgba(196, 160, 86, 0.35);
}
.theme-deadlands .slide.bleed::before {
  border-color: rgba(196, 160, 86, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(232, 200, 130, 0.2),
    0 0 0 8px rgba(10, 6, 4, 0.45);
}

.theme-deadlands .kicker {
  letter-spacing: 0.22em;
  font-weight: 400;
  color: #e0b25a;
}
.theme-deadlands .kicker::before {
  width: 18px;
  height: 18px;
  background: #e0b25a;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.theme-deadlands h1 {
  font-family: Rye, "Special Elite", serif;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-shadow: 0 3px 0 #1a0c08, 0 0 36px rgba(196, 74, 50, 0.4);
}
.theme-deadlands h2 {
  font-weight: 400;
  letter-spacing: 0.03em;
  font-size: 52px;
  text-shadow: 0 2px 0 #1a0c08;
}
.theme-deadlands .rule {
  background: repeating-linear-gradient(90deg, #c44a32 0 10px, transparent 10px 16px);
  height: 3px;
}

.theme-deadlands .card {
  background:
    linear-gradient(180deg, rgba(80, 48, 24, 0.35) 0%, transparent 28%),
    linear-gradient(180deg, #2a1e14 0%, #16100c 100%);
  border: 1px solid #6a4a28;
  border-top: 1px solid #c4a06a;
  box-shadow: 3px 4px 0 #0a0604;
}
.theme-deadlands .card::before {
  opacity: 0.12;
}
.theme-deadlands .card::after {
  left: 22px;
  right: 22px;
  width: auto;
  height: 0;
  border-bottom: 2px dashed color-mix(in srgb, var(--accent) 70%, #6a4a28);
  background: none;
  opacity: 0.7;
}
.theme-deadlands .card h3 {
  font-family: var(--font-kicker);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 22px;
}
.theme-deadlands .card .tag {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-weight: 400;
}

.theme-deadlands .formula {
  font-family: var(--font-kicker);
  font-size: 34px;
  letter-spacing: 0.06em;
  background: #1a120c;
  border: 2px solid #c4a06a;
  border-left: 10px solid #c44a32;
  box-shadow: 4px 4px 0 #0a0604;
}

.theme-deadlands .legend p,
.theme-deadlands .nations p {
  background: #1c140e;
  border-left-width: 6px;
  font-family: var(--font-body);
}

.theme-deadlands .timeline > div::after {
  transform: none;
  border-radius: 50%;
  width: 11px;
  height: 11px;
  background: #c44a32;
  box-shadow: 0 0 0 3px #120c08, 0 0 0 5px #c4a06a;
}
.theme-deadlands .timeline > div::before {
  background: repeating-linear-gradient(90deg, #c4a06a 0 8px, transparent 8px 14px);
  height: 2px;
}
.theme-deadlands .timeline .when {
  font-family: var(--font-kicker);
}

.theme-deadlands .progress {
  height: 8px;
  background: #1a120c;
}
.theme-deadlands .progress > span {
  background: repeating-linear-gradient(90deg, #c44a32 0 18px, #8b2e1e 18px 20px, #d4a056 20px 22px, #c44a32 22px 40px);
  box-shadow: 0 0 10px rgba(196, 74, 50, 0.55);
}

.theme-deadlands .primer-toolbar {
  background: #1a120c;
  border-bottom: 2px solid #6a4a28;
  letter-spacing: 0.16em;
}
.theme-deadlands .primer-toolbar__btn,
.theme-deadlands .primer-toolbar a {
  padding: 0 10px;
}
.theme-deadlands .primer-toolbar__btn:hover,
.theme-deadlands .primer-toolbar a:hover {
  color: #f0d090;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.theme-deadlands .primer-nav {
  color: #e0b25a;
  background: linear-gradient(90deg, rgba(26, 18, 12, 0.85), transparent);
}
.theme-deadlands .primer-nav--next {
  background: linear-gradient(270deg, rgba(26, 18, 12, 0.85), transparent);
}

.theme-deadlands .overlay {
  background: rgba(12, 8, 6, 0.88);
}
.theme-deadlands .overlay .box {
  background: #1c140e;
  border: 3px solid #c4a06a;
  box-shadow: 6px 6px 0 #0a0604;
}
.theme-deadlands .toc button {
  font-family: var(--font-kicker);
  letter-spacing: 0.04em;
}

.theme-deadlands .quote {
  font-family: var(--font-body);
}

.theme-deadlands .pill {
  font-family: var(--font-kicker);
  border-radius: 0;
  border-style: dashed;
}

.theme-deadlands .chrome {
  letter-spacing: 0.14em;
}

@media (hover: hover) {
  .theme-deadlands .primer-nav { opacity: 0.7; }
}

/* ------------------------------------------------------------------ */
/* Golarion — Pathfinder illuminated GM screen                        */
/* ------------------------------------------------------------------ */

.theme-golarion .viewport {
  background:
    radial-gradient(1100px 640px at 50% 120%, rgba(124, 26, 26, 0.28), transparent 55%),
    #100808;
}

.theme-golarion .slide {
  background:
    radial-gradient(900px 500px at 8% -8%, rgba(196, 156, 72, 0.16), transparent 50%),
    radial-gradient(800px 520px at 108% 118%, rgba(124, 26, 26, 0.28), transparent 52%),
    linear-gradient(165deg, #2a1414 0%, #120808 50%, #1c1010 100%);
}

.theme-golarion .slide::before {
  inset: 18px;
  border: 2px solid #c49c48;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(124, 26, 26, 0.18);
  background:
    linear-gradient(#c49c48, #c49c48) 0 0 / 42px 2px no-repeat,
    linear-gradient(#c49c48, #c49c48) 0 0 / 2px 42px no-repeat,
    linear-gradient(#c49c48, #c49c48) 100% 0 / 42px 2px no-repeat,
    linear-gradient(#c49c48, #c49c48) 100% 0 / 2px 42px no-repeat,
    linear-gradient(#c49c48, #c49c48) 0 100% / 42px 2px no-repeat,
    linear-gradient(#c49c48, #c49c48) 0 100% / 2px 42px no-repeat,
    linear-gradient(#c49c48, #c49c48) 100% 100% / 42px 2px no-repeat,
    linear-gradient(#c49c48, #c49c48) 100% 100% / 2px 42px no-repeat;
}
.theme-golarion .slide::after {
  inset: 28px;
  border: 1px solid rgba(196, 156, 72, 0.22);
}
.theme-golarion .slide.bleed::before {
  border-color: rgba(232, 208, 144, 0.45);
}

.theme-golarion .kicker {
  letter-spacing: 0.38em;
  color: #e8d090;
}
.theme-golarion .kicker::before {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #c04040, #c49c48);
}

.theme-golarion h1 {
  letter-spacing: 0.08em;
  text-shadow: 0 2px 0 #3a1010, 0 0 28px rgba(196, 156, 72, 0.28);
}
.theme-golarion h2 {
  letter-spacing: 0.03em;
}

.theme-golarion .grid.cols-4 {
  flex: 0 1 auto;
  min-height: 420px;
}
.theme-golarion .card {
  background:
    linear-gradient(180deg, rgba(196, 156, 72, 0.16) 0%, transparent 36%),
    linear-gradient(180deg, #2a1814 0%, #160e0c 100%);
  border: 1px solid rgba(196, 156, 72, 0.4);
  border-top: 3px solid var(--accent);
}
.theme-golarion .card h3 {
  letter-spacing: 0.08em;
}
.theme-golarion .card .tag {
  border-radius: 999px;
  padding: 4px 12px;
}

.theme-golarion .formula {
  background: linear-gradient(90deg, rgba(124, 26, 26, 0.7), rgba(16, 8, 8, 0.75));
  border: 1px solid #c49c48;
  border-left: 8px solid #c04040;
}

.theme-golarion .progress {
  height: 7px;
  background: #1a0c0c;
}
.theme-golarion .progress > span {
  background: linear-gradient(90deg, #7c1a1a, #c49c48, #e8d090);
  box-shadow: 0 0 12px rgba(196, 156, 72, 0.45);
}

.theme-golarion .primer-toolbar {
  background: #1a0c0c;
  border-bottom: 1px solid #c49c48;
}
.theme-golarion .nations p,
.theme-golarion .legend p {
  background: #1c1010;
}

.theme-golarion .quote {
  font-family: "IM Fell English", var(--font-body);
}

.theme-golarion .overlay .box {
  background: #1c1010;
  border: 2px solid #c49c48;
}

.theme-golarion .timeline > div::after {
  background: #c49c48;
  box-shadow: 0 0 0 3px #120808, 0 0 12px rgba(196, 156, 72, 0.7);
}

@media (hover: hover) {
  .theme-golarion .primer-nav { opacity: 0.55; }
}

/* ------------------------------------------------------------------ */
/* Fabula Ultima — JRPG crystal HUD                                   */
/* ------------------------------------------------------------------ */

.theme-fabula .viewport {
  background:
    radial-gradient(1000px 620px at 20% 110%, rgba(64, 200, 208, 0.18), transparent 50%),
    radial-gradient(900px 500px at 90% 0%, rgba(224, 112, 176, 0.16), transparent 50%),
    #070614;
}

.theme-fabula .slide {
  background:
    radial-gradient(900px 500px at 8% -8%, rgba(64, 200, 208, 0.16), transparent 52%),
    radial-gradient(820px 560px at 108% 118%, rgba(224, 112, 176, 0.2), transparent 52%),
    linear-gradient(165deg, #161028 0%, #0a0816 50%, #12101c 100%);
}

.theme-fabula .slide.active .content {
  animation-name: primer-content-up;
}
.theme-fabula .slide.active[data-direction='back'] .content {
  animation-name: primer-content-down;
}
@keyframes primer-content-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes primer-content-down {
  from { opacity: 0; transform: translateY(-28px); }
  to { opacity: 1; transform: none; }
}

.theme-fabula .slide::before {
  inset: 20px;
  border: 1px solid rgba(64, 200, 208, 0.45);
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(224, 112, 176, 0.18),
    0 0 40px rgba(64, 200, 208, 0.12);
}
.theme-fabula .slide::after {
  inset: 28px;
  border: 1px solid rgba(240, 200, 96, 0.12);
  border-radius: 14px;
}
.theme-fabula .slide.bleed::before {
  border-color: rgba(255, 233, 160, 0.4);
}

.theme-fabula .kicker {
  letter-spacing: 0.28em;
  font-weight: 600;
  color: #7ee8f0;
}
.theme-fabula .kicker::before {
  width: auto;
  height: auto;
  background: none;
  content: '▶';
  color: #40c8d0;
  font-size: 13px;
  letter-spacing: 0;
}

.theme-fabula h1 {
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.04em;
  font-size: 92px;
  background: linear-gradient(180deg, #ffe9a0 0%, #f0c860 42%, #7ee8f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(64, 200, 208, 0.35));
}
.theme-fabula h2 {
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ffe9a0, #f0c860);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.theme-fabula .rule {
  background: linear-gradient(90deg, #40c8d0, #e070b0, transparent);
  height: 3px;
  border-radius: 99px;
}

.theme-fabula .card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 42%),
    linear-gradient(180deg, rgba(28, 22, 44, 0.92) 0%, rgba(12, 10, 22, 0.92) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--accent) 80%, #fff);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.theme-fabula .card::after {
  left: 24px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  transform: rotate(45deg);
  bottom: 18px;
}
.theme-fabula .card h3 {
  font-family: var(--font-kicker);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 20px;
}
.theme-fabula .card .tag {
  border-radius: 999px;
  color: #0a0814;
  font-weight: 700;
}

.theme-fabula .formula {
  font-size: 34px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(64, 200, 208, 0.28), rgba(10, 8, 22, 0.72));
  border: 1px solid #40c8d0;
  border-left: 6px solid #e070b0;
  box-shadow: 0 0 24px rgba(64, 200, 208, 0.2);
}

.theme-fabula .nations p,
.theme-fabula .legend p {
  background: rgba(20, 16, 36, 0.82);
  border-left: none;
  border-radius: 10px;
  padding-left: 42px;
  position: relative;
}
.theme-fabula .nations p::before,
.theme-fabula .legend p::before {
  content: '▶';
  position: absolute;
  left: 16px;
  top: 16px;
  color: var(--teal);
  font-size: 12px;
}

.theme-fabula .class-grid figure {
  border-radius: 12px;
  border-color: rgba(64, 200, 208, 0.28);
  background: rgba(16, 12, 32, 0.78);
}
.theme-fabula .class-grid img {
  object-fit: cover;
  object-position: center 8%;
}
.theme-fabula .class-grid figcaption {
  color: #7ee8f0;
  letter-spacing: 0.16em;
}
.theme-fabula .class-grid.cols-atlas {
  grid-template-columns: repeat(5, 1fr);
}
.theme-fabula .status-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-content: stretch;
}
.theme-fabula .status-grid .card {
  align-items: center;
  text-align: center;
  padding: 28px 16px 36px;
  justify-content: center;
}
.theme-fabula .status-grid img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin: 12px 0 16px;
  filter: drop-shadow(0 0 12px rgba(64, 200, 208, 0.35));
}
.theme-fabula .status-grid h3 {
  font-size: 18px;
}
.theme-fabula .status-grid p {
  font-size: 18px;
  line-height: 1.32;
}
.theme-fabula .spell-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 8px;
}
.theme-fabula .spell-row img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(224, 112, 176, 0.35));
}
.theme-fabula .pill-grid {
  flex: 1;
  align-content: center;
  gap: 14px 16px;
}
.theme-fabula .pill {
  font-family: var(--font-kicker);
  border-radius: 999px;
  border-color: rgba(64, 200, 208, 0.4);
  color: #7ee8f0;
  letter-spacing: 0.14em;
  background: rgba(10, 8, 22, 0.55);
  padding: 16px 12px;
  font-size: 15px;
}
.theme-fabula .pill.is-now {
  background: rgba(64, 200, 208, 0.18);
  color: #ffe9a0;
}

.theme-fabula .progress {
  height: 10px;
  background: rgba(10, 8, 22, 0.9);
  border-top: 1px solid rgba(64, 200, 208, 0.25);
}
.theme-fabula .progress > span {
  background: linear-gradient(90deg, #e070b0, #f0c860, #40c8d0);
  box-shadow: 0 0 16px rgba(64, 200, 208, 0.55);
  position: relative;
}
.theme-fabula .progress > span::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 40%;
  background: rgba(255, 255, 255, 0.28);
}

.theme-fabula .primer-toolbar {
  background: rgba(10, 8, 22, 0.92);
  border-bottom: 1px solid rgba(64, 200, 208, 0.28);
  letter-spacing: 0.2em;
  font-weight: 600;
}
.theme-fabula .primer-toolbar__btn:hover,
.theme-fabula .primer-toolbar a:hover {
  color: #7ee8f0;
}

.theme-fabula .primer-nav {
  color: #7ee8f0;
  font-size: 0;
  width: 64px;
}
.theme-fabula .primer-nav--prev::before { content: '◀'; font-size: 22px; }
.theme-fabula .primer-nav--next::before { content: '▶'; font-size: 22px; }
.theme-fabula .primer-nav--prev { background: linear-gradient(90deg, rgba(10, 8, 22, 0.8), transparent); }
.theme-fabula .primer-nav--next { background: linear-gradient(270deg, rgba(10, 8, 22, 0.8), transparent); }

.theme-fabula .chrome {
  letter-spacing: 0.22em;
  color: rgba(126, 232, 240, 0.7);
}

.theme-fabula .overlay {
  background: rgba(6, 5, 16, 0.86);
}
.theme-fabula .overlay .box {
  background: #161028;
  border: 1px solid #40c8d0;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(64, 200, 208, 0.18);
}
.theme-fabula .toc button {
  font-family: var(--font-kicker);
  border-bottom-color: rgba(64, 200, 208, 0.16);
}
.theme-fabula .toc button[aria-current='true'] {
  color: #7ee8f0;
  border-bottom-color: #40c8d0;
}

.theme-fabula .quote {
  font-family: var(--font-display);
  font-style: italic;
}

.theme-fabula .map-card {
  border-radius: 14px;
  border-color: rgba(64, 200, 208, 0.4);
}

@media (hover: hover) {
  .theme-fabula .primer-nav { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-fabula .slide.active .content { animation: none; }
}

/* ------------------------------------------------------------------ */
/* Ard — desert dark fantasy (D&D 2024)                               */
/* ------------------------------------------------------------------ */

.theme-ard .viewport {
  background:
    radial-gradient(1200px 700px at 50% 110%, rgba(139, 30, 74, 0.28), transparent 55%),
    #10080c;
}

.theme-ard .slide {
  background:
    radial-gradient(1000px 520px at 8% -8%, rgba(224, 178, 90, 0.18), transparent 52%),
    radial-gradient(820px 560px at 108% 118%, rgba(139, 30, 74, 0.28), transparent 55%),
    radial-gradient(640px 420px at 96% 0%, rgba(165, 107, 219, 0.14), transparent 50%),
    linear-gradient(165deg, #23141a 0%, #14100d 48%, #1a1218 100%);
}

.theme-ard .slide::before {
  inset: 18px;
  border: 1px solid rgba(224, 178, 90, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(139, 30, 74, 0.12);
}
.theme-ard .slide::after {
  inset: 26px;
  border: 1px solid rgba(224, 178, 90, 0.16);
}
.theme-ard .slide.bleed::before {
  border-color: rgba(243, 212, 138, 0.35);
}

.theme-ard .kicker::before {
  background: linear-gradient(90deg, var(--blood-2), var(--gold));
}

.theme-ard .progress > span {
  background: linear-gradient(90deg, var(--sun), var(--gold), var(--violet));
  box-shadow: 0 0 12px rgba(224, 90, 138, 0.55);
}

.theme-ard .hero {
  border-radius: 0;
}
.theme-ard .hero img {
  border-radius: 10px;
}

.theme-ard .pair {
  background: linear-gradient(180deg, #241418 0%, #16100e 100%);
}

@media (hover: hover) {
  .theme-ard .primer-nav { opacity: 0.55; }
}

/* ------------------------------------------------------------------ */
/* Call of Cthulhu — pulp investigative horror                        */
/* ------------------------------------------------------------------ */

.theme-cthulhu .viewport {
  background:
    radial-gradient(1200px 700px at 50% 120%, rgba(74, 106, 72, 0.22), transparent 55%),
    #0a0c0a;
}

.theme-cthulhu .slide {
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(196, 168, 106, 0.1), transparent 50%),
    radial-gradient(820px 560px at 110% 120%, rgba(74, 106, 72, 0.18), transparent 52%),
    linear-gradient(165deg, #1a1c16 0%, #0c100c 48%, #141612 100%);
}

.theme-cthulhu .slide::before {
  inset: 16px;
  border: 2px solid #4a5a40;
  box-shadow:
    inset 0 0 0 1px rgba(232, 216, 168, 0.2),
    inset 0 0 40px rgba(8, 12, 8, 0.4),
    0 0 0 6px #0a0c0a;
}
.theme-cthulhu .slide::after {
  inset: 28px;
  border: 1px solid rgba(196, 168, 106, 0.22);
}
.theme-cthulhu .slide.bleed::before {
  border-color: rgba(196, 168, 106, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(232, 216, 168, 0.15),
    0 0 0 6px rgba(8, 10, 8, 0.5);
}

.theme-cthulhu .kicker {
  letter-spacing: 0.2em;
  font-weight: 400;
  color: #c4a86a;
}
.theme-cthulhu .kicker::before {
  width: 28px;
  height: 2px;
  background: #6a8a58;
}

.theme-cthulhu h1 {
  font-family: Cinzel, serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 #0a0c0a, 0 0 40px rgba(74, 106, 72, 0.35);
}
.theme-cthulhu h2 {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 52px;
  text-shadow: 0 2px 0 #0a0c0a;
}
.theme-cthulhu .rule {
  background: linear-gradient(90deg, #6a8a58, transparent);
  height: 2px;
}

.theme-cthulhu .card {
  background:
    linear-gradient(180deg, rgba(74, 90, 60, 0.28) 0%, transparent 28%),
    linear-gradient(180deg, #1a2018 0%, #0e120e 100%);
  border: 1px solid #4a5a40;
  border-top: 1px solid #c4a86a;
  box-shadow: 3px 4px 0 #060806;
}
.theme-cthulhu .card::after {
  left: 22px;
  right: 22px;
  width: auto;
  height: 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, #4a5a40);
  background: none;
  opacity: 0.7;
}
.theme-cthulhu .card h3 {
  font-family: var(--font-kicker);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 20px;
}
.theme-cthulhu .card .tag {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-weight: 400;
}

.theme-cthulhu .formula {
  font-family: var(--font-kicker);
  font-size: 34px;
  letter-spacing: 0.04em;
  background: #121612;
  border: 2px solid #c4a86a;
  border-left: 10px solid #6a8a58;
  box-shadow: 4px 4px 0 #060806;
}

.theme-cthulhu .legend p,
.theme-cthulhu .nations p {
  background: #141814;
  border-left-width: 6px;
  font-family: var(--font-body);
}

.theme-cthulhu .timeline > div::after {
  transform: none;
  border-radius: 0;
  width: 10px;
  height: 10px;
  background: #6a8a58;
  box-shadow: 0 0 0 3px #0c100c, 0 0 0 5px #c4a86a;
}
.theme-cthulhu .timeline > div::before {
  background: repeating-linear-gradient(90deg, #c4a86a 0 8px, transparent 8px 14px);
  height: 2px;
}
.theme-cthulhu .timeline .when {
  font-family: var(--font-kicker);
}

.theme-cthulhu .progress {
  height: 6px;
  background: #121612;
}
.theme-cthulhu .progress > span {
  background: linear-gradient(90deg, #4a6a48, #c4a86a);
  box-shadow: 0 0 10px rgba(106, 138, 88, 0.45);
}

.theme-cthulhu .primer-toolbar {
  background: #121612;
  border-bottom: 2px solid #4a5a40;
  letter-spacing: 0.16em;
}
.theme-cthulhu .primer-toolbar__btn:hover,
.theme-cthulhu .primer-toolbar a:hover {
  color: #e8d8a8;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.theme-cthulhu .primer-nav {
  color: #c4a86a;
  background: linear-gradient(90deg, rgba(18, 22, 18, 0.85), transparent);
}
.theme-cthulhu .primer-nav--next {
  background: linear-gradient(270deg, rgba(18, 22, 18, 0.85), transparent);
}

.theme-cthulhu .overlay {
  background: rgba(8, 10, 8, 0.9);
}
.theme-cthulhu .overlay .box {
  background: #141814;
  border: 2px solid #c4a86a;
  box-shadow: 6px 6px 0 #060806;
}
.theme-cthulhu .toc button {
  font-family: var(--font-kicker);
}
.theme-cthulhu .quote {
  font-family: var(--font-body);
  font-style: italic;
}
.theme-cthulhu .pill {
  font-family: var(--font-kicker);
  border-radius: 0;
}

@media (hover: hover) {
  .theme-cthulhu .primer-nav { opacity: 0.7; }
}

/* ------------------------------------------------------------------ */
/* Forbidden Lands — Nordic dark fantasy survival                     */
/* ------------------------------------------------------------------ */

.theme-forbidden .viewport {
  background:
    radial-gradient(1200px 700px at 50% 120%, rgba(168, 40, 40, 0.28), transparent 55%),
    #100808;
}

.theme-forbidden .slide {
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(201, 160, 90, 0.12), transparent 50%),
    radial-gradient(820px 560px at 110% 120%, rgba(168, 40, 40, 0.22), transparent 52%),
    linear-gradient(165deg, #2a1810 0%, #120a08 48%, #1c100c 100%);
}

.theme-forbidden .slide::before {
  inset: 16px;
  border: 2px solid #5a3820;
  box-shadow:
    inset 0 0 0 1px rgba(232, 200, 136, 0.2),
    inset 0 0 40px rgba(20, 8, 6, 0.4),
    0 0 0 7px #100808;
}
.theme-forbidden .slide::after {
  inset: 28px;
  border: 1px solid rgba(201, 160, 90, 0.28);
}
.theme-forbidden .slide.bleed::before {
  border-color: rgba(201, 160, 90, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(232, 200, 136, 0.15),
    0 0 0 7px rgba(10, 6, 4, 0.5);
}

.theme-forbidden .kicker {
  letter-spacing: 0.28em;
  color: #c9a05a;
}
.theme-forbidden .kicker::before {
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, #a82828, #c9a05a);
}

.theme-forbidden h1 {
  font-family: "IM Fell English", Cinzel, serif;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  text-shadow: 0 3px 0 #1a0806, 0 0 36px rgba(168, 40, 40, 0.4);
}
.theme-forbidden h2 {
  font-family: "IM Fell English", Cinzel, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 52px;
  text-shadow: 0 2px 0 #1a0806;
}
.theme-forbidden .rule {
  background: linear-gradient(90deg, #a82828, transparent);
  height: 3px;
}

.theme-forbidden .card {
  background:
    linear-gradient(180deg, rgba(90, 40, 24, 0.35) 0%, transparent 28%),
    linear-gradient(180deg, #261410 0%, #140c0a 100%);
  border: 1px solid #5a3820;
  border-top: 1px solid #c9a05a;
  box-shadow: 3px 4px 0 #0a0604;
}
.theme-forbidden .card::after {
  left: 22px;
  right: 22px;
  width: auto;
  height: 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, #5a3820);
  background: none;
}
.theme-forbidden .card h3 {
  font-family: Cinzel, serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 22px;
}
.theme-forbidden .card .tag {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.theme-forbidden .formula {
  font-family: Cinzel, serif;
  font-size: 32px;
  letter-spacing: 0.04em;
  background: #1a100c;
  border: 2px solid #c9a05a;
  border-left: 10px solid #a82828;
  box-shadow: 4px 4px 0 #0a0604;
}

.theme-forbidden .timeline > div::after {
  transform: none;
  border-radius: 0;
  width: 10px;
  height: 10px;
  background: #a82828;
  box-shadow: 0 0 0 3px #120a08, 0 0 0 5px #c9a05a;
}
.theme-forbidden .timeline > div::before {
  background: repeating-linear-gradient(90deg, #c9a05a 0 8px, transparent 8px 14px);
  height: 2px;
}

.theme-forbidden .progress {
  height: 7px;
  background: #1a100c;
}
.theme-forbidden .progress > span {
  background: linear-gradient(90deg, #6a1010, #a82828, #c9a05a);
  box-shadow: 0 0 10px rgba(168, 40, 40, 0.5);
}

.theme-forbidden .primer-toolbar {
  background: #1a100c;
  border-bottom: 2px solid #5a3820;
}
.theme-forbidden .primer-toolbar__btn:hover,
.theme-forbidden .primer-toolbar a:hover {
  color: #e8c888;
}

.theme-forbidden .primer-nav {
  color: #c9a05a;
  background: linear-gradient(90deg, rgba(26, 16, 12, 0.85), transparent);
}
.theme-forbidden .primer-nav--next {
  background: linear-gradient(270deg, rgba(26, 16, 12, 0.85), transparent);
}

.theme-forbidden .overlay {
  background: rgba(12, 6, 4, 0.9);
}
.theme-forbidden .overlay .box {
  background: #1c100c;
  border: 2px solid #c9a05a;
  box-shadow: 6px 6px 0 #0a0604;
}

@media (hover: hover) {
  .theme-forbidden .primer-nav { opacity: 0.65; }
}

/* ------------------------------------------------------------------ */
/* Pathfinder for Savage Worlds — Golarion + SWADE pulp               */
/* ------------------------------------------------------------------ */

.theme-pfsw .viewport {
  background:
    radial-gradient(1200px 700px at 50% 110%, rgba(192, 64, 64, 0.26), transparent 55%),
    #120a08;
}

.theme-pfsw .slide {
  background:
    radial-gradient(1000px 520px at 8% -8%, rgba(212, 168, 72, 0.16), transparent 52%),
    radial-gradient(820px 560px at 108% 118%, rgba(192, 64, 64, 0.22), transparent 55%),
    linear-gradient(165deg, #241410 0%, #140c0a 48%, #1c1210 100%);
}

.theme-pfsw .slide::before {
  inset: 18px;
  border: 1px solid rgba(212, 168, 72, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(192, 64, 64, 0.12);
}
.theme-pfsw .slide::after {
  inset: 26px;
  border: 1px dashed rgba(212, 168, 72, 0.22);
}
.theme-pfsw .slide.bleed::before {
  border-color: rgba(240, 208, 120, 0.4);
}

.theme-pfsw .kicker {
  font-family: "Special Elite", Cinzel, serif;
  letter-spacing: 0.2em;
  font-weight: 400;
  color: #d4a848;
}
.theme-pfsw .kicker::before {
  width: 18px;
  height: 18px;
  background: #d4a848;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.theme-pfsw h1 {
  text-shadow: 0 2px 0 #1a0c08, 0 0 28px rgba(192, 64, 64, 0.3);
}
.theme-pfsw h2 {
  font-size: 52px;
}

.theme-pfsw .formula {
  font-family: "Special Elite", "JetBrains Mono", monospace;
  font-size: 30px;
  letter-spacing: 0.03em;
  background: #1a100c;
  border: 2px solid #d4a848;
  border-left: 10px solid #c04040;
  box-shadow: 4px 4px 0 #0a0604;
}

.theme-pfsw .card .tag {
  font-family: "Special Elite", Cinzel, serif;
}

.theme-pfsw .progress > span {
  background: linear-gradient(90deg, #c04040, #d4a848, #7a4aaa);
  box-shadow: 0 0 12px rgba(192, 64, 64, 0.45);
}

.theme-pfsw .primer-toolbar {
  background: #1a100c;
  border-bottom: 2px solid rgba(212, 168, 72, 0.35);
  letter-spacing: 0.14em;
}
.theme-pfsw .primer-toolbar__btn:hover,
.theme-pfsw .primer-toolbar a:hover {
  color: #f0d078;
}

.theme-pfsw .primer-nav {
  color: #d4a848;
  background: linear-gradient(90deg, rgba(26, 16, 12, 0.85), transparent);
}
.theme-pfsw .primer-nav--next {
  background: linear-gradient(270deg, rgba(26, 16, 12, 0.85), transparent);
}

.theme-pfsw .overlay .box {
  background: #1e1210;
  border: 2px solid #d4a848;
  box-shadow: 4px 4px 0 #0a0604;
}

@media (hover: hover) {
  .theme-pfsw .primer-nav { opacity: 0.6; }
}
