    * { box-sizing: border-box; margin: 0; padding: 0; }
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    html {
      scroll-behavior: smooth;
      scroll-padding-top: 108px;
    }

    body {
      background: #06060f;
      color: #d4d0e8;
      font-family: 'Nunito', sans-serif;
      overflow-x: hidden;
    }

    .history-chapter-tint {
      --history-tint-r: 100;
      --history-tint-g: 50;
      --history-tint-b: 200;
      --history-tint-opacity: 0;
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background: radial-gradient(ellipse 90% 55% at 50% 38%, rgba(var(--history-tint-r), var(--history-tint-g), var(--history-tint-b), var(--history-tint-opacity)), transparent 72%);
      mix-blend-mode: screen;
      transform: translateZ(0);
    }
    code { font-size: .92em; background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; font-family: monospace; color: #c9b8ff; }

    /* ── AMBIENT NEBULA LAYERS (fixed, behind everything) ── */
    .nebula-layer {
      position: fixed;
      top: 0; left: 0; width: 100%; height: 100%;
      z-index: 0;
      pointer-events: none;
      will-change: transform;
    }
    .nebula-layer .neb {
      position: absolute;
      border-radius: 50%;
      filter: blur(100px);
      opacity: 0;
      animation: nebulaFloat 20s ease-in-out infinite;
      will-change: transform;
      transform: translate3d(0, 0, 0);
      backface-visibility: hidden;
    }
    .neb-1 { width: 500px; height: 500px; background: rgba(99,102,241,.08); top: 10%; left: -5%; animation-delay: 0s; }
    .neb-2 { width: 600px; height: 400px; background: rgba(168,85,247,.06); top: 40%; right: -10%; animation-delay: -7s; }
    .neb-3 { width: 400px; height: 400px; background: rgba(6,182,212,.05); bottom: 10%; left: 30%; animation-delay: -14s; }
    .neb-4 { width: 350px; height: 350px; background: rgba(232,121,168,.04); top: 60%; left: 10%; animation-delay: -3s; }
    .neb-5 { width: 300px; height: 300px; background: rgba(251,191,36,.03); top: 75%; right: 5%; animation-delay: -10s; }
    @keyframes nebulaFloat {
      0%, 100% { opacity: 0; transform: scale(.8) translateY(20px); }
      30%, 70% { opacity: 1; transform: scale(1) translateY(0); }
    }

    /* override nav on this page */
    nav { background: rgba(10,10,30,.85) !important; border-bottom-color: rgba(168,85,247,.25) !important; box-shadow: 0 2px 24px rgba(168,85,247,.15) !important; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .nav-logo { color: #c9b8ff !important; }
    .nav-links a { color: #b0a8d0 !important; }
    .nav-links a:hover { background: rgba(168,85,247,.12) !important; color: #e0d0ff !important; }
    .nav-links a.join { background: linear-gradient(135deg, #a855f7, #6d28d9) !important; color: #fff !important; }
    .nav-links a.join:hover { background: linear-gradient(135deg, #c084fc, #7c3aed) !important; }
    .nav-dropdown-btn { color: #b0a8d0 !important; }
    .nav-dropdown-btn:hover { background: rgba(168,85,247,.12) !important; color: #e0d0ff !important; }
    .nav-dropdown-menu { background: rgba(15,15,35,.95) !important; border-color: rgba(168,85,247,.25) !important; box-shadow: 0 8px 32px rgba(100,50,200,.3) !important; }
    .nav-dropdown-menu a { color: #b0a8d0 !important; }
    .nav-dropdown-menu a:hover { background: rgba(168,85,247,.15) !important; color: #e0d0ff !important; }
    .nav-dropdown-menu .menu-divider { background: rgba(168,85,247,.15) !important; }
    .gs-input { background: rgba(255,255,255,.06) !important; border-color: rgba(168,85,247,.25) !important; color: #d4d0e8 !important; }
    .gs-input:focus { border-color: #a855f7 !important; box-shadow: 0 0 0 3px rgba(168,85,247,.15) !important; }
    .gs-input::placeholder { color: rgba(168,85,247,.35) !important; }
    .gs-results { background: rgba(15,15,35,.95) !important; border-color: rgba(168,85,247,.25) !important; }
    .gs-item { color: #d4d0e8 !important; }
    .gs-item:hover, .gs-item.active { background: rgba(168,85,247,.15) !important; color: #e0d0ff !important; }

    /* override footer on this page */
    footer { background: transparent !important; color: #706890 !important; }
    footer a { color: #a78bfa !important; }

    /* starfield canvas */
    #starfield { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

    /* everything else sits above stars */
    .hero-history, .history-main, .history-layout, .cast-wrap, .closing, .closing-journey, footer { position: relative; z-index: 1; }
    nav { position: sticky; z-index: 100; transition: opacity .35s ease, visibility .35s ease; }
    body.closing-journey-active nav {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }
    body.closing-journey-active .rainbow {
      opacity: 0;
      transition: opacity .35s ease;
    }
    body.closing-journey-active #starfield,
    body.closing-journey-active .nebula-layer {
      opacity: 0.12;
      transition: opacity .45s ease;
    }

    .rainbow { height: 3px; background: linear-gradient(90deg,#a855f7,#6366f1,#3b82f6,#06b6d4,#a855f7); background-size: 300%; animation: rb 4s linear infinite; position: relative; z-index: 1; }
    @keyframes rb { 0%{background-position:0%} 100%{background-position:300%} }

    /* ── HERO (full viewport) ── */
    .hero-history {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      min-height: 100vh;
      min-height: 100svh;
      padding: 80px 20px 48px;
      background:
        radial-gradient(ellipse at 30% 20%, rgba(99,102,241,.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(168,85,247,.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(100,50,200,.18) 0%, transparent 70%);
      border-bottom: 1px solid rgba(168,85,247,.1);
      position: relative;
      overflow: hidden;
    }
    .hero-history::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='.6' fill='%23a78bfa' opacity='.08'/%3E%3C/svg%3E");
      pointer-events: none;
    }
    .hero-logo-wrap {
      position: relative;
      display: inline-block;
      margin-bottom: 18px;
      animation: heroFadeIn 1s ease both;
      cursor: pointer;
    }
    .hero-logo-peel-stack {
      display: grid;
      width: 140px;
      grid-template-columns: 1fr;
      grid-template-rows: 1fr;
      justify-items: center;
      align-items: start;
      transform-origin: center center;
    }
    .hero-logo-layer {
      grid-row: 1;
      grid-column: 1;
      display: block;
      width: 100%;
      height: auto;
      box-shadow: 0 0 40px rgba(168,85,247,.35), 0 0 80px rgba(100,50,200,.15);
      transition: box-shadow .35s ease;
    }
    .hero-logo-base {
      z-index: 1;
      filter: brightness(0.94);
    }
    .hero-logo-peel-top {
      z-index: 2;
      transform-origin: 92% 4%;
      transition: transform .1s;
    }
    .hero-logo-peel-stack:hover .hero-logo-peel-top:not(.is-peeling):not(.logo-flick-out):not(.logo-flick-in) {
      box-shadow: 0 0 48px rgba(168,85,247,.5), 0 0 100px rgba(100,50,200,.22);
    }
    .hero-logo-peel-top.is-peeling {
      transform-origin: 50% 50%;
      pointer-events: none;
    }
    .hero-logo-peel-top.is-peeling:not(.peel-variant-rare) {
      animation: logoPeelDynamic 1.05s cubic-bezier(.42,.02,.18,1) forwards;
    }
    .hero-logo-peel-top.is-peeling.peel-variant-rare {
      animation: logoPeelDynamic 1.28s cubic-bezier(.34,.02,.12,1) forwards;
    }
    @keyframes logoPeelDynamic {
      0% {
        transform: translate3d(0,0,0) rotate(0deg) scale(1);
        opacity: 1;
        box-shadow: 0 0 40px rgba(168,85,247,.35), 0 0 80px rgba(100,50,200,.15);
      }
      100% {
        transform: translate3d(var(--peel-tx), var(--peel-ty), 0) rotate(var(--peel-r)) scale(0.74);
        opacity: 0;
        box-shadow: 16px 20px 40px rgba(0,0,0,.42);
      }
    }
    .hero-logo-peel-top.logo-flick-out {
      transform-origin: 50% 50%;
      pointer-events: none;
      animation: logoFlickClick 0.38s cubic-bezier(.18,.85,.12,1) forwards;
    }
    .hero-logo-peel-top.logo-flick-in {
      transform-origin: 50% 50%;
      pointer-events: none;
      animation: logoFlickIn 0.24s cubic-bezier(.2,.95,.24,1) both;
    }
    @keyframes logoFlickClick {
      0% {
        transform: translate3d(0,0,0) rotate(0deg) scale(1);
        opacity: 1;
      }
      100% {
        transform: translate3d(var(--flick-tx), var(--flick-ty), 0) rotate(var(--flick-r)) scale(0.52);
        opacity: 0;
      }
    }
    @keyframes logoFlickIn {
      0% {
        transform: translate3d(var(--flick-in-tx), var(--flick-in-ty), 0) rotate(var(--flick-in-r)) scale(0.68);
        opacity: 0;
      }
      100% {
        transform: translate3d(0,0,0) rotate(0deg) scale(1);
        opacity: 1;
      }
    }
    .hero-logo-peel-stack.logo-dance {
      animation: stackDance 5s cubic-bezier(.42,.08,.2,1) 5 both;
    }
    @keyframes stackDance {
      0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
      12% { transform: translate3d(-22px, -16px, 0) rotate(-11deg) scale(1.07); }
      28% { transform: translate3d(26px, -8px, 0) rotate(13deg) scale(1.08); }
      44% { transform: translate3d(-14px, -26px, 0) rotate(-6deg) scale(1.1); }
      58% { transform: translate3d(20px, 12px, 0) rotate(9deg) scale(1.05); }
      72% { transform: translate3d(-24px, 4px, 0) rotate(-12deg) scale(1.06); }
      86% { transform: translate3d(10px, -12px, 0) rotate(5deg) scale(1.03); }
    }
    .hero-logo-hint {
      position: absolute;
      bottom: -4px;
      right: -8px;
      width: 24px;
      height: 24px;
      line-height: 24px;
      text-align: center;
      font-family: 'Fredoka', sans-serif;
      font-size: 15px;
      font-weight: 700;
      color: #fff;
      background: linear-gradient(145deg, rgba(192,132,252,.95), rgba(109,40,217,.9));
      border-radius: 50%;
      border: 1px solid rgba(255,255,255,.28);
      pointer-events: none;
      z-index: 3;
      text-shadow: 0 1px 2px rgba(0,0,0,.25);
      animation: heroHintPulse 2.6s ease-in-out infinite;
      box-shadow: 0 0 14px rgba(168,85,247,.45);
    }
    @keyframes heroHintPulse {
      0%, 100% { opacity: .65; transform: scale(1); }
      50% { opacity: 1; transform: scale(1.08); }
    }
    @media (prefers-reduced-motion: reduce) {
      .hero-logo-hint { animation: none; opacity: .85; }
      .hero-logo-peel-stack.logo-dance { animation: stackDanceReduced 5s ease-in-out 5 both; }
    }
    @keyframes stackDanceReduced {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.055); }
    }
    .hero-logo-peel-stack:hover .hero-logo-peel-top:not(.is-peeling):not(.spin):not(.logo-flick-out):not(.logo-flick-in) {
      animation: logoShake .4s ease infinite;
    }
    .hero-logo-peel-top.spin {
      animation: logoSpin .5s cubic-bezier(.2,.8,.3,1);
    }
    @keyframes logoShake {
      0%, 100% { transform: translateX(0) rotate(0); }
      20% { transform: translateX(-3px) rotate(-2deg); }
      40% { transform: translateX(3px) rotate(2deg); }
      60% { transform: translateX(-2px) rotate(-1deg); }
      80% { transform: translateX(2px) rotate(1deg); }
    }
    @keyframes logoSpin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    .pootis-counter {
      position: absolute;
      font-family: 'Fredoka', sans-serif;
      font-size: 22px;
      font-weight: 700;
      color: #fff;
      background: rgba(168,85,247,.85);
      padding: 3px 12px;
      border-radius: 12px;
      pointer-events: none;
      opacity: 0;
      transform: scale(.5);
      transition: opacity .15s, transform .15s;
      white-space: nowrap;
      z-index: 2;
      text-shadow: 0 1px 4px rgba(0,0,0,.3);
    }
    .pootis-counter.show {
      opacity: 1;
      transform: scale(1);
    }
    .pootis-counter.pop {
      animation: counterPop .2s ease;
    }
    @keyframes counterPop {
      0% { transform: scale(1); }
      50% { transform: scale(1.35); }
      100% { transform: scale(1); }
    }
    .hero-logo-wrap canvas {
      position: absolute;
      top: -30px;
      left: -30px;
      pointer-events: none;
    }
    .hero-history h1 {
      font-family: 'Fredoka', sans-serif;
      font-size: 48px;
      font-weight: 700;
      color: #fff;
      margin-bottom: 10px;
      text-shadow: 0 0 60px rgba(168,85,247,.5), 0 0 120px rgba(100,50,200,.2), 0 2px 4px rgba(0,0,0,.3);
      letter-spacing: -0.5px;
      animation: heroGlow 4s ease-in-out infinite alternate, heroFadeIn 1.2s ease both;
    }
    @keyframes heroGlow {
      0% { text-shadow: 0 0 60px rgba(168,85,247,.4), 0 0 120px rgba(100,50,200,.15); }
      100% { text-shadow: 0 0 80px rgba(168,85,247,.6), 0 0 160px rgba(100,50,200,.25), 0 0 200px rgba(99,102,241,.1); }
    }
    @keyframes heroFadeIn {
      0% { opacity: 0; transform: translateY(18px); }
      100% { opacity: 1; transform: translateY(0); }
    }
    .hero-history .tagline {
      font-family: 'Nunito', sans-serif;
      font-size: 17px;
      line-height: 1.55;
      color: #b8aed8;
      font-style: italic;
      max-width: 520px;
      margin-left: auto;
      margin-right: auto;
      padding: 0 8px;
      animation: heroFadeIn 1s ease both;
      animation-delay: .4s;
    }
    .hero-year-range {
      display: inline-block;
      margin-top: 20px;
      font-family: 'Fredoka', sans-serif;
      font-size: 13px;
      font-weight: 700;
      color: #a78bfa;
      letter-spacing: 4px;
      text-transform: uppercase;
      padding: 6px 24px;
      border: 1px solid rgba(167,139,250,.2);
      border-radius: 2px;
      background: rgba(167,139,250,.06);
      animation: heroFadeIn 1s ease both;
      animation-delay: .7s;
    }
    .chapter-era-peel-interactive {
      cursor: pointer;
      border-radius: 3px;
      outline-offset: 3px;
    }
    .chapter-era-peel-interactive:focus-visible {
      outline: 2px solid rgba(196,181,253,.75);
    }
    .chapter-era-peel-caption-hint {
      display: block;
      margin-top: 4px;
      font-size: 10px;
      opacity: .65;
      font-style: normal;
      font-weight: 500;
    }
    .story-deep-target {
      scroll-margin-top: 112px;
      border-radius: 4px;
      transition: box-shadow .25s ease, background-color .25s ease;
    }
    .story-deep-target:target {
      animation: storyDeepPulse 2.4s ease-out 1;
    }
    @keyframes storyDeepPulse {
      0% {
        box-shadow: 0 0 0 0 rgba(196,181,253,0);
        background-color: transparent;
      }
      8% {
        box-shadow: 0 0 0 3px rgba(196,181,253,.45), 0 0 28px rgba(168,85,247,.2);
        background-color: rgba(167,139,250,.09);
      }
      55% {
        box-shadow: 0 0 0 2px rgba(196,181,253,.22);
        background-color: rgba(167,139,250,.04);
      }
      100% {
        box-shadow: none;
        background-color: transparent;
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .story-deep-target:target { animation: none !important; }
    }
    .hero-scroll-hint {
      position: absolute;
      bottom: 32px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      animation: heroFadeIn 1s ease both, heroFloat 2.4s ease-in-out infinite;
      animation-delay: 1.4s, 2.4s;
    }
    .hero-scroll-hint span {
      font-family: 'Fredoka', sans-serif;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: rgba(167,139,250,.45);
    }
    .hero-scroll-hint svg {
      width: 18px;
      height: 18px;
      stroke: rgba(167,139,250,.4);
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    @keyframes heroFloat {
      0%, 100% { transform: translateX(-50%) translateY(0); }
      50% { transform: translateX(-50%) translateY(6px); }
    }

    /* shooting star */
    .shooting-star {
      position: absolute;
      width: 80px;
      height: 1px;
      background: linear-gradient(90deg, rgba(167,139,250,.6), transparent);
      border-radius: 1px;
      opacity: 0;
      animation: shootingStar 3s ease-in-out infinite;
    }
    .shooting-star:nth-child(1) { top: 25%; left: 10%; animation-delay: 0s; transform: rotate(-15deg); }
    .shooting-star:nth-child(2) { top: 40%; right: 15%; animation-delay: 1.5s; transform: rotate(-25deg); width: 60px; }
    .shooting-star:nth-child(3) { top: 15%; left: 50%; animation-delay: 2.8s; transform: rotate(-10deg); width: 100px; }
    @keyframes shootingStar {
      0% { opacity: 0; transform: translateX(0) rotate(-15deg); }
      5% { opacity: .8; }
      30% { opacity: 0; transform: translateX(200px) rotate(-15deg); }
      100% { opacity: 0; }
    }

    /* ── SCROLL REVEAL ── */
    .reveal {
      opacity: 0;
      transform: translateY(32px);
      transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
    }
    .reveal.visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* ── STORY LAYOUT (single narrative column) ── */
    .history-layout {
      max-width: 720px;
      margin: 0 auto;
      padding: 0 20px 20px;
    }

    .story-flow {
      padding: 28px 0 8px;
    }

    /* ── CHAPTER JUMP (sticky under site nav) ── */
    .story-jump-wrap {
      position: sticky;
      top: 56px;
      z-index: 90;
      margin: 0 -8px 20px;
      padding: 10px 8px 12px;
      background: linear-gradient(180deg, rgba(6,6,15,.98) 50%, rgba(6,6,15,.75) 100%);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(168,85,247,.14);
    }
    .story-jump {
      border: none;
      border-radius: 0;
      background: transparent;
      padding: 4px 0 10px;
      box-shadow: none;
    }
    .story-jump-h {
      display: block;
      font-family: 'Fredoka', sans-serif;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: #706890;
      margin-bottom: 8px;
    }
    .story-jump-scroll {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }
    .story-jump-scroll a {
      font-family: 'Fredoka', sans-serif;
      font-size: 11px;
      font-weight: 600;
      color: #a098c0;
      text-decoration: none;
      padding: 6px 12px 6px 10px;
      border-radius: 0 6px 6px 0;
      border: 1px solid rgba(167,139,250,.14);
      border-left: 3px solid rgba(167,139,250,.42);
      background: linear-gradient(90deg, rgba(167,139,250,.12) 0%, rgba(12,12,28,.35) 55%);
      transition: color .15s, border-color .15s, background .15s, border-left-color .15s;
      white-space: nowrap;
    }
    .story-jump-scroll a:hover {
      color: #e8e0ff;
      border-color: rgba(167,139,250,.32);
      border-left-color: #c4b5fd;
      background: linear-gradient(90deg, rgba(167,139,250,.2) 0%, rgba(20,20,40,.5) 55%);
    }
    .story-jump-scroll a:focus-visible {
      outline: 2px solid #a78bfa;
      outline-offset: 2px;
    }

    .story-lede {
      font-size: 17px;
      line-height: 1.78;
      color: #b0a6d0;
      margin: 0 0 36px;
      padding: 16px 0 16px 22px;
      border-left: 3px solid rgba(167,139,250,.4);
    }

    .chapter-rule {
      display: flex;
      align-items: center;
      gap: 14px;
      margin: 0 0 22px;
    }
    .chapter-rule::before,
    .chapter-rule::after {
      content: '';
      flex: 1;
      height: 1px;
      border-radius: 2px;
      background: linear-gradient(90deg, transparent, rgba(167,139,250,.35), transparent);
    }
    .chapter-rule span {
      font-size: 15px;
      flex-shrink: 0;
      opacity: .9;
    }

    /* ── STORY CHAPTER (flat: margin line + rule, not a floating card) ── */
    .story-chapter {
      position: relative;
      margin-bottom: 0;
      padding: 28px 12px 36px 22px;
      scroll-margin-top: 108px;
      background: transparent;
      border: none;
      border-left: 3px solid rgba(167,139,250,.32);
      border-radius: 0;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      transition: border-left-color .2s ease, background .2s ease, opacity .5s, translate .5s;
    }
    .story-chapter[data-color="pink"]   { border-left-color: rgba(232,121,168,.42); }
    .story-chapter[data-color="lav"]    { border-left-color: rgba(167,139,250,.38); }
    .story-chapter[data-color="mint"]   { border-left-color: rgba(52,211,153,.38); }
    .story-chapter[data-color="yellow"] { border-left-color: rgba(251,191,36,.4); }
    .story-chapter[data-color="orange"] { border-left-color: rgba(251,146,60,.42); }

    .story-chapter:target {
      background: rgba(167,139,250,.05);
      border-left-width: 4px;
      border-left-color: #c4b5fd;
    }
    .story-chapter[data-color="pink"]:target   { background: rgba(232,121,168,.06); border-left-color: #f9a8d4; }
    .story-chapter[data-color="lav"]:target    { background: rgba(167,139,250,.07); border-left-color: #ddd6fe; }
    .story-chapter[data-color="mint"]:target   { background: rgba(52,211,153,.06); border-left-color: #6ee7b7; }
    .story-chapter[data-color="yellow"]:target { background: rgba(251,191,36,.07); border-left-color: #fcd34d; }
    .story-chapter[data-color="orange"]:target { background: rgba(251,146,60,.07); border-left-color: #fdba74; }

    .story-chapter::after { content: none; display: none; }

    .story-chapter[data-color="pink"]:hover   { border-left-color: rgba(244,168,198,.75); }
    .story-chapter[data-color="lav"]:hover    { border-left-color: rgba(196,181,253,.75); }
    .story-chapter[data-color="mint"]:hover   { border-left-color: rgba(110,231,183,.75); }
    .story-chapter[data-color="yellow"]:hover { border-left-color: rgba(253,224,71,.8); }
    .story-chapter[data-color="orange"]:hover { border-left-color: rgba(253,186,116,.85); }

    .story-chapter.reveal { opacity: 0; translate: 0 22px; }
    .story-chapter.visible { opacity: 1; translate: 0 0; }

    .chapter-when {
      font-family: 'Fredoka', sans-serif;
      font-size: 11px;
      font-weight: 700;
      color: #8878a8;
      text-transform: uppercase;
      letter-spacing: 2px;
      margin-bottom: 8px;
    }
    /* Era read as a dateline: left rule + open right (not a pill) */
    .chapter-when .when-pill {
      font-size: 12px;
      letter-spacing: .04em;
      text-transform: none;
      display: inline-block;
      padding: 2px 0 3px 14px;
      margin-left: 10px;
      vertical-align: middle;
      border-radius: 0;
      background: transparent;
      border: none;
      border-left: 3px solid;
      font-variant-numeric: tabular-nums;
    }
    .story-chapter[data-color="pink"] .when-pill   { color: #f0a0c4; border-left-color: rgba(232,121,168,.55); }
    .story-chapter[data-color="lav"] .when-pill    { color: #c9b8ff; border-left-color: rgba(167,139,250,.55); }
    .story-chapter[data-color="mint"] .when-pill   { color: #6ee7b7; border-left-color: rgba(52,211,153,.5); }
    .story-chapter[data-color="yellow"] .when-pill { color: #fcd34d; border-left-color: rgba(251,191,36,.5); }
    .story-chapter[data-color="orange"] .when-pill { color: #fdba74; border-left-color: rgba(251,146,60,.5); }

    /* GP RGBA chapter — extra vertical rhythm (title + banner + meta + peel + map + audio) */
    #chapter-gp-rgba h2.chapter-title {
      margin-bottom: 14px;
    }
    #chapter-gp-rgba .chapter-meta {
      margin-bottom: 36px;
      padding-bottom: 4px;
    }
    #chapter-gp-rgba .chapter-era-logo.chapter-era-logo-peel {
      margin-top: 4px;
      margin-bottom: 36px;
    }
    #chapter-gp-rgba #rgba-era-peel-caption {
      margin-top: 16px;
      line-height: 1.5;
    }
    #chapter-gp-rgba .gp-rgba-media-map {
      margin: 0 0 44px;
      text-align: center;
    }
    #chapter-gp-rgba .gp-rgba-media-map img {
      max-width: 100%;
      height: auto;
      border-radius: 6px;
      box-shadow: 0 4px 22px rgba(0, 0, 0, 0.38);
      vertical-align: middle;
    }
    #chapter-gp-rgba .gp-rgba-map-caption {
      font-family: 'Nunito', sans-serif;
      font-size: 13px;
      color: #a098c0;
      margin-top: 14px;
      font-style: italic;
      line-height: 1.5;
      max-width: 40em;
      margin-left: auto;
      margin-right: auto;
    }
    #chapter-gp-rgba .gp-rgba-audio {
      margin-top: 0;
      margin-bottom: 32px;
      max-width: 480px;
    }
    /* In-joke banner sits after era kit (peel / map / audio); then narrative */
    #chapter-gp-rgba .gp-rgba-banner-meme {
      margin: 8px auto 36px;
      text-align: center;
      max-width: 100%;
    }
    #chapter-gp-rgba .gp-rgba-banner-meme img {
      max-width: 100%;
      height: auto;
      border-radius: 6px;
      box-shadow: 0 4px 22px rgba(0, 0, 0, 0.38);
      vertical-align: middle;
    }
    #chapter-gp-rgba .gp-rgba-narrative-wrap {
      margin-top: 0;
      padding-top: 28px;
      border-top: 1px solid rgba(251, 146, 60, 0.16);
    }
    #chapter-gp-rgba .gp-rgba-audio-inner {
      padding: 22px 22px 26px;
    }
    #chapter-gp-rgba .gp-rgba-audio-title {
      margin-bottom: 8px;
    }
    #chapter-gp-rgba .gp-rgba-audio-track {
      margin-bottom: 18px;
    }
    #chapter-gp-rgba .gp-rgba-audio-note {
      margin-top: 16px;
      line-height: 1.55;
    }
    #chapter-gp-rgba .gp-rgba-narrative-wrap .story-prose {
      margin-top: 0;
    }

    h2.chapter-title {
      font-family: 'Fredoka', sans-serif;
      font-size: 26px;
      font-weight: 700;
      color: #ece6ff;
      margin: 0 0 6px;
      line-height: 1.2;
    }
    h2.chapter-title small {
      display: block;
      margin-top: 6px;
      font-size: 14px;
      font-weight: 600;
      color: #9888b8;
    }

    .chapter-meta {
      font-size: 13px;
      color: #9088b0;
      margin: 0 0 16px;
      line-height: 1.55;
    }
    .chapter-meta dd {
      margin: 0 0 8px;
      padding: 0;
    }
    .chapter-meta dd:last-child { margin-bottom: 0; }

    .chapter-era-logo {
      margin: 4px 0 18px;
      text-align: center;
    }
    .chapter-era-logo img {
      max-width: min(220px, 88vw);
      height: auto;
      border-radius: 2px;
      box-shadow: none;
      border: 1px solid rgba(167,139,250,.18);
      vertical-align: middle;
    }
    .chapter-era-peel-stack {
      display: grid;
      width: min(184px, 88vw);
      max-width: min(220px, 88vw);
      margin: 0 auto;
      grid-template-columns: 1fr;
      grid-template-rows: 1fr;
      justify-items: center;
      align-items: start;
    }
    .chapter-era-peel-layer {
      grid-row: 1;
      grid-column: 1;
      display: block;
      width: 100%;
      height: auto;
      border-radius: 2px;
      border: 1px solid rgba(167,139,250,.18);
      vertical-align: middle;
      box-shadow: none;
    }
    .chapter-era-peel-base {
      z-index: 1;
      filter: brightness(0.94);
    }
    .chapter-era-peel-top {
      z-index: 2;
      transform-origin: 92% 4%;
    }
    .chapter-era-peel-top.is-peeling {
      transform-origin: 50% 50%;
      pointer-events: none;
    }
    .chapter-era-peel-top.is-peeling:not(.peel-variant-rare) {
      animation: logoPeelDynamic 1.05s cubic-bezier(.42,.02,.18,1) forwards;
    }
    .chapter-era-peel-top.is-peeling.peel-variant-rare {
      animation: logoPeelDynamic 1.28s cubic-bezier(.34,.02,.12,1) forwards;
    }
    .chapter-era-logo figcaption {
      margin-top: 8px;
      font-size: 11.5px;
      color: #8878a8;
      letter-spacing: 0.02em;
    }
    .chapter-era-logo.chapter-era-wide img {
      max-width: min(720px, 100%);
    }
    /* Mcres Days — wide white-on-transparent mark */
    .chapter-era-logo.mcres-days-logo {
      display: block;
      width: fit-content;
      max-width: 100%;
      margin-left: auto;
      margin-right: auto;
      padding: 14px 22px 16px;
      background: rgba(6, 22, 26, 0.94);
      border-radius: 10px;
      border: 1px solid rgba(52, 211, 153, 0.22);
      box-shadow: 0 6px 28px rgba(0, 0, 0, 0.28);
      box-sizing: border-box;
    }
    .chapter-era-logo.mcres-days-logo img {
      max-width: min(400px, 88vw);
      max-height: 92px;
      width: auto;
      height: auto;
      object-fit: contain;
      border: none;
      box-shadow: none;
      vertical-align: middle;
    }
    .chapter-era-logo.chapter-chat-cap img {
      max-width: min(960px, 100%);
      border-radius: 2px;
      border: 1px solid rgba(167,139,250,.15);
      box-shadow: none;
    }
    .story-prose .chapter-era-logo {
      margin: 22px 0;
    }

    .pbc-intro-audio,
    .te-era-audio,
    .gp-rgba-audio {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      margin: 0 auto 22px;
      max-width: 440px;
      padding: 0;
      background: transparent;
      border: none;
    }
    .pbc-intro-audio-inner,
    .te-era-audio-inner,
    .gp-rgba-audio-inner {
      width: 100%;
      padding: 14px 16px 16px 18px;
      border-radius: 0;
      background: rgba(6, 6, 14, 0.4);
      border: none;
      border-left: 3px solid rgba(52, 211, 153, 0.45);
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    .te-era-audio-inner {
      border-left-color: rgba(251, 191, 36, 0.58);
    }
    .gp-rgba-audio-inner {
      border-left-color: rgba(251, 146, 60, 0.62);
    }
    .pbc-intro-audio-title,
    .te-era-audio-title,
    .gp-rgba-audio-title {
      margin: 0 0 2px;
      font-family: 'Fredoka', sans-serif;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: #a78bfa;
    }
    .pbc-intro-audio-track,
    .te-era-audio-track,
    .gp-rgba-audio-track {
      margin: 0 0 14px;
      font-size: 14px;
      font-weight: 600;
      color: #c8c0e0;
    }
    .pbc-intro-audio-track cite {
      font-style: normal;
      color: #6ee7b7;
    }
    .te-era-audio-track cite {
      font-style: normal;
      color: #fcd34d;
    }
    .gp-rgba-audio-track cite {
      font-style: normal;
      color: #fdba74;
    }
    .pbc-intro-audio-bar,
    .te-era-audio-bar,
    .gp-rgba-audio-bar {
      width: 100%;
      max-width: 340px;
      margin: 0 auto 10px;
      padding: 6px 8px;
      border-radius: 2px;
      background: rgba(6, 6, 15, 0.65);
      border: 1px solid rgba(167, 139, 250, 0.14);
    }
    .pbc-intro-audio audio,
    .te-era-audio audio,
    .gp-rgba-audio audio {
      display: block;
      width: 100%;
      height: 34px;
      margin: 0;
      border-radius: 2px;
      accent-color: #6ee7b7;
    }
    .te-era-audio audio {
      accent-color: #fbbf24;
    }
    .gp-rgba-audio audio {
      accent-color: #fb923c;
    }
    .pbc-intro-audio-note,
    .te-era-audio-note,
    .gp-rgba-audio-note {
      margin: 0;
      font-size: 11.5px;
      color: #706890;
      font-style: italic;
      max-width: 32em;
      margin-left: auto;
      margin-right: auto;
      line-height: 1.45;
    }

    .story-prose {
      font-size: 16px;
      line-height: 1.82;
      color: #c8c0e0;
    }
    .story-prose p { margin-bottom: 14px; }
    .story-prose p:last-child { margin-bottom: 0; }
    .story-prose strong { color: #e8e0ff; }

    .chapter-echo {
      font-family: 'Fredoka', sans-serif;
      font-size: 13px;
      color: #b8a0e8;
      font-style: italic;
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px dashed rgba(167,139,250,.18);
    }

    .rip-banner {
      text-align: center;
      font-family: 'Fredoka', sans-serif;
      font-size: 14px;
      font-weight: 700;
      color: #e0d0ff;
      background: rgba(168,85,247,.12);
      border: none;
      border-left: 3px solid rgba(168,85,247,.45);
      padding: 8px 16px 8px 18px;
      border-radius: 0;
      margin-top: 14px;
      display: inline-block;
    }
    .conspiracy-box {
      background: rgba(251,191,36,.04);
      border: none;
      border-left: 2px dashed rgba(251,191,36,.35);
      border-radius: 0;
      padding: 14px 14px 14px 18px;
      margin-top: 14px;
      font-size: 13px;
      color: #c8c0e0;
      font-style: italic;
    }
    .conspiracy-box::before {
      content: '🕵️ SIDE NOTE: ';
      font-style: normal;
      font-weight: 900;
      font-family: 'Fredoka', sans-serif;
      color: #fbbf24;
    }
    .conspiracy-box a { color: #fbbf24 !important; }
    .chapter-glyph {
      text-align: center;
      padding: 16px 0 4px;
      font-size: 40px;
      line-height: 1;
      margin-top: 4px;
      opacity: .85;
    }

    /* ── RECOVERED DOCUMENT ── */
    .recovered-doc {
      background: rgba(6,6,14,.35);
      border: none;
      border-left: 2px dashed rgba(167,139,250,.28);
      border-radius: 0;
      padding: 16px 12px 14px 20px;
      margin-top: 16px;
      font-size: 13px;
      line-height: 1.6;
      color: #b0a8c8;
      position: relative;
    }
    .recovered-doc::before {
      content: '>> THE RECOVERED DOCUMENT AREA <<<';
      display: block;
      font-family: 'Fredoka', sans-serif;
      font-size: 11px;
      font-weight: 700;
      color: #706890;
      letter-spacing: 0.5px;
      margin-bottom: 10px;
      padding-bottom: 8px;
      border-bottom: 1px dashed rgba(167,139,250,.15);
    }
    .recovered-doc .doc-title {
      font-family: 'Fredoka', sans-serif;
      font-size: 15px;
      font-weight: 700;
      color: #d4d0e8;
      margin-bottom: 4px;
    }
    .recovered-doc .doc-meta {
      font-size: 11px;
      color: #706890;
      margin-bottom: 10px;
      font-style: italic;
    }
    .recovered-doc .doc-meta a { color: #a78bfa !important; }
    .recovered-doc blockquote {
      margin: 8px 0;
      padding: 10px 12px 10px 14px;
      background: rgba(167,139,250,.04);
      border-left: 2px solid rgba(167,139,250,.28);
      border-radius: 0;
      font-size: 12.5px;
      font-style: italic;
      color: #b0a8c8;
    }
    .recovered-doc blockquote p { margin: 0 0 0.65em; }
    .recovered-doc blockquote p:last-child { margin-bottom: 0; }
    .recovered-doc .doc-comment {
      margin-top: 10px;
      padding: 10px 12px 10px 14px;
      background: rgba(167,139,250,.04);
      border-left: 1px solid rgba(167,139,250,.15);
      border-radius: 0;
      font-size: 12px;
    }
    .recovered-doc .doc-comment .commenter {
      font-family: 'Fredoka', sans-serif;
      font-weight: 700;
      color: #c9b8ff;
      font-size: 12px;
    }
    .recovered-doc .doc-comment .comment-text {
      margin-top: 4px;
      font-style: italic;
      color: #a098c0;
    }
    .recovered-doc .doc-narrator {
      margin-top: 10px;
      font-style: normal;
      font-weight: 700;
      color: #a78bfa;
      font-family: 'Fredoka', sans-serif;
      font-size: 12px;
    }

    /* ── REGULAR QUOTES (in-game chat, logs) ── */
    .regular-quotes {
      margin: 22px 0 6px;
      padding: 12px 16px;
      background: rgba(6,6,14,.35);
      border-left: 2px solid rgba(167,139,250,.3);
    }
    .regular-quotes-label {
      font-family: 'Fredoka', sans-serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: #605878;
      margin-bottom: 8px;
    }
    .regular-quotes .rq-line {
      font-family: 'Nunito', sans-serif;
      font-size: 13px;
      line-height: 1.5;
      color: #b0a8c8;
      font-style: italic;
      margin: 0 0 5px;
    }
    .regular-quotes .rq-line:last-child { margin-bottom: 0; }
    .regular-quotes .rq-attr {
      font-style: normal;
      font-size: 11px;
      color: #7868a0;
      font-weight: 600;
    }

    /* ── CAST (profiles live here; story reads above) ── */
    #cast-wrap { scroll-margin-top: 108px; }

    .cast-wrap {
      max-width: 920px;
      margin: 0 auto;
      padding: 36px 20px 8px;
      border-top: 1px solid rgba(167,139,250,.12);
    }
    .cast-wrap h2 {
      font-family: 'Fredoka', sans-serif;
      font-size: 26px;
      font-weight: 700;
      color: #e8e0ff;
      text-align: center;
      margin-bottom: 10px;
    }
    .cast-intro {
      text-align: center;
      font-size: 14px;
      line-height: 1.65;
      color: #8878a8;
      max-width: 520px;
      margin: 0 auto 24px;
    }

    .sidebar {
      position: relative;
      top: auto;
      padding-top: 0;
      max-height: none;
      overflow: visible;
      margin: 0 auto;
      max-width: 440px;
      scrollbar-width: thin;
      scrollbar-color: rgba(167,139,250,.2) transparent;
    }
    .sidebar-label {
      font-family: 'Fredoka', sans-serif;
      font-size: 13px;
      font-weight: 700;
      color: #706890;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      margin-bottom: 12px;
      text-align: center;
    }

    /* ── PROFILE (sidebar panel — flat strip, not a card) ── */
    .profile-card {
      background: rgba(6,6,14,.45);
      border: none;
      border-left: 3px solid rgba(167,139,250,.42);
      border-radius: 0;
      overflow: visible;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      margin-bottom: 16px;
      display: none;
    }
    .profile-card.show {
      display: block;
      animation: cardIn .35s cubic-bezier(.22,1,.36,1) both;
    }
    .profile-card.hiding {
      display: block;
      animation: cardOut .25s ease both;
    }
    @keyframes cardIn {
      0%   { opacity: 0; transform: translateY(8px); }
      100% { opacity: 1; transform: translateY(0); }
    }
    @keyframes cardOut {
      0%   { opacity: 1; transform: translateY(0); }
      100% { opacity: 0; transform: translateY(-6px); }
    }
    .profile-card.show:hover {
      box-shadow: none;
      border-left-color: #c4b5fd;
      transform: none;
    }

    .profile-banner {
      height: 4px;
      opacity: .5;
    }
    .profile-inner {
      padding: 16px 18px 14px;
    }

    /* staggered child reveal */
    .profile-card.show .profile-head,
    .profile-card.show .profile-title,
    .profile-card.show .profile-bio,
    .profile-card.show .profile-quote,
    .profile-card.show .profile-stats,
    .profile-card.show .profile-eras {
      animation: fadeUp .3s ease both;
    }
    .profile-card.show .profile-head    { animation-delay: .06s; }
    .profile-card.show .profile-title   { animation-delay: .10s; }
    .profile-card.show .profile-bio     { animation-delay: .15s; }
    .profile-card.show .profile-quote   { animation-delay: .20s; }
    .profile-card.show .profile-stats   { animation-delay: .25s; }
    .profile-card.show .profile-eras    { animation-delay: .30s; }
    @keyframes fadeUp {
      0%   { opacity: 0; transform: translateY(8px); }
      100% { opacity: 1; transform: translateY(0); }
    }

    .profile-head {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 10px;
    }
    .profile-avatar {
      font-size: 32px;
      line-height: 1;
      flex-shrink: 0;
      transition: transform .3s cubic-bezier(.22,1,.36,1);
    }
    .profile-card.show:hover .profile-avatar {
      transform: scale(1.15) rotate(-6deg);
    }
    .profile-name {
      font-family: 'Fredoka', sans-serif;
      font-size: 18px;
      font-weight: 700;
      color: #e0d0ff;
      line-height: 1.2;
    }
    .profile-aka {
      font-size: 11px;
      color: #a78bfa;
      font-weight: 700;
      font-family: 'Fredoka', sans-serif;
    }
    .profile-title {
      font-family: 'Fredoka', sans-serif;
      font-size: 11px;
      font-weight: 600;
      color: #c9b8ff;
      background: transparent;
      border: none;
      border-left: 2px solid rgba(167,139,250,.45);
      display: inline-block;
      padding: 2px 0 2px 10px;
      border-radius: 0;
      margin-bottom: 10px;
      letter-spacing: .04em;
      text-transform: uppercase;
    }
    .profile-bio {
      font-size: 12.5px;
      line-height: 1.6;
      color: #b0a8c8;
    }
    .profile-quote {
      font-size: 11.5px;
      color: #8878a8;
      font-style: italic;
      margin-top: 8px;
      padding: 6px 8px 6px 12px;
      background: rgba(167,139,250,.04);
      border-radius: 0;
      border-left: 2px solid rgba(167,139,250,.25);
      transition: border-color .3s ease;
    }
    .profile-card.show:hover .profile-quote { border-left-color: #a78bfa; }
    .profile-quote::before { content: '\201C'; font-weight: 900; color: #706890; }
    .profile-quote::after  { content: '\201D'; font-weight: 900; color: #706890; }

    .profile-stats {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px dashed rgba(167,139,250,.15);
    }
    .profile-stat {
      font-family: 'Fredoka', sans-serif;
      font-size: 10px;
      font-weight: 600;
      background: rgba(12,12,28,.4);
      color: #a098c0;
      padding: 3px 9px 3px 8px;
      border-radius: 0 3px 3px 0;
      white-space: nowrap;
      border: 1px solid rgba(167,139,250,.12);
      border-left: 2px solid rgba(167,139,250,.35);
      transition: transform .15s ease, border-left-color .15s ease;
    }
    .profile-stat:hover { transform: translateX(1px); border-left-color: #a78bfa; }
    .profile-stat.legendary { background: rgba(251,191,36,.08); color: #fbbf24; border-color: rgba(251,191,36,.18); border-left-color: rgba(251,191,36,.45); }
    .profile-stat.cursed    { background: rgba(239,68,68,.1); color: #f87171; border-color: rgba(239,68,68,.12); border-left-color: rgba(239,68,68,.4); }
    .profile-stat.profile-stat-comp {
      background: rgba(6, 182, 212, 0.1);
      color: #7dd3fc;
      border-color: rgba(6, 182, 212, 0.22);
      border-left-color: rgba(34, 211, 238, 0.55);
    }
    .profile-stat.profile-stat-comp:hover { border-left-color: #22d3ee; }

    .profile-eras {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
      margin-top: 8px;
    }
    .profile-era-tag {
      font-family: 'Fredoka', sans-serif;
      font-size: 9px;
      font-weight: 600;
      padding: 3px 9px 3px 10px;
      border-radius: 0;
      border: none;
      border-left: 2px solid rgba(167,139,250,.38);
      background: rgba(167,139,250,.06);
      color: #8878a8;
      transition: color .15s ease, border-left-color .15s ease, background .15s ease;
    }
    .profile-era-tag:hover { border-left-color: #a78bfa; color: #c9b8ff; background: rgba(167,139,250,.1); }
    .profile-bio a { color: #a78bfa !important; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
    .profile-bio a:hover { color: #c9b8ff !important; }

    /* roster under profile stage */
    .roster {
      margin-top: 18px;
      border-top: 1px dashed rgba(167,139,250,.15);
      padding-top: 14px;
      max-width: 640px;
      margin-left: auto;
      margin-right: auto;
    }
    .roster-label {
      font-family: 'Fredoka', sans-serif;
      font-size: 12px;
      font-weight: 700;
      color: #706890;
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 1px;
      text-align: center;
    }
    .roster-list {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      justify-content: center;
    }
    .roster-btn {
      font-family: 'Fredoka', sans-serif;
      font-size: 11px;
      font-weight: 600;
      background: rgba(12,12,28,.45);
      color: #a098c0;
      border: 1px solid rgba(167,139,250,.14);
      border-left: 3px solid rgba(167,139,250,.4);
      padding: 4px 11px 4px 9px;
      border-radius: 0 5px 5px 0;
      cursor: pointer;
      transition: color .12s, border-color .12s, background .12s, border-left-color .12s;
      white-space: nowrap;
    }
    .roster-btn:hover { border-color: rgba(167,139,250,.28); border-left-color: #a78bfa; color: #c9b8ff; background: rgba(167,139,250,.14); }
    .roster-btn.active { background: rgba(167,139,250,.22); color: #fff; border-color: rgba(167,139,250,.35); border-left-color: #c4b5fd; }

    /* ── MOBILE: profile sheet slides up when a name is picked ── */
    @media (max-width: 860px) {
      .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 500;
        background: rgba(10,10,30,.95);
        border-top: 1px solid rgba(167,139,250,.2);
        padding: 12px 16px 20px;
        max-height: 55vh;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform .35s cubic-bezier(.22,1,.36,1);
        box-shadow: 0 -4px 24px rgba(0,0,0,.35);
        border-radius: 6px 6px 0 0;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        max-width: none;
      }
      .sidebar.mobile-open {
        transform: translateY(0);
      }
      .sidebar-label { display: none; }
      .sidebar .roster { margin-top: 12px; border-top: none; padding-top: 0; }
      .profile-card.show { margin-bottom: 10px; }

      .mobile-close {
        display: block !important;
        text-align: right;
        margin-bottom: 6px;
      }
      .mobile-close-btn {
        font-family: 'Fredoka', sans-serif;
        font-size: 13px;
        font-weight: 700;
        color: #a098c0;
        background: rgba(167,139,250,.15);
        border: 1px solid rgba(167,139,250,.2);
        border-radius: 2px;
        padding: 4px 16px;
        cursor: pointer;
        transition: all .12s;
      }
      .mobile-close-btn:hover { background: rgba(167,139,250,.3); color: #fff; }

      .story-chapter { padding: 20px 18px 18px; }
      .hero-history { padding: 60px 16px 48px; }
      .hero-logo-peel-stack { width: 100px; }
      .hero-logo-wrap { margin-bottom: 14px; }
      .hero-logo-hint { width: 20px; height: 20px; line-height: 20px; font-size: 13px; right: -6px; bottom: -3px; }
      .hero-history h1 { font-size: 28px; }
      h2.chapter-title { font-size: 21px; }
      .story-lede { font-size: 16px; }
      .hero-history .tagline { font-size: 16px; padding: 0 12px; }
      .story-deep-target { scroll-margin-top: 100px; }
      .hero-scroll-hint { bottom: 20px; }

      .closing-journey { min-height: 320vh; }
      .closing-journey-pin { padding: 16px 14px 24px; }
      .closing-journey .closing-body { font-size: 14px; line-height: 1.72; }
      .closing-journey .closing-body.closing-letter-voice {
        font-size: 14.5px;
        line-height: 1.78;
        padding-left: 16px;
      }

      .pbc-intro-audio,
      .te-era-audio,
      .gp-rgba-audio { max-width: none; margin-left: 0; margin-right: 0; }
      .pbc-intro-audio-inner,
      .te-era-audio-inner,
      .gp-rgba-audio-inner { padding: 14px 14px 16px; }

      #chapter-gp-rgba .gp-rgba-audio-inner { padding: 20px 16px 24px; }
      #chapter-gp-rgba .gp-rgba-banner-meme { margin: 6px auto 28px; }
      #chapter-gp-rgba .chapter-meta { margin-bottom: 26px; }
      #chapter-gp-rgba .chapter-era-logo.chapter-era-logo-peel { margin-bottom: 28px; }
      #chapter-gp-rgba .gp-rgba-media-map { margin-bottom: 32px; }
      #chapter-gp-rgba .gp-rgba-audio { margin-bottom: 36px; }

      html { scroll-padding-top: 96px; }
      .story-chapter { scroll-margin-top: 96px; }
      #cast-wrap { scroll-margin-top: 96px; }
      .story-jump-wrap {
        margin: 0 -6px 18px;
        top: 50px;
      }
      .story-jump-scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        gap: 5px;
        scrollbar-width: thin;
        scrollbar-color: rgba(167,139,250,.35) transparent;
      }
      .story-jump-scroll::-webkit-scrollbar { height: 3px; }
      .story-jump-scroll::-webkit-scrollbar-thumb {
        background: rgba(167,139,250,.4);
        border-radius: 3px;
      }

      .community-names {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px 8px;
      }
      .community-names li {
        font-size: 11px;
        padding: 4px 8px;
        text-align: center;
        line-height: 1.25;
        white-space: normal;
        justify-self: stretch;
      }
    }
    @media (min-width: 861px) {
      .mobile-close { display: none !important; }
    }

    /* ── CLOSING JOURNEY (scroll-driven fall → note reveal) ── */
    .closing-journey {
      position: relative;
      min-height: 360vh;
      margin-top: 12px;
      margin-left: calc(50% - 50vw);
      margin-right: calc(50% - 50vw);
      width: 100vw;
      max-width: 100vw;
      border-top: 1px solid rgba(168,85,247,.12);
    }
    /* Extra flow height after sticky pin so the document keeps scrolling through the closing beat */
    .closing-journey-endpad {
      height: 100vh;
      min-height: 420px;
      pointer-events: none;
    }
    .closing-journey-pin {
      position: sticky;
      top: 0;
      min-height: 100vh;
      min-height: 100svh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding: max(24px, 6vh) 20px max(48px, 10vh);
      box-sizing: border-box;
      z-index: 600;
      background:
        radial-gradient(ellipse at 50% 20%, rgba(99,102,241,.14) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 90%, rgba(168,85,247,.1) 0%, transparent 50%),
        #06060f;
      /* Never pair overflow-x: hidden with overflow-y: visible — spec forces y to "auto" and creates a nested scrollport. */
      overflow: visible;
    }
    .closing-journey-fall {
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: var(--cj-fall-op, 1);
      transition: opacity .35s ease-out;
    }
    .closing-journey-fall-inner {
      position: absolute;
      inset: -30% -10% -20%;
      background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.35), transparent),
        radial-gradient(1px 1px at 55% 42%, rgba(200,190,255,.3), transparent),
        radial-gradient(1px 1px at 78% 65%, rgba(255,255,255,.2), transparent),
        radial-gradient(1.5px 1.5px at 33% 80%, rgba(180,170,255,.25), transparent),
        radial-gradient(1px 1px at 88% 12%, rgba(255,255,255,.22), transparent);
      background-size: 220px 320px, 180px 260px, 260px 300px, 200px 280px, 240px 310px;
      animation: cjFallDrift 7s linear infinite;
      will-change: transform;
    }
    .closing-journey-fall-inner::after {
      content: '';
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(
        180deg,
        transparent 0,
        transparent 52px,
        rgba(255,255,255,.02) 53px,
        transparent 56px
      );
      animation: cjFallLines 4.5s linear infinite;
    }
    @keyframes cjFallDrift {
      from { transform: translateY(-6%); }
      to { transform: translateY(6%); }
    }
    @keyframes cjFallLines {
      from { transform: translateY(0); }
      to { transform: translateY(56px); }
    }
    .closing-journey-vignette {
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: radial-gradient(ellipse at 50% 45%, transparent 0%, transparent 35%, rgba(2,2,8,.75) 100%);
      opacity: var(--cj-vignette, 0.55);
      transition: opacity .4s ease;
    }
    .closing-journey-stack {
      position: relative;
      z-index: 1;
      width: 100%;
      max-width: 760px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding-bottom: min(8vh, 80px);
      overflow: visible;
    }
    .closing-journey-note-shell {
      width: 100%;
      max-width: 720px;
      padding: 8px 6px 0;
      overflow: visible;
    }
    /* Letter reveal: slow aurora + smooth scroll-lerped --magic-smooth (see JS) */
    .closing-note-magic {
      position: relative;
      --magic-smooth: 0;
      --magic: 0;
      overflow: visible;
    }
    .closing-note-aurora {
      position: absolute;
      left: -35%;
      right: -35%;
      top: -45%;
      bottom: -35%;
      z-index: 0;
      opacity: calc(0.2 + var(--magic-smooth, 0) * 0.65);
      background: linear-gradient(
        112deg,
        rgba(30,25,60,0) 0%,
        rgba(99,102,241,.42) 22%,
        rgba(168,85,247,.38) 40%,
        rgba(6,182,212,.22) 58%,
        rgba(251,191,36,.14) 74%,
        rgba(30,25,60,0) 100%
      );
      background-size: 240% 240%;
      filter: blur(42px);
      animation: closingAurora 18s ease-in-out infinite alternate;
      pointer-events: none;
    }
    @keyframes closingAurora {
      0% { transform: translate(-8%, 4%) rotate(-4deg) scale(1.02); background-position: 0% 35%; }
      100% { transform: translate(10%, -6%) rotate(5deg) scale(1.08); background-position: 100% 65%; }
    }
    /* No clip-path here — a circle centered high on the page clipped the bottom (sign-off, P.S., CTA). Reveal = opacity + blur + motion only. */
    .closing-note-magic-inner {
      position: relative;
      z-index: 1;
      overflow: visible;
      opacity: calc(0.12 + var(--magic-smooth, 0) * 0.88);
      transform: translateY(calc((1 - var(--magic-smooth, 0)) * 16px))
        scale(calc(0.978 + var(--magic-smooth, 0) * 0.022));
      filter: blur(calc((1 - var(--magic-smooth, 0)) * 3px));
    }
    .closing-note-magic-glow {
      position: absolute;
      inset: -12px;
      z-index: 0;
      border-radius: 14px;
      opacity: calc(var(--magic-smooth, 0) * 0.85);
      box-shadow:
        0 0 calc(36px + 40px * var(--magic-smooth, 0)) rgba(168,85,247,.22),
        0 0 calc(90px + 60px * var(--magic-smooth, 0)) rgba(99,102,241,.1);
      pointer-events: none;
    }
    .closing-journey .closing-from {
      text-shadow:
        calc((1 - var(--magic-smooth, 0)) * 3px) 0 12px rgba(255,120,200,.12),
        calc((1 - var(--magic-smooth, 0)) * -3px) 0 12px rgba(120,200,255,.1);
    }
    .closing-journey .closing-body {
      font-size: 14.5px;
      line-height: 1.75;
      max-width: 38em;
      margin-left: auto;
      margin-right: auto;
      text-align: left;
      text-wrap: pretty;
      hyphens: auto;
      -webkit-hyphens: auto;
    }
    .closing-journey .closing-body p {
      margin-bottom: 15px;
    }
    hr.closing-timeline-break {
      border: 0;
      border-top: 1px solid rgba(167, 139, 250, 0.45);
      margin: 0 0 20px;
      padding: 0;
      height: 0;
    }
    .closing-journey .closing-body.closing-letter-voice {
      font-family: 'Literata', Georgia, serif;
      font-size: 15.5px;
      font-weight: 400;
      letter-spacing: 0.01em;
      line-height: 1.82;
      padding: 2px 0 4px 22px;
      border-left: 3px solid rgba(167, 139, 250, 0.32);
    }
    .closing-body strong.closing-site-cta {
      font-family: 'Fredoka', sans-serif;
      font-weight: 800;
      font-size: 1.08em;
      letter-spacing: 0.045em;
      color: #fdfcff !important;
    }
    .closing-journey .closing-you-are {
      text-align: center;
      font-size: 1.4em;
      font-family: 'Fredoka', sans-serif;
      font-weight: 700;
      margin: 6px 0 22px;
      letter-spacing: 0.04em;
      color: #e8e0ff;
    }
    .closing-journey .closing-you-are strong {
      font-weight: 700;
      color: #f0e8ff;
    }
    @media (prefers-reduced-motion: reduce) {
      .closing-journey-fall-inner,
      .closing-journey-fall-inner::after { animation: none; }
      .closing-note-aurora { animation: none; opacity: 0.5; }
      .closing-note-magic-inner {
        opacity: 1;
        filter: none;
        transform: none;
      }
      .closing-note-magic {
        --magic-smooth: 1;
        --magic: 1;
      }
    }

    /* ── CLOSING LETTER ── */
    .closing {
      max-width: 740px;
      margin: 0 auto;
      padding: 0 20px;
      width: 100%;
      text-align: center;
    }
    .closing-divider {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 40px;
    }
    .closing-divider::before,
    .closing-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      border-radius: 3px;
      background: linear-gradient(90deg, transparent, rgba(167,139,250,.3), transparent);
    }
    .closing-divider span {
      font-size: 28px;
      flex-shrink: 0;
      animation: gentlePulse 3s ease-in-out infinite;
    }
    @keyframes gentlePulse {
      0%, 100% { opacity: .7; transform: scale(1); }
      50% { opacity: 1; transform: scale(1.1); }
    }
    .closing-card {
      background: transparent;
      border: none;
      border-left: 3px solid rgba(167,139,250,.38);
      border-radius: 0;
      padding: 8px 16px 24px 32px;
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      text-align: left;
      position: relative;
      overflow: visible;
    }
    .closing-card::before,
    .closing-card::after {
      content: none;
      display: none;
    }
    .closing-from {
      font-family: 'Fredoka', sans-serif;
      font-size: 14px;
      font-weight: 700;
      color: #a78bfa;
      margin-bottom: 20px;
      letter-spacing: .5px;
    }
    .closing-body {
      font-size: 15px;
      line-height: 1.9;
      color: #c8c0e0;
    }
    .closing-body p { margin-bottom: 18px; }
    .closing-body p:last-child { margin-bottom: 0; }
    .closing-body strong { color: #e8e0ff; }
    .closing-body a { color: #a78bfa; }
    .closing-sign {
      margin-top: 28px;
      padding-top: 24px;
      border-top: 1px solid rgba(167,139,250,.12);
      text-align: right;
    }
    .closing-sign .sig-name {
      font-family: 'Fredoka', sans-serif;
      font-size: 24px;
      font-weight: 700;
      color: #e8e0ff;
      text-shadow: none;
    }
    .closing-sign .sig-sub {
      font-size: 12px;
      color: #706890;
      margin-top: 4px;
      letter-spacing: .5px;
    }
    .closing-contact-server a {
      display: inline-block;
      font-family: 'Fredoka', sans-serif;
      font-size: 15px;
      font-weight: 700;
      color: #fff !important;
      background: #6d28d9;
      padding: 12px 28px;
      border-radius: 2px;
      border: 1px solid rgba(255,255,255,.12);
      text-decoration: none !important;
      transition: background .2s ease, border-color .2s ease, color .2s ease;
      box-shadow: none;
      position: relative;
      overflow: visible;
    }
    .closing-contact-server a:hover {
      transform: none;
      background: #7c3aed;
      border-color: rgba(255,255,255,.2);
      box-shadow: none;
      color: #fff !important;
    }
    .closing-ps {
      margin-top: 22px;
      margin-bottom: 0;
      font-size: 13px;
      line-height: 1.55;
      color: #706890;
      font-style: italic;
    }
    .closing-contact-server {
      margin-top: 16px;
      padding-top: 18px;
      border-top: 1px solid rgba(167, 139, 250, 0.2);
      text-align: center;
    }

    .closing-contact {
      margin-top: 22px;
      padding: 18px 16px 22px;
      text-align: center;
      border-radius: 8px;
      background: rgba(6, 6, 18, 0.42);
      border: 1px solid rgba(167, 139, 250, 0.14);
    }
    .closing-contact-lead {
      font-size: 13px;
      color: #9888b8;
      margin: 0 0 14px;
      line-height: 1.55;
      max-width: 30em;
      margin-left: auto;
      margin-right: auto;
    }
    .closing-contact-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
      align-items: stretch;
    }
    .closing-contact-row a {
      font-family: 'Fredoka', sans-serif;
      font-size: 14px;
      font-weight: 700;
      color: #e0d0ff !important;
      text-decoration: none !important;
      padding: 10px 22px;
      border-radius: 4px;
      border: 1px solid rgba(167, 139, 250, 0.35);
      background: rgba(167, 139, 250, 0.08);
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }
    .closing-contact-row a:hover {
      background: rgba(167, 139, 250, 0.18) !important;
      border-color: rgba(196, 181, 253, 0.5) !important;
      color: #fff !important;
    }
    .closing-contact--after-ps {
      margin-top: 20px;
    }

    .closing-afterword {
      margin: 28px auto 0;
      max-width: 34em;
      font-size: 12px;
      line-height: 1.55;
      color: rgba(152, 136, 184, 0.88);
      font-style: italic;
      text-align: center;
    }

    /* ── NEBULA GLOW (ambient decoration) ── */
    .hero-history::after {
      content: '';
      position: absolute;
      bottom: -80px;
      left: 50%;
      transform: translateX(-50%);
      width: 800px;
      height: 160px;
      background: radial-gradient(ellipse, rgba(168,85,247,.1) 0%, transparent 70%);
      pointer-events: none;
    }

    /* ── SMOOTH SCROLLBAR ── */
    ::-webkit-scrollbar { width: 8px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(167,139,250,.2); border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(167,139,250,.35); }

    /* ── COMMUNITY WALL ── */
    .community-wall {
      margin-top: 24px;
      padding: 20px 0 4px;
      background: transparent;
      border: none;
      border-top: 1px solid rgba(167,139,250,.16);
      border-radius: 0;
      position: relative;
      overflow: visible;
    }
    .community-wall::before {
      content: none;
      display: none;
    }
    h3.community-wall-title {
      font-family: 'Fredoka', sans-serif;
      font-size: 15px;
      font-weight: 700;
      color: #c9b8ff;
      margin: 0 0 16px;
      text-shadow: none;
      padding-bottom: 8px;
      border-bottom: 1px dashed rgba(167,139,250,.15);
    }
    .community-names {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 0 0 14px;
      padding: 0;
      list-style: none;
    }
    .community-names li {
      font-family: 'Fredoka', sans-serif;
      font-size: 12px;
      font-weight: 600;
      color: #a098c0;
      background: rgba(8,8,20,.5);
      border: 1px dashed rgba(167,139,250,.22);
      padding: 4px 10px 4px 12px;
      border-radius: 2px;
      border-left: 2px solid rgba(251,146,60,.35);
      transition: color .15s, border-color .15s, background .15s, border-left-color .15s;
    }
    .community-names li:hover {
      color: #c9b8ff;
      border-color: rgba(167,139,250,.35);
      border-left-color: rgba(251,146,60,.65);
      background: rgba(167,139,250,.1);
    }
    .community-note {
      font-size: 12.5px;
      color: #8878a8;
      margin: 4px 0 0;
      font-style: italic;
    }

    /* GP RGBA — compact log-derived regulars (100+ joins) */
    .gp-log-regulars {
      margin: 20px 0 0;
      padding: 14px 14px 12px;
      background: rgba(12, 8, 6, 0.55);
      border: 1px solid rgba(251, 146, 60, 0.2);
      border-radius: 8px;
      border-left: 3px solid rgba(251, 146, 60, 0.45);
    }
    .gp-log-regulars-h {
      font-family: 'Fredoka', sans-serif;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #fdba74;
      margin: 0 0 8px;
      padding-bottom: 6px;
      border-bottom: 1px dashed rgba(251, 146, 60, 0.22);
    }
    .gp-log-regulars-list {
      list-style: none;
      margin: 0;
      padding: 0;
      column-count: 4;
      column-gap: 14px;
      font-family: 'Nunito', sans-serif;
      font-size: 10.5px;
      line-height: 1.32;
      color: #8a82a8;
      max-height: 240px;
      overflow-y: auto;
      overflow-x: hidden;
    }
    .gp-log-regulars-list li {
      break-inside: avoid;
      margin: 0 0 3px;
      padding: 0;
    }
    .gp-log-regulars-cnt {
      display: inline-block;
      min-width: 2.6em;
      margin-right: 4px;
      font-variant-numeric: tabular-nums;
      color: rgba(251, 146, 60, 0.75);
      font-weight: 700;
      font-size: 9.5px;
    }
    @media (max-width: 900px) {
      .gp-log-regulars-list { column-count: 3; }
    }
    @media (max-width: 640px) {
      .gp-log-regulars-list { column-count: 2; max-height: 280px; }
    }
    @media (max-width: 380px) {
      .gp-log-regulars-list { column-count: 1; }
    }

    /* crew links in chapter meta */
    .crew-link { color: #c9b8ff; text-decoration: none; border-bottom: 1px dotted rgba(167,139,250,.35); transition: color .15s; cursor: pointer; }
    .crew-link:hover { color: #e0d0ff; border-bottom-color: #a78bfa; }
    .history-out-link { color: #c9b8ff; text-decoration: none; border-bottom: 1px dotted rgba(167,139,250,.35); transition: color .15s; }
    .history-out-link:hover { color: #e0d0ff; border-bottom-color: #a78bfa; }

    /* inline styles for closing card steam link */
    .closing-body a { color: #c9b8ff !important; }
    .closing-body a:hover { color: #e0d0ff !important; }

    @media print {
      html { scroll-behavior: auto; }
      #history-chapter-tint { --history-tint-opacity: 0 !important; }
      body {
        background: #fff !important;
        color: #111 !important;
        overflow: visible !important;
      }
      #starfield,
      .history-chapter-tint,
      .nebula-layer,
      .rainbow,
      .shooting-star,
      #hero-shimmer,
      .hero-logo-hint,
      .pootis-counter,
      .hero-scroll-hint,
      nav,
      .story-jump-wrap,
      #profile-stage,
      #mobile-close,
      .mobile-close-btn { display: none !important; }

      .hero-history {
        min-height: auto !important;
        padding: 24px 16px !important;
        background: #f8f7fc !important;
        page-break-after: avoid;
      }
      .hero-logo-wrap { margin-bottom: 12px !important; }
      .hero-logo-peel-stack,
      .chapter-era-peel-stack {
        animation: none !important;
      }
      .hero-logo-peel-top,
      .chapter-era-peel-top {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
        box-shadow: none !important;
      }
      .hero-logo-base,
      .chapter-era-peel-base { display: none !important; }

      .story-chapter {
        break-inside: avoid;
        border-left-color: #ccc !important;
        background: transparent !important;
        box-shadow: none !important;
      }
      .story-chapter.reveal {
        opacity: 1 !important;
        translate: none !important;
      }
      .story-deep-target:target { animation: none !important; }

      .gp-log-regulars-list { max-height: none !important; overflow: visible !important; column-count: 3 !important; }

      hr.closing-timeline-break { border-top-color: #999 !important; }
      .closing-journey .closing-body.closing-letter-voice {
        border-left-color: #bbb !important;
        color: #222 !important;
      }
      .closing-body strong.closing-site-cta { color: #1a0a2e !important; }

      a { color: #3b2b6b !important; text-decoration: underline; }
      .crew-link { border-bottom: none !important; }
      img { max-width: 100% !important; page-break-inside: avoid; }
    }
