 :root {
    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --gold-dim: #7a6130;
    --parchment: #d4b896;
    --ink: #1a1410;
    --ink-mid: #2a2018;
    --shadow: #0d0b08;
    --text-body: #c8b090;
    --text-faint: #6b5a3e;
  }

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

  html {
    scroll-behavior: smooth;
  }

  body {
    background-color: var(--ink);
    color: var(--text-body);
    font-family: 'Noto Serif JP', serif;
    font-weight: 300;
    overflow-x: hidden;
    cursor: default;
  }

  /* ── NOISE TEXTURE OVERLAY ── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
  }

  /* ── NAVIGATION ── */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1.4rem 2rem;
    background: linear-gradient(to bottom, rgba(13,11,8,0.95) 0%, rgba(13,11,8,0) 100%);
    letter-spacing: 0.15em;
    font-size: 0.7rem;
    font-family: 'IM Fell English', serif;
  }

  nav a {
    color: var(--gold-dim);
    text-decoration: none;
    transition: color 0.4s;
    text-transform: capitalize;
  }
  nav a:hover { color: var(--gold-light); }
  nav a.active { color: var(--gold); }

  /* ── HERO ── */
  .hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 60% at 50% 40%, rgba(60,40,10,0.5) 0%, transparent 70%),
      linear-gradient(to bottom, var(--ink) 0%, #1c140a 40%, #0d0b08 100%);
  }

  /* Floating dust particles */
  .dust {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .dust-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: drift linear infinite;
  }

  @keyframes drift {
    0%   { transform: translateY(100vh) translateX(0px); opacity: 0; }
    10%  { opacity: 0.4; }
    90%  { opacity: 0.2; }
    100% { transform: translateY(-10vh) translateX(40px); opacity: 0; }
  }

  .hero-eyebrow {
    font-family: 'IM Fell English', serif;
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    color: var(--gold-dim);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 1.2s ease forwards 0.5s;
  }

  .hero-title {
    font-family: '刻明朝', 'KokuMincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    color: var(--gold);
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
    opacity: 0;
    animation: fadeUp 1.4s ease forwards 0.8s;
    text-shadow: 0 0 60px rgba(201,168,76,0.3), 0 2px 30px rgba(0,0,0,0.8);
  }

  .hero-title-jp {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-faint);
    text-align: center;
    letter-spacing: 0.25em;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeUp 1.4s ease forwards 1s;
  }

  .hero-divider {
    width: 1px;
    height: 0;
    background: linear-gradient(to bottom, transparent, var(--gold-dim), transparent);
    animation: growLine 1.5s ease forwards 1.5s;
    margin: 0 auto 3rem;
  }
  @keyframes growLine {
    to { height: 80px; }
  }

  .hero-subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--text-faint);
    text-align: center;
    max-width: 480px;
    padding: 0 2rem;
    line-height: 2.2;
    opacity: 0;
    animation: fadeUp 1.4s ease forwards 1.8s;
  }

  .scroll-cue {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeUp 1s ease forwards 2.5s;
  }
  .scroll-cue span {
    font-family: 'IM Fell English', serif;
    font-size: 0.55rem;
    letter-spacing: 0.4em;
    color: var(--gold-dim);
    text-transform: uppercase;
  }
  .scroll-cue-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold-dim), transparent);
    animation: pulse-line 2s ease-in-out infinite;
  }
  @keyframes pulse-line {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.1); }
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── DECORATIVE CHAIN (left side) — SVG画像版 ── */
  .chain-left {
    position: absolute;
    left: 2.5%;
    top: 0;
    bottom: 0;
    width: 24px;
    pointer-events: none;
    overflow: hidden;
  }
  .chain-left-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* heightはJSで設定 */
  }
  .chain-svg-tile {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.35;
  }

  /* ── SECTION BASE ── */
  .section {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 6rem 2.5rem;
  }

  .section-full {
    position: relative;
    padding: 8rem 2rem;
    overflow: hidden;
  }

  /* ── SCROLL REVEAL ── */
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.25s; }
  .reveal-delay-3 { transition-delay: 0.4s; }
  .reveal-delay-4 { transition-delay: 0.55s; }
  .reveal-delay-5 { transition-delay: 0.7s; }

  /* ── ORNAMENTAL DIVIDERS ── */
  .ornament {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    color: var(--gold-dim);
  }
  .ornament-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
  }
  .ornament-glyph {
    font-family: 'IM Fell English', serif;
    font-size: 1.2rem;
    color: var(--gold-dim);
    line-height: 1;
  }

  /* ── TYPOGRAPHY ── */
  .section-label {
    font-size: 0.6rem;
    letter-spacing: 0.5em;
    color: var(--gold-dim);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
  }

  .section-heading {
    font-family: 'IM Fell English', serif;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    color: var(--gold-light);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 40px rgba(201,168,76,0.15);
  }

  .section-heading-jp {
    font-family: 'Noto Serif JP', serif;
    font-weight: 200;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    color: var(--gold);
    line-height: 1.6;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
  }

  .body-text {
    font-family: 'Noto Serif JP', serif;
    font-weight: 300;
    font-size: 0.88rem;
    line-height: 2.4;
    color: var(--text-body);
    margin-bottom: 1.5rem;
    letter-spacing: 0.03em;
  }

  .italic-quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--gold);
    line-height: 1.8;
    padding: 2rem 0;
    letter-spacing: 0.05em;
    text-align: center;
    text-shadow: 0 0 40px rgba(201,168,76,0.2);
  }

  /* ── LEGACY IMAGE ── */
  .legacy-image-block {
    position: relative;
    width: 100%;
    max-width: 860px;
    margin: 0 auto 4rem;
    overflow: hidden;
  }

  .legacy-image-block img {
    width: 100%;
    height: auto;
    display: block;
    filter: sepia(0.35) brightness(0.72) contrast(1.1);
    transition: filter 1.2s ease;
  }

  .legacy-image-block:hover img {
    filter: sepia(0.15) brightness(0.85) contrast(1.05);
  }

  .image-vignette {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to bottom, var(--ink) 0%, transparent 18%, transparent 82%, var(--ink) 100%),
      linear-gradient(to right, var(--ink) 0%, transparent 12%, transparent 88%, var(--ink) 100%);
    pointer-events: none;
  }

  /* ── LARGE WATERMARK TEXT ── */
  .watermark-section {
    position: relative;
    overflow: hidden;
  }

  .watermark-text {
    position: absolute;
    font-family: 'IM Fell English', serif;
    font-size: clamp(4rem, 15vw, 12rem);
    color: transparent;
    -webkit-text-stroke: 1px rgba(201,168,76,0.07);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    letter-spacing: 0.05em;
    line-height: 1;
  }

  /* ── HORIZONTAL RULE ── */
  .hr-ornate {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
  }
  .hr-ornate-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold-dim));
  }
  .hr-ornate-line:last-child {
    background: linear-gradient(to left, transparent, var(--gold-dim));
  }
  .hr-ornate-diamond {
    width: 6px;
    height: 6px;
    background: var(--gold-dim);
    transform: rotate(45deg);
  }

  /* ── CHAPTER MARKER ── */
  .chapter-marker {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
  }
  .chapter-num {
    font-family: 'IM Fell English', serif;
    font-size: 3rem;
    color: rgba(201,168,76,0.12);
    line-height: 1;
    flex-shrink: 0;
  }
  .chapter-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--gold-dim), transparent);
  }

  /* ── BACKGROUND GRADIENT BANDS ── */
  .bg-warm {
    background: linear-gradient(to bottom,
      var(--ink) 0%,
      #1e1508 30%,
      #18120a 70%,
      var(--ink) 100%);
  }

  /* ── QUOTE BLOCK ── */
  .director-quote {
    border-left: 1px solid var(--gold-dim);
    padding: 1.5rem 0 1.5rem 2rem;
    margin: 2.5rem 0;
    position: relative;
  }
  .director-quote::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    width: 1px;
    height: 0;
    background: var(--gold);
    transition: height 1s ease;
  }
  .director-quote.visible::before {
    height: 100%;
  }
  .director-quote p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    color: var(--gold-light);
    line-height: 2;
    letter-spacing: 0.04em;
  }
  .director-quote .quote-attr {
    font-family: 'IM Fell English', serif;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--gold-dim);
    margin-top: 1rem;
    font-style: normal;
  }

  /* ── FOOTER NAV ── */
  .bottom-nav {
    position: fixed;
    bottom: 1.5rem;
    right: 2rem;
    font-family: 'IM Fell English', serif;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--gold-dim);
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
  }
  .bottom-nav:hover { color: var(--gold); }

  /* MOBILE */
  @media (max-width: 640px) {
    nav { gap: 1.2rem; font-size: 0.6rem; }
    .chain-left { display: none; }
    .section { padding: 4rem 1.5rem; }
  }

  /* ══ CANDLE FLICKER OVERLAY ══ */

  /* 画面全体にかかる環境光の揺らぎ */
  @keyframes flicker-ambient {
    0%   { opacity: 0.00; }
    8%   { opacity: 0.02; }
    15%  { opacity: 0.00; }
    22%  { opacity: 0.03; }
    30%  { opacity: 0.01; }
    42%  { opacity: 0.00; }
    55%  { opacity: 0.04; }
    63%  { opacity: 0.01; }
    74%  { opacity: 0.00; }
    88%  { opacity: 0.03; }
    100% { opacity: 0.00; }
  }

  /* ページ周縁部のヴィネット（炎の光が届かない暗がり） */
  .candle-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(
      ellipse 70% 65% at 50% 48%,
      transparent 0%,
      rgba(8,5,2,0.35) 55%,
      rgba(5,3,1,0.72) 80%,
      rgba(3,2,0,0.90) 100%
    );
  }

  /* 炎の明滅：暗くなるパルス */
  .candle-flicker {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
    background: rgba(6,4,1,1);
    animation: flicker-ambient 0.1s step-end infinite;
    will-change: opacity;
  }

  /* 暖色の環境光オーバーレイ（炎の色温度） */
  .candle-warmth {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9996;
    background: radial-gradient(
      ellipse 80% 70% at 50% 45%,
      rgba(180,90,10,0.04) 0%,
      rgba(140,60,5,0.06) 40%,
      transparent 70%
    );
    animation: warmth-pulse 4.3s ease-in-out infinite alternate;
  }
  @keyframes warmth-pulse {
    0%   { opacity: 0.6; transform: scale(1.00); }
    30%  { opacity: 1.0; transform: scale(1.02); }
    60%  { opacity: 0.7; transform: scale(0.98); }
    100% { opacity: 0.9; transform: scale(1.01); }
  }

  /* テキストカラーに微妙な暖色ゆらぎを乗せる */
  @keyframes text-warmth {
    0%   { filter: brightness(1.00) sepia(0.00); }
    20%  { filter: brightness(1.02) sepia(0.04); }
    45%  { filter: brightness(0.97) sepia(0.02); }
    70%  { filter: brightness(1.01) sepia(0.05); }
    100% { filter: brightness(0.98) sepia(0.03); }
  }
  .section, .hero {
    animation: text-warmth 5.7s ease-in-out infinite alternate;
  }

