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

:root {
  --col-offwhite: #e8e8e0;
  --col-teal: #00e5cc;
  --col-neon: #c8ff00;
  --col-magenta: #ff00aa;
  --bg-top: #0a1020;
  --bg-bottom: #2a3f70;
  --col-shadow: rgba(8, 14, 30, 0.92);
  --col-shadow-soft: rgba(8, 14, 30, 0.68);
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--col-offwhite);
  font-family: "Noto Sans JP", sans-serif;
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

/* ペーパーグレインノイズ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("../images/vertical-background.png");
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 48px;
  background: linear-gradient(to bottom, rgba(8, 16, 32, 0.58), transparent);
}

.nav-logo {
  display: block;
  text-decoration: none;
}

.nav-logo-img {
  display: block;
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--col-offwhite);
  font-family: "Rajdhani", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.20em;
  opacity: 0.92;
  text-shadow: 0 2px 8px rgba(8, 14, 30, 0.9);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover { color: var(--col-teal); opacity: 1; }

/* ===== HERO ===== */
.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 680px;
  overflow: clip;
}

/* 背景：ビューポートに固定。スクロールしても画面位置は動かさない。 */
.hero-kv {
  position: fixed;
  z-index: 0;
  inset: 0;
  height: 100svh;
  overflow: hidden;
  pointer-events: none;
  background-image: url("../images/vertical-background.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Heroの下端に固定する可読性用グラデーション。
   ビューポート固定ではなくHeroセクション内に絶対配置するため、
   テキストと一緒にスクロールして常にその背後に残る。 */
.hero-bottom-gradient {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: min(52vh, 560px);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(6, 10, 25, 0) 0%,
    rgba(6, 10, 25, 0.28) 18%,
    rgba(5, 8, 20, 0.74) 58%,
    rgba(3, 6, 16, 0.94) 100%
  );
}

/* ===== RIRRY CHARACTER / PARALLAX ===== */
.rirry-fixed {
  position: fixed;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 100svh;
  pointer-events: none;
  will-change: transform, opacity;
}

.rirry-img {
  display: block;
  width: min(59vw, 680px);
  height: auto;
  margin-top: clamp(-72px, -6vh, -28px);
  filter:
    drop-shadow(0 0 28px rgba(0, 229, 204, 0.28))
    drop-shadow(0 0 56px rgba(255, 0, 170, 0.18));
}

/* Heroのリリーは、ローダー終了後に単一画像のまま短いノイズを経て表示する。
   スクロール用のtransformは親要素に任せ、登場演出は画像自身だけで完結させる。 */
/* ローダー消滅後にJSが付与する hero-reveal-ready を起点に再生する。
   is-loaded だけではローダーの背後でアニメーションが進んでしまうため使用しない。 */
body.hero-reveal-ready .hero .rirry-img {
  animation: hero-rirry-reveal .82s cubic-bezier(.2, .74, .23, 1) both;
}

/* ローダーのフェード中はHero本体を見せず、アニメーションの1フレーム目を確実に残す。 */
body.is-loaded:not(.hero-reveal-ready) .hero .rirry-img {
  opacity: 0;
}


/* 別ページからアンカー付きでHOMEへ戻る場合は、Hero登場演出を再生しない。 */
html.skip-hero-reveal body.is-loaded .hero .rirry-img {
  animation: none;
}

/* ===== HERO TEXT ===== */
.hero-text {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 72px 64px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--col-magenta);
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  text-shadow: 0 2px 7px var(--col-shadow);
}

.hero-eyebrow::before {
  display: block;
  width: 32px;
  height: 1px;
  content: "";
  background: var(--col-magenta);
  box-shadow: 0 1px 5px var(--col-shadow-soft);
  opacity: 0.7;
}

.hero-title-wrap { margin-bottom: 16px; }

.hero-title-en {
  color: var(--col-offwhite);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(42px, 6.5vw, 96px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  /* 縁取りは使用せず、ネイビー系のドロップシャドウだけで視認性を確保 */
  -webkit-text-stroke: 0 transparent;
  paint-order: normal;
  text-shadow:
    0 3px 4px var(--col-shadow),
    0 8px 18px var(--col-shadow-soft),
    0 0 28px rgba(8, 14, 30, 0.42);
  animation: glitch 7s infinite;
}

.hero-title-jp {
  margin-top: 8px;
  color: var(--col-offwhite);
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(11px, 1.2vw, 15px);
  font-weight: 300;
  letter-spacing: 0.6em;
  opacity: 0.62;
  text-shadow: 0 2px 7px var(--col-shadow);
}

.hero-catch-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 28px;
  max-width: min(660px, 60vw);
  margin-bottom: 80px;
}

.hero-catch-en {
  color: var(--col-teal);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 400;
  letter-spacing: 0.15em;
  opacity: 0.9;
  text-shadow: 0 2px 7px var(--col-shadow);
  text-transform: uppercase;
}

.hero-catch-divider {
  width: 1px;
  height: 14px;
  background: rgba(232, 232, 224, 0.38);
  box-shadow: 0 2px 5px var(--col-shadow-soft);
}

.hero-catch-jp {
  color: var(--col-offwhite);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px var(--col-shadow);
}

.hero-catch-jp em { color: var(--col-magenta); font-style: normal; }

.hero-story {
  max-width: 500px;
  margin-bottom: 28px;
  color: var(--col-offwhite);
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(12px, 1.1vw, 13px);
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.9;
  opacity: 0.82;
  text-shadow: 0 2px 8px var(--col-shadow);
}

.hero-story .accent { font-weight: 400; opacity: 1; }

.hero-onair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border: 1px solid rgba(200, 255, 0, 0.42);
  color: var(--col-neon);
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-decoration: none;
  text-shadow: 0 2px 6px var(--col-shadow);
  text-transform: uppercase;
  transition: background 0.2s ease;
}

.hero-onair::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--col-neon);
  box-shadow: 0 0 8px rgba(200, 255, 0, 0.68);
  animation: blink 1.5s infinite;
}

.hero-onair:hover { background: rgba(200, 255, 0, 0.08); }

.scroll-indicator {
  position: absolute;
  z-index: 10;
  right: 48px;
  bottom: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 7px var(--col-shadow);
}

.scroll-indicator span {
  color: var(--col-offwhite);
  font-family: "Rajdhani", sans-serif;
  font-size: 9px;
  letter-spacing: 0.4em;
  opacity: 0.58;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(232, 232, 224, 0.72), transparent);
  animation: scroll-drop 2s infinite;
}

/* Story以降の共通セクションは明示的にキャラクターより前面。 */
.content-section {
  position: relative;
  z-index: 5;
  overflow: hidden;
  padding: 120px 72px;
  border-top: 1px solid rgba(232, 232, 224, 0.08);
  background: var(--bg-top);
}

.content-section__watermark {
  position: absolute;
  top: 0.3em;
  left: 48px;
  z-index: 0;
  color: var(--col-offwhite);
  opacity: 0.07;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(64px, 12vw, 220px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.content-section__eyebrow,
.content-section__title,
.content-section__body {
  position: relative;
  z-index: 1;
}

.intro-section {
  position: relative;
  overflow: hidden;
  min-height: 900px;
}

.intro-section::after {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  /* 次のセクションへつなぐため、最下部だけをネイビーに収束。
     街並みを隠さないよう、グラデーションの領域は小さく保つ。 */
  height: 10%;
  content: "";
  background: linear-gradient(to bottom, rgba(10, 16, 32, 0) 0%, rgba(13, 20, 40, 0.26) 62%, #0d1428 100%);
  pointer-events: none;
}

.intro-visual {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

/* 夜空からビル群までを残しつつ、本文背面だけを薄く抑えるレイヤー。 */
.intro-visual::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(
    to bottom,
    rgba(6, 11, 25, 0.24) 0%,
    rgba(6, 11, 25, 0.36) 34%,
    rgba(6, 11, 25, 0.50) 66%,
    rgba(6, 11, 25, 0.56) 100%
  );
}

.intro-visual__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 画像を少し下寄りに見せ、上部に夜空、中盤からビル群が入る構図にする。 */
  object-position: center 47%;
}

#introduction .content-section__eyebrow,
#introduction .content-section__title,
#introduction .content-section__body {
  z-index: 2;
}

@media (max-width: 900px) {
  .intro-section { min-height: 700px; }
  .intro-section::after { height: 10%; }
  .intro-visual__bg { object-position: center 49%; }
  .intro-visual::after {
    background: linear-gradient(
      to bottom,
      rgba(6, 11, 25, 0.16) 0%,
      rgba(6, 11, 25, 0.28) 28%,
      rgba(6, 11, 25, 0.46) 64%,
      rgba(6, 11, 25, 0.54) 100%
    );
  }
}

.content-section--alt {
  background: #0d1428;
}

.content-section__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--col-teal);
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.content-section__eyebrow::before {
  display: block;
  width: 32px;
  height: 1px;
  content: "";
  background: var(--col-teal);
  opacity: 0.7;
}

.content-section__title {
  position: relative;
  margin-bottom: 40px;
  padding-bottom: 20px;
  color: var(--col-offwhite);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow:
    0 3px 4px var(--col-shadow),
    0 8px 18px var(--col-shadow-soft);
}

.content-section__title::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 2px;
  content: "";
  background: linear-gradient(to right, var(--col-teal), transparent);
}

.content-section__body {
  max-width: 640px;
  color: var(--col-offwhite);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 2.1;
  opacity: 0.86;
}

.content-section__body p { margin-bottom: 16px; }
.content-section__body p.space-before { padding-top: 28px; }

#introduction .content-section__body p {
  /* あらすじ本文の可読性を保つ既存ドロップシャドウ。背景を少し暗くした上で、
     明るいネオン背景上でも輪郭が残る強さへごく軽く補強する。 */
  text-shadow: 0 2px 9px var(--col-shadow), 0 5px 18px var(--col-shadow-soft);
}

.content-section__placeholder {
  color: var(--col-neon);
  font-size: 12px;
  opacity: 0.7;
}


/* ===== TOP PAGE SECTION TEXT REVEAL =====
   背景・ウォーターマーク・パララックスは動かさず、各セクションの
   テキストブロックだけを一塊で下からフェード表示する。 */
.content-section__text-block {
  position: relative;
  z-index: 2;
}

/* CSSアニメーションのキーフレームは使わず、開始・終了の2点を
   同じ時間軸で補間する。これにより途中で止まるように見える挙動を避ける。 */
.js-section-reveal {
  opacity: 0;
  transform: translate3d(0, 120px, 0);
  will-change: opacity, transform;
  /* 移動と同じ1.56秒の間、透明度も0→100を最後まで使って変化させる。
     opacityだけにlinearを使うことで、開始直後に不透明へ寄りすぎるのを防ぐ。 */
  transition:
    opacity 1.56s linear,
    transform 1.56s cubic-bezier(0.42, 0, 0.22, 1);
}

.js-section-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}


@media (prefers-reduced-motion: reduce) {
  .js-section-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== SCROLL REVEAL（名前の強調のみ） ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1),
              transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== コピー内テキスト装飾 ===== */
.copy-emphasis-magenta {
  /* 親のスクロール表示用transformで新しい積層コンテキストが作られても
     確実に見えるよう、疑似要素ではなく文字要素自身へ帯を描画する。 */
  display: inline;
  padding: 0.05em 0.30em 0.08em;
  color: var(--col-offwhite);
  font-weight: 700;
  background: var(--col-magenta);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.copy-emphasis-teal {
  font-weight: 700;
}

/* ===== On Air ===== */
.onair-work-title {
  margin-bottom: 8px;
  color: var(--col-offwhite);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-shadow:
    0 3px 4px var(--col-shadow),
    0 8px 18px var(--col-shadow-soft);
}

.onair-work-sub {
  display: block;
  margin-top: 6px;
  color: var(--col-teal);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
}

.onair-streaming-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 8px;
  color: var(--col-neon);
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-shadow: 0 2px 6px var(--col-shadow);
}

.onair-streaming-label {
  text-decoration: none;
}

.onair-streaming-label:hover {
  color: var(--col-offwhite);
}

.onair-streaming-label::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--col-neon);
  box-shadow: 0 0 8px rgba(200, 255, 0, 0.68);
  animation: blink 1.5s infinite;
}

/* ===== セクション共通CTA ===== */
.section-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 28px;
  border: 1px solid rgba(0, 229, 204, 0.5);
  color: var(--col-teal);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-shadow: 0 2px 6px var(--col-shadow);
  transition: background 0.2s ease;
}

.section-cta::after {
  content: "\2192";
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
}

.section-cta:hover { background: rgba(0, 229, 204, 0.08); }

/* ===== Staff & Cast クレジット ===== */
.credit-group-title {
  margin: 36px 0 18px;
  color: var(--col-teal);
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-shadow: 0 2px 6px var(--col-shadow);
}

.credit-group-title:first-child { margin-top: 0; }

.credit-list { margin: 0; }

.credit-item { margin-bottom: 24px; }
.credit-item:last-child { margin-bottom: 0; }

.credit-item dt {
  color: var(--col-offwhite);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.7;
  opacity: 0.75;
}

.credit-role-en {
  display: block;
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}

.credit-item dd {
  margin: 6px 0 0;
  color: var(--col-offwhite);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-shadow:
    0 2px 4px var(--col-shadow),
    0 6px 14px var(--col-shadow-soft);
}

.credit-item__cast { margin-top: 0; }

.credit-name-en {
  margin-left: 12px;
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  opacity: 0.6;
}

/* ===== Special ===== */
.special-subtitle {
  margin-bottom: 26px;
  color: var(--col-offwhite);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(21px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow:
    0 3px 4px var(--col-shadow),
    0 8px 18px var(--col-shadow-soft);
}

.content-section__closer {
  display: block;
  margin-top: 10px;
  color: var(--col-offwhite);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-shadow:
    0 3px 4px var(--col-shadow),
    0 8px 18px var(--col-shadow-soft);
}

@media (max-width: 900px) {
  .content-section__closer { white-space: normal; }
}

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 64px 24px 96px;
  border-top: 1px solid rgba(232, 232, 224, 0.08);
  background: var(--bg-top);
  text-align: center;
}

.site-footer__logo-img {
  height: 64px;
  width: auto;
}

.site-footer__sns {
  display: flex;
  gap: 28px;
  list-style: none;
}

.site-footer__sns a {
  color: var(--col-offwhite);
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  opacity: 0.75;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-footer__sns a:hover { color: var(--col-teal); opacity: 1; }

.site-footer__copyright {
  color: var(--col-offwhite);
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  opacity: 0.4;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.22; }
}

@keyframes scroll-drop {
  0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

@keyframes hero-rirry-reveal {
  0% {
    opacity: 0;
    transform: translateX(-18px);
    clip-path: inset(46% 0 46% 0);
    filter: brightness(1.55) contrast(1.22) drop-shadow(0 0 28px rgba(0, 229, 204, 0.28)) drop-shadow(0 0 56px rgba(255, 0, 170, 0.18));
  }
  13% {
    opacity: .5;
    transform: translateX(12px);
    clip-path: inset(14% 0 64% 0);
  }
  27% {
    opacity: .86;
    transform: translateX(-8px);
    clip-path: inset(63% 0 13% 0);
  }
  42% {
    opacity: .62;
    transform: translateX(5px);
    clip-path: inset(7% 0 25% 0);
  }
  60% {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(0);
    filter: drop-shadow(0 0 28px rgba(0, 229, 204, 0.28)) drop-shadow(0 0 56px rgba(255, 0, 170, 0.18));
  }
}

@keyframes glitch {
  0%, 90%, 100% { text-shadow: 0 3px 4px var(--col-shadow), 0 8px 18px var(--col-shadow-soft), 0 0 28px rgba(8, 14, 30, 0.42); transform: none; }
  91% { text-shadow: 3px 0 var(--col-magenta), -3px 0 var(--col-teal), 0 3px 4px var(--col-shadow); transform: translateX(2px); }
  92% { text-shadow: -2px 0 var(--col-magenta), 2px 0 var(--col-teal), 0 3px 4px var(--col-shadow); transform: translateX(-1px); }
  93% { text-shadow: 0 3px 4px var(--col-shadow), 0 8px 18px var(--col-shadow-soft), 0 0 28px rgba(8, 14, 30, 0.42); transform: none; }
}

@media (max-width: 900px) {
  /* iPhoneのSafari／Dropbox内蔵ビューアの下部UIに隠れないよう、
     MENUは安全領域＋ツールバー分だけ上に逃がす。 */
  .menu-toggle {
    right: max(18px, calc(env(safe-area-inset-right, 0px) + 18px));
    bottom: max(88px, calc(env(safe-area-inset-bottom, 0px) + 72px));
  }

  nav { padding: 16px 20px; }
  .nav-links { display: none; }

  .hero { min-height: 620px; }
  .hero-kv { background-position: 55% center; }

  .rirry-img {
    width: min(94vw, 530px);
    margin-top: -36px;
  }

  .hero-text { max-width: none; padding: 0 24px 34px; }
  .hero-title-en { font-size: clamp(39px, 12vw, 62px); }
  .hero-title-jp { letter-spacing: 0.38em; }
  .hero-catch-row { gap: 12px; margin-bottom: 56px; }
  .hero-catch-divider { display: none; }
  .hero-story { line-height: 2.1; margin-bottom: 24px; }
  .scroll-indicator { right: 20px; bottom: 34px; }
  .content-section { padding: 80px 24px; }
}

/* ===== MOBILE MENU ===== */
.menu-toggle {
  position: fixed;
  z-index: 420;
  right: 24px;
  bottom: 24px; /* PC / desktop */
  display: grid;
  place-items: center;
  width: 76px;
  min-height: 76px;
  border: 1px solid rgba(200, 255, 0, 0.82);
  background: rgba(5, 8, 20, 0.9);
  color: var(--col-neon);
  cursor: pointer;
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(8, 14, 30, 0.5), 0 8px 34px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateZ(0);
  -webkit-transform: translate3d(0, 0, 0);
  will-change: transform;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  outline: none;
  background: rgba(12, 20, 42, 0.92);
  border-color: var(--col-teal);
  color: var(--col-teal);
  transform: translateY(-2px);
}

.menu-toggle__label {
  display: block;
  margin-top: 8px;
}

.menu-toggle__icon {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  width: 28px;
  margin: 0 auto;
}

.menu-toggle__icon span {
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 0 8px rgba(200, 255, 0, 0.25);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  z-index: 380;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  padding: 80px 28px 126px;
  /* 背景とリリーがうっすら透ける、半透明のミッドナイトネイビー */
  background:
    linear-gradient(145deg, rgba(4, 7, 19, 0.48), rgba(7, 12, 28, 0.66)),
    rgba(3, 6, 16, 0.44);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu__inner {
  width: min(100%, 640px);
  margin: 0 auto;
  border-top: 1px solid rgba(0, 229, 204, 0.42);
  transform: translateY(22px);
  opacity: 0;
  transition: transform 0.3s ease 0.04s, opacity 0.26s ease 0.04s;
}

.mobile-menu.is-open .mobile-menu__inner { transform: translateY(0); opacity: 1; }

.mobile-menu__eyebrow {
  margin: 0 0 18px;
  color: var(--col-teal);
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.mobile-menu__list { list-style: none; }

.mobile-menu__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(232, 232, 224, 0.16);
  color: var(--col-offwhite);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-menu__link:hover,
.mobile-menu__link:focus-visible {
  outline: none;
  padding-left: 8px;
  color: var(--col-teal);
}

.mobile-menu__en {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.mobile-menu__jp {
  color: rgba(232, 232, 224, 0.72);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

body.menu-open { overflow: hidden; }

/* ===== ログ（ろぐ）浮遊パララックス ===== */
.log-parallax-wrap {
  position: relative;
  z-index: 6;
  height: 0;
  pointer-events: none;
}

.log-float {
  position: absolute;
  top: -90px;
  right: 6%;
  width: min(18vw, 190px);
  height: auto;
  will-change: transform;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 20px rgba(0, 229, 204, 0.25));
  animation: log-bob 6.5s ease-in-out infinite;
}

@keyframes log-bob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -20px; }
}

@media (prefers-reduced-motion: reduce) {
  .log-float { animation: none; }
}

@media (max-width: 900px) {
  .log-float { width: min(28vw, 130px); right: 4%; }
}

/* ===== 運用用の共通調整（2026-07 refactor） ===== */
.menu-toggle {
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== v6 CENTERED CONTENT TRIAL =====
   Hero以降をティザーサイトらしく中央へ集約する試作。
   情報量は増やさず、見出し・本文・CTAの重心だけを中央に移す。 */
.content-section {
  text-align: center;
}

.content-section__watermark {
  right: 0;
  left: 0;
  text-align: center;
}

.content-section__eyebrow {
  justify-content: center;
}

.content-section__eyebrow::after {
  display: block;
  width: 32px;
  height: 1px;
  content: "";
  background: var(--col-teal);
  opacity: 0.7;
}

.content-section__title::after {
  right: 0;
  left: 0;
  margin: 0 auto;
  background: linear-gradient(to right, transparent, var(--col-teal), transparent);
}

.content-section__body {
  margin-right: auto;
  margin-left: auto;
  max-width: 720px;
  text-align: center;
}

.onair-streaming-label {
  justify-content: center;
}

.credit-list {
  margin-right: auto;
  margin-left: auto;
  max-width: 680px;
}

.credit-item dd {
  margin-right: auto;
  margin-left: auto;
}

.special-subtitle,
.content-section__closer {
  text-align: center;
}

/* ピンク帯は本文用の影を継承させず、マゼンタ面の発色を優先する。 */
#introduction .content-section__body .copy-emphasis-magenta {
  text-shadow: none;
}

/* ===== v7 SECTION BACKGROUND TRANSPARENCY =====
   ONAIR以降は固定の渋谷夜景を、ごく薄く透かして見せる。
   文字の可読性を優先し、完全なガラス調にはしない。 */
#onair {
  background: rgba(13, 20, 40, 0.84);
}

#staffcast {
  background: rgba(10, 16, 32, 0.88);
}

#special {
  background: rgba(13, 20, 40, 0.82);
}

/* SPECIALの改行はPCとスマホで個別に制御する。 */
.special-mobile-break {
  display: none;
}
.special-desktop-break {
  display: block;
}

@media (max-width: 900px) {
  .content-section__body { max-width: 620px; }
  .special-mobile-break {
    display: block;
  }
  .special-desktop-break {
    display: none;
  }
  .credit-name-en {
    display: block;
    margin: 4px 0 0;
  }
}

/* ===== CHARACTER PAGE TRIAL =====
   プロフィール左／既存の立ち絵2種を右に並べる、縦に伸びすぎない構成。 */
.character-page {
  background: #09101f;
}

.character-page__fixed-bg {
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 10, 24, 0.54) 0%, rgba(7, 13, 28, 0.68) 54%, rgba(5, 9, 20, 0.92) 100%),
    url("../images/vertical-background.png") center center / cover no-repeat;
}

.character-page nav .nav-links a[aria-current="page"] {
  color: var(--col-teal);
  opacity: 1;
}

.character-profile {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  min-height: max(760px, 100svh);
  padding: 128px 7vw 80px;
  overflow: hidden;
}

.character-profile::after {
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 24%;
  content: "";
  background: linear-gradient(to bottom, rgba(7, 13, 28, 0), rgba(5, 9, 20, 0.76));
  pointer-events: none;
}

.character-profile__content {
  display: grid;
  grid-template-columns: minmax(300px, 0.84fr) minmax(500px, 1.16fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  width: min(1400px, 100%);
  margin: 0 auto;
}

.character-profile__copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 34px 0;
  text-align: left;
}

.character-profile__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
  color: var(--col-teal);
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px var(--col-shadow);
}

.character-profile__eyebrow::before {
  width: 32px;
  height: 1px;
  content: "";
  background: var(--col-teal);
}

.character-profile__name {
  color: var(--col-offwhite);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(34px, 4.1vw, 58px);
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.18;
  text-shadow: 0 3px 5px var(--col-shadow), 0 10px 22px var(--col-shadow-soft);
}


.character-profile__x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  margin-left: 12px;
  padding: 0 8px;
  border: 1px solid rgba(200, 255, 0, 0.48);
  color: var(--col-neon);
  font-family: "Rajdhani", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  transform: translateY(-0.12em);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.character-profile__x-link:hover {
  border-color: var(--col-neon);
  background: rgba(200, 255, 0, 0.08);
}

.character-profile__name-en {
  margin-top: 12px;
  color: var(--col-magenta);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px var(--col-shadow);
}

.character-profile__description {
  margin-top: clamp(30px, 4.4vh, 54px);
  color: var(--col-offwhite);
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 300;
  letter-spacing: 0.065em;
  line-height: 2.05;
  text-shadow: 0 2px 8px var(--col-shadow), 0 5px 15px var(--col-shadow-soft);
}

.character-profile__description p + p { margin-top: 18px; }

.character-profile__facts {
  margin-top: clamp(28px, 4vh, 46px);
  padding-top: 20px;
  border-top: 1px solid rgba(0, 229, 204, 0.42);
}

.character-profile__facts h2 {
  margin-bottom: 13px;
  color: var(--col-teal);
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.character-profile__facts dl { width: min(100%, 430px); }
.character-profile__facts dl > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(232, 232, 224, 0.16);
}
.character-profile__facts dt {
  color: rgba(232, 232, 224, 0.62);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.11em;
}
.character-profile__facts dd {
  color: var(--col-offwhite);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 7px var(--col-shadow);
}

.character-profile__visuals {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  min-height: min(70svh, 760px);
  padding: 16px 0 0;
}

.character-profile__visuals::before {
  position: absolute;
  z-index: 0;
  right: 4%;
  bottom: 9%;
  left: 4%;
  height: 36%;
  content: "";
  background: radial-gradient(ellipse at center, rgba(255, 0, 170, 0.14), rgba(0, 229, 204, 0.06) 42%, transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}

.character-profile__visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: center;
  height: 100%;
}

.character-profile__visual img {
  display: block;
  width: min(100%, 430px);
  height: auto;
  max-height: min(72svh, 780px);
  aspect-ratio: auto;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.38));
}

.character-profile__visual--back { transform: translateX(-4%); }

/* 1枚立ち絵のCharacterページ用。既存の右側ビジュアル領域を1体で使う。 */
.character-profile__visuals--single {
  display: flex;
  align-items: end;
  justify-content: center;
}
.character-profile__visual--single {
  width: min(100%, 560px);
}
.character-profile__visual--single img {
  width: min(100%, 520px);
}

/* 立ち絵共通：背景との境界を明確にする細い白縁と、最小限の接地影。 */
.character-profile__visual img {
  filter:
    drop-shadow(1px 0 0 rgba(255, 255, 255, 0.72))
    drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.72))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.72))
    drop-shadow(0 14px 24px rgba(0, 0, 0, 0.34));
}
.character-profile__content--text-only {
  grid-template-columns: minmax(0, 720px);
  justify-content: start;
}
.character-profile__content--text-only .character-profile__copy {
  max-width: 720px;
}



/* ===== CHARACTER INTRO REVEAL =====
   テキストと各立ち絵を同時に表示する、最小構成の初回演出。 */
.js-character-intro .character-profile__copy,
.js-character-intro .character-profile__visual {
  will-change: transform, opacity;
}

.js-character-intro .character-profile__copy {
  opacity: 0;
  transform: translate3d(-92px, 0, 0);
  transition: transform 1.06s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.06s ease-out;
}

.js-character-intro .character-profile__visual {
  opacity: 0;
  transform: scale(1.16);
  transform-origin: center center;
  transition: transform 1.08s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.08s ease-out;
}

.js-character-intro.is-intro-visible .character-profile__copy,
.js-character-intro.is-intro-visible .character-profile__visual {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-character-intro .character-profile__copy,
  .js-character-intro .character-profile__visual {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.character-profile__ability {
  margin-top: clamp(28px, 4vh, 44px);
  padding-top: 0;
}

.character-profile__ability h2 {
  margin: 0 0 12px;
  color: var(--col-teal);
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.character-profile__ability-name {
  color: var(--col-offwhite);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(20px, 1.9vw, 28px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-shadow: 0 3px 5px var(--col-shadow), 0 8px 18px var(--col-shadow-soft);
}

.character-profile__ability-copy {
  margin-top: 16px;
  color: var(--col-offwhite);
  font-size: clamp(12px, 0.98vw, 14px);
  font-weight: 300;
  letter-spacing: 0.065em;
  line-height: 2.02;
  text-shadow: 0 2px 8px var(--col-shadow), 0 5px 15px var(--col-shadow-soft);
}

.character-profile__ability-copy p + p { margin-top: 12px; }

@media (max-width: 900px) {
  .character-profile {
    display: block;
    min-height: 0;
    padding: 116px 24px 72px;
  }
  .character-profile__content {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .character-profile__copy {
    order: 1;
    width: 100%;
    padding: 0;
  }
  .character-profile__visuals {
    order: 2;
    width: min(100%, 560px);
    min-height: min(74svh, 610px);
    margin: 0 auto;
  }
  .character-profile__description { margin-top: 26px; }
  .character-profile__facts { margin-top: 30px; }
  .character-profile__ability { margin-top: 30px; }
  .character-profile__visual img { max-height: min(68svh, 570px); }
  .character-profile__visual--back { transform: translateX(-2%); }
}

@media (max-width: 480px) {
  .character-profile { padding-right: 20px; padding-left: 20px; }
  .character-profile__name { font-size: 32px; }
  .character-profile__x-link {
    min-width: 28px;
    height: 28px;
    margin-left: 8px;
    padding: 0 7px;
    font-size: 14px;
  }
  .character-profile__name-en { font-size: 14px; }
  .character-profile__description { font-size: 12px; line-height: 2; }
  .character-profile__description br { display: none; }
  .character-profile__visuals { min-height: 420px; }
  .character-profile__visual img { max-height: 440px; }
  .character-profile__facts dl > div { grid-template-columns: 70px 1fr; }
  .character-profile__ability-name { font-size: 20px; }
  .character-profile__ability-copy { font-size: 12px; line-height: 2; }
}


/* ===== CHARACTER PAGE COMPACT LAYOUT (v10) =====
   PCでスクロールなしに収めることを優先。左の文章幅を広げ、余白と行間を圧縮し、
   2枚の立ち絵を従来より大きく見せる。 */
@media (min-width: 901px) {
  .character-profile {
    min-height: 100svh;
    padding: 96px clamp(32px, 5vw, 88px) 34px;
  }

  .character-profile__content {
    grid-template-columns: minmax(560px, 1.05fr) minmax(560px, 0.95fr);
    align-items: end;
    gap: clamp(18px, 2.8vw, 48px);
    width: min(1560px, 100%);
  }

  .character-profile__copy {
    max-width: 720px;
    padding: 6px 0 0;
    align-self: center;
  }

  .character-profile__eyebrow {
    margin-bottom: 10px;
  }

  .character-profile__name {
    font-size: clamp(36px, 3.2vw, 54px);
    line-height: 1.1;
  }

  .character-profile__name-en {
    margin-top: 7px;
  }

  .character-profile__description {
    max-width: 700px;
    margin-top: clamp(18px, 2.6vh, 28px);
    font-size: clamp(13px, 0.96vw, 15px);
    line-height: 1.78;
  }

  .character-profile__description p + p {
    margin-top: 10px;
  }

  .character-profile__facts {
    margin-top: clamp(16px, 2.4vh, 26px);
    padding-top: 13px;
  }

  .character-profile__facts h2,
  .character-profile__ability h2 {
    margin-bottom: 8px;
  }

  .character-profile__facts dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 700px);
    border-top: 1px solid rgba(232, 232, 224, 0.16);
  }

  .character-profile__facts dl > div {
    display: block;
    padding: 8px 14px 8px 0;
    border-bottom: 1px solid rgba(232, 232, 224, 0.16);
  }

  .character-profile__facts dl > div + div {
    padding-left: 14px;
    border-left: 1px solid rgba(232, 232, 224, 0.16);
  }

  .character-profile__facts dt {
    margin-bottom: 2px;
    font-size: 10px;
  }

  .character-profile__facts dd {
    font-size: 13px;
  }

  .character-profile__ability {
    margin-top: clamp(16px, 2.4vh, 26px);
    padding-top: 0;
  }

  .character-profile__ability-name {
    font-size: clamp(18px, 1.55vw, 24px);
    line-height: 1.25;
  }

  .character-profile__ability-copy {
    max-width: 700px;
    margin-top: 8px;
    font-size: clamp(12px, 0.9vw, 14px);
    line-height: 1.72;
  }

  .character-profile__ability-copy p + p {
    margin-top: 6px;
  }

  .character-profile__visuals {
    min-height: min(82svh, 880px);
    margin-right: -1vw;
    padding-top: 0;
  }

  .character-profile__visual img {
    width: min(116%, 490px);
    max-width: none;
    max-height: min(84svh, 850px);
  }

  .character-profile__visual--front {
    justify-content: flex-end;
    transform: translateX(7%);
  }

  .character-profile__visual--back {
    justify-content: flex-start;
    transform: translateX(-9%);
  }

  .character-profile__visuals::before {
    right: -2%;
    left: -2%;
    bottom: 7%;
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .character-profile {
    padding-top: 82px;
    padding-bottom: 22px;
  }

  .character-profile__eyebrow { margin-bottom: 7px; }
  .character-profile__description { margin-top: 14px; line-height: 1.66; }
  .character-profile__description p + p { margin-top: 7px; }
  .character-profile__facts,
  .character-profile__ability { margin-top: 13px; padding-top: 10px; }
  .character-profile__visuals { min-height: 76svh; }
  .character-profile__visual img { max-height: 78svh; }
}



@media (min-width: 901px) {
  .character-profile__visuals--single {
    margin-right: 0;
  }
  .character-profile__visuals--single .character-profile__visual--single {
    width: min(100%, 620px);
  }
  .character-profile__visuals--single img {
    width: min(100%, 600px);
    max-height: min(84svh, 850px);
  }
}

/* ===== CHARACTER ICON RAIL (v13) =====
   CHARACTERページの左テキストカラム下部に配置する、他キャラクター用の小型レール。
   現在ページ（RirryEffect）のアイコンは置かず、4人＋NULLの合計5枠だけを表示する。 */
.character-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  /* ABILITY本文から十分に離し、レールの直前にのみマゼンタの区切り線を置く。 */
  margin-top: clamp(26px, 3vh, 34px);
  padding-top: clamp(14px, 1.8vh, 20px);
  border-top: 1px solid rgba(255, 0, 170, 0.52);
}

.character-links__item {
  display: grid;
  flex: 0 0 auto;
  width: 50px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(232, 232, 224, 0.48);
  background: rgba(7, 13, 28, 0.56);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.20);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.character-links__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.character-links__item:hover,
.character-links__item:focus-visible {
  outline: none;
  border-color: rgba(255, 110, 202, 0.9);
  background: rgba(255, 0, 170, 0.48);
  box-shadow: 0 0 0 1px rgba(255, 0, 170, 0.18), 0 0 12px rgba(255, 0, 170, 0.16);
}

.character-links__item:hover img,
.character-links__item:focus-visible img {
  filter: saturate(1.03) brightness(1.08) contrast(1.03);
  opacity: 0.98;
}

/* NULLは画像を置かない空枠。ほかのアイコンと同じ通常時・ホバー時の挙動にする。 */
.character-links__item--null {
  background: rgba(7, 13, 28, 0.56);
}

@media (max-width: 480px) {
  .character-links {
    gap: 8px;
  }

  .character-links__item {
    width: 46px;
  }
}


/* ===== CHARACTER PROFILE / ICON RAIL SPACING (v15) =====
   ABILITYの説明とアイコンレールの間に余白を作り、
   PCでは左プロフィール全体を少し上へ寄せて1画面内の収まりを維持する。 */
@media (min-width: 901px) {
  .character-profile__copy {
    /* 高さを増やした上部ナビと干渉させず、本文・レールを1画面内に収める。 */
    transform: translateY(-16px);
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .character-profile__copy {
    transform: translateY(-14px);
  }

  .character-links {
    margin-top: 20px;
    padding-top: 12px;
  }
}


/* ===== HEADER SCALE / CHARACTER DIVIDER (v16-v17) =====
   上部ナビは視認性を優先して文字・ロゴ・上下余白を拡大。
   CHARACTERのマゼンタ罫線はPROFILE直下ではなく、ABILITY説明とアイコンレールの間に移設。 */
@media (min-width: 901px) {
  .character-profile {
    padding-top: 124px;
  }
}

@media (max-width: 900px) {
  nav {
    padding: 18px 20px;
  }

  .nav-logo-img {
    height: 26px;
  }
}

/* ===== LOG CHARACTER PAGE (v24) =====
   ろぐはプロフィール・能力欄を設けず、説明文と設定画を主役にした構成。 */
.character-profile--log .character-profile__copy {
  max-width: 650px;
}

.character-profile__description--log {
  max-width: 620px;
}

.character-profile--log .character-links {
  margin-top: clamp(34px, 4.8vh, 58px);
}

.character-profile--log .character-profile__visuals {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  min-height: min(74svh, 760px);
  margin-right: 0;
}

.character-profile--log .character-profile__visual {
  align-items: center;
}

.character-profile--log .character-profile__visual img {
  width: min(118%, 560px);
  max-height: min(72svh, 760px);
  object-position: center;
}

.character-profile--log .character-profile__visual--front {
  transform: translateX(5%);
}

.character-profile--log .character-profile__visual--back {
  transform: translateX(-7%);
}

.character-profile--log .character-profile__visuals::before {
  right: 0;
  bottom: 10%;
  left: 0;
  height: 42%;
  background: radial-gradient(ellipse at center, rgba(0, 229, 204, 0.17), rgba(255, 0, 170, 0.05) 44%, transparent 72%);
}

.character-links__item[aria-current="page"] {
  border-color: rgba(0, 229, 204, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 229, 204, 0.18), 0 0 12px rgba(0, 229, 204, 0.16);
}

@media (max-width: 900px) {
  .character-profile--log .character-profile__visuals {
    min-height: min(72svh, 610px);
  }

  .character-profile--log .character-profile__visual img {
    width: min(112%, 510px);
    max-height: min(66svh, 560px);
  }
}

@media (max-width: 480px) {
  .character-profile--log .character-profile__visuals {
    min-height: 390px;
  }

  .character-profile--log .character-profile__visual img {
    max-height: 380px;
  }
}

/* ===== CHARACTER MOBILE FLOW =====
   スマホでは、名前の直後に立ち絵を置き、その後に説明・プロフィール・切替レールを続ける。 */
.character-profile__title-block,
.character-profile__details {
  width: 100%;
}

@media (max-width: 900px) {
  .character-profile__content {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .character-profile__copy {
    display: contents;
  }

  .character-profile__title-block {
    order: 1;
    width: 100%;
  }

  .character-profile__visuals {
    order: 2;
    margin-top: 24px;
    margin-bottom: 28px;
  }

  .character-profile__details {
    order: 3;
    width: 100%;
  }

  /* display: contentsでは親要素に変形を掛けられないため、スマホだけは
     テキストの前半／後半へ同一の登場演出を適用する。 */
  .js-character-intro .character-profile__copy {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js-character-intro .character-profile__title-block,
  .js-character-intro .character-profile__details {
    opacity: 0;
    transform: translate3d(-72px, 0, 0);
    transition:
      transform 1.06s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 1.06s ease-out;
  }

  .js-character-intro.is-intro-visible .character-profile__title-block,
  .js-character-intro.is-intro-visible .character-profile__details {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 900px) {
  .js-character-intro .character-profile__title-block,
  .js-character-intro .character-profile__details {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* v53: 立ち絵の縦横比を常に素材の比率で保持する。親領域の高さに引っ張られて横に伸びないようにする。 */
.character-profile__visual img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

/* ===== v35 CHARACTER OUTLINE / INTRO NAME REVEAL =====
   全キャラクターの立ち絵を背景から切り離すため、画像のアルファ境界にだけ
   白い1px相当の縁取りと最小限の接地影を付与する。素材そのものは加工しない。 */
.character-profile__visual img {
  filter:
    drop-shadow(1px 0 0 rgba(255, 255, 255, 0.86))
    drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.86))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.86))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.86))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.24));
}

/* ドリブンだけに付いていた試験用の縁取り指定を、全キャラクター共通仕様へ統合。 */
.character-page--driven .character-profile__visual--single img {
  filter:
    drop-shadow(1px 0 0 rgba(255, 255, 255, 0.86))
    drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.86))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.86))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.86))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.24));
}

/* あらすじ内の「リリー・エフェクト」は二段階で登場する。
   1) マゼンタ帯が左から伸びる  2) 帯が出きってから文字が下から透明→不透明で現れる。 */
.js-section-reveal .intro-name-reveal {
  position: relative;
  display: inline-block;
  padding: 0.05em 0.30em 0.08em;
  vertical-align: baseline;
}

.js-section-reveal .intro-name-reveal__band {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  background: var(--col-magenta);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.56s cubic-bezier(0.16, 1, 0.3, 1) 0.58s;
}

.js-section-reveal .intro-name-reveal__text {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0;
  background: transparent;
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.58s cubic-bezier(0.22, 0.85, 0.35, 1) 1.10s,
    transform 0.58s cubic-bezier(0.22, 0.85, 0.35, 1) 1.10s;
}

.js-section-reveal.is-visible .intro-name-reveal__band {
  transform: scaleX(1);
}

.js-section-reveal.is-visible .intro-name-reveal__text {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .js-section-reveal .intro-name-reveal__band {
    transform: scaleX(1);
    transition: none;
  }
  .js-section-reveal .intro-name-reveal__text {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== STORY PAGE ===== */
.story-page { background: #08101f; }
.story-page .character-page__fixed-bg { opacity: 0.72; }
.story-page .nav-links a[aria-current="page"] { color: var(--col-teal); opacity: 1; }
.story-main { position: relative; z-index: 2; width: min(1480px, calc(100% - 144px)); min-height: 100svh; margin: 0 auto; padding: 132px 0 40px; }
.story-heading { margin-bottom: 30px; text-shadow: 0 5px 16px rgba(0,0,0,.46); }
.story-heading__eyebrow { margin-bottom: 7px; color: var(--col-magenta); font-family: "Rajdhani", sans-serif; font-size: 15px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; }
.story-heading h1 { font-family: "Orbitron", sans-serif; font-size: clamp(46px, 5.4vw, 74px); line-height: .9; letter-spacing: .05em; text-transform: uppercase; }
.story-heading > p:last-child { margin-top: 8px; font-size: 15px; font-weight: 700; letter-spacing: .32em; }
.story-episode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px 22px; }
.story-episode-card { display: block; min-width: 0; color: var(--col-offwhite); text-align: left; background: transparent; border: 0; cursor: pointer; }
.story-thumb { position: relative; display: grid; aspect-ratio: 16 / 7.8; overflow: hidden; place-items: center; border: 1px solid rgba(232,232,224,.52); background: linear-gradient(135deg, rgba(12,25,49,.88), rgba(115,10,79,.58)); box-shadow: 0 12px 32px rgba(0,0,0,.28); transition: transform .32s cubic-bezier(.16,1,.3,1), border-color .32s ease, box-shadow .32s ease; }
.story-thumb::before, .story-thumb::after { position:absolute; content:""; pointer-events:none; }
.story-thumb::before { inset: 12px; border: 1px solid rgba(232,232,224,.20); }
.story-thumb::after { width: 160%; height: 1px; background: rgba(0,229,204,.38); transform: rotate(-34deg); }
.story-thumb span { position: relative; z-index: 1; color: rgba(232,232,224,.58); font-family: "Rajdhani", sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .20em; line-height: 1.3; text-align: center; }
.story-thumb--2, .story-thumb--6 { background: linear-gradient(135deg, rgba(16,31,58,.88), rgba(0,104,126,.56)); }
.story-thumb--3, .story-thumb--7 { background: linear-gradient(135deg, rgba(32,12,50,.88), rgba(182,0,91,.50)); }
.story-thumb--4, .story-thumb--8 { background: linear-gradient(135deg, rgba(8,24,43,.94), rgba(41,60,112,.70)); }
.story-episode-card__meta { display:block; margin-top: 9px; color: var(--col-teal); font-family: "Rajdhani", sans-serif; font-size: 13px; font-weight:700; letter-spacing:.18em; }
.story-episode-card strong { display:block; margin-top: 3px; font-size: 17px; letter-spacing: .12em; }
.story-episode-card:hover .story-thumb, .story-episode-card:focus-visible .story-thumb { border-color: var(--col-magenta); box-shadow: 0 14px 34px rgba(255,0,170,.20); transform: translateY(-6px); }
.story-episode-card:focus-visible { outline: 2px solid var(--col-teal); outline-offset: 6px; }
.story-modal { position: fixed; z-index: 300; inset: 0; display: grid; visibility: hidden; place-items: center; opacity: 0; pointer-events: none; transition: opacity .3s ease, visibility .3s step-end; }
.story-modal.is-open { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .3s ease; }
.story-modal__backdrop { position:absolute; inset:0; background: rgba(3,7,18,.74); backdrop-filter: blur(15px); }
.story-modal__panel { position:relative; z-index:1; width: min(980px, calc(100% - 56px)); max-height: min(86svh, 820px); overflow: auto; border:1px solid rgba(232,232,224,.42); background: linear-gradient(145deg, rgba(20,30,55,.96), rgba(9,14,30,.95)); box-shadow: 0 22px 70px rgba(0,0,0,.5); }
.story-modal__close { position:absolute; z-index:5; top:16px; right:20px; width:44px; height:44px; color:var(--col-offwhite); font-size:36px; line-height:1; background:rgba(8,14,30,.62); border:1px solid rgba(232,232,224,.46); cursor:pointer; }
.story-modal__close:hover, .story-modal__close:focus-visible { color:var(--col-teal); border-color:var(--col-teal); }
.story-modal__slider { position:relative; aspect-ratio:16/8; min-height:300px; overflow:hidden; background:#0c172d; }
.story-modal__slide { position:absolute; inset:0; display:grid; opacity:0; place-items:center; color:rgba(232,232,224,.62); font-family:"Rajdhani",sans-serif; font-size:20px; font-weight:700; letter-spacing:.26em; line-height:1.4; text-align:center; background: linear-gradient(135deg, rgba(11,29,55,.92), rgba(116,7,83,.66)); transform:scale(1.05); transition: opacity .65s ease, transform 1.1s ease; }
.story-modal__slide:nth-child(2) { background:linear-gradient(135deg, rgba(13,27,52,.9), rgba(0,119,137,.62)); }
.story-modal__slide:nth-child(3) { background:linear-gradient(135deg, rgba(39,12,60,.9), rgba(186,0,94,.58)); }
.story-modal__slide.is-active { opacity:1; transform:scale(1); }
.story-modal__pagination { position:absolute; z-index:2; right:24px; bottom:20px; display:flex; gap:8px; }
.story-modal__pagination i { width:24px; height:2px; background:rgba(232,232,224,.36); }
.story-modal__pagination i.is-active { background:var(--col-magenta); }
.story-modal__copy { padding:34px 46px 42px; }
.story-modal__episode { color:var(--col-teal); font-family:"Rajdhani",sans-serif; font-size:14px; font-weight:700; letter-spacing:.26em; }
.story-modal__copy h2 { margin-top:8px; font-size: clamp(28px,4vw,45px); letter-spacing:.16em; }
.story-modal__summary { margin-top:22px; font-size:16px; letter-spacing:.08em; line-height:2; }
body.story-modal-open { overflow:hidden; }
@media (max-width: 900px) { .story-main { width:min(100% - 40px, 680px); padding:124px 0 76px; }.story-heading { margin-bottom:40px; }.story-episode-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:30px 15px; }.story-episode-card strong { font-size:16px; }.story-modal__panel { width:min(100% - 28px, 680px); }.story-modal__slider { min-height:220px; }.story-modal__copy { padding:28px 24px 34px; }.story-modal__close { top:10px; right:10px; }.story-modal__slide { font-size:15px; }.story-modal__summary { font-size:14px; } }
@media (prefers-reduced-motion: reduce) { .story-thumb, .story-modal, .story-modal__slide { transition:none; } }


/* ===== v41 STORY CTA / CHARACTER MOBILE FLOW ===== */
.story-heading__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
.story-tiktok-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 18px;
  color: var(--col-offwhite);
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(11, 20, 43, .46);
  border: 1px solid rgba(0, 229, 204, .72);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
}
.story-tiktok-button span { color: var(--col-teal); font-size: 18px; line-height: 1; }
.story-tiktok-button:hover,
.story-tiktok-button:focus-visible {
  color: #fff;
  background: rgba(232, 0, 150, .52);
  border-color: rgba(255, 255, 255, .88);
  transform: translateY(-2px);
}
.story-tiktok-button--modal {
  margin-top: 28px;
  border-color: rgba(255, 0, 170, .74);
}

@media (max-width: 900px) {
  /* 名前の直後に立ち絵を置き、空きすぎていた間隔を縮小。 */
  .character-profile__visuals {
    margin-top: 10px;
    margin-bottom: 20px;
  }
  .story-heading__row {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .story-tiktok-button { min-height: 40px; font-size: 13px; }
}


/* ===== v42 STORY CTA / MODAL COMPACT ===== */
.story-tiktok-button {
  color: var(--col-teal);
  border-color: rgba(0, 229, 204, .72);
  background: rgba(11, 20, 43, .46);
}
.story-tiktok-button span { color: inherit; }
.story-tiktok-button:hover,
.story-tiktok-button:focus-visible {
  color: var(--col-offwhite);
  background: rgba(0, 229, 204, .14);
  border-color: var(--col-teal);
}
.story-modal__panel {
  max-height: min(84svh, 760px);
  overflow: hidden;
}
.story-modal__slider {
  aspect-ratio: 16 / 6.6;
  min-height: 0;
}
.story-modal__copy { padding: 22px 46px 26px; }
.story-modal__title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.story-modal__title-group { min-width: 0; }
.story-modal__copy h2 {
  margin-top: 5px;
  font-size: clamp(23px, 2.6vw, 34px);
  line-height: 1.06;
}
.story-modal__summary { margin-top: 12px; line-height: 1.72; }
.story-tiktok-button--modal {
  margin-top: 0;
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
  border-color: rgba(0, 229, 204, .72);
}
@media (max-width: 900px) {
  .story-modal__panel { max-height: 86svh; overflow: auto; }
  .story-modal__slider { aspect-ratio: 16 / 8; }
  .story-modal__copy { padding: 24px 24px 30px; }
  .story-modal__title-row { align-items: flex-start; flex-direction: column; gap: 14px; }
  .story-modal__copy h2 { font-size: 25px; }
}


/* ===== v44 MOBILE INTRO COPY COMPOSITION =====
   スマホでは、あらすじを文節単位で明示的に改行して可読性を確保する。
   PCでは従来の横組みを維持する。 */
.intro-copy__line { display: inline; }

@media (max-width: 900px) {
  /* v46: 指定した文節を「自動折り返し」させず、1行単位で保持する。
     長い文節もiPhone幅へ収まるよう、あらすじだけ文字サイズと字間を最適化。 */
  #introduction .content-section__body.intro-copy {
    width: 100%;
    max-width: none;
    font-size: clamp(11px, 3.45vw, 14px);
    letter-spacing: .01em;
    line-height: 2.0;
  }

  #introduction .intro-copy__line {
    display: block;
    white-space: nowrap;
  }

  #introduction .intro-copy__desktop-break {
    display: none;
  }

  #introduction .intro-name-reveal {
    display: inline-block;
    margin-top: .1em;
  }

  #introduction .content-section__body.intro-copy p {
    margin-bottom: 22px;
  }

  #introduction .content-section__body.intro-copy p.space-before {
    padding-top: 16px;
  }

  #introduction .content-section__closer {
    font-size: 1.16em;
    line-height: 1.7;
  }
}


@media (prefers-reduced-motion: reduce) {
  body.hero-reveal-ready .hero .rirry-img {
    animation: hero-rirry-simple-reveal .25s ease-out both;
  }
}

@keyframes hero-rirry-simple-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== TOP PAGE LOADER =====
   初回表示で背景・主役素材が揃うまで、完成前のHeroを見せない。 */
body.is-loading { overflow: hidden; }
.site-loader {
  position: fixed;
  z-index: 11000;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 32px;
  background:
    radial-gradient(circle at 50% 48%, rgba(17, 34, 52, .38) 0%, rgba(4, 8, 18, .96) 54%, #030611 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity .58s ease, visibility .58s step-end;
}
.site-loader.is-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.site-loader__core {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(34vw, 200px);
}
.site-loader__logo {
  position: relative;
  width: 100%;
  aspect-ratio: 115.73 / 78.64;
}
.site-loader__logo-fill-clip,
.site-loader__logo-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.site-loader__logo-fill-clip {
  --loader-progress: 0;
  overflow: hidden;
  clip-path: inset(calc((1 - var(--loader-progress)) * 100%) 0 0 0);
  transition: clip-path .34s cubic-bezier(.22, .61, .36, 1);
}
.site-loader__logo-fill-clip img,
.site-loader__logo-outline {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.site-loader__logo-outline { z-index: 2; }
.site-loader__label {
  margin-top: 26px;
  color: var(--col-neon);
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .34em;
  text-indent: .34em;
}
.site-loader__track {
  width: min(100%, 260px);
  height: 1px;
  margin-top: 14px;
  overflow: hidden;
  background: rgba(200, 255, 0, .24);
}
.site-loader__track span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--col-neon);
  box-shadow: 0 0 12px rgba(200, 255, 0, .82);
  transition: transform .34s cubic-bezier(.22, .61, .36, 1);
}
@media (max-width: 900px) {
  .site-loader__core { width: min(38vw, 165px); }
  .site-loader__label { margin-top: 20px; font-size: 11px; letter-spacing: .28em; text-indent: .28em; }
  .site-loader__track { width: min(100%, 210px); margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-loader, .site-loader__logo-fill-clip, .site-loader__track span { transition-duration: .01ms; }
}


/* ===== v55 CHARACTER VISUAL INTRO / MOBILE SIZE CORRECTION =====
   立ち絵の位置決めと登場アニメーションを分離する。
   各画像そのものを中心起点で 116% → 100% に戻すため、
   正面・背面それぞれが独立して拡大→縮小する。 */
.character-profile__visual {
  --character-visual-shift-x: 0%;
  transform: translateX(var(--character-visual-shift-x));
}
.character-profile__visual--back {
  --character-visual-shift-x: -4%;
}

.js-character-intro .character-profile__visual {
  opacity: 1;
  transform: translateX(var(--character-visual-shift-x));
  transition: none;
  will-change: auto;
}

.js-character-intro .character-profile__visual img {
  opacity: 0;
  transform: scale(1.16);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  transition: transform 1.08s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.08s ease-out;
}

.js-character-intro.is-intro-visible .character-profile__visual img {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .js-character-intro .character-profile__visual img {
    opacity: 1;
    transform: scale(1);
    transition: none;
  }
}

/* PC：従来の正面・背面の配置位置を保ったまま、画像単位でアニメーションする。 */
@media (min-width: 901px) {
  .character-profile__visual--front { --character-visual-shift-x: 7%; }
  .character-profile__visual--back { --character-visual-shift-x: -9%; }
  .character-profile--log .character-profile__visual--front { --character-visual-shift-x: 5%; }
  .character-profile--log .character-profile__visual--back { --character-visual-shift-x: -7%; }
}

/* スマホ：2体表示の立ち位置は維持。単体立ち絵は素材比率を保った高さ基準に統一する。 */
@media (max-width: 900px) {
  .character-profile__visual--front { --character-visual-shift-x: 0%; }
  .character-profile__visual--back { --character-visual-shift-x: -2%; }
  .character-profile--log .character-profile__visual--front { --character-visual-shift-x: 5%; }
  .character-profile--log .character-profile__visual--back { --character-visual-shift-x: -7%; }

  .character-profile__visuals--single {
    width: min(100%, 390px);
    min-height: min(70svh, 600px);
  }

  .character-profile__visuals--single .character-profile__visual--single {
    width: 100%;
    height: 100%;
  }

  .character-profile__visuals--single .character-profile__visual--single img {
    width: auto;
    height: min(67svh, 550px);
    max-width: 100%;
    max-height: none;
  }
}

@media (max-width: 480px) {
  .character-profile__visuals--single {
    min-height: min(66svh, 520px);
  }

  .character-profile__visuals--single .character-profile__visual--single img {
    height: min(63svh, 500px);
  }
}

/* Heroのノイズ開始はローダーがほぼ消えた後に行う。
   ローダーの裏で再生してスマホでは見えなくなる状態を防ぐ。 */
body.is-loaded .hero .rirry-img {
  animation: none;
}

body.is-loaded.hero-reveal-ready .hero .rirry-img {
  animation: hero-rirry-reveal .82s cubic-bezier(.2, .74, .23, 1) both;
}

html.skip-hero-reveal body.is-loaded.hero-reveal-ready .hero .rirry-img {
  animation: none;
}

/* 表示完了後も、各立ち絵に設定済みの配置オフセットを保持する。 */
.js-character-intro.is-intro-visible .character-profile__visual {
  opacity: 1;
  transform: translateX(var(--character-visual-shift-x));
}


/* ===== v56 CHARACTER MOBILE STABILITY / HERO REVEAL TIMING =====
   単体立ち絵はスマホでも「高さ基準・縦横比維持」で表示する。
   以前のルールの競合で横幅が親要素に引っ張られないよう、単体用の枠を明示する。 */
@media (max-width: 900px) {
  .character-profile__visuals--single {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    min-height: min(66svh, 540px);
    margin-right: auto;
    margin-left: auto;
  }

  .character-profile__visuals--single .character-profile__visual--single {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: auto;
    --character-visual-shift-x: 0%;
  }

  .character-profile__visuals--single .character-profile__visual--single img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(64svh, 520px);
    object-fit: contain;
    object-position: bottom center;
  }

  /* 2体表示は、各画像の位置を保ったまま画像自身を拡大→縮小する。 */
  .character-profile__visual--front { --character-visual-shift-x: 2%; }
  .character-profile__visual--back { --character-visual-shift-x: -2%; }
  .character-profile--log .character-profile__visual--front { --character-visual-shift-x: 2%; }
  .character-profile--log .character-profile__visual--back { --character-visual-shift-x: -2%; }
}

@media (max-width: 480px) {
  .character-profile__visuals--single {
    min-height: 430px;
  }

  .character-profile__visuals--single .character-profile__visual--single img {
    max-height: 420px;
  }
}

@media (min-width: 901px) {
  /* PC版もリリー／ろぐの各画像を独立した起点でアニメーションさせつつ、従来の配置を保持する。 */
  .character-profile__visual--front { --character-visual-shift-x: 7%; }
  .character-profile__visual--back { --character-visual-shift-x: -9%; }
  .character-profile--log .character-profile__visual--front { --character-visual-shift-x: 5%; }
  .character-profile--log .character-profile__visual--back { --character-visual-shift-x: -7%; }
}

/* 同じタブでアンカーへ戻る場合は、ノイズを出さず通常表示へ戻す。 */
html.skip-hero-reveal body.is-loaded .hero .rirry-img {
  opacity: 1;
  clip-path: none;
}
\n\n/* ===== v57 MOBILE DELIVERY FIX =====\n   Firebaseで同名CSS/JSが残って見える問題を、HTML側の?v=57で回避。\n   ここではスマホの単体立ち絵の表示寸法とHero登場の再生条件を最終的に固定する。 */\n\n/* Hero：ローダーが消えるまで隠し、消えた直後にPC/スマホ共通で一度だけ再生する。\n   clip-pathに依存せず、iOS Safariでも横ノイズが見える構成。 */\nbody.is-loaded:not(.hero-reveal-ready) .hero .rirry-img {\n  opacity: 0 !important;\n  animation: none !important;\n}\nbody.is-loaded.hero-reveal-ready .hero .rirry-img {\n  animation: hero-rirry-reveal-v57 .84s steps(1, end) both !important;\n}\nhtml.skip-hero-reveal body.is-loaded .hero .rirry-img,\nhtml.skip-hero-reveal body.is-loaded.hero-reveal-ready .hero .rirry-img {\n  opacity: 1 !important;\n  animation: none !important;\n  transform: none;\n  clip-path: none;\n}\n@keyframes hero-rirry-reveal-v57 {\n  0% { opacity: 0; transform: translateX(-18px); filter: brightness(1.7) contrast(1.3) drop-shadow(0 0 28px rgba(0,229,204,.28)) drop-shadow(0 0 56px rgba(255,0,170,.18)); }\n  12% { opacity: .64; transform: translateX(13px); }\n  24% { opacity: .9; transform: translateX(-9px); }\n  35% { opacity: .55; transform: translateX(7px); }\n  48% { opacity: 1; transform: translateX(-3px); }\n  62% { opacity: .82; transform: translateX(3px); }\n  100% { opacity: 1; transform: translateX(0); filter: drop-shadow(0 0 28px rgba(0,229,204,.28)) drop-shadow(0 0 56px rgba(255,0,170,.18)); }\n}\n\n/* Character：単体立ち絵（ドリブン／マサキ／？？？）はスマホで高さを固定し、\n   親幅による横伸びを完全に切る。 */\n@media (max-width: 900px) {\n  .character-profile__visuals.character-profile__visuals--single {\n    display: flex;\n    align-items: flex-end;\n    justify-content: center;\n    width: min(100%, 320px);\n    height: min(64svh, 520px);\n    min-height: 0;\n    margin: 0 auto;\n  }\n  .character-profile__visuals.character-profile__visuals--single .character-profile__visual.character-profile__visual--single {\n    display: flex;\n    align-items: flex-end;\n    justify-content: center;\n    width: 100%;\n    height: 100%;\n  }\n  .character-profile__visuals.character-profile__visuals--single .character-profile__visual.character-profile__visual--single img {\n    display: block;\n    width: auto !important;\n    height: 100% !important;\n    max-width: 100% !important;\n    max-height: none !important;\n    object-fit: contain;\n    object-position: center bottom;\n  }\n\n  /* リリー／ろぐは各画像そのものを中心起点で116%→100%にする。\n     親要素の位置決めは変形せず、正面・背面の配置が崩れない。 */\n  .js-character-intro .character-profile__visual img {\n    transform-origin: 50% 50%;\n  }\n}\n@media (max-width: 480px) {\n  .character-profile__visuals.character-profile__visuals--single {\n    width: min(100%, 280px);\n    height: min(59svh, 460px);\n  }\n}\n

/* ===== v61 RIRRY X PROFILE LINK =====
   リリー名横のX導線は、ブラウザ標準リンクではなくサイト共通の小型UIとして固定する。 */
.character-profile__name .character-profile__x-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: 0;
  height: 30px;
  margin-left: 12px;
  padding: 0 10px;
  border: 1px solid rgba(34, 233, 218, 0.68);
  border-radius: 0;
  background: rgba(4, 13, 45, 0.46);
  color: #22e9da !important;
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none !important;
  text-shadow: none;
  vertical-align: middle;
  transform: translateY(-0.15em);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.character-profile__name .character-profile__x-link:visited {
  color: #22e9da !important;
}
.character-profile__name .character-profile__x-link:hover,
.character-profile__name .character-profile__x-link:focus-visible {
  border-color: #c8ff00;
  background: rgba(200, 255, 0, 0.10);
  color: #c8ff00 !important;
  outline: none;
}
.character-profile__x-mark {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}
.character-profile__x-handle {
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .character-profile__name .character-profile__x-link {
    height: 27px;
    margin-top: 6px;
    margin-left: 0;
    padding: 0 9px;
    transform: none;
  }
  .character-profile__x-handle { font-size: 10px; }
}

/* ===== v62 RIRRY X PROFILE LINK =====
   名前横のX導線は、サイト下部のSNSテキストリンクと同じ設計に統一する。 */
.character-profile__name .character-profile__x-link {
  display: inline-block !important;
  box-sizing: border-box;
  height: auto;
  min-width: 0;
  margin-left: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--col-offwhite) !important;
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
  opacity: 0.75;
  text-decoration: none !important;
  text-shadow: none;
  text-transform: uppercase;
  vertical-align: middle;
  transform: translateY(-0.28em);
  transition: color 0.2s ease, opacity 0.2s ease;
}
.character-profile__name .character-profile__x-link:visited {
  color: var(--col-offwhite) !important;
}
.character-profile__name .character-profile__x-link:hover,
.character-profile__name .character-profile__x-link:focus-visible {
  border: 0;
  background: transparent;
  color: var(--col-teal) !important;
  opacity: 1;
  outline: none;
}
@media (max-width: 600px) {
  .character-profile__name .character-profile__x-link {
    display: block !important;
    width: fit-content;
    margin-top: 10px;
    margin-left: 0;
    transform: none;
  }
}


/* ===== v63 RIRRY X PROFILE LINK =====
   リリー名横のX導線は、STORYページの「公式TikTokで視聴する」と同じ外部リンクUIを使用する。 */
.character-profile__name .character-profile__x-link {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 42px;
  height: auto;
  margin-left: 16px;
  padding: 0 18px;
  border: 1px solid rgba(0, 229, 204, .72);
  border-radius: 0;
  background: rgba(11, 20, 43, .46);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  color: var(--col-teal) !important;
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
  opacity: 1;
  text-decoration: none !important;
  text-shadow: none;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
  transform: translateY(-0.13em);
  transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
}
.character-profile__name .character-profile__x-link:visited {
  color: var(--col-teal) !important;
}
.character-profile__name .character-profile__x-link span {
  color: inherit;
  font-size: 18px;
  line-height: 1;
}
.character-profile__name .character-profile__x-link:hover,
.character-profile__name .character-profile__x-link:focus-visible {
  border-color: var(--col-teal);
  background: rgba(0, 229, 204, .14);
  color: var(--col-offwhite) !important;
  outline: none;
  transform: translateY(calc(-0.13em - 2px));
}
@media (max-width: 600px) {
  .character-profile__name .character-profile__x-link {
    min-height: 40px;
    margin-top: 10px;
    margin-left: 0;
    padding: 0 16px;
    font-size: 13px;
    transform: none;
  }
  .character-profile__name .character-profile__x-link:hover,
  .character-profile__name .character-profile__x-link:focus-visible {
    transform: translateY(-2px);
  }
}


/* ===== v64 MOBILE RIRRY X LINK ORDER =====
   スマホでは「リリーエフェクト」→「RirryEffect」→Xリンクの順に表示する。 */
.character-profile__x-link--mobile { display: none !important; }
@media (max-width: 600px) {
  .character-profile__name .character-profile__x-link--desktop { display: none !important; }
  .character-profile__title-block > .character-profile__x-link--mobile {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    min-width: 0;
    min-height: 40px;
    margin-top: 10px;
    padding: 0 16px;
    border: 1px solid rgba(0, 229, 204, .72);
    border-radius: 0;
    background: rgba(11, 20, 43, .46);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
    color: var(--col-teal) !important;
    font-family: "Rajdhani", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1;
    text-decoration: none !important;
    text-shadow: none;
    white-space: nowrap;
    transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
  }
  .character-profile__title-block > .character-profile__x-link--mobile:visited { color: var(--col-teal) !important; }
  .character-profile__title-block > .character-profile__x-link--mobile span { color: inherit; font-size: 18px; line-height: 1; }
  .character-profile__title-block > .character-profile__x-link--mobile:hover,
  .character-profile__title-block > .character-profile__x-link--mobile:focus-visible {
    border-color: var(--col-teal);
    background: rgba(0, 229, 204, .14);
    color: var(--col-offwhite) !important;
    outline: none;
    transform: translateY(-2px);
  }
}

/* ===== v68 INTRO CLOSER LINE CONTROL =====
   PCでは最後の締め文を必ず1行で表示し、スマホだけ文節改行を維持する。 */
@media (min-width: 901px) {
  #introduction .content-section__body.intro-copy p.space-before {
    white-space: nowrap;
  }

  #introduction .content-section__closer.intro-copy__line {
    display: inline;
    margin-top: 0;
    font-size: clamp(20px, 2.15vw, 30px);
    white-space: nowrap;
  }

  #introduction .content-section__closer.intro-copy__line + .content-section__closer.intro-copy__line {
    margin-left: .18em;
  }
}

@media (max-width: 900px) {
  #introduction .content-section__body.intro-copy p.space-before {
    white-space: normal;
  }

  #introduction .content-section__closer.intro-copy__line {
    display: block;
    margin-left: 0;
    white-space: nowrap;
  }

  #introduction .content-section__closer.intro-copy__line + .content-section__closer.intro-copy__line {
    margin-left: 0;
  }
}


/* ===== v69 INTRO CLOSER DESKTOP/MOBILE SPLIT =====
   PCは締め文を1つの要素にして強制的に1行表示。スマホだけ2行表示。 */
#introduction .intro-copy__closer-mobile {
  display: none;
}

@media (min-width: 901px) {
  #introduction .content-section__body.intro-copy p.space-before {
    white-space: normal;
  }
  #introduction .intro-copy__closer-desktop {
    display: block !important;
    width: max-content;
    max-width: none;
    margin: 10px auto 0;
    white-space: nowrap !important;
    font-size: clamp(20px, 2.15vw, 30px);
    line-height: 1.7;
  }
  #introduction .intro-copy__closer-mobile {
    display: none !important;
  }
}

@media (max-width: 900px) {
  #introduction .intro-copy__closer-desktop {
    display: none !important;
  }
  #introduction .intro-copy__closer-mobile {
    display: block !important;
    margin-left: 0;
    white-space: nowrap;
  }
  #introduction .intro-copy__closer-mobile + .intro-copy__closer-mobile {
    margin-left: 0;
  }
}

/* ===== v70 STORY EPISODES ===== */
.story-thumb--image {
  background-color: #0c172d;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.story-thumb--ep1 { background-image: url("../images/story/EP1_1.png"); }
.story-thumb--ep2 { background-image: url("../images/story/EP2_1.png"); }
.story-thumb--image::after { display: none; }
.story-thumb--coming-soon::after { display: none; }
.story-episode-card--coming-soon {
  cursor: default;
}
.story-episode-card--coming-soon:disabled {
  color: var(--col-offwhite);
  opacity: 1;
}
.story-episode-card--coming-soon:hover .story-thumb,
.story-episode-card--coming-soon:focus-visible .story-thumb {
  border-color: rgba(232,232,224,.52);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
  transform: none;
}
.story-modal__slide {
  background-color: #0c172d;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.story-modal__summary {
  white-space: pre-line;
}


/* ===== v71 STORY MODAL / CACHE-SAFE VISUAL FIX =====
   Keep full 16:9 scene frames visible and allow long summaries to scroll. */
.story-modal__panel {
  max-height: 90svh;
  overflow-y: auto;
  overflow-x: hidden;
}
.story-modal__slider {
  aspect-ratio: 16 / 9;
  min-height: 0;
  background: #070d18;
}
.story-modal__slide {
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
}
.story-modal__copy {
  padding-bottom: 36px;
}
.story-modal__summary {
  display: block;
  overflow: visible;
  max-height: none;
  white-space: pre-line;
}
@media (max-width: 900px) {
  .story-modal__panel { max-height: 92svh; overflow-y: auto; }
  .story-modal__slider { aspect-ratio: 16 / 9; }
  .story-modal__slide { background-size: contain; }
}

/* ===== v72 STORY SLIDE SCALE FIX =====
   All story stills are 16:9. Keep every slide at the same 1:1 display scale;
   transition opacity only so slides 2/3 do not briefly appear enlarged. */
.story-modal__slide,
.story-modal__slide.is-active {
  transform: none !important;
  transition: opacity .45s ease !important;
}

/* ===== v74 STORY SLIDER STRUCTURE FIX =====
   All story stills use the exact same 16:9 image box.
   Use real img elements; no zoom, no inherited background sizing. */
.story-modal__slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
  overflow: hidden;
  background: #070d18;
}
.story-modal__slide,
.story-modal__slide.is-active {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: none !important;
  transition: opacity .35s ease !important;
  background: none !important;
}
.story-modal__slide.is-active {
  opacity: 1;
}
.story-modal__slide img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}
@media (max-width: 900px) {
  .story-modal__slider {
    aspect-ratio: 16 / 9 !important;
  }
}


/* ===== v75 GLOBAL SCROLLBAR / STORY MODAL BALANCE =====
   Site-wide scrollbar uses the signature magenta.
   Desktop STORY modal: slightly narrower, scene area about 3/5 high,
   with only the synopsis scrolling. Mobile keeps the existing 16:9 visual ratio
   and only the synopsis becomes an internal scroll area. */
html,
body,
* {
  scrollbar-width: thin;
  scrollbar-color: var(--col-magenta) rgba(5, 10, 24, .72);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: rgba(5, 10, 24, .72);
}
*::-webkit-scrollbar-thumb {
  background: var(--col-magenta);
  border: 2px solid rgba(5, 10, 24, .72);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: #ff39bd;
}

.story-modal__copy {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.story-modal__title-row {
  flex: 0 0 auto;
}
.story-modal__summary {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.story-modal__summary::-webkit-scrollbar {
  width: 7px;
}

@media (min-width: 901px) {
  .story-modal__panel {
    width: min(840px, calc(100% - 80px));
    height: min(84svh, 780px);
    max-height: none;
    display: grid;
    grid-template-rows: 58% 42%;
    overflow: hidden;
  }
  .story-modal__slider {
    width: 100%;
    height: 100%;
    aspect-ratio: auto !important;
    min-height: 0 !important;
  }
  .story-modal__copy {
    height: 100%;
    padding: 20px 36px 24px;
  }
  .story-modal__summary {
    margin-top: 12px;
  }
}

@media (max-width: 900px) {
  .story-modal__panel {
    height: 92svh;
    max-height: 92svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .story-modal__slider {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9 !important;
  }
  .story-modal__copy {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }
  .story-modal__summary {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    margin-top: 18px;
    padding-right: 10px;
  }
}


/* ===== v76 STORY MODAL WIDTH / PERSISTENT SYNOPSIS SCROLLBAR =====
   Desktop modal width is derived from the visible 16:9 scene width, so the
   panel no longer leaves side gutters beside the animation still. The 58/42
   image/copy balance is preserved. The synopsis uses a custom always-visible
   magenta scrollbar so it is obvious that the copy can be scrolled.
   Mobile modal proportions remain unchanged from v75. */
.story-modal__summary-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 12px;
  overflow: hidden;
}
.story-modal__summary {
  width: 100%;
  height: 100%;
  margin-top: 0 !important;
  padding-right: 22px;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.story-modal__summary::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}
.story-modal__scrollbar {
  position: absolute;
  z-index: 3;
  top: 2px;
  right: 2px;
  bottom: 2px;
  width: 7px;
  border-radius: 999px;
  background: rgba(255, 0, 170, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 0, 170, .22);
  pointer-events: none;
}
.story-modal__scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 28px;
  border-radius: 999px;
  background: var(--col-magenta);
  box-shadow: 0 0 10px rgba(255, 0, 170, .42);
  transform: translateY(0);
  will-change: transform, height;
}

@media (min-width: 901px) {
  .story-modal__panel {
    /* 58% of the modal height is a 16:9 image:\n       W / H = .58 * 16 / 9 = 1.031111... */
    --story-modal-width: min(820px, calc(100vw - 80px), calc(84svh * 1.0311111111));
    width: var(--story-modal-width);
    height: calc(var(--story-modal-width) * .9698275862);
    max-height: none;
    grid-template-rows: 58% 42%;
  }
  .story-modal__slider {
    width: 100%;
    height: 100%;
    aspect-ratio: auto !important;
  }
  .story-modal__copy {
    height: 100%;
    padding: 20px 36px 24px;
  }
}

@media (max-width: 900px) {
  .story-modal__summary-wrap {
    margin-top: 18px;
  }
  .story-modal__summary {
    margin-top: 0 !important;
    padding-right: 20px;
  }
}


/* ===== v77 STORY MODAL HORIZONTAL DESKTOP LAYOUT =====
   Desktop only: scene still on the left, episode/title/CTA/synopsis on the right.
   The media column alone defines the modal height: a flush 16:9 scene plus a
   slim indicator strip. The copy column is pinned to that same height so only
   the synopsis scrolls. Mobile retains the v76 vertical composition. */
@media (min-width: 901px) {
  .story-modal__panel {
    width: min(1180px, calc(100vw - 96px));
    height: auto;
    max-height: none;
    display: block;
    overflow: hidden;
  }

  .story-modal__media {
    width: 60%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #070d18;
  }

  .story-modal__slider {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
    flex: 0 0 auto;
    overflow: hidden;
    background: #070d18;
  }

  .story-modal__slide,
  .story-modal__slide.is-active {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .story-modal__slide img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .story-modal__pagination {
    position: static;
    z-index: auto;
    width: 100%;
    height: 34px;
    display: flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(7, 13, 24, .98);
    border-top: 1px solid rgba(232, 232, 224, .08);
  }

  .story-modal__pagination i {
    width: 30px;
    height: 2px;
  }

  .story-modal__copy {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 32px 34px 30px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid rgba(232, 232, 224, .12);
  }

  .story-modal__title-row {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-right: 54px;
  }

  .story-modal__copy h2 {
    margin-top: 6px;
    font-size: clamp(27px, 2.4vw, 36px);
    line-height: 1.08;
    letter-spacing: .12em;
  }

  .story-tiktok-button--modal {
    margin-top: 0;
  }

  .story-modal__summary-wrap {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 20px;
  }

  .story-modal__summary {
    height: 100%;
    min-height: 0;
    padding-right: 22px;
    font-size: 15px;
    line-height: 1.82;
  }

  .story-modal__close {
    top: 18px;
    right: 18px;
  }
}

@media (max-width: 900px) {
  .story-modal__media {
    position: relative;
    width: 100%;
    flex: 0 0 auto;
  }

  .story-modal__copy {
    position: static;
    width: auto;
    border-left: 0;
  }

  /* Pagination stays over the scene on mobile, matching the v76 layout. */
  .story-modal__pagination {
    position: absolute;
    z-index: 2;
    right: 24px;
    bottom: 20px;
    width: auto;
    height: auto;
    display: flex;
    gap: 8px;
    background: transparent;
    border: 0;
  }
}


/* ===== v79 STORY MODAL EDITORIAL DESKTOP LAYOUT =====
   Desktop: episode/title float above the framed content, close button sits at the
   upper-right, scene + synopsis share one horizontal frame, and the TikTok CTA
   sits below the synopsis column. Mobile intentionally keeps the v78 vertical flow. */
@media (min-width: 901px) {
  .story-modal__panel {
    width: min(1180px, calc(100vw - 96px));
    height: auto;
    max-height: min(88svh, 760px);
    overflow: visible;
    display: block;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .story-modal__header {
    min-height: 94px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding: 0 0 18px;
  }

  .story-modal__title-group {
    width: fit-content;
    max-width: calc(100% - 90px);
    min-width: 380px;
    padding: 12px 20px 10px;
    background: linear-gradient(90deg, rgba(12, 29, 55, .94), rgba(12, 29, 55, .56));
    border-left: 2px solid rgba(0, 231, 220, .28);
  }

  .story-modal__episode {
    margin: 0;
    font-size: 14px;
  }

  .story-modal__title-group h2,
  .story-modal__copy h2 {
    margin-top: 6px;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.06;
    letter-spacing: .12em;
  }

  .story-modal__close {
    position: static;
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    margin-top: 4px;
    font-size: 38px;
    background: rgba(8, 14, 30, .76);
  }

  .story-modal__content {
    display: grid;
    grid-template-columns: 60% 40%;
    width: 100%;
    border: 1px solid rgba(232, 232, 224, .42);
    background: linear-gradient(145deg, rgba(20,30,55,.92), rgba(9,14,30,.92));
    box-shadow: 0 18px 58px rgba(0,0,0,.36);
    overflow: hidden;
  }

  .story-modal__media {
    position: relative;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #070d18;
  }

  .story-modal__slider {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
    flex: 0 0 auto;
    overflow: hidden;
    background: #070d18;
  }

  .story-modal__slide,
  .story-modal__slide.is-active {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none !important;
  }

  .story-modal__slide img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .story-modal__pagination {
    position: static;
    width: 100%;
    height: 34px;
    display: flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(7, 13, 24, .98);
    border-top: 1px solid rgba(232, 232, 224, .08);
  }

  .story-modal__pagination i {
    width: 30px;
    height: 2px;
  }

  .story-modal__copy {
    position: relative;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 22px 28px 22px;
    display: flex;
    overflow: hidden;
    border-left: 1px solid rgba(232, 232, 224, .12);
  }

  .story-modal__summary-wrap {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    margin: 0;
    overflow: hidden;
  }

  .story-modal__summary {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0 !important;
    padding-right: 22px;
    font-size: 13px;
    letter-spacing: .055em;
    line-height: 1.78;
    overflow-y: scroll !important;
  }

  .story-modal__footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 18px;
  }

  .story-tiktok-button--modal {
    margin: 0;
  }
}

@media (max-width: 900px) {
  .story-modal__panel {
    border: 1px solid rgba(232,232,224,.42);
    background: linear-gradient(145deg, rgba(20,30,55,.96), rgba(9,14,30,.95));
    box-shadow: 0 22px 70px rgba(0,0,0,.5);
  }

  .story-modal__header,
  .story-modal__content {
    display: contents;
  }

  .story-modal__media { order: 1; }

  .story-modal__title-group {
    order: 2;
    padding: 28px 24px 0;
  }

  .story-modal__footer {
    order: 3;
    display: flex;
    justify-content: flex-start;
    padding: 14px 24px 0;
  }

  .story-modal__copy {
    order: 4;
    position: static;
    width: auto;
    min-height: 0;
    padding: 0 24px 34px;
    border-left: 0;
  }

  .story-modal__summary-wrap {
    margin-top: 18px;
  }

  .story-modal__summary {
    font-size: 14px;
    line-height: 2;
  }

  .story-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
  }
}

/* v79 layout constraint: let the left media column define the framed row height;
   the synopsis column is pinned to that exact height so long copy never stretches it. */
@media (min-width: 901px) {
  .story-modal__content {
    position: relative;
    display: block;
  }

  .story-modal__media {
    width: 60%;
  }

  .story-modal__copy {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%;
    height: auto;
  }

  .story-modal__summary-wrap,
  .story-modal__summary {
    height: 100%;
  }
}

/* ===== v80 STORY TITLE BACKDROP REMOVAL ===== */
@media (min-width: 901px) {
  .story-modal__title-group {
    padding: 0;
    background: transparent;
    border-left: 0;
  }
}


/* ===== v81 STORY HEADING SPACING / INTRODUCTION BACKGROUND ===== */
/* Give the STORY title and Japanese subtitle a little more breathing room. */
.story-heading__row > div > p {
  margin-top: 18px;
  line-height: 1.35;
}

/* Use the supplied Shibuya night scene as the Introduction backdrop and
   darken it non-destructively so the existing copy remains readable. */
#introduction .intro-visual__bg {
  object-position: center center;
  filter: brightness(.50) saturate(.88);
}

#introduction .intro-visual::after {
  background: linear-gradient(
    to bottom,
    rgba(5, 9, 22, .42) 0%,
    rgba(5, 9, 22, .54) 36%,
    rgba(5, 9, 22, .64) 68%,
    rgba(5, 9, 22, .72) 100%
  );
}

@media (max-width: 900px) {
  .story-heading__row > div > p {
    margin-top: 14px;
  }

  #introduction .intro-visual__bg {
    object-position: center center;
    filter: brightness(.46) saturate(.86);
  }

  #introduction .intro-visual::after {
    background: linear-gradient(
      to bottom,
      rgba(5, 9, 22, .40) 0%,
      rgba(5, 9, 22, .52) 34%,
      rgba(5, 9, 22, .64) 68%,
      rgba(5, 9, 22, .72) 100%
    );
  }
}
