/* EPIDOKI 메인 홈 v2 — 접속 첫 3초에 '두 겹의 말'을 보여 준다
   원칙: transform/opacity만 움직인다 · 영상은 화면에 보일 때만 재생 · prefers-reduced-motion 존중 */
:root {
  --ink2: var(--ink-muted); --ink3: var(--ink-subtle);
  --plum: var(--surface-1); --plum2: var(--color-plum-black);
  --rose: var(--accent); --rose-d: var(--accent-ink); --rose-l: var(--accent-soft); --coral: var(--accent-2); --ivory: var(--color-ivory); --paper: var(--paper-1);
  --line: var(--ink-6);
  --f-ja: 'EP Maru', var(--font-ja, sans-serif); --f-ko: 'EP Sans KR', var(--font-ko, sans-serif);
  --f-min: 'EP Mincho', serif; --f-serif-ko: 'EP Serif KR', serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: var(--ease-out-standard); --ease-io: cubic-bezier(.65,0,.35,1); --spring: cubic-bezier(.34,1.56,.64,1);
  --w: min(460px, 100vw);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: var(--space-0); background: var(--color-black); }
body { color: var(--ink); font-family: var(--f-ja); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: var(--space-0); }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; }

/* ───── 0. 오프닝 ───── */
.splash { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; align-content: center; gap: var(--space-4); background: var(--surface-1);
  transition: clip-path 900ms var(--ease-io), opacity 500ms; clip-path: inset(0 0 0 0); }
.splash.out { clip-path: inset(0 0 100% 0); }
.splash.gone { display: none; }
.sp-ecg { width: min(320px, 78vw); height: 72px; fill: none; stroke: var(--rose); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: none;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 900ms var(--ease-io) 80ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sp-logo { height: 26px; opacity: 0; transform: translateY(8px) scale(.96); animation: rise 600ms var(--ease) 650ms forwards; }
.sp-tag { margin: var(--space-0); font: 500 var(--text-xs)/1 var(--f-ja); letter-spacing: .24em; color: var(--text-muted); opacity: 0; transform: translateY(8px); animation: rise 600ms var(--ease) 850ms forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ───── 1. 히어로 ───── */
.hero { position: relative; width: var(--w); margin: var(--space-0) auto; height: 100vh; height: 100svh; min-height: 680px; max-height: 960px; overflow: hidden; background: var(--plum); color: var(--ivory); isolation: isolate; }
.hv { position: absolute; inset: -2% -2% 0; will-change: transform; }
.hv-layer { position: absolute; inset: 0; background-size: cover; background-position: 50% 18%; opacity: 0; transition: opacity 1100ms var(--ease-io); }
.hv-layer.on { opacity: 1; }
.hv-layer.on.kb { animation: kb 11s linear forwards; }
@keyframes kb { from { transform: scale(1.02); } to { transform: scale(1.09) translateY(-1%); } }
.hv-layer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; opacity: 0; transition: opacity 900ms; }
.hv-layer video.on { opacity: 1; }
.hv-grad { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--black-70) 0%, var(--black-50) 24%, var(--black-24) 34%, var(--black-50) 52%, var(--black-90) 70%, var(--plum) 100%); }
.hv-flash { position: absolute; inset: 0; pointer-events: none; background: var(--accent-soft); opacity: 0; mix-blend-mode: screen; }
.hv-flash.go { animation: flash 900ms var(--ease); }
@keyframes flash { 0% { opacity: 0; } 18% { opacity: 1; } 40% { opacity: .35; } 55% { opacity: .8; } 100% { opacity: 0; } }
.hero.thump .hv { animation: thump 900ms var(--ease); }
@keyframes thump { 0%,100% { transform: scale(1); } 16% { transform: scale(1.018); } 32% { transform: scale(1); } 48% { transform: scale(1.012); } }
.grain { position: absolute; inset: -50%; pointer-events: none; opacity: .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 baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0,0); } 33% { transform: translate(-3%,2%); } 66% { transform: translate(2%,-3%); } 100% { transform: translate(0,0); } }

.h-top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + var(--space-3)) var(--space-4) var(--space-0); }
.h-logo { height: 17px; filter: none; }
.h-top-r { display: flex; align-items: center; gap: var(--space-2); }
.h-streak, .h-sound { background: var(--ivory-12); border: 1px solid var(--ivory-12); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.h-streak { display: inline-flex; align-items: center; gap: var(--space-1); height: 32px; padding: var(--space-0) var(--space-3); border-radius: var(--r-pill); font: 700 var(--text-xs)/1 var(--f-ja); }
.h-streak[hidden] { display: none; }
.h-streak svg { fill: var(--coral); width: 14px; height: 14px; }
.h-streak b { font: 800 var(--text-sm)/1 var(--f-ko); color: var(--status-warning); }
.h-sound { display: inline-flex; align-items: center; gap: var(--space-2); height: 32px; padding: var(--space-0) var(--space-3); border-radius: var(--r-pill); font: 700 var(--text-2xs)/1 var(--f-ja); color: var(--ivory-90); }
.h-sound .eq { display: inline-flex; gap: var(--space-1); align-items: flex-end; height: 11px; }
.h-sound .eq i { width: 2px; height: 3px; border-radius: var(--r-sm); background: currentColor; }
.h-sound:not(.on) { animation: ask 2.4s ease-in-out infinite; }
@keyframes ask { 0%,70%,100% { box-shadow: var(--shadow-none); } 80% { box-shadow: var(--shadow-none); } }
.h-sound.on { color: var(--rose-l); }
.h-sound.on .eq i { animation: eq 900ms ease-in-out infinite alternate; }
.h-sound.on .eq i:nth-child(2) { animation-delay: -300ms; } .h-sound.on .eq i:nth-child(3) { animation-delay: -600ms; }
@keyframes eq { from { height: 3px; } to { height: 11px; } }

.hero-copy { position: absolute; z-index: 3; left: 20px; right: 20px; top: calc(var(--safe-t) + 66px); }
.eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); margin: var(--space-0); font: 700 var(--text-2xs)/1 var(--f-ja); letter-spacing: .14em; color: var(--ivory-70); opacity: 0; transition: opacity 600ms 200ms; }
.ready .eyebrow { opacity: 1; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rose); animation: live 1.6s ease-out infinite; }
@keyframes live { 0% { box-shadow: var(--shadow-none); } 100% { box-shadow: var(--shadow-none); } }
.headline { margin: var(--space-3) var(--space-0) var(--space-0); font: 700 var(--text-2xl)/1.22 var(--f-min); letter-spacing: .02em; text-shadow: var(--shadow-none); }
.headline .ln { display: block; overflow: hidden; padding-bottom: var(--space-1); }
.headline .ln > span { display: inline-block; transform: translateY(110%); }
.ready .headline .ln > span { animation: up 900ms var(--ease) forwards; }
.ready .headline .ln:nth-child(2) > span { animation-delay: 120ms; }
@keyframes up { to { transform: none; } }
.headline em { font-style: normal; color: var(--accent-soft); }

/* 데모 */
.demo { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: calc(var(--safe-b) + 226px); }
.demo-meta { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-0) var(--space-1) var(--space-2); font: 700 var(--text-xs)/1.2 var(--f-ja); color: var(--ivory-90); opacity: 0; transform: translateY(6px); transition: all 500ms var(--ease); }
.demo.show .demo-meta { opacity: 1; transform: none; }
.d-no { display: inline-grid; place-items: center; height: 20px; padding: var(--space-0) var(--space-2); border-radius: var(--r-pill); background: color-mix(in srgb, var(--tc, var(--rose)) 55%, var(--surface-1)); color: var(--color-ivory); font: 800 var(--text-2xs)/1 var(--f-ko); letter-spacing: .06em; }
#dSeries { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-segs { display: flex; gap: var(--space-1); }
.d-segs i { width: 16px; height: 3px; border-radius: var(--r-sm); background: var(--ivory-24); overflow: hidden; position: relative; }
.d-segs i.done { background: var(--ivory-70); }
.d-segs i.cur::after { content: ''; position: absolute; inset: 0; background: var(--rose); transform-origin: 0 50%; animation: seg var(--dur, 9s) linear forwards; }
@keyframes seg { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.bubble { position: relative; padding: var(--space-3) var(--space-4) var(--space-3); border-radius: var(--r-md) var(--r-md) var(--r-md) var(--r-sm); color: var(--ivory);
  background: var(--ivory-12); border: 1px solid var(--ivory-24);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: var(--shadow-low);
  opacity: 0; transform: translateY(14px) scale(.98); transition: opacity 500ms var(--ease), transform 600ms var(--ease); }
.demo.show .bubble { opacity: 1; transform: none; }
.demo.show.inner-on .bubble { opacity: 1; filter: brightness(.8); transform: scale(.965) translateY(4px); transition: filter 700ms var(--ease), transform 700ms var(--ease); }
.who { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); font: 700 var(--text-xs)/1 var(--f-ja); }
.who .face { width: 26px; height: 26px; border-radius: 50%; background-color: var(--surface-2); background-repeat: no-repeat; border: 1.5px solid var(--ivory-70); }
.who .say { font-weight: 500; color: var(--text-muted); }
.bubble .ko { margin: var(--space-0); font: 700 var(--text-md)/1.5 var(--f-ko); letter-spacing: -.01em; min-height: 27px; word-break: keep-all; }
.bubble .ko .c, .inner .ko .c { display: inline-block; white-space: pre; }
.bubble .ko .c { opacity: 0; transform: translateY(4px); transition: opacity 180ms, transform 260ms var(--ease); }
.bubble .ko .c.on { opacity: 1; transform: none; }
.bubble .ja { margin: var(--space-1) var(--space-0) var(--space-0); font: 500 var(--text-xs)/1.55 var(--f-ja); color: var(--ivory-70); opacity: 0; transition: opacity 500ms; }
.bubble .ja.on { opacity: 1; }

.beat { display: flex; align-items: center; gap: var(--space-2); height: 36px; margin: var(--space-1) var(--space-1); opacity: 0; transition: opacity 300ms; }
.beat.on { opacity: 1; }
.beat .ecg { flex: 1; height: 30px; fill: none; stroke: var(--rose); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: none; stroke-dasharray: 1; stroke-dashoffset: 1; }
.beat.on .ecg { animation: draw 700ms var(--ease-io) forwards; }
.beat span { font: 700 var(--text-xs)/1 var(--f-ja); letter-spacing: .12em; color: var(--rose-l); white-space: nowrap; opacity: 0; transform: translateX(-6px); transition: all 400ms var(--ease) 380ms; }
.beat.on span { opacity: 1; transform: none; }

.inner { position: relative; padding: var(--space-4) var(--space-4) var(--space-4); border-radius: var(--r-sm) var(--r-md) var(--r-md) var(--r-md); color: var(--ink);
  background: var(--paper-1); box-shadow: var(--shadow-low);
  transform-origin: 50% 0; transform: perspective(900px) rotateX(-88deg); opacity: 0; }
.inner::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5;
  background: none; }
.inner.on { animation: flipin 820ms var(--spring) forwards; }
@keyframes flipin { 0% { transform: perspective(900px) rotateX(-88deg); opacity: 0; } 30% { opacity: 1; } 100% { transform: perspective(900px) rotateX(0); opacity: 1; } }
.inner .hanko { position: absolute; right: 12px; top: -12px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--r-md); border: 2.5px solid var(--rose-d); color: var(--rose-d);
  font: 700 var(--text-sm)/1 var(--f-min); letter-spacing: .05em; background: var(--ivory-90); transform: rotate(-12deg) scale(2.2); opacity: 0; }
.inner.stamped .hanko { animation: stamp 420ms cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes stamp { 0% { transform: rotate(-24deg) scale(2.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-12deg) scale(1); opacity: .95; } }
.inner .ko { margin: var(--space-0); padding-right: var(--space-7); font: 700 var(--text-lg)/1.55 var(--f-serif-ko); color: var(--accent-ink); word-break: keep-all; min-height: 29px; }
.inner .ko .c { opacity: 0; filter: blur(6px); transform: translateY(3px); transition: opacity 260ms, filter 420ms, transform 420ms var(--ease); }
.inner .ko .c.on { opacity: 1; filter: none; transform: none; }
.inner .ja { margin: var(--space-1) var(--space-0) var(--space-0); font: 700 var(--text-sm)/1.6 var(--f-min); color: var(--ink); opacity: 0; transform: translateY(4px); transition: all 600ms var(--ease); }
.inner .ja.on { opacity: 1; transform: none; }
.demo.out .bubble, .demo.out .inner, .demo.out .beat, .demo.out .demo-meta { opacity: 0 !important; transform: translateY(10px) !important; filter: blur(4px); transition: all 420ms var(--ease-io); animation: none; }

.hero-cta { position: absolute; z-index: 4; left: 16px; right: 16px; bottom: calc(var(--safe-b) + 92px); opacity: 0; transform: translateY(16px); transition: all 800ms var(--ease) 300ms; }
.ready .hero-cta { opacity: 1; transform: none; }
.cta-main { position: relative; overflow: hidden; display: flex; align-items: center; gap: var(--space-3); width: 100%; height: 64px; padding: var(--space-0) var(--space-4); border-radius: var(--r-md); text-align: left;
  background: var(--accent); color: var(--plum); box-shadow: var(--shadow-primary);
  transition: transform 160ms var(--ease); }
.cta-main > svg { flex: 0 0 26px; height: 26px; fill: var(--plum); animation: hb 1.6s ease-in-out infinite; }
@keyframes hb { 0%,100% { transform: scale(1); } 12% { transform: scale(1.18); } 24% { transform: scale(1); } 36% { transform: scale(1.12); } 48% { transform: scale(1); } }
.cm-txt b { display: block; font: 700 var(--text-md)/1.25 var(--f-ja); }
.cm-txt small { display: block; margin-top: var(--space-1); font: 700 var(--text-2xs)/1 var(--f-ja); opacity: .72; letter-spacing: .06em; }
.shine { position: absolute; top: 0; bottom: 0; width: 40%; left: -50%; background: none; transform: skewX(-18deg); animation: shine 3.6s ease-in-out 1.6s infinite; }
@keyframes shine { 0% { left: -50%; } 30%, 100% { left: 130%; } }
.cta-row { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.cta-listen, .cta-watch { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 46px; border-radius: var(--r-md); font: 700 var(--text-sm)/1 var(--f-ja); color: var(--ivory);
  background: var(--ivory-12); border: 1px solid var(--ivory-12); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.cta-listen svg, .cta-watch svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cta-listen.playing { color: var(--rose-l); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.scroll-cue { display: none;  position: absolute; z-index: 3; left: 50%; bottom: calc(var(--safe-b) + 12px); width: 22px; height: 22px; margin-left: -11px; }
.scroll-cue i { position: absolute; left: 50%; top: 2px; width: 10px; height: 10px; margin-left: -5px; border-right: 2px solid var(--ivory-50); border-bottom: 2px solid var(--ivory-50); transform: rotate(45deg); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: translateY(0) rotate(45deg); opacity: .3; } 50% { transform: translateY(5px) rotate(45deg); opacity: 1; } }

/* 스크롤 후 상단 */
.mini-top { position: fixed; z-index: 30; top: 0; left: 50%; width: var(--w); transform: translate(-50%, -110%); display: flex; align-items: center; justify-content: space-between; height: calc(var(--safe-t) + 56px); padding: var(--safe-t) var(--space-4) var(--space-0);
  background: var(--ivory-90); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); transition: transform 420ms var(--ease); }
.mini-top.on { transform: translate(-50%, 0); }
.mini-top img { height: 16px; }
.mini-quiz { display: inline-flex; align-items: center; gap: var(--space-1); height: 34px; padding: var(--space-0) var(--space-3); border-radius: var(--r-pill); background: var(--plum); color: var(--ivory); font: 700 var(--text-xs)/1 var(--f-ja); }
.mini-quiz svg { width: 14px; height: 14px; fill: var(--rose); }

/* ───── 피드 ───── */
.feed { position: relative; width: var(--w); margin: -1px auto var(--space-0); padding: var(--space-2) var(--space-4) calc(var(--safe-b) + 110px);
  background: var(--ivory); }
.dark-zone { margin: var(--space-0) calc(-1 * var(--space-4)); padding: var(--space-1) var(--space-4) 84px; background: var(--surface-1); }
.dark-zone + .sec { margin-top: calc(-1 * var(--space-4)); }
.quick { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: var(--space-2); margin-bottom: var(--space-3); }
.qk { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-0); min-height: 96px; padding: var(--space-3) var(--space-3) var(--space-3); border-radius: var(--r-md); text-align: left; color: var(--ivory);
  background: var(--ivory-6); border: 1px solid var(--ivory-12); transition: transform 160ms var(--ease); }
.qk-ic { width: 34px; height: 34px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--ivory-12); margin-bottom: var(--space-2); }
.qk-ic svg { width: 19px; height: 19px; fill: none; stroke: var(--rose-l); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.qk b { font: 700 var(--text-sm)/1.2 var(--f-ja); }
.qk small { margin-top: var(--space-1); font: 600 var(--text-2xs)/1.2 var(--f-ja); color: var(--ivory-70); }
.qk-quiz { background: var(--surface-3); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.qk-quiz .qk-ic { background: var(--accent); }
.qk-quiz .qk-ic svg { fill: var(--plum); stroke: none; animation: hb 1.6s ease-in-out infinite; }
.qk-quiz small { color: var(--rose-l); }
.sec { margin-top: var(--space-6); }
.sec:first-child { margin-top: var(--space-0); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease), transform 900ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin: var(--space-0) var(--space-1) var(--space-3); }
.sec-head small { font: 800 var(--text-2xs)/1 var(--f-ko); letter-spacing: .22em; color: var(--rose-d); }
.sec-head h2 { margin: var(--space-2) var(--space-0) var(--space-0); font: 700 var(--text-lg)/1.38 var(--f-min); color: var(--ink); letter-spacing: .01em; }
.sec-note { font: 600 var(--text-2xs)/1 var(--f-ja); color: var(--ink3); padding: var(--space-1) var(--space-2); border-radius: var(--r-pill); background: var(--ink-6); }

/* 2. 이어보기 */
.cont { position: relative; display: flex; align-items: stretch; gap: var(--space-3); padding: var(--space-3); border-radius: var(--r-md); background: var(--ivory-6); border: 1px solid var(--ivory-12); color: var(--ivory);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow-low); }
.cont-media { position: relative; flex: 0 0 96px; height: 128px; border-radius: var(--r-md); overflow: hidden; background-color: var(--color-plum-black); background-size: cover; background-position: 50% 20%; }
.cont-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.cont-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.cont-kicker { font: 700 var(--text-2xs)/1 var(--f-ja); letter-spacing: .14em; color: var(--rose-l); }
.cont-title { margin-top: var(--space-2); font: 700 var(--text-md)/1.4 var(--f-ja); }
.cont-ep { margin-top: var(--space-1); font: 500 var(--text-xs)/1.4 var(--f-ja); color: var(--ivory-70); }
.cont-prog { height: 4px; border-radius: var(--r-sm); margin-top: var(--space-3); background: var(--ivory-12); overflow: hidden; }
.cont-prog i { display: block; height: 100%; transform: scaleX(var(--continue-progress, 0)); transform-origin: left; background: var(--accent); border-radius: var(--r-sm); transition: transform var(--duration-cut) var(--ease-out-standard); }

/* 3. 작품 */
.chips { display: flex; gap: var(--space-1); margin: var(--space-0) calc(-1 * var(--space-4)) var(--space-3); padding: var(--space-1) var(--space-4) var(--space-1); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; white-space: nowrap; height: 32px; padding: var(--space-0) var(--space-3); border-radius: var(--r-pill); background: var(--paper-1); font: 700 var(--text-xs)/1 var(--f-ja); color: var(--ink2); box-shadow: var(--shadow-low); transition: all 250ms var(--ease); }
.chips button.on { background: var(--ink); color: var(--ivory); }
.shelf { display: flex; gap: var(--space-3); overflow-x: auto; scroll-snap-type: x mandatory; margin: var(--space-0) calc(-1 * var(--space-4)); padding: var(--space-1) var(--space-4) var(--space-5); scrollbar-width: none; perspective: 900px; }
.shelf::-webkit-scrollbar { display: none; }
.pc { flex: 0 0 72%; max-width: 320px; scroll-snap-align: center; opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease), transform 800ms var(--ease); }
.pc.in { opacity: 1; transform: none; }
.pc:nth-child(2) { transition-delay: 90ms; } .pc:nth-child(3) { transition-delay: 180ms; }
.pc.hide { display: none; }
.pc-card { position: relative; display: block; height: 380px; border-radius: var(--r-md); overflow: hidden; background-color: var(--color-plum-black); background-size: cover; background-position: 50% 20%; color: var(--ivory);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 500ms var(--ease); box-shadow: var(--shadow-card); }
.pc-card.tilt { transition: transform 80ms linear; }
.pc-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; opacity: 0; transition: opacity 700ms; }
.pc-card video.on { opacity: 1; }
.pc-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--black-90) 100%); }
.pc-glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: none; mix-blend-mode: overlay; }
.pc-body { position: absolute; z-index: 3; left: 18px; right: 18px; bottom: 18px; }
.pc-badge { display: inline-flex; align-items: center; gap: var(--space-1); height: 24px; padding: var(--space-0) var(--space-2); border-radius: var(--r-pill); background: color-mix(in srgb, var(--tc) 55%, var(--surface-1)); color: var(--color-ivory); font: 800 var(--text-2xs)/1 var(--f-ja); }
.pc-title { margin: var(--space-2) var(--space-0) var(--space-1); font: 700 var(--text-lg)/1.35 var(--f-min); text-shadow: var(--shadow-none); }
.pc-hook { margin: var(--space-0); font: 500 var(--text-xs)/1.6 var(--f-ja); color: var(--ivory-90); }
.pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-3); }
.pc-mood { font: 700 var(--text-2xs)/1 var(--f-ja); color: var(--ivory-70); letter-spacing: .06em; }
.pc-go { display: inline-flex; align-items: center; gap: var(--space-1); height: 36px; padding: var(--space-0) var(--space-3); border-radius: var(--r-pill); background: var(--ivory); color: var(--ink); font: 700 var(--text-xs)/1 var(--f-ja); }
.pc-go svg { width: 14px; height: 14px; fill: var(--tc); }

/* 近日公開 */
.soon-head { display: flex; align-items: baseline; gap: var(--space-2); margin: var(--space-1) var(--space-1) var(--space-3); }
.soon-head b { font: 700 var(--text-sm)/1 var(--f-ja); color: var(--ink); }
.soon-head span { font: 600 var(--text-2xs)/1.3 var(--f-ja); color: var(--ink3); }
.soon-row { display: flex; gap: var(--space-2); overflow-x: auto; margin: var(--space-0) calc(-1 * var(--space-4)); padding: var(--space-1) var(--space-4) var(--space-3); scrollbar-width: none; scroll-snap-type: x proximity; }
.soon-row::-webkit-scrollbar { display: none; }
.soon-head[hidden], .soon-row[hidden] { display: none; }
.soon { position: relative; flex: 0 0 132px; height: 176px; border-radius: var(--r-md); padding: var(--space-3); color: var(--ivory); overflow: hidden; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  box-shadow: var(--shadow-low); }
.soon::after { content: ''; position: absolute; inset: 0; background: none; pointer-events: none; }
.soon .n { font: 800 var(--text-2xl)/1 var(--f-ko); opacity: .9; }
.soon .lock { position: absolute; right: 10px; top: 10px; font: 700 var(--text-2xs)/1 var(--f-ja); padding: var(--space-1) var(--space-2); border-radius: var(--r-pill); background: var(--black-24); letter-spacing: .06em; }
.soon b { display: block; font: 700 var(--text-xs)/1.4 var(--f-min); }
.soon small { display: block; margin-top: var(--space-1); font: 600 var(--text-2xs)/1.2 var(--f-ja); opacity: .78; }

/* 작품 상세 */
.sd { position: fixed; inset: 0; z-index: 55; background: var(--plum); animation: sdIn 460ms var(--ease); }
.sd[hidden] { display: none; }
@keyframes sdIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.sd-back { position: absolute; z-index: 3; left: calc(50% - var(--w) / 2 + 14px); top: calc(var(--safe-t) + 12px); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--black-50); border: 1px solid var(--ivory-24); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.sd-back svg { width: 20px; height: 20px; fill: none; stroke: var(--ivory); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sd-scroll { position: absolute; inset: 0; overflow-y: auto; }
.sd-in { width: var(--w); margin: var(--space-0) auto; background: var(--ivory); min-height: 100%; }
.sd-hero { position: relative; height: min(62vh, 520px); min-height: 400px; overflow: hidden; background-color: var(--plum); background-size: cover; background-position: 50% 18%; color: var(--ivory); }
.sd-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; opacity: 0; transition: opacity 800ms; }
.sd-hero video.on { opacity: 1; }
.sd-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--black-24) 0%, transparent 26%, var(--black-50) 58%, var(--black-90) 100%); }
.sd-info { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 22px; }
.sd-badge { display: inline-flex; align-items: center; height: 24px; padding: var(--space-0) var(--space-2); border-radius: var(--r-pill); background: color-mix(in srgb, var(--tc) 55%, var(--surface-1)); color: var(--color-ivory); font: 800 var(--text-2xs)/1 var(--f-ja); }
.sd-title { margin: var(--space-2) var(--space-0) var(--space-1); font: 700 var(--text-xl)/1.3 var(--f-min); text-shadow: var(--shadow-none); }
.sd-hook { margin: var(--space-0); font: 500 var(--text-xs)/1.65 var(--f-ja); color: var(--ivory-90); }
.sd-meta { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-3); }
.sd-meta span { font: 700 var(--text-2xs)/1 var(--f-ja); padding: var(--space-1) var(--space-2); border-radius: var(--r-pill); background: var(--ivory-12); border: 1px solid var(--ivory-12); }
.sd-body { position: relative; margin-top: -1px; padding: var(--space-4) var(--space-4) calc(var(--safe-b) + var(--space-6)); background: linear-gradient(180deg, var(--surface-1) 0, var(--surface-1) 46px, var(--ivory) 46px); }
.sd-cta { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%; height: 60px; border-radius: var(--r-md); background: var(--accent); color: var(--plum); font: 700 var(--text-md)/1 var(--f-ja);
  box-shadow: var(--shadow-primary); }
.sd-cta svg { width: 20px; height: 20px; fill: var(--plum); }
.sd-list-head { display: flex; align-items: baseline; justify-content: space-between; margin: var(--space-5) var(--space-1) var(--space-2); }
.sd-list-head b { font: 700 var(--text-md)/1 var(--f-ja); }
.sd-list-head span { font: 600 var(--text-2xs)/1 var(--f-ja); color: var(--ink3); }
.ep { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3); margin-bottom: var(--space-2); border-radius: var(--r-md); background: var(--paper-1); text-align: left; box-shadow: var(--shadow-low); animation: optIn 480ms var(--ease) backwards; }
.ep-n { flex: 0 0 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--ink-6); font: 800 var(--text-sm)/1 var(--f-ko); color: var(--ink); }
.ep.cur .ep-n { background: color-mix(in srgb, var(--tc) 55%, var(--surface-1)); color: var(--color-ivory); }
.ep-t { flex: 1; min-width: 0; }
.ep-t b { display: block; font: 700 var(--text-sm)/1.4 var(--f-ja); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-t small { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-1); font: 700 var(--text-2xs)/1 var(--f-ja); color: var(--ink3); }
.ep-t small .free { color: var(--status-success-ink); } .ep-t small .wait { color: var(--rose-d); } .ep-t small .done { color: var(--ink3); }
.ep-go { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-6); }
.ep-go svg { width: 15px; height: 15px; fill: var(--ink); }
.ep.lock .ep-go svg { fill: none; stroke: var(--ink-muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sd-note { margin: var(--space-4) var(--space-1) var(--space-0); font: 500 var(--text-2xs)/1.6 var(--f-ja); color: var(--ink3); }

/* 4. 오늘의 한마디 */
.fortune { position: relative; overflow: hidden; border-radius: var(--r-md); padding: var(--space-5) var(--space-4) var(--space-4); color: var(--ivory);
  background: var(--surface-2);
  box-shadow: var(--shadow-card); }
.fortune::before { content: ''; position: absolute; width: 260px; height: 260px; right: -80px; bottom: -120px; border-radius: 50%; border: 1px solid var(--ivory-12); box-shadow: var(--shadow-card); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.f-head { position: relative; display: flex; align-items: center; justify-content: space-between; }
.f-tag { font: 800 var(--text-2xs)/1 var(--f-ja); letter-spacing: .16em; color: var(--rose-l); }
.f-date { font: 700 var(--text-2xs)/1 var(--f-ko); color: var(--text-muted); }
.f-title { position: relative; margin: var(--space-3) var(--space-0) var(--space-1); font: 700 var(--text-lg)/1.45 var(--f-min); }
.f-sub { position: relative; margin: var(--space-0); font: 500 var(--text-xs)/1.7 var(--f-ja); color: var(--ivory-70); }
.f-form { position: relative; display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.f-form input, .f-form select { height: 50px; border-radius: var(--r-md); border: 1px solid var(--ivory-24); background: var(--ivory-12); color: var(--ivory); padding: var(--space-0) var(--space-3); font: 700 var(--text-sm)/1 var(--f-ko); color-scheme: dark; }
.f-form input { flex: 1; min-width: 0; }
.f-form select { font: 700 var(--text-sm)/1 var(--f-ja); }
.f-form button { height: 50px; padding: var(--space-0) var(--space-4); border-radius: var(--r-md); background: var(--accent); color: var(--plum); font: 700 var(--text-sm)/1 var(--f-ja); }
.f-note { position: relative; margin: var(--space-2) var(--space-1) var(--space-0); font: 500 var(--text-2xs)/1.55 var(--f-ja); color: var(--text-muted); }
.f-ilju { position: relative; display: flex; gap: var(--space-3); align-items: center; margin-top: var(--space-4); }
.f-hanja { flex: 0 0 72px; height: 72px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--ivory); color: var(--ink); font: 700 var(--text-xl)/1 var(--f-min); letter-spacing: .04em; box-shadow: var(--shadow-low); }
.f-ilju b { display: block; font: 700 var(--text-md)/1.4 var(--f-ja); }
.f-ilju p { margin: var(--space-1) var(--space-0) var(--space-0); font: 500 var(--text-xs)/1.6 var(--f-ja); color: var(--ivory-70); }
.f-lead { position: relative; margin: var(--space-4) var(--space-0) var(--space-0); font: 700 var(--text-md)/1.5 var(--f-min); }
.f-bars { position: relative; display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-2); margin-top: var(--space-3); }
.f-bar { text-align: center; }
.f-bar .t { height: 64px; border-radius: var(--r-md); background: var(--ivory-6); position: relative; overflow: hidden; }
.f-bar .t i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; border-radius: var(--r-md); background: var(--accent-2); transition: height 1100ms var(--ease); }
.f-bar .t i.careful { background: var(--ivory-50); }
.f-bar span { display: block; margin-top: var(--space-2); font: 700 var(--text-2xs)/1.3 var(--f-ja); color: var(--ivory-70); }
.f-phrase { position: relative; margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--r-md); background: var(--ivory); color: var(--ink); }
.f-phrase small { font: 800 var(--text-2xs)/1 var(--f-ja); color: var(--rose-d); letter-spacing: .1em; }
.f-phrase .ko { display: block; margin-top: var(--space-2); font: 700 var(--text-lg)/1.4 var(--f-ko); }
.f-phrase .kana { display: block; font: 500 var(--text-2xs)/1.5 var(--f-ja); color: var(--ink3); }
.f-phrase .ja { display: block; margin-top: var(--space-1); font: 500 var(--text-xs)/1.5 var(--f-ja); color: var(--ink2); }
.f-links { position: relative; display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.f-links button { flex: 1; height: 44px; border-radius: var(--r-md); background: var(--ivory-12); border: 1px solid var(--ivory-12); font: 700 var(--text-xs)/1 var(--f-ja); color: var(--ivory); }
.f-links button.soon { color: var(--text-muted); }
.f-reset { position: relative; margin-top: var(--space-3); font: 500 var(--text-2xs)/1 var(--f-ja); color: var(--text-muted); text-decoration: underline; }

/* 5. 연애 문화 */
.culture { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.cul { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 214px; padding: var(--space-4); border-radius: var(--r-md); text-align: left; overflow: hidden; color: var(--ivory);
  box-shadow: var(--shadow-low); opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 800ms var(--ease); }
.cul.in { opacity: 1; transform: none; } .cul:nth-child(2) { transition-delay: 100ms; }
.cul .big { font: 800 var(--text-2xl)/1.12 var(--f-ko); letter-spacing: -.04em; word-break: keep-all; text-shadow: var(--shadow-none); }
.cul .big small { display: block; margin-top: var(--space-2); font: 700 var(--text-2xs)/1 var(--f-ja); letter-spacing: .08em; opacity: .8; }
.cul b { font: 700 var(--text-sm)/1.45 var(--f-ja); }
.cul .sub { display: block; margin-top: var(--space-1); font: 500 var(--text-2xs)/1.4 var(--f-ja); opacity: .82; }

.foot { text-align: center; padding: var(--space-6) var(--space-0) var(--space-2); }
.foot img { height: 16px; opacity: .8; }
.foot p { margin: var(--space-3) var(--space-0) var(--space-1); font: 700 var(--text-sm)/1.5 var(--f-min); color: var(--ink); }
.foot small { font: 500 var(--text-2xs)/1.4 var(--f-ja); color: var(--ink3); }

/* 하단 탭 */
.tabbar { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--safe-b) + 12px); transform: translate(-50%, 160%); width: calc(var(--w) - 24px); display: grid; grid-template-columns: repeat(5,1fr);
  padding: var(--space-1); border-radius: var(--r-md); background: var(--black-70); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); border: 1px solid var(--ivory-12);
  box-shadow: var(--shadow-low); transition: transform 600ms var(--ease); }
.tabbar.on { transform: translate(-50%, 0); }
.tab-ind { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 5); border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 24%, transparent); transition: transform 450ms var(--spring); }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); height: 50px; font: 700 var(--text-2xs)/1 var(--f-ja); color: var(--text-muted); transition: color 250ms; }
.tabbar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.tabbar button.on { color: var(--ivory); }
.tabbar button.on svg { stroke: var(--rose); }

.hearts { position: fixed; inset: 0; pointer-events: none; z-index: 80; }
.hearts i { position: absolute; width: 14px; height: 14px; background: var(--rose); transform: rotate(45deg); border-radius: var(--r-sm); animation: heart 1100ms var(--ease) forwards; }
.hearts i::before, .hearts i::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: inherit; }
.hearts i::before { left: -7px; } .hearts i::after { top: -7px; }
@keyframes heart { from { opacity: 1; transform: translate(0,0) rotate(45deg) scale(.6); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(45deg) scale(1.1); } }

/* 시트 */
.sheet-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap::before { content: ''; position: absolute; inset: 0; background: var(--black-50); animation: sheet-dim var(--duration-sheet) var(--ease-out-standard) both; }
.sheet-wrap[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: var(--w); max-height: 86vh; overflow-y: auto; background: var(--ivory); border-radius: var(--r-md) var(--r-md) var(--r-none) var(--r-none); padding: var(--space-3) var(--space-4) calc(var(--safe-b) + var(--space-5)); animation: sheet-rise var(--duration-sheet) var(--ease-out-standard) both; }
.sheet .grab { width: 40px; height: 5px; border-radius: var(--r-sm); background: var(--ink-12); margin: var(--space-0) auto var(--space-4); }
.sheet h3 { margin: var(--space-0) var(--space-0) var(--space-2); font: 700 var(--text-lg)/1.45 var(--f-min); }
.sheet p { margin: var(--space-0) var(--space-0) var(--space-3); font: 500 var(--text-sm)/1.85 var(--f-ja); color: var(--ink2); }
.sheet .phrase { padding: var(--space-3) var(--space-4); border-radius: var(--r-md); background: var(--paper-1); margin: var(--space-1) var(--space-0) var(--space-3); }
.sheet .phrase .ko { display: block; font: 700 var(--text-md)/1.5 var(--f-ko); color: var(--ink); }
.sheet .phrase .kana { display: block; font: 500 var(--text-2xs)/1.5 var(--f-ja); color: var(--ink3); }
.sheet .phrase .ja { display: block; margin-top: var(--space-1); font: 500 var(--text-xs)/1.5 var(--f-ja); color: var(--ink2); }
.sheet .cta { width: 100%; height: 52px; border-radius: var(--r-md); background: var(--ink); color: var(--ivory); font: 700 var(--text-sm)/1 var(--f-ja); margin-top: var(--space-1); }
.sheet .cta.ghost { background: var(--ink-6); color: var(--ink); }
.sheet .paywall { text-align: center; }
.sheet .paywall .crown { width: 64px; height: 64px; margin: var(--space-1) auto var(--space-2); border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent); }
.sheet .paywall .crown svg { width: 30px; height: 30px; fill: var(--ink); }
.sheet ul { text-align: left; padding: var(--space-0); margin: var(--space-2) var(--space-0) var(--space-4); list-style: none; }
.sheet li { display: flex; gap: var(--space-2); padding: var(--space-2) var(--space-0); font: 600 var(--text-sm)/1.5 var(--f-ja); border-bottom: 1px solid var(--line); }
.sheet li::before { content: '♥'; color: var(--rose); }

.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 96px); transform: translate(-50%, 20px); opacity: 0; padding: var(--space-3) var(--space-4); border-radius: var(--r-pill); background: var(--ink); color: var(--ivory);
  font: 600 var(--text-xs)/1 var(--f-ja); transition: all 300ms var(--ease); z-index: 90; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 520px) { body { background: var(--surface-1); } .feed { border-radius: var(--r-none) var(--r-none) var(--r-md) var(--r-md); } }
@media (max-height: 740px) { .headline { font-size: var(--text-xl); } .demo { bottom: calc(var(--safe-b) + 216px); } .hero-copy { top: calc(var(--safe-t) + 58px); } .bubble .ko, .inner .ko { font-size: var(--text-md); } .bubble, .inner { padding: var(--space-3) var(--space-3); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; } .reveal, .pc, .cul { opacity: 1; transform: none; } }

/* 2026-11-28 작품 상세 「予告を聴く」 */
.sd-teaser { display: flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%; height: 46px; margin-top: var(--space-2); border: 1px solid var(--ivory-24); border-radius: var(--r-md); background: var(--ivory-6); color: inherit; font: 700 var(--text-sm)/1 var(--f-ja); cursor: pointer; }
.sd-teaser svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sd-teaser.on { border-color: var(--rose); color: var(--rose); }
.sd-tsub { margin: var(--space-2) var(--space-1) var(--space-0); text-align: center; line-height: 1.45; } .sd-tsub b { display: block; font-size: var(--text-md); } .sd-tsub small { display: block; opacity: .75; font-size: var(--text-xs); }
