.story-main {
  max-width: 880px;
}

.story-title {
  margin-bottom: 23px;
}

.story-title h1 {
  font-size: clamp(1.55rem, 5.8vw, 2.15rem);
  color: var(--purple);
}

.story-picture {
  background: #2C1841;
  border: 1px solid #2C1841;
  margin-inline: calc(-1 * var(--gutter));
}

.story-picture img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
  image-rendering: pixelated;
}

.story-prose {
  color: #2C1841;
  background: #EFDEB8;
  padding: 28px 24px 32px;
  line-height: 2.1;
  font-family: var(--body);
  margin: 0 calc(-1 * var(--gutter));
}

.story-key {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .35em;
  text-decoration-thickness: 1px;
}

.story-controls {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
}

.story-controls .next {
  margin-left: auto;
}

.story-controls .button {
  min-width: 120px;
}

.truth-confirm {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  background: #0c0712;
  color: #eedff5;
  border: 0;
  margin: 0;
}

.truth-confirm .dialog-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 480px;
  min-height: 100%;
  margin: 0 auto;
  padding: 48px 24px;
}

.truth-confirm p {
  font-family: var(--heading);
  font-size: 18px;
  line-height: 2.2;
}

.truth-confirm button,
.truth-confirm .button {
  color: #251331;
  background: #d7c0e4;
  border-color: #d7c0e4;
}

.truth-confirm button.secondary {
  color: #d7c0e4;
  background: transparent;
}

.truth-confirm .text-key {
  color: #e4b9f1;
}

body.truth-story {
  color-scheme: dark;
  --paper: #030205;
  --surface: #07050a;
  --ink: #eee8f0;
  --muted: #a998ae;
  --purple: #d8b2e5;
  --line: #34263d;
  --wash: #0b0710;
  --emphasis: #e2b6f2;
  --warning: #f3a8b8;
  --focus: #e4b9f1;
  background: #030205;
}

body.truth-story[data-stage='3'] {
  --paper: #020103;
  --surface: #050307;
  --wash: #09050d;
}

.truth-story {
  --truth-amount: 0;
}

.truth-story .site-header {
  background: rgb(5 3 7 / .94);
  border-color: #33243c;
  backdrop-filter: blur(8px);
}

.truth-story .page-main {
  max-width: 680px;
  padding-top: 0;
  padding-bottom: 0;
}

.truth-story .story-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72svh;
  margin: 0;
  padding: 12svh 0;
}

.truth-story .story-title h1 {
  color: #e1bee9;
  text-shadow: 0 0 24px rgb(190 116 215 / .2);
}

.truth-story .story-prose {
  color: #eee8f0;
  background: transparent;
  font: clamp(1.05rem, 4.5vw, 1.18rem)/2.05 var(--heading);
  margin: 0;
  padding: 4svh 0 12svh;
  letter-spacing: .035em;
}

.truth-story .story-prose > p {
  width: 100%;
  min-height: clamp(160px, 31svh, 300px);
  margin: 0;
  padding: clamp(44px, 9svh, 88px) 0;
}

.truth-story.reveal-sequence .story-title,
.truth-story.reveal-sequence .story-prose > p,
.truth-story.reveal-sequence .truth-return {
  visibility: hidden;
  opacity: 0;
  filter: blur(9px);
  transform: translateY(28px);
  transition:
    opacity 1.35s ease,
    filter 1.45s ease,
    transform 1.35s cubic-bezier(.2, .7, .2, 1),
    visibility 0s linear 1.45s;
}

.truth-story.reveal-sequence .story-title.is-visible,
.truth-story.reveal-sequence .story-prose > p.is-visible,
.truth-story.reveal-sequence .truth-return.is-visible {
  visibility: visible;
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  transition-delay: 0s;
}

.truth-story .truth-cry {
  color: #e0b7f0;
  font-size: 1.2em;
  letter-spacing: .06em;
}

.truth-story .truth-turn {
  display: block;
  color: #e3bdf0;
  font: 1.4rem/1.7 var(--heading);
  letter-spacing: .16em;
  text-shadow: 0 0 20px rgb(204 134 228 / .24);
}

.truth-story .truth-end {
  min-height: 52svh;
  border-block: 1px solid #644275;
  color: #f1abbc;
}

.truth-story .chief-interruption {
  color: #d8b5e9;
  text-align: right;
}

.truth-story .horror-frame {
  opacity: max(.08, calc(var(--truth-amount) * .22));
  background-image: url('../images/Hair_Heavy.png');
}

.truth-return {
  display: grid;
  align-content: center;
  min-height: 72svh;
  padding: 18svh 0;
  text-align: center;
}

.truth-return .button {
  width: 100%;
}

#story-end {
  width: 100%;
  height: 2px;
}

.truth-story .site-footer {
  background: #050307;
  border-color: #2e2036;
}

@media(min-width:700px) {
  .story-picture,
  .story-prose,
  .truth-story .story-prose {
    margin-inline: 0;
  }
  .story-prose {
    padding: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .truth-story.reveal-sequence .story-title,
  .truth-story.reveal-sequence .story-prose > p,
  .truth-story.reveal-sequence .truth-return {
    filter: none;
    transform: none;
  }
}

.story-prose p {
  white-space: pre-line;
}
/* ========================================
   美しい黒髪
   ── 濡れたような艶のある漆黒
======================================== */

.beautiful-black-hair {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.06em;

  background: linear-gradient(
    110deg,
    #17131b 0%,
    #29202f 30%,
    #9c83aa 46%,
    #302538 54%,
    #17131b 75%
  );

  background-size: 220% 100%;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  filter: drop-shadow(
    0 1px 1px rgba(35, 20, 40, 0.25)
  );

  animation: black-hair-shine 7s ease-in-out infinite;
}

@keyframes black-hair-shine {
  0%, 30% {
    background-position: 100% 50%;
  }

  65%, 100% {
    background-position: 0% 50%;
  }
}

.first-conversation {
  position: relative;

  width: fit-content;

  padding: 3px 10px;

  font-family: var(--heading);
  letter-spacing: 0.04em;
}


/* 家の中の少女
   閉じた、冷たい色 */
.girl-inside {
  color: #51465d;

  border-left: 2px solid rgba(75, 60, 90, 0.38);
}


/* 窓の外の少女
   少しだけ暖かい色 */
.girl-outside {
  color: #74564f;

  border-bottom: 1px solid rgba(120, 85, 75, 0.28);

  text-shadow:
    0 0 5px rgba(170, 125, 110, 0.10);
}

/* ========================================
   友達を失いたくない
   不安が少しずつ強くなる
======================================== */

.fear-of-loss {
  margin-top: 18px;

  color: #493a4d;

  font-family: var(--heading);
  font-weight: 600;
}

.fear-of-loss span {
  position: relative;
  display: inline-block;

  color: #5c394d;
  letter-spacing: 0.04em;

  text-shadow:
    0 0 2px rgba(85, 45, 65, 0.18),
    0 0 7px rgba(85, 45, 65, 0.10);

  animation: fear-tighten 5s ease-in-out infinite;
}

.fear-of-loss span::after {
  content: "";
  position: absolute;

  left: 0;
  right: 0;
  bottom: -3px;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(95, 45, 70, 0.75),
    transparent
  );
}

@keyframes fear-tighten {
  0%,
  100% {
    letter-spacing: 0.04em;
    text-shadow:
      0 0 2px rgba(85, 45, 65, 0.18);
  }

  50% {
    letter-spacing: -0.01em;
    text-shadow:
      0 0 5px rgba(85, 45, 65, 0.28);
  }
}

/* 不安の始まり */
.anxiety {
  width: fit-content;
  font-family: var(--heading);
}

/* 今日も来ない */
.anxiety-1 {
  color: #665565;
}

/* 明日も来なかったら？ */
.anxiety-2 {
  color: #654454;

  letter-spacing: 0.025em;

  text-shadow:
    0 0 3px rgba(90, 50, 70, 0.12);
}

/* ずっと来なかったら？ */
.anxiety-3 {
  color: #653143;

  font-weight: 600;
  letter-spacing: 0.05em;

  text-shadow:
    0 0 4px rgba(105, 40, 60, 0.20),
    0 0 9px rgba(105, 40, 60, 0.08);
}

.but-still {
  margin: 20px 0;

  color: #504450;

  font-family: var(--heading);

  letter-spacing: 0.15em;
}
.fear-word {
  display: inline-block;

  color: #4a3541;

  font-family: var(--heading);
  font-size: 0.94em;

  text-shadow:
    1px 0 2px rgba(60, 30, 45, 0.20);

  animation: fear-shiver 2s ease-in-out infinite;
}

@keyframes fear-shiver {
  0%, 88%, 100% {
    transform: translateX(0);
  }

  90% {
    transform: translateX(-0.6px);
  }

  92% {
    transform: translateX(0.7px);
  }

  94% {
    transform: translateX(-0.4px);
  }

  96% {
    transform: translateX(0.3px);
  }
}

.decision-turn {
  margin-bottom: 4px;

  color: #4d3745;

  font-family: var(--heading);
  font-weight: 700;

  letter-spacing: 0.08em;
}

/* 前ページより一段だけ強くする */
.fear-of-loss.decision span {
  color: #683347;

  text-shadow:
    0 0 3px rgba(100, 40, 65, 0.22),
    0 0 8px rgba(100, 40, 65, 0.12);
}

/* ========================================
   過去の記憶による恐怖
   ── 昔の出来事が頭の中に蘇る
======================================== */

.past-fear {
  position: relative;
  width: fit-content;

  color: #625861;
  font-family: var(--heading);

  opacity: 0.88;

  text-shadow:
    1px 0 0 rgba(70, 55, 70, 0.10),
    -1px 0 2px rgba(70, 55, 70, 0.08);
}

.desperate-wish {
  display: inline-block;

  color: #633747;
  font-family: var(--heading);
  font-weight: 600;
  letter-spacing: 0.08em;

  text-shadow:
    0 0 5px rgba(100, 45, 65, 0.16);

  animation: desperate-tremble 4s ease-in-out infinite;
}

@keyframes desperate-tremble {
  0%, 90%, 100% {
    transform: translateX(0);
  }

  92% {
    transform: translateX(-0.5px);
  }

  94% {
    transform: translateX(0.6px);
  }

  96% {
    transform: translateX(-0.3px);
  }
}

.silent-prayer {
  color: #625567;

  font-family: var(--heading);
  font-size: 0.94em;

  letter-spacing: 0.04em;

  opacity: 0.82;

  text-shadow:
    0 0 6px rgba(85, 65, 95, 0.12);
}

.single-hair {
  position: relative;
  display: inline-block;

  color: #27202a;
  font-weight: 600;
}

.single-hair::after {
  content: "";

  position: absolute;

  left: 15%;
  bottom: -3px;

  width: 110%;
  height: 5px;

  border-bottom: 1px solid rgba(40, 30, 45, 0.55);

  border-radius: 50%;

  transform: rotate(-2deg);

  pointer-events: none;
}

.purple-butterfly {
  display: inline-block;

  color: #754c91;
  font-family: var(--heading);
  font-weight: 700;
  letter-spacing: 0.08em;

  text-shadow:
    0 0 3px rgba(150, 105, 185, 0.55),
    0 0 8px rgba(135, 80, 175, 0.30),
    0 0 14px rgba(120, 65, 160, 0.16);

  animation: butterfly-glow 4.5s ease-in-out infinite;
}

@keyframes butterfly-glow {
  0%, 100% {
    transform: translateY(0);
    text-shadow:
      0 0 3px rgba(150, 105, 185, 0.45),
      0 0 8px rgba(135, 80, 175, 0.24);
  }

  50% {
    transform: translateY(-1px);
    text-shadow:
      0 0 4px rgba(170, 125, 205, 0.70),
      0 0 10px rgba(145, 90, 185, 0.40),
      0 0 18px rgba(125, 70, 165, 0.20);
  }
}

.chief-discovery {
  width: fit-content;

  color: #392d40;
  font-family: var(--heading);
  font-weight: 600;

  letter-spacing: 0.05em;

  text-shadow:
    0 0 5px rgba(55, 35, 65, 0.18);
}

.rumor {
  width: fit-content;
  font-family: var(--heading);
}

.rumor-1 {
  color: #665b68;
}

.rumor-2 {
  color: #6a1592;

  text-shadow:
    0 0 4px rgba(110, 75, 130, 0.14);
}

/* ========================================
   「紫姫」という名の誕生
======================================== */

.murasakihime-birth {
  margin-top: 24px;

  font-family: var(--heading);
  letter-spacing: 0.08em;
}

.murasakihime-birth span {
  position: relative;
  display: inline-block;

  color: #704687;

  font-size: 1.15em;
  font-weight: 700;

  letter-spacing: 0.16em;

  text-shadow:
    0 0 3px rgba(155, 110, 180, 0.55),
    0 0 8px rgba(125, 75, 155, 0.28),
    0 0 16px rgba(90, 50, 115, 0.14);

  animation: murasakihime-breathe 5s ease-in-out infinite;
}

.murasakihime-birth span::after {
  content: "";

  position: absolute;

  left: -12%;
  right: -12%;
  bottom: -4px;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(105, 65, 125, 0.65),
    transparent
  );
}

@keyframes murasakihime-breathe {
  0%, 100% {
    text-shadow:
      0 0 3px rgba(155, 110, 180, 0.40),
      0 0 8px rgba(125, 75, 155, 0.20);
  }

  50% {
    text-shadow:
      0 0 4px rgba(175, 125, 200, 0.70),
      0 0 10px rgba(135, 80, 165, 0.38),
      0 0 18px rgba(100, 55, 125, 0.20);
  }
}

/* ========================================
   第8場面：神格化された紫姫
   紫 × 古びた金

   村人たちが作り上げた
   「神としての紫姫」を表現する。
======================================== */

.murasakihime-divine {
  position: relative;
  display: inline-block;

  font-family: var(--heading);
  font-weight: 700;
  letter-spacing: 0.08em;

  /* フォールバック */
  color: #75508a;

  /* 紫の中を古い金色が通る */
  background: linear-gradient(
    110deg,
    #654176 0%,
    #76508a 24%,
    #916ba0 36%,
    #b99a52 46%,
    #ddc477 51%,
    #b99a52 56%,
    #805992 66%,
    #654176 100%
  );

  background-size: 240% 100%;

  -webkit-background-clip: text;
  background-clip: text;

  -webkit-text-fill-color: transparent;

  filter:
    drop-shadow(0 0 2px rgba(105, 70, 125, 0.18));

  animation:
    murasakihime-divine-shine 8s ease-in-out infinite;
}


/* 金色の光がゆっくり文字を横切る */
@keyframes murasakihime-divine-shine {
  0%,
  20% {
    background-position: 100% 50%;
  }

  70%,
  100% {
    background-position: 0% 50%;
  }
}


/* ========================================
   また一人。
   また一人。

   人々が次々と紫姫を利用していく。
======================================== */

.one-more {
  display: inline-block;

  font-family: var(--heading);

  margin-left: 0.25em;

  transition:
    color 0.4s ease,
    letter-spacing 0.4s ease;
}


/* 最初の一人 */
.one-more-1 {
  color: #665b63;

  letter-spacing: 0.06em;
}


/* さらに一人
   少し濃く、少し詰まる */
.one-more-2 {
  color: #513844;

  font-weight: 600;

  letter-spacing: 0.015em;

  text-shadow:
    0 0 3px rgba(75, 35, 50, 0.14);
}


/* ========================================
   アニメーション軽減設定
======================================== */

@media (prefers-reduced-motion: reduce) {

  .murasakihime-divine {
    animation: none;

    background-position: 50% 50%;
  }

}

/* ========================================
   真相閲覧警告
   ── ここから先は「公式サイト」の領域ではない
======================================== */

.truth-confirm {
  width: min(520px, calc(100% - 32px));

  padding: 0;

  background: #0c0910;
  color: #d0c8d0;

  border: 1px solid rgba(126, 55, 67, 0.55);

  box-shadow:
    0 0 0 1px rgba(30, 20, 32, 0.9),
    0 12px 45px rgba(0, 0, 0, 0.65),
    0 0 35px rgba(90, 25, 40, 0.10);

  font-family: var(--body);
}


/* dialog外側を完全に暗くする */
.truth-confirm::backdrop {
  background:
    radial-gradient(
      circle at center,
      rgba(25, 15, 28, 0.50),
      rgba(3, 2, 5, 0.92)
    );

  backdrop-filter: blur(3px);
}


/* ========================================
   内側
======================================== */

.truth-confirm .dialog-content {
  position: relative;

  padding: 32px 30px 28px;

  overflow: hidden;
}


/* 上部の細い警告線 */
.truth-confirm .dialog-content::before {
  content: "";

  position: absolute;

  top: 0;
  left: 0;
  right: 0;

  height: 2px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(150, 50, 65, 0.75),
    rgba(105, 35, 50, 0.35),
    transparent
  );
}


/* ========================================
   「閲覧警告」
======================================== */

.truth-warning-title {
  margin: 0 0 25px;

  color: #a95361;

  font-family: var(--heading);
  font-size: 18px;
  font-weight: 700;

  letter-spacing: 0.18em;

  text-shadow:
    0 0 5px rgba(145, 45, 60, 0.35),
    0 0 14px rgba(100, 25, 40, 0.15);
}


/* ========================================
   通常文章
======================================== */

.truth-confirm .dialog-content p {
  line-height: 2;
}

.truth-confirm .dialog-content > p:not(.truth-warning-title) {
  margin: 0 0 17px;
}


/* ========================================
   「これ以上、閲覧しないでください。」
   このダイアログで一番危険な文章
======================================== */

.truth-warning-stop {
  position: relative;

  display: inline-block;

  margin: 7px 0 25px !important;

  color: #bc5965;

  font-family: var(--heading);
  font-weight: 700;

  letter-spacing: 0.07em;

  text-shadow:
    0 0 4px rgba(175, 55, 70, 0.32),
    0 0 11px rgba(120, 30, 45, 0.18);

  animation: truth-warning-pulse 4.5s ease-in-out infinite;
}


/* 下に不完全な警告線 */
.truth-warning-stop::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -4px;

  width: 100%;
  height: 1px;

  background: linear-gradient(
    90deg,
    rgba(165, 55, 70, 0.75),
    rgba(120, 40, 55, 0.30),
    transparent
  );
}


@keyframes truth-warning-pulse {
  0%,
  100% {
    color: #a94f5b;

    text-shadow:
      0 0 3px rgba(160, 45, 60, 0.22);
  }

  50% {
    color: #c86672;

    text-shadow:
      0 0 5px rgba(185, 55, 70, 0.42),
      0 0 12px rgba(125, 30, 45, 0.20);
  }
}


/* ========================================
   最終確認
======================================== */

.truth-warning-question {
  margin-top: 13px !important;
  margin-bottom: 25px !important;

  color: #ddd4dd;

  font-family: var(--heading);

  letter-spacing: 0.035em;
}


/* ========================================
   ボタンエリア
======================================== */

.truth-confirm .dialog-actions {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 12px;

  margin-top: 26px;
}


/* ========================================
   真相を見る
   ── サイト側は押してほしくない
======================================== */

.truth-confirm .truth-enter {
  display: flex;

  align-items: center;
  justify-content: center;

  min-height: 44px;

  background: rgba(65, 20, 30, 0.12);

  border: 1px solid #7d3d49;

  color: #b9626d;

  box-shadow:
    inset 0 0 12px rgba(95, 25, 40, 0.08);

  text-decoration: none;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}


.truth-confirm .truth-enter:hover {
  background: rgba(100, 30, 45, 0.22);

  border-color: #aa5360;

  color: #d17781;

  box-shadow:
    inset 0 0 15px rgba(120, 30, 45, 0.14),
    0 0 10px rgba(110, 30, 45, 0.12);
}


/* ========================================
   戻る
   ── こちらが「安全な選択」
======================================== */

.truth-confirm .truth-return {
  min-height: 44px;

  background: #cdb7d6;

  border: 1px solid #d9c7df;

  color: #281d2d;

  font-family: inherit;

  cursor: pointer;

  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.20);

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}


.truth-confirm .truth-return:hover {
  background: #dbc9e2;

  transform: translateY(-1px);
}


/* ========================================
   スマホ
======================================== */

@media (max-width: 699px) {

  .truth-confirm {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .truth-confirm .dialog-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-content: safe center;
    min-height: 100%;
    padding: 27px 23px 24px;
    overflow: visible;
  }

  .truth-warning-title {
    font-size: 17px;
  }

  .truth-confirm .dialog-actions {
    gap: 10px;
  }
}

/* ========================================
   真相確認ボタン
   スマホでも巨大化させない
======================================== */

.truth-confirm .dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 14px;

  margin-top: 28px;
}

.truth-confirm .dialog-actions .truth-enter,
.truth-confirm .dialog-actions .truth-return {
  width: 100%;
  height: auto;
  min-height: 48px;

  padding: 12px 10px;

  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 15px;
  line-height: 1.4;

  border-radius: 2px;
}


/* 危険な選択 */
.truth-confirm .truth-enter {
  background: rgba(75, 20, 30, 0.10);

  border: 1px solid #793b47;

  color: #bc626d;
}



/* ========================================
   アニメーション軽減
======================================== */

@media (prefers-reduced-motion: reduce) {

  .truth-warning-stop {
    animation: none;
  }

  .truth-confirm .truth-return:hover {
    transform: none;
  }
}
