/* ============ Tokens ============ */
:root {
  --ink: #060608;
  --char: #0f0f13;
  --char-2: #18181e;
  --line: rgba(222, 226, 233, 0.16);
  --text: #eceef2;
  --muted: #c9c9ce;
  --body: #d2d3d8;
  --sub: rgba(240, 241, 245, 0.8);
  --silver: #c9ccd2;
  --gold: #cbb07a;
  --gold-soft: rgba(203, 176, 122, 0.55);
  --paper: #f1ede5;
  --ink-pen: #24262c;

  --metal: linear-gradient(100deg, #8a8e96 0%, #f2f3f6 18%, #a4a8b0 34%, #ffffff 48%, #9a9ea6 62%, #e6e8ec 80%, #858991 100%);
  --metal-band: linear-gradient(90deg, #5f636b 0%, #d9dce1 24%, #9ea2aa 44%, #ffffff 58%, #b2b6bd 74%, #6c7078 100%);

  --sans: 'Pretendard Variable', Pretendard, 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  height: 100%;
  background: var(--ink);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  word-break: keep-all;
}
body {
  font-family: var(--sans); font-weight: 400;
  position: fixed;
  inset: 0;
  touch-action: manipulation;
  background:
    radial-gradient(120% 70% at 50% 40%, #121218 0%, var(--ink) 62%) fixed;
}
img { display: block; max-width: 100%; -webkit-user-drag: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ============ Global layers ============ */
#fx { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 6; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(130% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.72) 100%);
}
#flash {
  position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 48%, #ffffff 0%, #f3f4f7 45%, #d9dce2 100%);
}

.progress {
  position: fixed; z-index: 12; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-t) + 16px);
  display: flex; gap: 6px; align-items: center;
}
.progress i {
  display: block; width: 12px; height: 2px; border-radius: 2px;
  background: rgba(230, 233, 238, 0.18);
  transition: width 0.6s var(--ease-expo), background 0.6s ease;
}
.progress i.is-done { background: rgba(230, 233, 238, 0.45); }
.progress i.is-on { width: 30px; background: linear-gradient(90deg, #9da1a9, #ffffff, #c9ad72); }

.hint {
  position: fixed; z-index: 12; left: 0; right: 0; margin: 0 auto; width: max-content;
  bottom: calc(var(--safe-b) + 34px);
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: var(--muted);
  opacity: 0; pointer-events: none; white-space: nowrap;
}
.hint-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: #e9ebef; box-shadow: 0 0 10px rgba(255, 255, 255, 0.8); }
.hint-dot::after {
  content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.55);
  animation: pulse 1.8s var(--ease-expo) infinite;
}
@keyframes pulse { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }

/* ============ Stage & scenes ============ */
#stage { position: fixed; inset: 0; z-index: 4; overflow: hidden; cursor: pointer; outline: none; }
.scene {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--safe-t) + 56px) 24px calc(var(--safe-b) + 84px);
  text-align: center;
  visibility: hidden; opacity: 0;
}
.scene.is-active { visibility: visible; opacity: 1; }
.aura {
  position: absolute; left: 50%; top: 46%; width: 140vmax; height: 140vmax; transform: translate(-50%, -50%);
  pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(210, 216, 228, 0.10), rgba(160, 166, 180, 0.04) 45%, transparent 70%);
}
.ch { display: inline-block; will-change: transform, opacity, filter; white-space: pre; }
b .ch, .metal-chars .ch, b.metal {
  background: var(--metal); background-size: 220% 100%; background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.card-msg b .ch { background: none; color: inherit; -webkit-text-fill-color: currentColor; }
.metal {
  background: var(--metal); background-size: 220% 100%; background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.line { display: block; overflow: hidden; padding: 0.04em 0.1em 0.12em; }
.line > span { display: inline-block; will-change: transform; }

/* ---- 1. Intro ---- */
.s-intro .seal { width: 92px; height: 92px; margin-bottom: 34px; overflow: visible; }
.seal-ring { fill: none; stroke: url(#g-ring); stroke-width: 0.8; }
.seal-ring2 { fill: none; stroke: rgba(230, 233, 238, 0.22); stroke-width: 0.6; stroke-dasharray: 2 4; }
.seal-star { fill: url(#g-silver); transform-origin: 60px 60px; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45)); }
.intro-name { font-weight: 400; font-size: 24px; line-height: 1.3; letter-spacing: -0.02em; color: var(--sub); }
.intro-name b { font-weight: 800; }
.intro-line { margin-top: 14px; font-size: clamp(30px, 8.6vw, 34px); font-weight: 700; line-height: 1.25; letter-spacing: -0.035em; color: var(--text); }


/* ---- 2. Years ---- */
.kicker { font-size: 22px; font-weight: 400; line-height: 1.3; letter-spacing: -0.02em; color: var(--sub); margin-bottom: 20px; }
.counter { position: relative; width: min(64vw, 248px); aspect-ratio: 1; display: grid; place-items: center; }
.dial { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial-track { fill: none; stroke: rgba(230, 233, 238, 0.08); stroke-width: 1; }
.dial-bar { fill: none; stroke: url(#g-ring); stroke-width: 1.6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 120px 120px; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5)); }
.ticks line { stroke: rgba(230, 233, 238, 0.16); stroke-width: 1; }
.ticks line.major { stroke-width: 1.4; }
.count { position: relative; display: flex; align-items: baseline; gap: 4px; }
.num {
  font-family: var(--sans); font-weight: 800; font-size: clamp(62px, 18vw, 72px); line-height: 1; letter-spacing: -0.045em;
  font-variant-numeric: lining-nums tabular-nums;
  background: var(--metal); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.unit { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--sub); }

.and { margin-top: 28px; font-size: 22px; font-weight: 400; letter-spacing: -0.02em; color: var(--sub); }
.pass { margin-top: 4px; font-weight: 800; font-size: 44px; letter-spacing: -0.04em; line-height: 1.2; }
.pass .metal { filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.28)); }

/* ---- 3. Congrats ---- */
.en-script { font-weight: 600; font-size: 15px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 20px; }
.headline { font-weight: 400; font-size: clamp(36px, 10.2vw, 40px); line-height: 1.24; letter-spacing: -0.04em; color: var(--text); }
.headline b { font-weight: 800; }
.rule { display: block; width: 72px; height: 1px; margin: 30px auto 24px; background: linear-gradient(90deg, transparent, #e9ebef, var(--gold), transparent); transform-origin: center; }
.sub { font-size: 17px; font-weight: 400; line-height: 1.6; color: var(--body); letter-spacing: -0.02em; }

/* ---- 3-2. Bridge ---- */
.br-line { font-weight: 400; font-size: 22px; letter-spacing: -0.025em; color: var(--sub); line-height: 1.35; }
.br-line b { font-weight: 800; color: var(--text); }
.br-line + .br-line { margin-top: 22px; }
.br-strong { position: relative; margin-top: 40px !important; padding-bottom: 20px; color: var(--text); font-weight: 800; font-size: 36px; letter-spacing: -0.04em; line-height: 1.25; }
.br-strong .br-text { display: inline-block; }
.br-rule { position: absolute; left: 50%; bottom: 0; width: 160px; height: 1px; margin-left: -80px; transform-origin: 0 50%; background: linear-gradient(90deg, rgba(160, 165, 174, 0.2), #ffffff 45%, #c9ccd2 70%, rgba(203, 176, 122, 0.6)); box-shadow: 0 0 8px rgba(255, 255, 255, 0.45); }

/* ---- 4. Gift box ---- */
.box-label { position: absolute; top: calc(var(--safe-t) + 15%); font-weight: 600; font-size: 15px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.box-wrap { position: relative; width: 300px; height: 360px; margin-top: 20px; }
.box-persp { position: absolute; inset: 0; perspective: 1100px; perspective-origin: 50% 30%; }
.box-float { position: absolute; inset: 0; transform-style: preserve-3d; }
.box3d {
  --w: 158px; --d: 158px; --h: 118px; --lh: 30px;
  position: absolute; left: 50%; top: 60%; width: 0; height: 0;
  transform-style: preserve-3d;
  transform: rotateX(-24deg);
}
.box-spin { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: rotateY(36deg); }
.box3d .f { position: absolute; left: 0; top: 0; overflow: hidden; }
.box3d .side {
  width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2);
  background: linear-gradient(165deg, #23232a 0%, #121216 55%, #0a0a0d 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.box3d .front { transform: translateZ(calc(var(--d) / 2)); }
.box3d .back { transform: translateZ(calc(var(--d) / -2)) rotateY(180deg); }
.box3d .right { transform: translateX(calc(var(--w) / 2)) rotateY(90deg); filter: brightness(0.6); }
.box3d .left { transform: translateX(calc(var(--w) / -2)) rotateY(-90deg); filter: brightness(0.72); }
.box3d .bottom {
  width: var(--w); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--w) / -2);
  transform: translateY(calc(var(--h) / 2)) rotateX(90deg);
  background: #0b0b0e;
}
.inner-light { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle, #ffffff 0%, rgba(240, 242, 246, 0.6) 35%, rgba(200, 205, 214, 0) 75%); }
.box3d .band { position: absolute; top: 0; bottom: 0; left: 50%; width: 22px; margin-left: -11px; background: var(--metal-band); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); transform-origin: 50% 0%; }
.lid { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.lid-top {
  width: calc(var(--w) + 8px); height: calc(var(--d) + 8px);
  margin: calc((var(--d) + 8px) / -2) 0 0 calc((var(--w) + 8px) / -2);
  transform: translateY(calc(var(--h) / -2 - 3px)) rotateX(90deg);
  background: radial-gradient(120% 120% at 30% 25%, #2b2b33 0%, #141418 60%, #0d0d10 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.lid-top .band.h { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 22px; margin: -11px 0 0; background: linear-gradient(180deg, #5f636b 0%, #d9dce1 24%, #9ea2aa 44%, #ffffff 58%, #b2b6bd 74%, #6c7078 100%); transform-origin: 50% 50%; }
.lid-top .band.v { transform-origin: 50% 50%; }
.lid-side {
  width: calc(var(--w) + 8px); height: var(--lh);
  margin: calc(var(--lh) / -2) 0 0 calc((var(--w) + 8px) / -2);
  background: linear-gradient(180deg, #26262d, #111115);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 -6px 10px rgba(0, 0, 0, 0.5);
}
.l-front { transform: translateY(calc(var(--h) / -2 - 3px + var(--lh) / 2)) translateZ(calc(var(--d) / 2 + 4px)); }
.l-back { transform: translateY(calc(var(--h) / -2 - 3px + var(--lh) / 2)) translateZ(calc(var(--d) / -2 - 4px)) rotateY(180deg); }
.l-right { transform: translateY(calc(var(--h) / -2 - 3px + var(--lh) / 2)) translateX(calc(var(--w) / 2 + 4px)) rotateY(90deg); filter: brightness(0.6); }
.l-left { transform: translateY(calc(var(--h) / -2 - 3px + var(--lh) / 2)) translateX(calc(var(--w) / -2 - 4px)) rotateY(-90deg); filter: brightness(0.72); }
.bow {
  position: absolute; left: 0; top: 0; width: 112px; height: 66px; margin: -66px 0 0 -56px;
  transform-origin: 50% 100%;
}
.bow svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.bow-a { transform: translateY(calc(var(--h) / -2 - 3px)) translateY(6px); }
.bow-b { transform: translateY(calc(var(--h) / -2 - 3px)) translateY(6px) rotateY(90deg); }
.box-floor {
  position: absolute; left: 50%; top: 82%; width: 230px; height: 46px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.85), transparent);
}
.rays {
  position: absolute; left: 50%; top: 38%; width: 720px; height: 720px; margin: -360px 0 0 -360px;
  border-radius: 50%; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0) 0deg 7deg, rgba(255, 255, 255, 0.22) 8deg 10deg, rgba(255, 255, 255, 0) 11deg 17deg, rgba(240, 220, 180, 0.12) 18deg 19deg, rgba(255, 255, 255, 0) 20deg 26deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.7) 26%, transparent 62%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.7) 26%, transparent 62%);
}
.bloom {
  position: absolute; left: 50%; top: 38%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%;
  opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #ffffff 0%, rgba(245, 246, 249, 0.75) 25%, rgba(220, 224, 232, 0) 70%);
}

/* ---- 5. Wallet ---- */
.w-stage { position: relative; width: min(78vw, 310px); aspect-ratio: 1 / 1.02; perspective: 1000px; }
.w-glow { position: absolute; inset: -30%; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(236, 240, 248, 0.28), rgba(200, 206, 220, 0.08) 50%, transparent 72%); }
.w-tilt { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.w-slide { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; }
.w-slide img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.7)); }
.sheen {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.05) 44%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.05) 56%, transparent 62%);
  background-size: 300% 100%; background-position: 120% 0; mix-blend-mode: screen;
}
.w-floor { position: absolute; left: 50%; bottom: -6%; width: 70%; height: 30px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0, 0, 0, 0.9), transparent); z-index: -1; }
.w-dots { display: flex; gap: 4px; margin-top: 26px; }
.w-dots button { width: 34px; height: 30px; position: relative; }
.w-dots button::after { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; border-radius: 2px; background: rgba(230, 233, 238, 0.22); transition: background 0.4s ease; }
.w-dots button.is-on::after { background: #f2f3f6; box-shadow: 0 0 8px rgba(255, 255, 255, 0.6); }
.w-cap { margin-top: 18px; }
.w-en { font-weight: 700; font-size: 30px; line-height: 1.2; letter-spacing: -0.03em; color: var(--text); }
.w-sub { margin-top: 8px; font-weight: 600; font-size: 15px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.w-ko { margin-top: 14px; font-size: 17px; font-weight: 400; line-height: 1.55; letter-spacing: -0.02em; color: var(--body); }

/* ---- 5-2. Open wallet ---- */
.open-kicker { font-weight: 600; font-size: 15px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 24px; }
.o-stage { position: relative; width: min(70vw, 270px); aspect-ratio: 664 / 741; perspective: 900px; perspective-origin: 54% 40%; }
.o-glow { position: absolute; inset: -40%; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(236, 240, 248, 0.22), rgba(203, 176, 122, 0.05) 55%, transparent 74%); }
.o-book { position: absolute; inset: 0; transform-style: preserve-3d; }
.o-half { position: absolute; inset: 0; transform-origin: 54% 50%; will-change: transform; }
.o-half img { width: 100%; height: 100%; object-fit: contain; }
.o-l { clip-path: inset(0 46% 0 0); }
.o-r { clip-path: inset(0 0 0 54%); }
.o-spine { position: absolute; left: 54%; top: 2%; bottom: 2%; width: 2px; margin-left: -1px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.6), transparent); opacity: 0; filter: blur(1px); }
.o-book .sheen { z-index: 2; }
.o-floor { position: absolute; left: 50%; bottom: -7%; width: 86%; height: 34px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0, 0, 0, 0.9), transparent); z-index: -1; }
.open-title { margin-top: 40px; font-weight: 400; font-size: 36px; line-height: 1.25; letter-spacing: -0.04em; color: var(--text); }
.open-title b { font-weight: 800; }
.open-sub { margin-top: 12px; font-size: 18px; font-weight: 400; line-height: 1.55; letter-spacing: -0.02em; color: var(--body); }

/* ---- 6. Stamp ---- */
.stamp-kicker { font-weight: 600; font-size: 15px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 24px; }
.leather {
  position: relative; width: min(80vw, 316px); aspect-ratio: 1 / 0.86; border-radius: 18px; overflow: hidden;
  background: #0b0b0d url(leather.webp) center / cover;
  box-shadow: 0 40px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.leather::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.7) 100%); }
.leather-light { position: absolute; inset: 0; background: radial-gradient(60% 40% at 30% 20%, rgba(255, 255, 255, 0.12), transparent 70%); mix-blend-mode: screen; }
.stitch { position: absolute; inset: 12px; border-radius: 10px; border: 1px dashed rgba(170, 170, 178, 0.28); }
.mono {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 700; font-size: clamp(50px, 14vw, 56px); letter-spacing: 0.05em;
}
.g {
  display: inline-block; position: relative;
  background: var(--metal); background-size: 300% 100%; background-position: 100% 50%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.85)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.18)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.12));
  opacity: 0;
}
.g.dot { margin: 0 0.02em; }
.press { position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.7); opacity: 0; pointer-events: none; }
.stamp-title { margin-top: 36px; font-size: 30px; font-weight: 400; line-height: 1.3; letter-spacing: -0.035em; color: var(--text); }
.stamp-title b { font-weight: 800; }
.stamp-en { margin-top: 12px; font-weight: 600; font-size: 15px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

/* ---- 7. Card ---- */
.env-wrap { position: relative; width: min(82vw, 320px); height: min(118vw, 470px); }
.env-back, .env-front, .env-flap { position: absolute; left: 0; right: 0; bottom: 0; height: 200px; }
.env-back { border-radius: 6px; background: linear-gradient(180deg, #1b1b21, #101014); box-shadow: 0 30px 50px -10px rgba(0, 0, 0, 0.8); }
.env-front {
  z-index: 3; border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #24242b 0%, #16161b 100%);
  clip-path: polygon(0 18%, 50% 58%, 100% 18%, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.env-front::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 40%); }
.env-flap {
  z-index: 4; height: 120px; bottom: 80px; transform-origin: 50% 0%;
  background: linear-gradient(180deg, #2a2a32, #1a1a20);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.env-flap::after { content: ''; position: absolute; left: 50%; top: 66%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff, #b8bcc4 45%, #6d7179 100%); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.card-clip { position: absolute; z-index: 2; left: -40px; right: -40px; top: -240px; bottom: 14px; overflow: hidden; }
.card {
  position: absolute; left: calc(40px + 6%); right: calc(40px + 6%); bottom: 0; height: 340px;
  padding: 34px 26px 28px; border-radius: 4px; text-align: left; color: var(--ink-pen);
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, 0.7), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .42 0 0 0 0 .38 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    var(--paper);
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  display: flex; flex-direction: column;
}
.card::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(150, 140, 120, 0.25); border-radius: 2px; pointer-events: none; }
.card-to { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; color: #5f5b54; }
.card-msg { margin-top: 24px; font-weight: 500; font-size: 26px; line-height: 1.55; letter-spacing: -0.03em; color: var(--ink-pen); }
.card-msg b { font-weight: 800; color: #111216; }
.card-msg .ln { display: block; }
.card-msg .ch { opacity: 0; }
.card-rule { display: block; margin-top: auto; width: 54px; height: 1px; background: linear-gradient(90deg, #8e887d, transparent); transform-origin: left; }
.card-from { margin-top: 14px; font-weight: 500; font-size: 15px; line-height: 1.5; letter-spacing: -0.02em; color: #4e4a44; }

/* ---- 8. Finale ---- */
.fin-wallet { position: relative; width: min(46vw, 180px); aspect-ratio: 733 / 785; }
.fin-wallet img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 24px 26px rgba(0, 0, 0, 0.75)); }
.fin-halo { position: absolute; inset: -55%; border-radius: 50%; background: radial-gradient(closest-side, rgba(236, 240, 248, 0.24), rgba(203, 176, 122, 0.06) 55%, transparent 75%); }
.fin-en { margin-top: 40px; font-weight: 600; font-size: 15px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.fin-title { margin-top: 14px; font-weight: 400; font-size: clamp(36px, 10.2vw, 40px); line-height: 1.24; letter-spacing: -0.04em; color: var(--text); }
.fin-title b { font-weight: 800; }
.replay {
  margin-top: 40px; padding: 15px 30px; border-radius: 999px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--text);
  border: 1px solid rgba(230, 233, 238, 0.32); background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.replay:active { background: rgba(255, 255, 255, 0.1); }
.replay:focus-visible { outline: 1px solid #fff; outline-offset: 4px; }

/* ---- Short screens ---- */
@media (max-height: 700px) {
  .scene { padding-top: calc(var(--safe-t) + 44px); padding-bottom: calc(var(--safe-b) + 70px); }
  .counter { width: min(54vw, 210px); }
  .box-wrap { transform: scale(0.86); margin-top: 0; }
  .env-wrap { transform: scale(0.84); }
  .w-stage { width: min(64vw, 260px); }
  .o-stage { width: min(58vw, 220px); }
  .open-title { margin-top: 30px; }
  .fin-wallet { width: 130px; }
  .fin-en { margin-top: 26px; }
  .replay { margin-top: 26px; }
  .hint { bottom: calc(var(--safe-b) + 22px); }
}

@media (prefers-reduced-motion: reduce) {
  .hint-dot::after { animation: none; }
}
