:root {
  --bg-black: #0a0505;
  --bg-black-2: #050202;

  --curtain-1: #5c0f14;
  --curtain-2: #2a0508;

  --neon: #ff3b4e;
  --neon-soft: #ff8a92;
  --neon-dim: #7a1018;

  --brass: #caa15a;
  --gold: #f0c869;
  --gold-dim: #7a5e28;
}

@font-face {
  font-family: 'NanumSonMomma';
  src: url("fonts/나눔손글씨_딸에게_엄마가.ttf") format('truetype');
  font-weight: normal;
  font-style: normal;
}


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


html,
body {
  background: var(--bg-black-2);
  color: var(--neon-soft);
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  word-break: keep-all;
}


body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg-black);
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("image/wood.jpg") center center / cover no-repeat;
  filter: grayscale(1) brightness(0.12) contrast(1.15);
  z-index: 0;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 130% 55% at 50% 55%, rgba(180, 20, 30, 0.32), transparent 62%),
    radial-gradient(ellipse 90% 40% at 50% 5%, rgba(120, 10, 18, 0.22), transparent 65%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation: fade-in-delay 0.8s ease-out 1.7s forwards;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 50;
}

.stage-dim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(1, 0, 0, 0.1);
  pointer-events: none;
}

/* ---------- 녹화 오버레이(뷰파인더 + ON AIR) ----------
   .stage는 overflow:hidden이라 그 안에 있으면 스크롤 시
   position:fixed가 잘려버림. 그래서 body 바로 아래,
   .stage 바깥으로 빼서 화면(뷰포트)에 항상 고정되게 함. */

.rec-overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  z-index: 150;
  pointer-events: none;
}

.on-air {
  position: absolute;
  top: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 40;
  font-family: 'Cormorant SC', serif;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--gold);
  opacity: 0;
  animation: fade-in-delay 0.5s ease-out 1.7s forwards;
}

.rec-timer {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--neon-soft);
  opacity: 0.85;
}


.on-air .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px 2px rgba(255, 59, 78, 0.9);
  animation: blink 1.6s infinite ease-in-out;
}


@keyframes fade-in-delay {
  to { opacity: 1; }
}


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

.viewfinder {
  position: absolute;
  inset: 14px;
  z-index: 39;
  pointer-events: none;
  opacity: 0;
  animation: fade-in-delay 0.5s ease-out 1.7s forwards;
}

/* ================================================
   Hero canvas — 사인/TV/커튼/좌대는 480x950 고정 좌표계로
   그린 다음, 화면 폭에 맞춰 통째로 비율 유지하며 축소.
   이렇게 하면 폰 화면에서도 서로 겹치거나 잘리지 않음.
   ================================================ */

.hero-canvas-wrap {
  position: relative;
  z-index: 10; /* .floor(3), .stage::after(1)보다 위로: hero-canvas의 transform이
                  새 스태킹 컨텍스트를 만들면서 z-index 없는 wrap이 뒤로 밀리던 문제 수정 */
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(950 / 480 * 100%);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 480px;
  height: 950px;
  transform-origin: top left;
  /* 스케일 값은 JS(scaleHeroCanvas)가 매 화면마다 계산해서 넣어줌.
     cqw 컨테이너 쿼리 단위는 카카오톡 인앱 브라우저 등 구형 웹뷰에서
     지원되지 않아 화면이 찌그러지는 원인이었음. */
  transform: scale(1);
}


.vf-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--gold);
  border-style: solid;
  border-width: 0;
  transition: border-color 0.3s;
}


.vf-corner.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.vf-corner.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.vf-corner.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.vf-corner.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.sign-wrap {
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
}


.sign-img-btn {
  position: relative;
  display: block;
  width: 280px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}


.sign-img {
  position: relative;
  z-index: 1;
  width: 280px;
  height: auto;
  display: block;
  filter: grayscale(1) brightness(0.35);
  animation: sign-color-on 0.8s ease-out 1.7s forwards;
}


@keyframes sign-color-on {
  to { filter: grayscale(0) brightness(1); }
}


.sign-img-glow {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background: radial-gradient(ellipse, rgba(240,200,105,0.55), transparent 70%);
  filter: blur(24px);
  opacity: 0;
  animation:
    glow-appear 0.8s ease-out 1.7s forwards,
    glow-flicker 5s 2.5s infinite;
}


@keyframes glow-appear {
  to { opacity: 1; }
}

.sign-caption {
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  width: 300px !important;
  transform: translate(-50%, 175px) !important;
  text-align: center !important;
  color: var(--gold);
  font-family: 'times new roman', serif;
  font-size: 13px;
  font-style: italic;
  letter-spacing: 1px;
  white-space: nowrap;
  z-index: 0;
  opacity: 0;
  text-shadow:
    0 0 5px rgba(240, 200, 105, 0.8),
    0 0 12px rgba(240, 200, 105, 0.4);
  animation: caption-appear 0.8s ease-out 1.7s forwards;
}


@keyframes caption-appear {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.sign-subtitle {
  position: absolute;
  top: 860px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 20;
  text-align: center;
  filter: grayscale(1) opacity(0.5);
  animation: subtitle-color-on 0.6s ease-out 1.7s forwards;
}


@keyframes subtitle-color-on {
  to { filter: grayscale(0) opacity(1); }
}


.sub-line1 {
  margin-bottom: 4px;
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--gold);
  text-shadow: 0 0 5px var(--gold), 0 0 12px rgba(240, 200, 105, 0.6);
}


.sub-line2 {
  font-family: 'times new roman', serif;
  font-size: 8px;
  letter-spacing: 3px;
  color: var(--gold);
  text-shadow: 0 0 5px var(--gold), 0 0 12px rgba(240, 200, 105, 0.6);
}

.sign-spacer {
  height: 222px;
}


.tv-area {
  position: absolute !important;
  top: 275px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  width: 340px;
  height: 226px;
  z-index: 15;
  display: flex;
  justify-content: center;
  align-items: center;
}


.tv-photo {
  position: relative;
  width: 340px;
  height: 226px;
  flex-shrink: 0;
  filter: drop-shadow(0 26px 30px rgba(186, 40, 40, 0));
  animation: tv-shadow-on 0.01s linear 1.7s forwards;
}
@keyframes tv-shadow-on {
  to { filter: drop-shadow(0 26px 30px rgba(186, 40, 40, 0.603)); }
}

.tv-photo .glow {
  position: absolute;
  left: 22.2%;
  top: 27.44%;
  width: 47.53%;
  height: 47.07%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 241, 194, 0.532), transparent 70%);
  filter: blur(40px);
  z-index: 1;
  opacity: 0;
  animation:
    tv-light-on 2s ease-out 1.7s forwards,
    glow-flicker 5s 3.7s infinite;
}


@keyframes tv-light-on {
  0% { opacity: 0; transform: scale(0.7); }
  60% { opacity: 0.8; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}


@keyframes glow-flicker {
  0%, 100% { opacity: 1; }
  8% { opacity: 0.6; }
  12% { opacity: 1; }
  20% { opacity: 0.75; }
  24% { opacity: 1; }
  55% { opacity: 0.85; }
  60% { opacity: 1; }
}

.tv-photo .screen-off {
  position: absolute;
  left: 22.2%;
  top: 27.44%;
  width: 47.53%;
  height: 47.07%;
  z-index: 1;
  background: #000;
  border-radius: 6px;
  pointer-events: none;
}

.tv-photo canvas {
  position: absolute;
  left: 22.2%;
  top: 27.44%;
  width: 47.53%;
  height: 47.07%;
  z-index: 2;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #080808;
  filter: grayscale(1) contrast(1.4) brightness(0.95);
  opacity: 0;
  animation: tv-static-start 2.5s steps(1, end) 1.7s forwards;
  pointer-events: none;
}


@keyframes tv-static-start {
  0% { opacity: 0; }
  8% { opacity: 1; }
  12% { opacity: 0; }
  18% { opacity: 1; }
  25% { opacity: 0; }
  32% { opacity: 1; }
  40% { opacity: 0; }
  47% { opacity: 1; }
  54% { opacity: 0.1; }
  60% { opacity: 1; }
  100% { opacity: 1; }
}

.tv-photo .scanlines {
  position: absolute;
  left: 22.2%;
  top: 27.44%;
  width: 47.53%;
  height: 47.07%;
  z-index: 3;
  overflow: hidden;
  border-radius: 6px;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0px,
    rgba(0, 0, 0, 0.35) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0;
  animation: scanline-start 0.01s linear 1.7s forwards;
}


@keyframes scanline-start {
  to { opacity: 0.8; }
}

.tv-photo .rollbar-wrap {
  position: absolute;
  left: 22.2%;
  top: 27.44%;
  width: 47.53%;
  height: 47.07%;
  z-index: 4;
  overflow: hidden;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  animation: rollbar-container 0.01s linear 1.7s forwards;
}


@keyframes rollbar-container {
  to { opacity: 1; }
}


.tv-photo .rollbar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  animation: rollbar 6.5s linear 1.7s infinite;
}


@keyframes rollbar {
  0% { top: -10%; opacity: 0; }
  5% { opacity: 0.6; }
  95% { opacity: 0.6; }
  100% { top: 110%; opacity: 0; }
}
.tv-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 5;
  pointer-events: none;
  user-select: none;
  filter: grayscale(0.5) brightness(0.6);
}

.curtain {
  position: absolute;
  top: 0;
  width: 190px;
  height: 100%;
  z-index: 30;
  pointer-events: none;
}


.curtain img {
  width: 100%;
  height: 700px;
  object-fit: fill;
  display: block;
}


.curtain-left { left: -25px; }
.curtain-right { right: -25px; }
.curtain-right img { transform: scaleX(-1); }

.pedestal {
  position: absolute !important;
  top: 470px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  width: 600px;
  display: flex;
  justify-content: center;
  z-index: 10;
}


.cloth-img {
  width: 600px;
  height: auto;
  display: block;
  transform: scaleY(1.35);
  transform-origin: bottom center;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.7)) brightness(0.65) grayscale(1);
  animation: cloth-color-on 0.8s ease-out 1.7s forwards;
}
@keyframes cloth-color-on {
  to { filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.7)) brightness(0.65) grayscale(0); }
}

.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  z-index: 3;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.7) 20%,
    #000 45%
  );
  pointer-events: none;
}


.floor-glow {
  position: absolute;
  left: 50%;
  top: 640px;
  transform: translateX(-50%);
  width: 450px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(255, 40, 50, 0.28), transparent 70%);
  filter: blur(6px);
  z-index: 5;
  opacity: 0;
  animation: fade-in-delay 0.8s ease-out 1.7s forwards;
}

/* ---------- Apply Now 버튼 ---------- */

.apply-wrap {
  position: absolute;
  top: 575px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45; /* 커튼(30), 다른 무대 요소들보다 위, 맨 앞으로 */
  width: 238px;
  opacity: 0;
  animation: fade-in-delay 0.8s ease-out 1.9s forwards;
}

.apply-btn {
  position: relative;
  display: block;
  text-decoration: none;
}

.apply-img {
  display: block;
  width: 100%;
  height: auto;
}

.stage nav {
  position: absolute !important;
  top: 700px !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  width: 100%;
  z-index: 25;
  padding: 0 20px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  filter: grayscale(1);
  animation: nav-color-on 0.6s ease-out 1.7s forwards;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}


@keyframes nav-color-on {
  to { filter: grayscale(0); }
}


nav a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px;
  text-decoration: none;
  color: var(--gold);
  font-family: 'Cormorant SC', serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s, text-shadow 0.2s;
}

.nav-kr {
  margin-top: 2px;
  font-family: 'Noto Serif KR', serif;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: none;
  color: #d9c4a4;
  opacity: 0.8;
}


nav a.active {
  padding: 8px 20px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  box-shadow:
    0 0 10px rgba(255, 179, 0, 0.55),
    inset 0 0 8px rgba(255, 180, 6, 0.35);
  opacity: 1;
  text-shadow: 0 0 6px var(--gold);
}


nav a:not(.active):hover {
  opacity: 1;
  text-shadow: 0 0 6px var(--gold);
}


nav .sep {
  color: var(--gold-dim);
  opacity: 0.6;
  font-size: 12px;
}
.letter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}


.letter-overlay.open {
  display: flex;
  animation: letter-fade-in 0.3s ease;
}


@keyframes letter-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}


.letter-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 44px 30px;
  background: #0d0808;
  border: 2px solid var(--gold);
  box-shadow:
    0 0 0 1px rgba(240, 200, 105, 0.3),
    0 0 30px rgba(240, 200, 105, 0.25),
    0 20px 50px rgba(0, 0, 0, 0.7);
  animation: letter-pop 0.35s ease;
}


@keyframes letter-pop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.letter-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--gold);
  border-style: solid;
  border-width: 0;
}


.letter-corner.tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; }
.letter-corner.tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; }
.letter-corner.bl { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; }
.letter-corner.br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; }

.letter-text {
  font-family: 'NanumSonMomma', 'Cormorant Garamond', serif;
  font-style: normal;
  color: var(--gold);
  font-size: 16px;
  line-height: 1.8;
  text-align: left;
}

.letter-signature {
  margin-top: 8px;
  font-family: 'NanumSonMomma', 'Cormorant Garamond', serif;
  color: var(--gold);
  font-size: 16px;
  text-align: right;
}

.letter-close {
  display: block;
  margin: 24px auto 0;
  padding: 4px 14px;
  background: none;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-family: 'Cormorant SC', serif;
  font-size: 10px;
  letter-spacing: 2px;
  cursor: pointer;
}



.fx-color-in {
  filter: grayscale(1);
  animation: fx-color-on 0.8s ease-out 1.7s forwards;
}
@keyframes fx-color-on {
  to { filter: grayscale(0); }
}


.power-on-dim {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #000;
  opacity: 0.8;
  pointer-events: none;
  animation: power-on-fade 0.6s ease-out 1.7s forwards;
}
@keyframes power-on-fade {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}