/* DearEleanora — 시안(DearTales v3): 밤의 자줏빛 바탕 + 벽난로의 금빛 · 크림. 휴대폰 한 칸 너비, 아래 탭 없음. */
:root {
  --bg: #170f1d; --bg2: #21162a; --bg3: #2c1f36; --glass: rgba(255,236,210,.07); --glass2: rgba(255,236,210,.12);
  --line: rgba(255,226,190,.14); --line2: rgba(255,226,190,.26);
  --cream: #f8e8cd; --gold: #f2c27d; --amber: #e9a352; --ember: #ff9d47; --text: #faf1e6; --muted: rgba(250,241,230,.66); --dim: rgba(250,241,230,.45);
  --violet: #b98cff; --violet2: #8a5cf6; --ok: #7fd1a0; --bad: #ffb0a6;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r: 18px; --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { font: 16px/1.5 var(--sans); background: #0d0811; color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden, [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 한 칸 너비 무대 */
.stage { position: relative; max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--bg); box-shadow: 0 0 90px rgba(0,0,0,.7); overflow-x: clip; }
.app { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(28px + var(--safe-b)); }

/* 글꼴 */
.logo { display: inline-flex; align-items: center; gap: 6px; font: 500 27px/1 var(--serif); letter-spacing: -.01em; color: var(--cream); font-style: italic; }
.logo b { font-weight: 500; color: var(--gold); }
.logo svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.serif { font-family: var(--serif); }
.display { font: 500 34px/1.1 var(--serif); letter-spacing: -.01em; margin: 0; }
.kicker { font-size: 12.5px; letter-spacing: .02em; color: var(--cream); }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.gold { color: var(--gold); }

/* 머리 줄 */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + var(--safe-t)) 16px 10px; background: linear-gradient(var(--bg) 70%, rgba(23,15,29,0)); }
.top .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.top .brand .soft { margin-left: 30px; font-size: 8.5px; padding: 2px 6px; }
.top .acts { display: flex; align-items: center; gap: 8px; }
.ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.glass { background: var(--glass); border: 1px solid var(--line); }
.ic.dark { background: rgba(15,9,20,.48); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.14); color: #fff; }
.me-btn { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 1.5px solid var(--line2); background: var(--bg3); display: grid; place-items: center; }
.me-btn img { width: 100%; height: 100%; object-fit: cover; }
.me-btn.in { border-color: var(--gold); background: rgba(242,194,125,.16); }
.bar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: 56px; padding: var(--safe-t) 6px 0; background: rgba(23,15,29,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bar h1 { margin: 0; text-align: center; font: 600 17px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.float { position: absolute; left: 0; right: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: calc(8px + var(--safe-t)) 12px 0; grid-template-columns: auto 1fr auto; }

/* SOFT OPEN 배지 (soft-open.md) */
.soft { font-family: var(--sans); font-size: 9.5px; font-weight: 700; letter-spacing: .08em; padding: 3px 7px; border-radius: 99px; border: 1px solid rgba(242,194,125,.5); background: rgba(0,0,0,.25); color: var(--gold); white-space: nowrap; line-height: 1.2; }
.soft-note { margin: 4px 24px 28px; font-size: 12.5px; line-height: 1.5; text-align: center; color: var(--dim); }
.soft-note b { font-weight: 700; color: var(--muted); }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 17px; transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.btn-cream { background: linear-gradient(180deg, #fbe7c6, #f1cf98); color: #2a1a12; box-shadow: 0 8px 28px rgba(242,194,125,.22), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-ghost { background: var(--glass); border: 1px solid var(--line); color: var(--text); }
.btn-danger { background: #c4473b; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { height: 42px; font-size: 15px; padding: 0 16px; }
.link { color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* 칩 · 타일 */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); font-size: 14px; color: var(--cream); white-space: nowrap; }
.chip.on { background: var(--cream); color: #2a1a12; border-color: var(--cream); }
.chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.mode-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 16px 6px; padding: 6px 12px; border-radius: 99px; font-size: 13px; background: rgba(185,140,255,.14); border: 1px solid rgba(185,140,255,.4); color: #e4d4ff; }

/* 홈 */
.hero-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 4px 16px 10px; scrollbar-width: none; }
.hero-rail::-webkit-scrollbar { display: none; }
.hero { position: relative; flex: none; width: 100%; aspect-ratio: 16 / 11; border-radius: 24px; overflow: hidden; scroll-snap-align: center; border: 1px solid var(--line); background: var(--bg3) center 30% / cover no-repeat; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,15,29,0) 35%, rgba(23,15,29,.88)); }
.hero > * { position: relative; z-index: 1; }
.hero .tag { align-self: flex-start; font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: rgba(23,15,29,.6); border: 1px solid var(--line); margin-bottom: 8px; }
.hero h2 { margin: 0; font: 500 28px/1.12 var(--serif); padding-right: 64px; }
.hero .meta { font-size: 14px; color: var(--cream); opacity: .9; margin-top: 4px; }
.hero .play { position: absolute; right: 16px; bottom: 18px; z-index: 2; width: 54px; height: 54px; border-radius: 50%; background: var(--cream); color: #2a1a12; display: grid; place-items: center; box-shadow: 0 6px 22px rgba(0,0,0,.4); }
.hero .play svg { width: 22px; height: 22px; fill: currentColor; margin-left: 3px; }
.dots { display: flex; justify-content: center; gap: 7px; margin: 2px 0 6px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line2); transition: background .2s, width .2s; }
.dots i.on { background: var(--cream); }

.sec { padding: 16px 0 4px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; }
.sec-head h2 { margin: 0; font: 600 21px/1.2 var(--serif); }
.sec-head a { display: grid; place-items: center; width: 34px; height: 34px; color: var(--cream); }
.sec-head a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.rail { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 6px; scroll-padding: 0 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

.tile { position: relative; flex: none; width: 92px; height: 92px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg3) center / cover; display: flex; align-items: flex-end; justify-content: center; padding: 6px; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(15,9,20,.85)); }
.tile span { position: relative; z-index: 1; font-size: 13.5px; font-weight: 700; text-align: center; line-height: 1.15; }
.tile.wide { width: 140px; height: 92px; }
.tile.icon { background: linear-gradient(160deg, #3a2a3d, #241828); align-items: center; flex-direction: column; justify-content: center; gap: 6px; }
.tile.icon::after { display: none; }
.tile.icon svg { width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile.icon span { color: var(--cream); font-weight: 600; }

.card { flex: none; width: 138px; }
.card .cover { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--bg3) center / cover; border: 1px solid var(--line); }
.card .cover .len { position: absolute; left: 8px; bottom: 8px; font-size: 11.5px; padding: 2px 7px; border-radius: 99px; background: rgba(15,9,20,.7); }
.card .cover .bar-p { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.18); }
.card .cover .bar-p i { display: block; height: 100%; background: var(--gold); }
.card b { display: block; margin-top: 7px; font-size: 14.5px; line-height: 1.25; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; padding: 0 16px; }
.grid .card { width: auto; }

.foot { margin: 26px 20px 8px; text-align: center; font-size: 12.5px; color: var(--dim); }
.foot button { color: var(--gold); text-decoration: underline; font-size: inherit; }

/* 자매품 줄 (sister/phase1.md) */
.sister { padding: 22px 16px 0; }
.sister-title { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sister-home { text-decoration: underline; }
.sister-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.sister-row::-webkit-scrollbar { display: none; }
.sister-card { flex: none; width: 124px; padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.sister-icon { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 8px; }
.sister-name { display: block; font-weight: 700; font-size: 14px; }
.sister-tag { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }

/* PC 가로 줄 넘기기 (sister/phase1.md 9절) */
.pcrail { position: relative; }
.pcnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(15,9,20,.78); color: #fff; font-size: 11px; display: grid; place-items: center; cursor: pointer; }
.pcnav:hover { background: rgba(15,9,20,.92); }
.pcnav.l { left: 4px; } .pcnav.r { right: 4px; }
.pcnav[hidden] { display: none; }
.pcrail.more-r > :first-child { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.pcrail.more-l > :first-child { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
.pcrail.more-l.more-r > :first-child { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.pcrail > .dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.pcrail > .dragging * { pointer-events: none; }

/* 첫 화면 (Welcome) */
.welcome { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(64px + var(--safe-t)) 28px calc(30px + var(--safe-b)); text-align: center; background: #120b18 center bottom / cover no-repeat; }
.welcome::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,11,24,.25), rgba(18,11,24,0) 45%, rgba(18,11,24,.55) 85%); }
.welcome > * { position: relative; }
.welcome .logo { font-size: 50px; flex-direction: column; gap: 10px; }
.welcome .logo svg { width: 46px; height: 46px; }
.welcome h1 { margin: 16px 0 0; font: 400 21px/1.35 var(--serif); color: var(--cream); }
.welcome .cta { width: 100%; display: grid; gap: 14px; }
.welcome .cta p { margin: 0; font-size: 15px; color: var(--muted); }

/* 이야기 상세 */
.detail-art { position: relative; height: min(62vh, 560px); background: var(--bg3) center 30% / cover no-repeat; }
.detail-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,15,29,.25), rgba(23,15,29,0) 30%, rgba(23,15,29,.2) 60%, var(--bg)); }
.detail { position: relative; margin-top: -110px; padding: 0 20px; z-index: 2; }
.detail h1 { margin: 0; font: 500 34px/1.1 var(--serif); }
.detail .where { margin: 6px 0 0; font-weight: 700; color: var(--gold); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.facts div { display: grid; justify-items: center; gap: 4px; font-size: 14px; color: var(--cream); }
.facts svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.logline { font-size: 17px; line-height: 1.55; margin: 0 0 22px; color: var(--text); }
.fit { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(185,140,255,.1); border: 1px solid rgba(185,140,255,.3); font-size: 14px; color: #e8dbff; margin: 0 0 16px; }
.fit.no { background: rgba(255,176,166,.08); border-color: rgba(255,176,166,.35); color: #ffd6cf; }
.fit svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; margin-top: 1px; }
.resume { display: flex; justify-content: center; gap: 18px; margin-top: 12px; font-size: 14.5px; }
.about-tale { margin: 28px 0 0; padding: 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.about-tale h3 { margin: 0 0 6px; font: 600 17px var(--serif); }
.about-tale p { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }
.about-tale .chips .chip { height: 28px; font-size: 12.5px; padding: 0 10px; }

/* 듣기 */
body.listening { overflow: hidden; }
.listen { position: relative; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #140c12; }
.ln-art { position: absolute; inset: 0 0 auto 0; height: 66%; background: #2a1610 center 18% / cover no-repeat; transition: opacity .6s, filter .6s; }
.ln-art.alt { opacity: 0; }
.listen.talking .ln-art { filter: brightness(.55) saturate(.85); }
.ln-fire { position: absolute; inset: 0 0 auto 0; height: 66%; pointer-events: none; background: radial-gradient(60% 45% at 85% 55%, rgba(255,150,60,.28), transparent 70%); mix-blend-mode: screen; animation: flicker 2.6s infinite alternate ease-in-out; }
@keyframes flicker { 0% { opacity: .55; } 20% { opacity: .9; } 35% { opacity: .65; } 55% { opacity: 1; } 70% { opacity: .7; } 100% { opacity: .95; } }
.ln-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,18,.45) 0%, rgba(20,12,18,0) 18%, rgba(20,12,18,0) 38%, rgba(20,12,18,.92) 62%, #140c12 72%); pointer-events: none; }
.ln-top { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: calc(10px + var(--safe-t)) 14px 0; }
.ln-top .r { display: flex; gap: 10px; }
.ic.on { background: var(--cream); color: #2a1a12; }
.ln-body { position: relative; z-index: 2; margin-top: auto; padding: 0 22px calc(18px + var(--safe-b)); display: flex; flex-direction: column; }
.wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 38px; margin-bottom: 8px; }
.wave i { width: 3.5px; height: 6px; border-radius: 3px; background: linear-gradient(var(--gold), var(--ember)); box-shadow: 0 0 10px rgba(255,157,71,.6); transition: height .08s linear; }
.wave.violet i { background: linear-gradient(#d9c2ff, var(--violet2)); box-shadow: 0 0 10px rgba(185,140,255,.7); }
.caption { min-height: 132px; display: grid; place-items: center; padding: 16px 18px; border-radius: 20px; background: rgba(40,24,30,.55); border: 1px solid rgba(255,226,190,.1); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.caption p { margin: 0; text-align: center; font: italic 400 21px/1.42 var(--serif); color: #fff6ea; text-wrap: balance; }
.caption.off p { font: 500 15px var(--sans); color: var(--dim); font-style: normal; }
.prog { margin: 20px 0 0; }
.prog input { width: 100%; -webkit-appearance: none; appearance: none; height: 22px; background: transparent; }
.prog input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--cream) var(--p, 0%), rgba(255,255,255,.2) var(--p, 0%)); }
.prog input::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); }
.prog input::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--cream); }
.prog input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 4px rgba(248,232,205,.2); }
.prog input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--cream); }
.times { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ctrls { display: flex; align-items: center; justify-content: center; gap: 34px; margin: 10px 0 14px; }
.ctrls .skip { width: 48px; height: 48px; display: grid; place-items: center; color: var(--cream); position: relative; }
.ctrls .skip svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ctrls .skip b { position: absolute; font-size: 10.5px; font-weight: 800; margin-top: 2px; }
.ctrls .pp { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: #2a1a12; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.ctrls .pp svg { width: 28px; height: 28px; fill: currentColor; }
.mic { align-self: center; display: grid; justify-items: center; gap: 8px; }
.mic .ring { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #6b46c1, #3b2370); border: 2px solid rgba(217,194,255,.7); box-shadow: 0 0 0 6px rgba(185,140,255,.14), 0 0 34px rgba(138,92,246,.55); color: #fff; }
.mic .ring svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.mic span { font-size: 15px; font-weight: 600; color: var(--cream); }
.mic.small .ring { width: 56px; height: 56px; box-shadow: 0 0 0 4px rgba(242,194,125,.1); background: rgba(255,236,210,.08); border-color: var(--line2); color: var(--gold); }
.mic.rec .ring { animation: pulse 1.3s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(185,140,255,.55), 0 0 34px rgba(138,92,246,.55); } 100% { box-shadow: 0 0 0 18px rgba(185,140,255,0), 0 0 34px rgba(138,92,246,.55); } }

/* 대화 (끼어들기 · 이야기 끝) — 지금 말하는 사람 하나만 밝게 */
.talk { display: grid; gap: 12px; margin-bottom: 6px; }
.bub { display: flex; gap: 10px; align-items: flex-start; transition: opacity .3s; }
.bub .who { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none; border: 2px solid var(--line2); background: var(--bg3); display: grid; place-items: center; }
.bub .who img { width: 100%; height: 100%; object-fit: cover; }
.bub .who svg { width: 24px; height: 24px; fill: none; stroke: #e4d4ff; stroke-width: 1.8; }
.bub .say { flex: 1; padding: 13px 16px; border-radius: 20px; border-top-left-radius: 6px; background: rgba(48,30,38,.82); border: 1px solid rgba(255,226,190,.16); font-size: 16.5px; line-height: 1.45; }
.bub.kid .say { background: rgba(58,36,94,.78); border-color: rgba(185,140,255,.45); font: 500 19px/1.35 var(--serif); }
.bub.gran .say { font-size: 16.5px; }
.bub.active .say { box-shadow: 0 0 0 1px rgba(242,194,125,.5), 0 0 26px rgba(242,194,125,.18); }
.bub.kid.active .say { box-shadow: 0 0 0 1px rgba(185,140,255,.8), 0 0 26px rgba(138,92,246,.35); }
.bub.idle { opacity: .5; }
.bub .say .wave { height: 26px; justify-content: flex-start; margin: 6px 0 0; }
.think { display: inline-flex; gap: 5px; }
.think i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.think i:nth-child(2) { animation-delay: .2s; } .think i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.talk-acts { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.typebox { display: flex; gap: 8px; }
.typebox input { flex: 1; height: 46px; border-radius: 99px; border: 1px solid var(--line2); background: rgba(255,255,255,.06); padding: 0 16px; outline: none; }

/* 끝 화면 */
.end { padding: calc(14px + var(--safe-t)) 20px 30px; text-align: center; }
.end .art { width: 150px; aspect-ratio: 3 / 4; margin: 12px auto 18px; border-radius: 18px; background: var(--bg3) center / cover; border: 1px solid var(--line2); box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 60px rgba(242,194,125,.12); }
.end h1 { margin: 0; font: italic 500 46px/1 var(--serif); color: var(--gold); }
.end h2 { margin: 8px 0 0; font: 500 21px var(--serif); }
.end .q { margin: 26px 0 12px; font-weight: 700; }
.end .chips { justify-content: center; }
.end .acts { display: grid; gap: 10px; margin: 22px 0 0; }
.end .talk { text-align: left; margin-top: 18px; }

/* 누가 듣나 */
.who-pick { padding: 10px 20px 30px; }
.who-pick h1 { font: 500 30px/1.15 var(--serif); margin: 18px 0 22px; text-align: center; }
.opt { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; border-radius: 18px; background: var(--glass); border: 1.5px solid var(--line); text-align: left; }
.opt .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: rgba(242,194,125,.12); flex: none; }
.opt .ico svg { width: 28px; height: 28px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.opt b { display: block; font-size: 17px; }
.opt span { font-size: 14px; color: var(--muted); }
.opt.on { border-color: var(--gold); background: rgba(242,194,125,.1); }
.opt .dot { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); flex: none; }
.opt.on .dot { border-color: var(--gold); background: radial-gradient(var(--gold) 45%, transparent 50%); }
.ages { display: flex; gap: 8px; justify-content: center; margin: 4px 0 18px; }

/* 설정 · 목록 */
.page { padding: 4px 16px 30px; }
.group { margin: 18px 0 0; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); overflow: hidden; }
.group h3 { margin: 0; padding: 14px 16px 4px; font: 600 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; border-top: 1px solid var(--line); min-height: 56px; }
.group h3 + .row { border-top: 0; }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; font-weight: 700; }
.row .t span { display: block; font-size: 13.5px; color: var(--muted); }
.row .chev { color: var(--dim); }
.row .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(242,194,125,.12); flex: none; }
.row .ico svg { width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.16); flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--amber); }
.switch.on::after { transform: translateX(20px); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 14px; }
.lock-note { display: flex; gap: 8px; align-items: center; padding: 0 16px 14px; font-size: 13px; color: #e4d4ff; }
.lock-note svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }

.list { display: grid; gap: 10px; }
.lcard { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.lcard .thumb { width: 58px; height: 74px; border-radius: 12px; background: var(--bg3) center / cover; flex: none; }
.lcard .t { flex: 1; min-width: 0; }
.lcard .t b { display: block; font-weight: 700; line-height: 1.25; }
.lcard .t span { display: block; font-size: 13.5px; color: var(--muted); }
.lcard .pbar { height: 4px; margin-top: 6px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; }
.lcard .pbar i { display: block; height: 100%; background: var(--gold); }

/* 검색 */
.search-box { display: flex; align-items: center; gap: 10px; height: 52px; margin: 6px 16px 14px; padding: 0 16px; border-radius: 99px; background: var(--glass2); border: 1px solid var(--line2); }
.search-box svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16.5px; }
.label { margin: 18px 16px 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* 컬렉션 */
.coll-head { position: relative; height: 210px; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 20px; background: var(--bg3) center / cover; margin-bottom: 16px; }
.coll-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,15,29,.2), var(--bg) 96%); }
.coll-head > * { position: relative; z-index: 1; }
.coll-head h1 { margin: 0; font: 500 32px/1.1 var(--serif); }
.coll-head p { margin: 4px 0 0; color: var(--cream); }
.sorts { padding: 0 16px 16px; }

/* 시트 · 입장 암호 · 18세 · 알림 */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(8,4,10,.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; padding: 26px 22px calc(22px + var(--safe-b)); border-radius: 26px 26px 0 0; background: #24182b; border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -10px 50px rgba(0,0,0,.5); }
.sheet h2 { margin: 0 0 8px; font: 500 24px/1.2 var(--serif); }
.sheet p { margin: 0 0 14px; }
.sheet .btn { width: 100%; margin-top: 10px; }
.sheet-x { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; font-size: 26px; color: var(--muted); }
.field { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255,255,255,.06); outline: none; resize: vertical; }
.warn { color: var(--bad); font-size: 14px; }
.err { color: var(--bad); font-size: 14px; margin: 8px 0 0; }
.fb-stars { display: flex; gap: 6px; margin: 4px 0 12px; }
.fb-stars button { font-size: 30px; color: rgba(255,255,255,.2); }
.fb-stars button.on { color: var(--gold); }
.dw-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 80% at 50% 15%, #2e1d36, #0e0812); color: var(--text); }
.gate-card { width: 100%; max-width: 360px; text-align: center; }
.gate-card .logo { font-size: 40px; margin-bottom: 6px; flex-direction: column; }
.gate-card .slogan { font: italic 18px var(--serif); color: var(--gold); margin: 6px 0 22px; }
.gate-card p { color: var(--muted); }
.gate-card input { width: 100%; height: 54px; margin: 12px 0 8px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.06); color: #fff; font-size: 16px; outline: none; text-align: center; }
.gate-card .btn { width: 100%; margin-top: 8px; }
.gate-card .err { color: var(--bad); font-size: 14px; }
.gate-card .soft { display: inline-block; margin: 4px 0 6px; font-size: 10.5px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%) translateY(20px); max-width: min(440px, calc(100% - 32px)); padding: 12px 18px; border-radius: 16px; background: #f8e8cd; color: #2a1a12; font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 70; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loading { min-height: 60vh; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(242,194,125,.25); border-top-color: var(--gold); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.empty h3 { margin: 0 0 6px; color: var(--text); font: 500 21px var(--serif); }
.about { padding: 6px 20px 40px; }
.about h2 { font: 600 19px var(--serif); margin: 24px 0 6px; color: var(--cream); }
.about p { margin: 0 0 10px; color: var(--muted); }

@media (max-width: 360px) {
  .logo { font-size: 23px; } .top { padding-left: 12px; padding-right: 12px; } .ic { width: 38px; height: 38px; } .me-btn { width: 38px; height: 38px; }
  .ctrls { gap: 22px; } .caption p { font-size: 19px; } .tile { width: 84px; height: 84px; }
}
@media (min-height: 760px) { .caption { min-height: 150px; } }
@media (prefers-reduced-motion: reduce) { .ln-fire, .mic.rec .ring, .think i { animation: none; } }

/* 앱 설치 팝업 (install.js — 시리즈 install-prompt.md, DearGenie 의 모양) */
.dwi { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; justify-content: center; padding: 0 12px calc(12px + var(--safe-b)); pointer-events: none; animation: dwiUp .4s ease both; }
@keyframes dwiUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
body.listening .dwi { display: none; }
.dwi-card { pointer-events: auto; width: min(440px, 100%); background: #2a1c31; color: var(--text); border: 1px solid var(--line2); border-radius: 18px; padding: 16px 16px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 12px; }
.dwi-head { display: flex; gap: 12px; align-items: flex-start; }
.dwi-head img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.dwi-head b { display: block; font-weight: 700; font-size: 16px; }
.dwi-head p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.dwi-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.dwi-btn { padding: 9px 14px; border-radius: 999px; font-size: 13px; }
.dwi-main { background: linear-gradient(180deg, #fbe7c6, #f1cf98); color: #2a1a12; font-weight: 700; }
.dwi-ghost { border: 1px solid var(--line2); color: var(--muted); }
.dwi-more { font-size: 13.5px; }
.dwi-steps { margin: 0; padding-left: 20px; line-height: 1.9; }
.dwi-ico { display: inline-flex; vertical-align: -4px; padding: 2px 4px; border-radius: 6px; background: var(--bg3); color: var(--gold); }
.dwi-guide { margin: 0 0 8px; line-height: 1.6; }
/* 키가 작은 휴대폰(iPhone SE 등): 할머니 얼굴이 자막 · 말풍선에 덜 가리게 */
@media (max-height: 640px) {
  .caption { min-height: 92px; padding: 12px 14px; } .caption p { font-size: 17.5px; }
  .wave { height: 26px; margin-bottom: 4px; } .prog { margin-top: 12px; } .ctrls { margin: 4px 0 8px; gap: 26px; }
  .ctrls .pp { width: 60px; height: 60px; } .mic .ring { width: 60px; height: 60px; } .mic span { font-size: 13px; }
  .bub .who { width: 38px; height: 38px; } .bub .say { padding: 10px 13px; font-size: 15px; } .bub.kid .say { font-size: 16.5px; }
}
