
    @import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inconsolata:wght@400;500&display=swap');

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html { scroll-behavior: smooth; }

    body {
      background: var(--bg);
      font-family: 'EB Garamond', Georgia, serif;
      font-size: 17px;
      line-height: 1.72;
      color: var(--fg);
      display: flex;
      flex-direction: column;
      align-items: stretch;
      min-height: 100vh;
    }

    .page-wrap {
      flex: 1;
      background: var(--bg);
      position: relative;
      overflow-x: clip;
      overflow-y: visible;
    }

    .page-wrap::before {
      content: '';
      position: absolute; inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 0;
      opacity: 0.45;
    }

    .content {
      position: relative;
      z-index: 1;
      padding: 1rem 3rem;
    }

    .section-title {
      font-family: 'Cinzel', serif;
      font-size: 1.45rem;
      font-weight: 600;
      color: var(--fg);
      letter-spacing: 0.04em;
      margin-bottom: 0.2rem;
      padding-bottom: 0.4rem;
      border-bottom: 2px solid var(--rule);
    }

    .section { margin-bottom: 2.8rem; }

    p { margin-bottom: 1em; }
    p:last-child { margin-bottom: 0; }

    .callout {
      background: var(--surface);
      border-left: 3px solid var(--gold);
      border-radius: 2px;
      padding: 0.9rem 1.1rem;
      margin: 1.1rem 0;
      font-size: 0.97rem;
    }

    .divider {
      height: 1px;
      background: linear-gradient(to right, transparent, var(--gold), transparent);
      margin: 2rem 0;
    }

    .banner {
      background: var(--steel);
      color: var(--paper);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.5rem 3rem;
      font-family: 'Cinzel', serif;
      font-size: 0.72rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
    }

    .banner-rule {
      height: 1px;
      background: linear-gradient(to right, transparent, var(--gold), transparent);
    }

    .credits {
      background: var(--steel);
      color: rgba(245,237,216,0.55);
      padding: 1.4rem 3rem;
      font-size: 0.85rem;
      line-height: 1.6;
    }

    @media (max-width: 640px) {
      body { font-size: 19px; }
      .content { padding: 1rem 1.4rem; }
      .banner  { padding: 0.5rem 1.4rem; }
    }

    /* --- Cover section (shared base) --- */
    .cover {
      position: relative;
      max-height: 16rem;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      overflow: hidden;
    }
    .cover-image {
      position: absolute; inset: 0;
      background-size: cover;
      background-position: center 30%;
      z-index: 0;
    }
    .cover-gradient {
      position: absolute; inset: 0;
      background: linear-gradient(to bottom,
        rgba(26,18,8,0.05) 0%,
        rgba(26,18,8,0.5)  55%,
        rgba(26,18,8,0.92) 100%);
      z-index: 1;
    }
    .cover-content {
      position: relative; z-index: 2;
      padding: 2rem 3rem 2.5rem;
      color: var(--paper);
    }
    .cover-title {
      font-family: 'Cinzel', serif;
      font-size: 2.8rem; font-weight: 700;
      letter-spacing: 0.05em; line-height: 1.1;
      color: #f5e6c0;
      text-shadow: 0 2px 12px rgba(0,0,0,0.7);
      margin-bottom: 0.3rem;
    }
    .cover-subtitle {
      font-family: 'Cinzel', serif;
      font-size: 1rem; font-weight: 400;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--gold-lt);
    }
    .no-cover-header {
      background: var(--steel);
      padding: 2.5rem 3rem 1.8rem;
      color: var(--paper);
    }

    @media (max-width: 640px) {
      .cover-title { font-size: 2rem; }
      .cover-content { padding: 1.5rem 1.4rem 2rem; }
    }

    /* --- Back navigation breadcrumb --- */
    .back-nav {
      background: #111008;
      padding: 0.5rem 3rem;
      border-bottom: 1px solid rgba(184,146,44,0.2);
    }
    .back-nav a {
      font-family: 'Cinzel', serif;
      font-size: 0.68rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(184,146,44,0.6);
      text-decoration: none;
      transition: color 0.2s;
    }
    .back-nav a:hover { color: var(--gold); }

    /* --- Content headers (H2/H3) --- */
    .content h2 {
      font-family: 'Cinzel', serif;
      font-size: 1.45rem; font-weight: 600;
      color: var(--fg);
      letter-spacing: 0.04em;
      margin: 2.4rem 0 0.8rem;
      padding-bottom: 0.4rem;
      border-bottom: 1px solid var(--rule);
    }
    .content h2:first-child { margin-top: 2.8rem; }
    .content h3 {
      font-family: 'Cinzel', serif;
      font-size: 1.1rem; font-weight: 600;
      color: var(--muted);
      letter-spacing: 0.04em;
      margin: 1.8rem 0 0.6rem;
    }
    .content ul { margin: 0.8em 0; padding-left: 2em; }
    .content li { margin-bottom: 0.4em; line-height: 1.6; }

    /* --- Jump navigation --- */
    .jump-nav {
      display: flex;
      flex-wrap: wrap;
      padding: 1rem 0.5rem 1rem 0.5rem;
      border-bottom: 1px solid var(--rule);
      font-family: 'Cinzel', serif;
      font-size: 0.8rem;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      position: -webkit-sticky;
      position: sticky;
      top: 50px;
      max-height: 80vh;
      overflow-y: auto;
      background-color: rgb(26, 18, 8);
      min-width: -webkit-fit-content;
      min-width: fit-content;
      max-inline-size: 22%;
    }
    .jump-nav ul { list-style-type: bengali; padding-left: 1.2rem; }
    .jump-nav a { color: var(--gold); text-decoration: none; transition: color 0.15s; }
    .jump-nav a:hover { color: var(--gold-lt); }
    .jump-nav .nav-divider { list-style: none; border-top: 1px solid rgba(184,146,44,0.3); margin: 0.5rem 0; padding: 0; }
    .jump-nav .nav-subcategory { list-style: none; }
    .jump-nav .nav-subcategory a { color: var(--gold-lt); font-weight: 600; letter-spacing: 0.06em; }
    .jump-nav .nav-group-label {
      list-style: none; font-family: 'Cinzel', serif; font-size: 0.68rem;
      font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--cream); padding: 0.2rem 0 0.1rem; cursor: default;
    }

    @media (max-width: 640px) {
      body { flex-direction: column; justify-content: flex-start; }
      .jump-nav {
        position: sticky;
        top: 0;
        z-index: 10;
        max-inline-size: 100%;
        width: 100%;
        border-bottom: 1px solid var(--rule);
        padding: 0.5rem 1rem;
        overflow-y: visible;
        max-height: none;
      }
      .jump-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem 1rem;
        padding-left: 0;
        list-style: none;
      }
    }

    /* --- Inline image figure --- */
    .lore-figure {
      float: right;
      margin: 0.4rem 0 1.6rem 2rem;
      max-width: 240px;
      clear: right;
    }
    .lore-figure img {
      width: 100%; display: block;
      border: 1px solid var(--rule);
      box-shadow: 4px 6px 18px var(--shadow);
      border-radius: 1rem;
    }
    .lore-figure figcaption {
      font-size: 0.8rem; font-style: italic;
      color: var(--steel); text-align: center;
      margin-top: 0.45rem; padding-top: 0.35rem;
      border-top: 1px solid var(--rule); line-height: 1.4;
    }

    /* --- Markdown tables --- */
    .table-wrap {
      overflow-x: auto;
      margin: 1.2rem 0 1.4rem;
      -webkit-overflow-scrolling: touch;
    }
    .md-table {
      width: max-content;
      min-width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
      line-height: 1.5;
    }
    .md-table th {
      font-family: 'Cinzel', serif;
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--steel);
      background: var(--surface);
      padding: 0.55rem 0.7rem;
      border-bottom: 2px solid var(--rule);
      text-align: left;
      white-space: nowrap;
    }
    .md-table td {
      padding: 0.45rem 0.7rem;
      border-bottom: 1px solid rgba(184,146,44,0.18);
      vertical-align: top;
    }
    .md-table tr:last-child td { border-bottom: none; }
    .md-table tr:hover td { background: rgba(184,146,44,0.06); }

    @media (max-width: 640px) {
      .md-table { font-size: 0.8rem; }
      .md-table th, .md-table td { padding: 0.3rem 0.4rem; }
    }

    /* --- Audio player --- */
    .audio-player {
      margin: 2.4rem 0; padding: 1.1rem 1.4rem 1.2rem;
      background: var(--cream);
      border: 1px solid var(--rule); border-radius: 2px;
      box-shadow: inset 0 1px 4px rgba(26,18,8,0.06);
    }
    .audio-player-label {
      font-family: 'Cinzel', serif; font-size: 0.68rem;
      letter-spacing: 0.18em; text-transform: uppercase;
      color: var(--steel); margin-bottom: 0.65rem;
    }
    .audio-player audio { width: 100%; display: block; }

    /* --- Feature grid / feature box --- */
    .feature-grid {
      display: grid; grid-template-columns: 1fr 1fr;
      gap: 0.9rem; margin-top: 1.3rem;
    }
    .feature-box {
      background: var(--surface); border: 1px solid var(--rule);
      border-radius: 2px; padding: 0.95rem 1.1rem 1rem;
      box-shadow: inset 0 1px 4px rgba(26,18,8,0.06);
    }
    .feature-name {
      font-family: 'Cinzel', serif; font-size: 0.76rem; font-weight: 600;
      letter-spacing: 0.12em; text-transform: uppercase;
      color: var(--steel); margin-bottom: 0.45rem;
    }
    .feature-box p { margin: 0; font-size: 0.97rem; line-height: 1.6; }

    @media (max-width: 640px) {
      .lore-figure { float: none; max-width: 100%; margin: 0 0 1.5rem 0; }
      .feature-grid { grid-template-columns: 1fr; }
    }

    @media print {
      /* ── Page margins ── */
      @page { margin: 10mm; }

      /* ── Strip all backgrounds and decoration ── */
      *, *::before, *::after {
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
      }

      /* ── Show only .page-wrap ── */
      body > *:not(.page-wrap) { display: none !important; }

      .page-wrap {
        max-width: none;
        overflow: visible;
      }

      /* ── Hide navigation ── */
      .back-nav, .jump-nav { display: none !important; }

      /* ── Collapse cover — remove the reserved image height ── */
      .cover {
        max-height: none !important;
        min-height: 0 !important;
      }
      .cover-image,
      .cover-gradient {
        display: none !important;
      }
      .cover-content {
        padding: 1.5rem 2rem 1rem !important;
      }

      /* ── Darken light-on-dark text; preserve hue ── */
      .cover-title    { color: #3a2a10 !important; }
      .cover-subtitle { color: var(--gold) !important; }
      .cover-content  { color: var(--ink) !important; }
      .banner         { color: var(--steel) !important; border-top: 1px solid #999; border-bottom: 1px solid #999; }
      .credits        { color: var(--ink) !important; opacity: 1 !important; border-top: 1px solid #ccc; }

      /* ── Smart page breaks — never orphan a heading ── */
      h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        break-after: avoid;
      }

      h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + * {
        page-break-before: avoid;
        break-before: avoid;
      }

      p, li, blockquote {
        page-break-inside: avoid;
        break-inside: avoid;
      }
    }

    /* ── GM component styles (Tier 1 / 2 / 3) ─────────────────────────────── */
    /* Tier 1: inline redaction */
    .gm-redacted {
      background: var(--ink); color: var(--ink);
      user-select: none; border-radius: 2px;
      padding: 0 4px; letter-spacing: -0.05em;
    }
    .gm-inline {
      background: rgba(122,31,31,0.12); color: var(--crimson);
      border-bottom: 1px solid rgba(122,31,31,0.4);
      padding: 0 2px; border-radius: 2px;
    }

    /* Tier 2: GM-only callout block */
    .gm-callout {
      border-left: 3px solid var(--crimson);
      background: rgba(122,31,31,0.06);
      padding: 0.8rem 1rem 0.8rem 1.2rem;
      margin: 1.2rem 0;
    }
    .gm-callout::before {
      content: "GM ONLY";
      display: block;
      font-family: 'Inconsolata', monospace;
      font-size: 0.65rem; letter-spacing: 0.2em;
      color: var(--crimson); margin-bottom: 0.5rem;
    }

    /* Tier 3: GM prose block (file transclusion) */
    .gm-block {
      border: 1px solid rgba(122,31,31,0.3);
      border-left: 4px solid var(--crimson);
      background: rgba(122,31,31,0.04);
      padding: 1rem 1.2rem; margin: 1.5rem 0;
    }
    .gm-block::before {
      content: "↓ GM CONTENT";
      display: block;
      font-family: 'Inconsolata', monospace;
      font-size: 0.6rem; letter-spacing: 0.2em;
      color: rgba(122,31,31,0.5); margin-bottom: 0.8rem;
    }
