/* miya · 开屏 · 杂志刊面 × 剧院帷幕 */

html.miya-splash-pending .phone {
  opacity: 0;
  visibility: hidden;
}

.miya-splash {
  --sp-ink: rgba(248, 244, 236, 0.94);
  --sp-gold: #c9a962;
  --sp-gold-soft: rgba(201, 169, 98, 0.35);
  --sp-velvet: #120c0a;
  --sp-velvet-mid: #1e1410;
  --sp-cream: rgba(255, 251, 245, 0.08);
  --sp-display: "Cinzel", "Noto Serif SC", serif;
  --sp-serif: "Cormorant Garamond", "Noto Serif SC", serif;
  --sp-script: "Great Vibes", cursive;
  --sp-italic: "Playfair Display", "Noto Serif SC", serif;
  --sp-mono: "Italiana", serif;
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.miya-splash:not([hidden]) {
  visibility: visible;
  pointer-events: auto;
}

.miya-splash.is-active {
  opacity: 1;
}

.miya-splash.is-exit {
  opacity: 0;
  pointer-events: none;
}

.miya-splash.is-done {
  display: none !important;
}

/* ── 背景层叠 ── */
.miya-splash__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 38%, rgba(62, 38, 28, 0.55) 0%, transparent 62%),
    radial-gradient(circle at 18% 82%, rgba(201, 169, 98, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(120, 90, 70, 0.12) 0%, transparent 38%),
    linear-gradient(168deg, #0a0706 0%, var(--sp-velvet) 38%, #0f0a08 100%);
}

.miya-splash__grain {
  position: absolute;
  inset: -20%;
  opacity: 0.22;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  animation: miya-sp-grain 0.45s steps(2) infinite;
  pointer-events: none;
}

.miya-splash__spotlight {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 48% at 50% 42%, rgba(255, 248, 235, 0.14) 0%, transparent 68%),
    radial-gradient(circle at 50% 100%, rgba(0, 0, 0, 0.55) 0%, transparent 55%);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 1.4s ease, transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.miya-splash.is-active .miya-splash__spotlight {
  opacity: 1;
  transform: scale(1);
}

.miya-splash__vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

/* ── 装饰叠层 ── */
.miya-splash__orbit {
  position: absolute;
  border: 1px solid var(--sp-gold-soft);
  border-radius: 50%;
  pointer-events: none;
}

.miya-splash__orbit--a {
  width: min(88vw, 420px);
  height: min(88vw, 420px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%) scale(0.72);
  opacity: 0;
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.1s ease;
}

.miya-splash__orbit--b {
  width: min(72vw, 340px);
  height: min(72vw, 340px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%) scale(0.8) rotate(12deg);
  border-style: dashed;
  opacity: 0;
  transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.12s, opacity 1.1s ease 0.12s;
}

.miya-splash.is-active .miya-splash__orbit--a,
.miya-splash.is-active .miya-splash__orbit--b {
  opacity: 1;
  transform: translate(-50%, -54%) scale(1);
}

.miya-splash.is-reveal .miya-splash__orbit--a,
.miya-splash.is-reveal .miya-splash__orbit--b {
  opacity: 0;
  transform: translate(-50%, -54%) scale(1.18);
  transition-duration: 0.9s;
}

.miya-splash__float {
  position: absolute;
  font-family: var(--sp-mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(201, 169, 98, 0.42);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.95s ease, transform 1.05s ease;
  z-index: 5;
}

.miya-splash__float--tl { top: 14%; left: 10%; transition-delay: 0.2s; }
.miya-splash__float--tr { top: 18%; right: 8%; writing-mode: vertical-rl; transition-delay: 0.35s; }
.miya-splash__float--bl { bottom: 16%; left: 12%; transition-delay: 0.5s; }
.miya-splash__float--br { bottom: 12%; right: 10%; transition-delay: 0.28s; }

.miya-splash.is-active .miya-splash__float {
  opacity: 1;
  transform: translateY(0);
}

.miya-splash.is-reveal .miya-splash__float {
  opacity: 0;
  transform: translateY(-6px);
}

.miya-splash__stamp {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  right: 18px;
  padding: 8px 10px;
  border: 1px solid rgba(201, 169, 98, 0.45);
  color: rgba(201, 169, 98, 0.72);
  font-family: var(--sp-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  transform: rotate(8deg);
  opacity: 0;
  transition: opacity 0.5s ease 0.15s, transform 0.6s ease 0.15s;
  z-index: 5;
}

.miya-splash.is-active .miya-splash__stamp {
  opacity: 1;
  transform: rotate(-4deg);
}

.miya-splash.is-reveal .miya-splash__stamp {
  opacity: 0;
  transform: rotate(-4deg) scale(1.1);
}

/* ── 刊面主视觉 ── */
.miya-splash__folio {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 28px calc(env(safe-area-inset-bottom, 0px) + 24px);
  pointer-events: none;
}

.miya-splash__plate {
  position: relative;
  width: min(78vw, 320px);
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  filter: blur(6px);
  transition:
    opacity 1.1s ease 0.1s,
    transform 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
    filter 1.1s ease 0.1s;
}

.miya-splash.is-active .miya-splash__plate {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: none;
}

.miya-splash.is-curtain .miya-splash__plate {
  transform: translateY(-8px) scale(1.02);
}

.miya-splash.is-reveal .miya-splash__plate {
  opacity: 0;
  transform: translateY(-28px) scale(1.08);
  filter: blur(8px);
  transition-duration: 1.1s;
}

.miya-splash__frame {
  position: absolute;
  inset: -22px -18px;
  border: 1px solid rgba(201, 169, 98, 0.28);
  pointer-events: none;
}

.miya-splash__frame::before,
.miya-splash__frame::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--sp-gold);
  border-style: solid;
  opacity: 0.55;
}

.miya-splash__frame::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.miya-splash__frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

.miya-splash__corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: rgba(201, 169, 98, 0.5);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.5s ease 0.25s, transform 0.6s ease 0.25s;
}

.miya-splash__corner--tl { top: -8px; left: -8px; border-width: 1px 0 0 1px; transform: translate(4px, 4px); }
.miya-splash__corner--tr { top: -8px; right: -8px; border-width: 1px 1px 0 0; transform: translate(-4px, 4px); }
.miya-splash__corner--bl { bottom: -8px; left: -8px; border-width: 0 0 1px 1px; transform: translate(4px, -4px); }
.miya-splash__corner--br { bottom: -8px; right: -8px; border-width: 0 1px 1px 0; transform: translate(-4px, -4px); }

.miya-splash.is-active .miya-splash__corner {
  opacity: 1;
  transform: translate(0, 0);
}

.miya-splash__eyebrow {
  margin: 0 0 10px;
  font-family: var(--sp-mono);
  font-size: 10px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(201, 169, 98, 0.78);
}

.miya-splash__title {
  margin: 0;
  font-family: var(--sp-display);
  font-size: clamp(52px, 14vw, 72px);
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 0.92;
  color: var(--sp-ink);
  text-shadow: 0 0 40px rgba(201, 169, 98, 0.18);
}

.miya-splash__script {
  margin: 6px 0 0;
  font-family: var(--sp-script);
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1;
  color: rgba(201, 169, 98, 0.88);
  transform: rotate(-2deg);
}

.miya-splash__rule {
  width: 1px;
  height: 42px;
  margin: 16px auto;
  background: linear-gradient(180deg, transparent, var(--sp-gold), transparent);
  opacity: 0.7;
}

.miya-splash__lede {
  margin: 0;
  font-family: var(--sp-serif);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: rgba(248, 244, 236, 0.62);
}

.miya-splash__lede em {
  font-family: var(--sp-italic);
  font-style: italic;
  letter-spacing: 0.08em;
  color: rgba(201, 169, 98, 0.75);
}

.miya-splash__folio-no {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Bebas Neue", sans-serif;
  font-size: 11px;
  letter-spacing: 0.42em;
  color: rgba(201, 169, 98, 0.35);
}

.miya-splash__ribbon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.22), transparent);
  transform: translate(-50%, -50%) rotate(-8deg);
  pointer-events: none;
}

.miya-splash__clipping {
  position: absolute;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 251, 245, 0.04);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-family: var(--sp-serif);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(248, 244, 236, 0.45);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease, transform 0.65s ease;
  z-index: 5;
}

.miya-splash__clipping--1 {
  top: 28%;
  left: 6%;
  transform: rotate(-6deg) translateY(10px);
  transition-delay: 0.18s;
}

.miya-splash__clipping--2 {
  bottom: 24%;
  right: 5%;
  transform: rotate(5deg) translateY(10px);
  transition-delay: 0.26s;
}

.miya-splash.is-active .miya-splash__clipping {
  opacity: 1;
  transform: rotate(var(--sp-rot, 0deg)) translateY(0);
}

.miya-splash__clipping--1 { --sp-rot: -6deg; }
.miya-splash__clipping--2 { --sp-rot: 5deg; }

.miya-splash.is-reveal .miya-splash__clipping {
  opacity: 0;
  transform: translateY(-12px);
}

/* ── 帷幕 ── */
.miya-splash__valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(env(safe-area-inset-top, 0px) + 54px);
  z-index: 4;
  background:
    repeating-linear-gradient(90deg,
      rgba(90, 18, 28, 0.95) 0px,
      rgba(120, 24, 36, 0.92) 8px,
      rgba(70, 12, 20, 0.98) 16px),
    linear-gradient(180deg, rgba(40, 8, 14, 0.98) 0%, rgba(20, 4, 8, 0.88) 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  transform: translateY(-100%);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.miya-splash.is-active .miya-splash__valance {
  transform: translateY(0);
}

.miya-splash.is-reveal .miya-splash__valance {
  transform: translateY(-110%);
  transition-duration: 1s;
}

.miya-splash__valance::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 18px;
  background:
    radial-gradient(circle at 12px 0, rgba(201, 169, 98, 0.55) 3px, transparent 4px),
    radial-gradient(circle at 36px 0, rgba(201, 169, 98, 0.45) 3px, transparent 4px),
    radial-gradient(circle at 60px 0, rgba(201, 169, 98, 0.55) 3px, transparent 4px);
  background-size: 48px 18px;
  opacity: 0.65;
}

.miya-splash__curtain {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 48px);
  bottom: 0;
  width: 51%;
  z-index: 3;
  overflow: hidden;
  will-change: transform;
  transition: transform 2.15s cubic-bezier(0.76, 0, 0.24, 1);
}

.miya-splash__curtain--l {
  left: 0;
  transform-origin: left center;
}

.miya-splash__curtain--r {
  right: 0;
  transform-origin: right center;
}

.miya-splash__curtain-body {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg,
      rgba(58, 10, 18, 0.98) 0px,
      rgba(92, 18, 28, 0.96) 14px,
      rgba(48, 8, 14, 0.99) 28px,
      rgba(78, 14, 22, 0.97) 42px),
    linear-gradient(180deg,
      rgba(110, 20, 32, 0.92) 0%,
      rgba(62, 10, 18, 0.98) 38%,
      rgba(36, 6, 10, 1) 100%);
  box-shadow: inset -8px 0 24px rgba(0, 0, 0, 0.35);
}

.miya-splash__curtain--r .miya-splash__curtain-body {
  box-shadow: inset 8px 0 24px rgba(0, 0, 0, 0.35);
}

.miya-splash__curtain-fold {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0%, transparent 18%, rgba(0, 0, 0, 0.18) 42%, transparent 58%, rgba(255, 255, 255, 0.04) 100%);
  mix-blend-mode: overlay;
}

.miya-splash__curtain-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 220, 180, 0.08) 48%, transparent 62%);
  animation: miya-sp-shine 4.2s ease-in-out infinite;
}

.miya-splash__curtain-tassel {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 28%;
  background: linear-gradient(180deg, rgba(201, 169, 98, 0.55), rgba(201, 169, 98, 0.08));
  opacity: 0.55;
}

.miya-splash__curtain--l .miya-splash__curtain-tassel { right: 18%; }
.miya-splash__curtain--r .miya-splash__curtain-tassel { left: 18%; }

.miya-splash__curtain-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, rgba(201, 169, 98, 0.22), rgba(201, 169, 98, 0.05));
}

.miya-splash__curtain--l .miya-splash__curtain-edge { right: 0; }
.miya-splash__curtain--r .miya-splash__curtain-edge { left: 0; transform: scaleX(-1); }

.miya-splash.is-curtain .miya-splash__curtain--l {
  transform: translateX(-102%) skewY(-1.5deg);
}

.miya-splash.is-curtain .miya-splash__curtain--r {
  transform: translateX(102%) skewY(1.5deg);
}

.miya-splash.is-reveal .miya-splash__backdrop,
.miya-splash.is-reveal .miya-splash__grain,
.miya-splash.is-reveal .miya-splash__spotlight,
.miya-splash.is-reveal .miya-splash__vignette {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.miya-splash__proscenium {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transition: opacity 0.45s ease 0.35s;
}

.miya-splash.is-active .miya-splash__proscenium {
  opacity: 1;
}

.miya-splash.is-reveal .miya-splash__proscenium {
  opacity: 0;
  transition-delay: 0s;
}

.miya-splash__proscenium-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.45), transparent);
}

.miya-splash__proscenium-text {
  font-family: var(--sp-mono);
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(201, 169, 98, 0.5);
}

/* ── 跳过 ── */
.miya-splash__skip {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 16px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(201, 169, 98, 0.28);
  border-radius: 999px;
  background: rgba(10, 8, 6, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(248, 244, 236, 0.72);
  font-family: var(--ins-ui, "Jost", "Noto Sans SC", sans-serif);
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.45s ease 0.3s, transform 0.45s ease 0.3s, background 0.2s ease;
}

.miya-splash.is-active .miya-splash__skip {
  opacity: 1;
  transform: translateY(0);
}

.miya-splash__skip:active {
  background: rgba(201, 169, 98, 0.16);
}

.miya-splash__skip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sp-gold);
  animation: miya-sp-pulse 1.2s ease-in-out infinite;
}

/* ── 主屏联动 ── */
body.miya-splash-active .phone {
  opacity: 0;
  visibility: visible;
  transform: scale(1.03);
  filter: blur(8px);
}

body.miya-splash-active.miya-splash-reveal .phone {
  opacity: 1;
  transform: scale(1);
  filter: none;
  transition:
    opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.65s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.2s ease;
}

@keyframes miya-sp-grain {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-2%, 1%); }
}

@keyframes miya-sp-shine {
  0%, 100% { opacity: 0.35; transform: translateX(-8%); }
  50% { opacity: 0.85; transform: translateX(8%); }
}

@keyframes miya-sp-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .miya-splash,
  .miya-splash *,
  body.miya-splash-active .phone {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

html.is-low-end .miya-splash__grain,
html.is-low-end .miya-splash__curtain-shine,
html.is-low-end .miya-splash__orbit--b {
  display: none;
}
