/* =========================================================================
   《黒障子の奥 · 忌み屋敷》 — Flagship J-Horror Vertical Benchmark Stylesheet
   Adapter A: Diegetic Occult Desk Frame + 9:16 Matte Smartphone + 2.5D Depth
   ========================================================================= */

:root {
  --font-jp: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", "MS PMincho", Georgia, serif;
  --font-sys: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --crimson: #8f1018;
  --crimson-bright: #c91c26;
  --vermilion: #a81e18;
  --paper-pale: #dcd5c6;
  --ink-black: #050506;
}

*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #030304;
  color: var(--paper-pale);
  font-family: var(--font-jp);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Diegetic Desktop Backdrop: Occult Wooden Desk ---------- */
.desk-backdrop {
  position: fixed;
  inset: 0;
  background: #040404 url("assets/img/img_desk_occult.jpg") center center / cover no-repeat;
  filter: brightness(0.72) contrast(1.12) saturate(0.88);
  z-index: 0;
  pointer-events: none;
}

.desk-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 46% 62% at 50% 50%, rgba(0, 0, 0, 0.15) 0%, rgba(2, 2, 3, 0.72) 72%, rgba(0, 0, 0, 0.94) 100%);
  animation: deskCandleBreath 7s ease-in-out infinite;
}

@keyframes deskCandleBreath {
  0%, 100% { opacity: 0.92; }
  47% { opacity: 0.84; }
  51% { opacity: 0.97; }
  76% { opacity: 0.87; }
}

/* ---------- Diegetic 9:16 Matte Black Smartphone Chassis ---------- */
.phone-chassis {
  position: relative;
  z-index: 2;
  height: min(93vh, 860px);
  aspect-ratio: 9 / 16;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 16px);
  padding: 13px 10px 15px;
  border-radius: 34px;
  background:
    linear-gradient(145deg, #1b1a1d 0%, #0d0d0f 38%, #070708 100%);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.92),
    0 8px 24px rgba(0, 0, 0, 0.85),
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -1px 2px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(55, 48, 45, 0.35);
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.phone-earpiece {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3.5px;
  border-radius: 2px;
  background: #060607;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06);
  z-index: 40;
}

.phone-camera-dot {
  position: absolute;
  top: 5px;
  left: calc(50% + 36px);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #232836, #06070a 70%);
  z-index: 40;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 23px;
  overflow: hidden;
  background: #020203;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.95);
}

/* Mobile viewport: go edge-to-edge */
@media (max-width: 520px) {
  .desk-backdrop { display: none; }
  .phone-chassis {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    aspect-ratio: auto;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .phone-earpiece, .phone-camera-dot { display: none; }
  .phone-screen { border-radius: 0; }
}

/* ---------- Micro-Shake (Anti-Motion-Sickness Strict <= 6px, < 180ms) ---------- */
@keyframes microShake5 {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-4px, 3px, 0); }
  45%  { transform: translate3d(5px, -3px, 0); }
  70%  { transform: translate3d(-3px, -2px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes microShake6 {
  0%   { transform: translate3d(0, 0, 0); }
  18%  { transform: translate3d(-6px, 3px, 0); }
  42%  { transform: translate3d(6px, -4px, 0); }
  68%  { transform: translate3d(-4px, 2px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.shake-5 { animation: microShake5 150ms linear 1; }
.shake-6 { animation: microShake6 160ms linear 1; }

/* ---------- Minimal Status Bar ---------- */
.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  padding: 6px 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-sys);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(220, 214, 202, 0.58);
  z-index: 65;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease;
}

.status-bar.visible { opacity: 1; }
.status-bar.cursed .status-time,
.status-bar.cursed .status-battery {
  color: rgba(212, 34, 42, 0.85);
}

.status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-signal {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 9px;
}

.status-signal i {
  display: block;
  width: 2px;
  background: rgba(220, 214, 202, 0.45);
}
.status-signal i:nth-child(1) { height: 3px; }
.status-signal i:nth-child(2) { height: 5px; }
.status-signal i:nth-child(3) { height: 7px; opacity: 0.35; }
.status-signal i:nth-child(4) { height: 9px; opacity: 0.18; }

.btn-mute {
  pointer-events: auto;
  background: transparent;
  border: none;
  color: rgba(220, 214, 202, 0.55);
  padding: 2px 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 200ms ease, color 200ms ease;
}

.btn-mute:hover {
  opacity: 1;
  color: #f0e8d8;
}

/* ---------- Stage Root & Scene Layers ---------- */
.stage-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020203;
}

.scene-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.scene-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform, filter, opacity;
}

/* ---------- BEAT 01: Stormy House + Shoji Doors ---------- */
.scene-house {
  z-index: 4;
  opacity: 1;
}

.scene-house .scene-img {
  transform-origin: 50% 48%;
  filter: brightness(0.42) contrast(1.18);
}

.lightning-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 34%, rgba(215, 232, 255, 0.88), rgba(160, 190, 230, 0.32) 60%, rgba(10, 14, 22, 0) 100%);
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* 2.5D Double Shoji Sliding Door Rig */
.shoji-rig {
  position: absolute;
  inset: 0;
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 48%;
  will-change: opacity, transform;
}

.shoji-half {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.shoji-half img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.84) contrast(1.12);
}

.shoji-left {
  clip-path: inset(0 50% 0 0);
}

.shoji-right {
  clip-path: inset(0 0 0 50%);
}

/* ---------- BEAT 02: Tatami Room & Ichimatsu Dolls ---------- */
.scene-dolls {
  z-index: 8;
}

.scene-dolls .scene-img {
  transform-origin: 50% 44%;
}

.scene-img-stare {
  opacity: 0;
  transition: none;
}

.scene-dolls.staring .scene-img-stare {
  opacity: 1;
}

.bulb-flicker {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  animation: bulbJitter 4.3s steps(1) infinite;
}

@keyframes bulbJitter {
  0%, 84%, 100% { opacity: 0.04; }
  85% { opacity: 0.45; }
  87% { opacity: 0.08; }
  89% { opacity: 0.58; }
  91% { opacity: 0.05; }
}

.crimson-pulse {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 44%, rgba(120, 8, 16, 0) 26%, rgba(138, 10, 18, 0.52) 78%, rgba(85, 0, 6, 0.88) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.crimson-pulse.active {
  opacity: 1;
  animation: crimsonBreath 1.15s ease-in-out infinite;
}

@keyframes crimsonBreath {
  0%, 100% { opacity: 0.58; }
  50% { opacity: 0.96; }
}

/* ---------- BEAT 03: Crimson Corridor & Black Lacquer Box ---------- */
.scene-box {
  z-index: 16;
}

.scene-box .scene-img {
  transform-origin: 50% 66%;
}

.scene-img-grotesque {
  opacity: 0;
  transform: scale(1.06);
}

.scene-box.opened .scene-img-grotesque {
  opacity: 1;
  transform: scale(1);
  transition: transform 95ms cubic-bezier(0.22, 1, 0.36, 1), opacity 40ms linear;
}

.scene-box.vibrating #imgBoxSealed {
  animation: boxVibe 140ms linear infinite;
}

@keyframes boxVibe {
  0%   { transform: translate3d(0, 0, 0) scale(var(--box-scale, 1)); }
  33%  { transform: translate3d(-1.5px, 0.8px, 0) scale(var(--box-scale, 1)); }
  66%  { transform: translate3d(1.5px, -0.8px, 0) scale(var(--box-scale, 1)); }
  100% { transform: translate3d(0, 0, 0) scale(var(--box-scale, 1)); }
}

.box-blue-leak {
  position: absolute;
  left: 50%;
  top: 66%;
  width: 58%;
  height: 14%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(168, 224, 255, 0.48) 0%, rgba(92, 165, 220, 0.14) 55%, transparent 80%);
  mix-blend-mode: screen;
  opacity: 0.45;
  pointer-events: none;
  animation: blueCrackPulse 2.4s ease-in-out infinite;
}

@keyframes blueCrackPulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.72; }
}

.box-crimson-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 62%, transparent 34%, rgba(45, 0, 4, 0.72) 100%);
  pointer-events: none;
}

/* Punishing Agency Contamination (Stains + Creeping Wet Hair) */
.box-contamination {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.stain-bloom {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 2, 4, 0.92) 0%, rgba(72, 4, 10, 0.56) 46%, transparent 74%);
  filter: blur(4px);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stain-1 { width: 220px; height: 220px; top: -40px; left: -50px; }
.stain-2 { width: 250px; height: 250px; top: 18%; right: -75px; }
.stain-3 { width: 310px; height: 270px; bottom: -65px; left: 50%; margin-left: -155px; }

.box-contamination.level-1 .stain-1 { opacity: 0.85; transform: scale(1); }
.box-contamination.level-2 .stain-1,
.box-contamination.level-2 .stain-2 { opacity: 0.92; transform: scale(1.08); }
.box-contamination.level-3 .stain-1,
.box-contamination.level-3 .stain-2,
.box-contamination.level-3 .stain-3 { opacity: 0.96; transform: scale(1.16); }

.hair-creep {
  position: absolute;
  top: 0;
  height: 100%;
  width: 44%;
  fill: none;
  stroke: rgba(8, 7, 9, 0.92);
  stroke-width: 3.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
  opacity: 0;
  transition: opacity 550ms ease, transform 750ms ease;
}

.hair-left { left: 0; transform: translateX(-34px); }
.hair-right { right: 0; transform: translateX(34px); }

.box-contamination.level-2 .hair-left { opacity: 0.82; transform: translateX(-8px); }
.box-contamination.level-3 .hair-left { opacity: 0.96; transform: translateX(4px); }
.box-contamination.level-3 .hair-right { opacity: 0.94; transform: translateX(-4px); }

/* 3 Interactive Weathered Ofuda Seals */
.ofuda-group {
  position: absolute;
  left: 50%;
  top: 67%;
  width: 240px;
  height: 175px;
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms ease;
}

.ofuda-group.active {
  opacity: 1;
  pointer-events: auto;
}

.ofuda-seal {
  position: absolute;
  width: 44px;
  height: 118px;
  border: 1px solid rgba(118, 22, 18, 0.85);
  background:
    repeating-linear-gradient(0deg, rgba(120, 88, 52, 0.07) 0 3px, transparent 3px 7px),
    linear-gradient(180deg, #b89f74 0%, #9b8259 54%, #765c3b 100%);
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.78),
    0 0 14px rgba(176, 22, 28, 0.42),
    inset 0 0 10px rgba(42, 14, 8, 0.55);
  color: #190908;
  font-family: var(--font-jp);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  touch-action: none;
  transition: transform 180ms ease, opacity 260ms ease, box-shadow 200ms ease;
}

.ofuda-seal::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(145, 22, 18, 0.65);
  pointer-events: none;
}

.ofuda-kanji {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-shadow: 0 0 2px rgba(130, 12, 12, 0.45);
  pointer-events: none;
}

.ofuda-1 { left: 26px; top: 24px; transform: rotate(-28deg); }
.ofuda-2 { left: 98px; top: 14px; transform: rotate(4deg); z-index: 2; }
.ofuda-3 { right: 26px; top: 28px; transform: rotate(31deg); }

.ofuda-seal:hover {
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.88),
    0 0 22px rgba(220, 26, 36, 0.78),
    inset 0 0 12px rgba(90, 8, 8, 0.65);
}

.ofuda-seal.urgent {
  animation: ofudaTremble 220ms linear infinite;
  box-shadow: 0 0 24px rgba(235, 30, 38, 0.9);
}

@keyframes ofudaTremble {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.24) sepia(0.35); }
}

.ofuda-seal.torn {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-72px) rotate(52deg) scale(0.75) !important;
  transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms ease;
}

/* ---------- Sparse Hostile Japanese Typography (Zero Babysitting) ---------- */
.taboo-whisper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-jp);
  font-weight: 700;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  writing-mode: vertical-rl;
  color: rgba(212, 200, 184, 0.86);
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.96),
    0 0 16px rgba(150, 16, 22, 0.55);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 380ms ease;
}

.taboo-enter {
  top: 22%;
  font-size: 24px;
  color: rgba(196, 36, 40, 0.85);
}

.taboo-freeze {
  top: 16%;
  font-size: 32px;
  color: rgba(224, 28, 36, 0.95);
  text-shadow:
    0 0 18px rgba(190, 10, 20, 0.9),
    0 2px 12px rgba(0, 0, 0, 1);
}

.taboo-freeze.active {
  opacity: 1;
  animation: textSpasm 190ms steps(2) infinite;
}

.taboo-unseal {
  top: 17%;
  font-size: 28px;
  color: rgba(226, 212, 196, 0.88);
  text-shadow: 0 0 16px rgba(180, 18, 24, 0.85), 0 2px 10px #000;
}

.taboo-unseal.active { opacity: 0.92; }

.false-relief-text {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  letter-spacing: 0.28em;
  color: rgba(196, 196, 196, 0.55);
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  transition: opacity 600ms ease;
}

.false-relief-text.active { opacity: 1; }

@keyframes textSpasm {
  0%   { transform: translate(-50%, 0); }
  25%  { transform: translate(calc(-50% - 1.5px), 1px); }
  50%  { transform: translate(calc(-50% + 1.5px), -1px); }
  75%  { transform: translate(calc(-50% - 1px), -1px); }
  100% { transform: translate(-50%, 0); }
}

/* ---------- Atmospheric Canvas ---------- */
.atmo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 24;
  pointer-events: none;
}

/* ---------- One-Way Scroll Ratchet Hostile Flash ---------- */
.ratchet-alert {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 36;
  font-size: 15px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: rgba(220, 26, 34, 0.92);
  text-shadow: 0 0 12px rgba(170, 0, 10, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.ratchet-alert.show { opacity: 1; }

/* ---------- Minimal Downward Pulse Indicator ---------- */
.scroll-indicator {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 32;
  background: transparent;
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 380ms ease;
}

.scroll-indicator.visible {
  opacity: 0.78;
  pointer-events: auto;
}

.scroll-glyph {
  display: block;
  font-size: 20px;
  color: rgba(224, 212, 198, 0.85);
  text-shadow: 0 0 12px rgba(165, 22, 26, 0.85);
  animation: scrollPulse 1.85s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: translateY(0); opacity: 0.38; }
  55% { transform: translateY(6px); opacity: 0.95; }
}

/* ---------- BEAT 02 L4/L5 Doll Scare Overlay ---------- */
.scare-overlay {
  position: absolute;
  inset: 0;
  z-index: 48;
  background: #000;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.scare-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.24);
  transform-origin: 50% 45%;
  filter: contrast(1.22) brightness(1.08);
}

.scare-overlay.active {
  opacity: 1;
}

.scare-overlay.active img {
  transform: scale(1.02);
  transition: transform 85ms cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.scare-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}

.scare-glitch-word {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.34em;
  color: rgba(225, 22, 28, 0.94);
  text-shadow: 2px 0 rgba(0, 255, 210, 0.4), -2px 0 rgba(255, 0, 20, 0.7);
}

/* ---------- BEAT 04: Full-Screen Incoming Call & Video Call ---------- */
.call-overlay {
  position: absolute;
  inset: 0;
  z-index: 52;
  background: radial-gradient(circle at 50% 24%, #14161a 0%, #07080a 65%, #020203 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  font-family: var(--font-sys);
}

.call-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.incoming-call-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 84px 24px 66px;
}

.incoming-call-view.hidden { display: none; }

.call-top {
  text-align: center;
}

.call-badge {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(188, 194, 204, 0.62);
  margin-bottom: 14px;
}

.caller-name {
  font-family: var(--font-jp);
  font-size: 31px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #ebe6dc;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}

.caller-name.glitched {
  color: #d9262e;
  text-shadow: 2px 0 rgba(255, 20, 30, 0.65), -2px 0 rgba(120, 220, 255, 0.35);
}

.caller-sub {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(164, 170, 180, 0.45);
}

.call-actions {
  width: 100%;
  max-width: 260px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.call-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.call-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 140ms ease, background-color 180ms ease;
}

.call-btn-decline {
  background: #b71c22;
  box-shadow: 0 0 22px rgba(183, 28, 34, 0.42);
}

.call-btn-decline.mutated {
  background: #73060c;
  box-shadow: 0 0 28px rgba(220, 14, 24, 0.85);
  animation: textSpasm 140ms steps(2) infinite;
}

.call-btn-accept {
  background: #1f8a48;
  box-shadow: 0 0 24px rgba(31, 138, 72, 0.55);
  animation: acceptPulse 1.15s ease-in-out infinite;
}

@keyframes acceptPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 18px rgba(31, 138, 72, 0.45); }
  50% { transform: scale(1.08); box-shadow: 0 0 32px rgba(42, 186, 98, 0.78); }
}

.call-btn-label {
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: rgba(224, 220, 212, 0.82);
}

.call-btn-label.mutated {
  color: #e2222b;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.22em;
}

/* Video Call Feed */
.video-call-view {
  position: absolute;
  inset: 0;
  display: none;
  background: #020304;
}

.video-call-view.active { display: block; }

.video-call-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-call-hud {
  position: absolute;
  inset: 0;
  padding: 40px 16px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.vc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: rgba(210, 224, 218, 0.78);
}

.vc-rec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d9262e;
  font-weight: 700;
}

.vc-rec i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e2222b;
  animation: recBlink 0.9s steps(1) infinite;
}

@keyframes recBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.15; }
}

.vc-caller {
  text-align: center;
  font-family: var(--font-jp);
  font-size: 15px;
  letter-spacing: 0.28em;
  color: rgba(215, 222, 218, 0.65);
  text-shadow: 0 2px 8px #000;
}

/* ---------- 200ms Vacuum + L5 Ultimate Finale Overlay ---------- */
.black-vacuum {
  position: absolute;
  inset: 0;
  z-index: 56;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.black-vacuum.active { opacity: 1; }

.finale-overlay {
  position: absolute;
  inset: 0;
  z-index: 58;
  background: #000;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.finale-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 44%;
  transform: scale(0.76);
  filter: contrast(1.22) brightness(1.06);
}

.finale-overlay.active {
  opacity: 1;
}

.finale-overlay.active img {
  transform: scale(1.06);
  transition: transform 75ms cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.finale-strobe {
  position: absolute;
  inset: 0;
  background: rgba(205, 240, 225, 0.72);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Ending Overlay (Vermilion Seal) ---------- */
.ending-overlay {
  position: absolute;
  inset: 0;
  z-index: 62;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

.ending-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.ending-seal-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.vermilion-stamp {
  width: 54px;
  height: 54px;
  border: 2.5px solid var(--vermilion);
  color: var(--vermilion);
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transform: rotate(-4deg);
  box-shadow: 0 0 18px rgba(168, 30, 24, 0.35), inset 0 0 8px rgba(168, 30, 24, 0.25);
  opacity: 0.92;
}

.ending-phrase {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: rgba(214, 202, 190, 0.86);
  text-shadow: 0 0 16px rgba(155, 20, 24, 0.45);
}

/* ---------- Entry Ritual Gate (Weathered Wood Button) ---------- */
.entry-gate {
  position: absolute;
  inset: 0;
  z-index: 70;
  background: #040405;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 720ms ease;
}

.entry-gate.hidden {
  opacity: 0;
  pointer-events: none;
}

.entry-bg-preview {
  position: absolute;
  inset: 0;
  background: url("assets/img/img_gate_house.jpg") center center / cover no-repeat;
  opacity: 0.16;
  filter: grayscale(0.5) contrast(1.3) blur(1px);
  pointer-events: none;
}

.entry-inner {
  position: relative;
  z-index: 2;
  height: 76%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.entry-vertical-title {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 16px;
  margin-top: 24px;
}

.title-main {
  writing-mode: vertical-rl;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: rgba(226, 218, 204, 0.9);
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.96), 0 0 18px rgba(130, 14, 18, 0.42);
}

.title-sub {
  writing-mode: vertical-rl;
  font-size: 16px;
  letter-spacing: 0.45em;
  color: rgba(176, 32, 34, 0.86);
  margin-top: 22px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

/* Weathered Dark Wood Button */
.btn-wood {
  position: relative;
  padding: 13px 30px;
  font-family: var(--font-jp);
  font-size: 15px;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  color: #dfd5c4;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #271e18 0%, #19130f 52%, #110c0a 100%);
  border: 1px solid rgba(110, 86, 66, 0.5);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.88),
    inset 0 1px 0 rgba(255, 232, 204, 0.08),
    inset 0 0 16px rgba(0, 0, 0, 0.72);
  cursor: pointer;
  transition: border-color 220ms ease, color 220ms ease, box-shadow 220ms ease, transform 120ms ease;
}

.btn-wood:hover {
  border-color: rgba(168, 30, 26, 0.78);
  color: #f3eae0;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.92),
    0 0 20px rgba(145, 16, 20, 0.42),
    inset 0 0 14px rgba(90, 10, 12, 0.45);
}

.btn-wood:active {
  transform: translateY(1px);
}

.btn-replay {
  font-size: 13px;
  padding: 10px 24px;
  margin-top: 12px;
}
