/* DearVoxplay — 시안: 어두운 영화 화면(홈 · 장면 · 녹음 · 재생) + 밝은 종이 화면(대본 · 목록 · 만들기 · 편집 · 프로필). 휴대폰 한 칸 너비. */
:root {
  --ink: #0f0e12; --ink2: #18161c; --ink3: #232029; --line-d: rgba(255,255,255,.12);
  --cream: #f3e3cc; --gold: #e8c79a; --gold2: #c9a06c; --text-d: #f4efe8; --muted-d: rgba(244,239,232,.68);
  --paper: #f6f3ef; --card: #ffffff; --card2: #f1ece6; --text-l: #1b1a1f; --muted-l: #6e6870; --line-l: #e6e0d9;
  --rec: #ff5a4e; --ok: #3f9d6b;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r: 18px; --tab: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.5 var(--sans); background: #08070a; color: var(--text-d); -webkit-font-smoothing: antialiased; }
body.light .app { background: var(--paper); color: var(--text-l); }
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; }

/* 한 칸 너비 무대 (넓은 화면에선 가운데 휴대폰 너비) */
.stage { position: relative; max-width: 480px; min-height: 100%; margin: 0 auto; background: var(--ink); box-shadow: 0 0 80px rgba(0,0,0,.6); }
.app { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--tab) + var(--safe-b) + 12px); background: var(--ink); }
body.notab .app { padding-bottom: 0; }
body.notab .tabbar { display: none; }

/* 아래 탭 */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; background: rgba(15,14,18,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-d); z-index: 30; }
body.light .tabbar { background: rgba(246,243,239,.94); border-top-color: var(--line-l); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted-d); }
body.light .tabbar a { color: var(--muted-l); }
.tabbar a.on { color: var(--gold); }
body.light .tabbar a.on { color: var(--text-l); }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* 머리 줄 */
.bar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; height: 56px; padding: 0 4px; padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; }
body.light .bar { background: rgba(246,243,239,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bar.float { position: absolute; left: 0; right: 0; background: none; }
.bar h1 { margin: 0; text-align: center; font: 600 17px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .ic, .ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bar .act { justify-self: end; padding: 0 12px; font-weight: 600; }
.bar.float .ic { background: rgba(0,0,0,.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; }

/* 글꼴 */
.logo { font: 500 28px/1 var(--serif); letter-spacing: -.01em; }
.logo b { font-weight: 500; color: var(--gold); }
.display { font: 500 44px/1.05 var(--serif); letter-spacing: -.01em; margin: 0; }
.h2 { font: 600 20px/1.25 var(--sans); margin: 0; }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-d); }
.muted { color: var(--muted-d); }
body.light .muted { color: var(--muted-l); }
.tiny { font-size: 12.5px; }
.serif { font-family: var(--serif); }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 16px; transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-cream { background: var(--cream); color: #1d1814; }
.btn-dark { background: #1d1b21; color: #fff; }
.btn-ghost { background: rgba(255,255,255,.08); color: inherit; }
body.light .btn-ghost { background: var(--card2); }
.btn-line { border: 1px solid var(--line-d); }
body.light .btn-line { border-color: var(--line-l); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-danger { background: #3a1716; color: #ffb3ad; }
body.light .btn-danger { background: #fde9e7; color: #b42318; }
.link { color: var(--gold); font-weight: 500; }
body.light .link { color: #8a5a22; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-d); font-size: 13.5px; color: var(--text-d); background: rgba(255,255,255,.04); white-space: nowrap; }
body.light .chip { border-color: var(--line-l); color: var(--text-l); background: var(--card); }
.chip.on { background: var(--text-l); color: #fff; border-color: var(--text-l); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,.1); }
body.light .pill { background: var(--card2); }
.pill.ai { background: rgba(232,199,154,.18); color: var(--gold); }
body.light .pill.ai { background: #f3e6d4; color: #7a4c17; }

/* 얼굴 */
.face { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: linear-gradient(140deg, #3a3340, #1e1b22); display: grid; place-items: center; font: 600 18px/1 var(--serif); color: var(--gold); }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face.sm { width: 36px; height: 36px; font-size: 14px; }
.face.lg { width: 112px; height: 112px; font-size: 40px; }
.face.xl { width: 190px; height: 190px; font-size: 64px; }
.face.ring { box-shadow: 0 0 0 3px rgba(255,255,255,.85); }
.face.narr { background: linear-gradient(140deg, #2b2a33, #15141a); color: var(--muted-d); }
.face.narr svg { width: 55%; height: 55%; fill: none; stroke: var(--gold); stroke-width: 1.5; }

/* ── 홈 ── */
.hero { position: relative; min-height: 760px; height: 100vh; max-height: 900px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 20px 24px; overflow: hidden; }
.hero .bgimg { position: absolute; left: 0; right: 0; top: 0; height: 74%; background: #1b1820 center 18%/cover no-repeat; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,14,18,.5) 0%, rgba(15,14,18,0) 16%, rgba(15,14,18,0) 36%, rgba(15,14,18,.78) 58%, var(--ink) 74%, var(--ink) 100%); }
.hero > *:not(.bgimg):not(.home-top) { position: relative; z-index: 1; }
.home-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 0; }
.home-top .face { width: 40px; height: 40px; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.hero .kicker { margin-bottom: 8px; color: rgba(255,255,255,.85); }
.hero .logline { margin: 14px 0 16px; font-size: 17px; color: rgba(255,255,255,.88); max-width: 34ch; }
.hero .chips { margin-bottom: 20px; }
.hero .chip { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.22); backdrop-filter: blur(6px); }
.rehearse { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted-d); margin: -6px 0 14px; }
.bar-mini { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; }
.bar-mini i { display: block; height: 100%; background: var(--gold); transition: width .5s; }
.create-card { display: flex; align-items: center; gap: 16px; margin: 14px 0 0; padding: 18px; border-radius: var(--r); background: rgba(255,255,255,.06); border: 1px solid var(--line-d); }
.create-card .plus { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; }
.create-card .plus svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 1.8; fill: none; }
.create-card b { display: block; font-size: 17px; }
.create-card span { font-size: 14px; color: var(--muted-d); }
.sec { padding: 26px 20px 6px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sec-head h2 { margin: 0; font: 500 22px/1.2 var(--serif); }
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 0 20px 6px; margin: 0 -20px; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.scard { flex: none; width: 168px; scroll-snap-align: start; }
.scard .poster { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: #221f27 center/cover; }
.scard .poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.75)); }
.scard .poster .t { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; font: 500 17px/1.15 var(--serif); color: #fff; }
.scard .meta { margin-top: 8px; font-size: 13px; color: var(--muted-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-d); }
.prow:last-child { border-bottom: 0; }
.prow .who { flex: 1; min-width: 0; }
.prow .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .who span { font-size: 13px; color: var(--muted-d); }
.playbtn { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--cream); color: #1d1814; display: grid; place-items: center; }
.playbtn svg { width: 16px; height: 16px; fill: currentColor; }
body.light .playbtn { background: #1d1b21; color: #fff; }
.foot { padding: 24px 20px 8px; font-size: 13px; color: var(--muted-d); text-align: center; }
.foot button { text-decoration: underline; color: inherit; }

/* ── 장면 ── */
.scene-top { position: relative; height: 420px; overflow: hidden; }
.scene-top .bgimg { position: absolute; inset: 0; background: #1b1820 center 20%/cover no-repeat; }
.scene-top::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,14,18,.35) 0%, transparent 25%, rgba(15,14,18,.4) 60%, var(--ink) 100%); }
.scene-top .titlebox { position: absolute; left: 20px; right: 20px; bottom: 6px; z-index: 1; }
.counts { display: flex; align-items: center; gap: 20px; padding: 8px 20px 0; color: var(--muted-d); font-size: 15px; }
.counts button, .counts span { display: inline-flex; align-items: center; gap: 6px; }
.counts svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.counts .liked svg { fill: var(--rec); stroke: var(--rec); }
.counts .share { margin-left: auto; }
.about { padding: 12px 20px 4px; font-size: 16.5px; line-height: 1.55; }
.byline { padding: 0 20px; font-size: 13px; color: var(--muted-d); }
.role { display: flex; gap: 14px; align-items: center; margin: 12px 20px 0; padding: 14px; border-radius: var(--r); background: #f7f1ea; color: var(--text-l); }
.role .face { width: 82px; height: 82px; }
.role .rbody { flex: 1; min-width: 0; }
.role b { font-size: 17px; }
.role p { margin: 2px 0 10px; font-size: 14px; color: var(--muted-l); line-height: 1.35; }
.role .btn { height: 40px; width: 100%; font-size: 14.5px; }
.note { margin: 14px 20px 0; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.06); font-size: 14.5px; }
body.light .note { background: var(--card2); }
.note.warn { background: rgba(255,90,78,.12); }
.owner-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 0; }

/* ── 밝은 화면 공통 ── */
.sheet-l { margin: 0 12px; padding: 4px 0 20px; border-radius: 24px 24px 0 0; }
.list { padding: 4px 16px; }
.lcard { display: flex; align-items: center; gap: 14px; padding: 14px; margin: 10px 0; border-radius: var(--r); background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.lcard .who { flex: 1; min-width: 0; }
.lcard .who b { display: block; font-weight: 600; }
.lcard .sub { font-size: 13px; color: var(--muted-l); }
.lcard .likes { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted-l); }
.lcard .likes svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tabs2 { display: flex; border-bottom: 1px solid var(--line-l); margin: 0 16px; }
.tabs2 button { flex: 1; height: 46px; font-weight: 500; color: var(--muted-l); border-bottom: 2px solid transparent; }
.tabs2 button.on { color: var(--text-l); border-bottom-color: #d89a4c; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted-l); }
.empty h3 { margin: 0 0 6px; color: var(--text-l); font: 500 20px/1.3 var(--serif); }
body:not(.light) .empty, body:not(.light) .empty h3 { color: var(--muted-d); }

/* ── 대본 읽기 ── */
.counter { text-align: center; font-size: 13px; color: var(--muted-l); padding: 4px 0 8px; }
.lines { padding: 0 14px 120px; }
.ln { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.ln .bub { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ln .bub b { display: block; font-size: 14px; margin-bottom: 2px; }
.ln .dir { display: block; font-size: 13px; font-style: italic; color: #8b7a66; margin-bottom: 4px; }
.ln .say { font-size: 16.5px; line-height: 1.45; }
.ln.me .bub { background: #fff4e6; box-shadow: inset 0 0 0 1.5px #e7b778; }
.ln.narr .bub { background: transparent; box-shadow: none; padding-left: 0; }
.ln.narr .say { font-family: var(--serif); font-style: italic; color: #4c4650; }
.ln.now .bub { box-shadow: inset 0 0 0 2px #1d1b21; }
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(180deg, rgba(246,243,239,0), var(--paper) 30%); z-index: 25; }
body:not(.light) .dock { background: linear-gradient(180deg, rgba(15,14,18,0), var(--ink) 30%); }

/* ── 녹음 ── */
.rec { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 20px calc(20px + var(--safe-b)); background: radial-gradient(120% 70% at 50% 35%, #1e1b23, var(--ink) 70%); }
.rec .who { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; font-size: 15px; }
.rec .dirline { font-size: 14.5px; font-style: italic; color: var(--gold); margin: 0 0 8px; min-height: 1.4em; }
.rec .bigline { font: 500 27px/1.3 var(--serif); margin: 0; min-height: 3.2em; }
.rec.narr .bigline { font-style: italic; color: rgba(255,255,255,.85); font-size: 23px; }
.rec .center { flex: 1; display: grid; place-items: center; padding: 18px 0; }
.rec .center .face { transition: transform .3s, box-shadow .3s; }
.rec .center .face.speaking { box-shadow: 0 0 0 4px rgba(232,199,154,.55), 0 0 60px rgba(232,199,154,.25); }
.rec .status { text-align: center; min-height: 26px; font-size: 15px; color: var(--muted-d); display: flex; align-items: center; justify-content: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: blink 1.1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.recbtn { width: 92px; height: 92px; margin: 14px auto 6px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,90,78,.12); box-shadow: 0 0 0 2px rgba(255,90,78,.55); }
.recbtn i { display: block; width: 62px; height: 62px; border-radius: 50%; background: var(--rec); transition: all .2s; }
.recbtn.on { box-shadow: 0 0 0 2px rgba(255,90,78,.7), 0 0 0 12px rgba(255,90,78,.12); }
.recbtn.on i { width: 34px; height: 34px; border-radius: 8px; }
.recbtn:disabled { opacity: .4; }
.rec .under { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-size: 14px; color: var(--muted-d); }
.rec .under button { padding: 10px 4px; color: var(--muted-d); }
.prog { height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 4px; }
.prog i { display: block; height: 100%; background: var(--gold); transition: width .3s; }
.tips { margin: auto 0; text-align: center; }
.tips ul { text-align: left; margin: 20px auto; padding: 0 0 0 20px; max-width: 320px; color: var(--muted-d); line-height: 1.8; }

/* ── 재생 ── */
.play-top { position: relative; height: 54vh; min-height: 360px; overflow: hidden; }
.play-top .bgimg { position: absolute; inset: 0; background: #1b1820 center 20%/cover no-repeat; }
.play-top::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,14,18,.3), transparent 30%, rgba(15,14,18,.55) 70%, var(--ink)); }
.play-title { text-align: center; margin-top: -88px; position: relative; z-index: 1; padding: 0 20px; }
.play-title .display { font-size: 36px; }
.duo { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 22px 0 6px; }
.duo .one { text-align: center; width: 110px; }
.duo .one .face { margin: 0 auto 8px; width: 92px; height: 92px; box-shadow: 0 0 0 2px rgba(255,255,255,.75); transition: box-shadow .25s, transform .25s; }
.duo .one.speaking .face { box-shadow: 0 0 0 3px var(--gold), 0 0 34px rgba(232,199,154,.45); transform: scale(1.04); }
.duo .one b { display: block; font-weight: 600; }
.duo .one span { font-size: 13px; color: var(--muted-d); }
.duo .amp { font: italic 22px var(--serif); color: var(--muted-d); }
.player { padding: 14px 24px 4px; }
.seek { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; }
.seek::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--text-d) var(--p, 0%), rgba(255,255,255,.18) var(--p, 0%)); }
.seek::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); }
.seek::-moz-range-progress { height: 4px; background: var(--text-d); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; }
.seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.times { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted-d); font-variant-numeric: tabular-nums; }
.ctrls { display: flex; justify-content: center; align-items: center; gap: 34px; margin: 10px 0 6px; }
.ctrls .skip { position: relative; width: 48px; height: 48px; display: grid; place-items: center; }
.ctrls .skip svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.ctrls .skip small { position: absolute; font-size: 10.5px; font-weight: 600; top: 17px; }
.ctrls .pp { width: 72px; height: 72px; border-radius: 50%; background: var(--text-d); color: var(--ink); display: grid; place-items: center; }
.ctrls .pp svg { width: 28px; height: 28px; fill: currentColor; }
.nowline { margin: 16px 20px 0; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.05); min-height: 76px; }
.nowline b { font-size: 13px; color: var(--gold); }
.nowline p { margin: 2px 0 0; font: 500 18px/1.4 var(--serif); }
.nowline.narr p { font-style: italic; color: var(--muted-d); }
.actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 18px 20px 0; }
.script-toggle { display: block; margin: 18px auto 0; color: var(--muted-d); font-size: 14px; text-decoration: underline; }
.dark-lines .ln .bub { background: rgba(255,255,255,.05); box-shadow: none; }
.dark-lines .ln .dir { color: rgba(232,199,154,.8); }
.dark-lines .ln.narr .say { color: var(--muted-d); }
.dark-lines .ln.now .bub { box-shadow: inset 0 0 0 1.5px var(--gold); }
.dark-lines .ln.me .bub { background: rgba(232,199,154,.08); box-shadow: none; }

/* ── 만들기 · 편집 ── */
.form { padding: 4px 18px 120px; }
.form h2 { font: 600 22px/1.3 var(--sans); margin: 14px 0 10px; }
.field { display: block; width: 100%; border: 1px solid var(--line-l); border-radius: 14px; background: var(--card); padding: 14px 16px; font-size: 16px; color: var(--text-l); outline: none; resize: vertical; }
.field:focus { border-color: #c9a06c; box-shadow: 0 0 0 3px rgba(201,160,108,.18); }
textarea.field { min-height: 110px; line-height: 1.5; }
.count { text-align: right; font-size: 12.5px; color: var(--muted-l); margin: 6px 2px 0; }
.opts { margin-top: 10px; border-radius: 16px; background: var(--card); overflow: hidden; }
.opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-l); }
.opt:last-child { border-bottom: 0; }
.opt .k { flex: 1; font-weight: 500; }
.opt select { border: 0; background: transparent; font-weight: 500; color: var(--muted-l); text-align: right; outline: none; max-width: 60%; }
.seg { display: inline-flex; background: var(--card2); border-radius: 999px; padding: 3px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 14px; color: var(--muted-l); }
.seg button.on { background: #fff; color: var(--text-l); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ideas { margin-top: 12px; }
.ideas .chip { height: auto; min-height: 34px; padding: 7px 12px; white-space: normal; text-align: left; line-height: 1.3; }
.writing { padding: 60px 26px; text-align: center; }
.writing .quill { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.06); animation: bob 2s ease-in-out infinite; }
.writing .quill svg { width: 30px; height: 30px; fill: none; stroke: #8a5a22; stroke-width: 1.6; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.writing h2 { font: 500 24px/1.3 var(--serif); margin: 0 0 8px; }
.steps { list-style: none; padding: 0; margin: 22px auto 0; max-width: 300px; text-align: left; color: var(--muted-l); }
.steps li { padding: 6px 0 6px 28px; position: relative; }
.steps li::before { content: ''; position: absolute; left: 4px; top: 13px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #c9b8a4; }
.steps li.done { color: var(--text-l); }
.steps li.done::before { background: #c9a06c; border-color: #c9a06c; }
.steps li.now::before { border-color: #8a5a22; animation: blink 1s infinite; }
.edit-head { padding: 6px 18px 0; }
.edit-head .t { width: 100%; border: 0; background: transparent; font: 600 26px/1.25 var(--serif); padding: 4px 0; outline: none; color: var(--text-l); }
.edit-head .lg { width: 100%; border: 0; background: transparent; font-size: 16px; line-height: 1.5; color: #4c4650; resize: none; outline: none; padding: 2px 0; }
.label { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-l); margin: 22px 18px 8px; display: flex; justify-content: space-between; align-items: center; }
.ccard { margin: 8px 16px; border-radius: 16px; background: var(--card); overflow: hidden; }
.ccard .top { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.ccard .top .who { flex: 1; min-width: 0; }
.ccard .top b { display: block; }
.ccard .top span { font-size: 13.5px; color: var(--muted-l); }
.ccard .more { padding: 0 14px 14px; display: grid; gap: 8px; }
.ccard .more .field { padding: 10px 12px; font-size: 15px; border-radius: 10px; }
.ccard .vrow { display: flex; gap: 8px; align-items: center; }
.ccard .vrow select { flex: 1; }
.lcard2 { margin: 10px 16px; border-radius: 16px; background: var(--card); padding: 10px 12px 12px; }
.lcard2 .lh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lcard2 .num { font-size: 12px; color: var(--muted-l); background: var(--card2); border-radius: 6px; padding: 2px 7px; }
.lcard2 select.who { border: 0; background: transparent; font-weight: 600; outline: none; flex: 1; min-width: 0; }
.lcard2 .dirin { width: 100%; border: 0; border-bottom: 1px dashed var(--line-l); background: transparent; font-size: 14px; line-height: 1.4; font-style: italic; color: #8a5a22; padding: 4px 0; outline: none; resize: none; overflow: hidden; display: block; }
.lcard2 .dirin::placeholder { color: #c4b5a2; }
.lcard2 .say { width: 100%; border: 0; background: transparent; font-size: 16px; line-height: 1.45; resize: none; padding: 6px 0 0; outline: none; color: var(--text-l); overflow: hidden; }
.lcard2.narr .say { font-family: var(--serif); font-style: italic; }
.lcard2 .menu { display: flex; gap: 2px; }
.lcard2 .menu button { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted-l); }
.lcard2 .menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lcard2 .menu button:active { background: var(--card2); }
.saved { font-size: 12.5px; color: var(--muted-l); text-align: center; padding: 6px; }

/* ── 프로필 ── */
.ptop { text-align: center; padding: 8px 20px 0; }
.ptop .face { margin: 0 auto 10px; }
.ptop h1 { margin: 0; font: 600 24px/1.2 var(--sans); }
.stats { display: flex; margin: 18px 16px 6px; }
.stats div { flex: 1; text-align: center; border-right: 1px solid var(--line-l); }
.stats div:last-child { border: 0; }
.stats b { display: block; font-size: 22px; font-weight: 600; }
.stats span { font-size: 13px; color: var(--muted-l); }
.thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; background: #2a2630 center/cover; }

/* ── 겹창 ── */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(8,7,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 20px calc(22px + var(--safe-b)); border-radius: 24px 24px 0 0; background: #fbf8f4; color: var(--text-l); }
.sheet h2 { margin: 0 0 6px; font: 600 22px/1.3 var(--serif); }
.sheet p { margin: 0 0 14px; }
.sheet .muted { color: var(--muted-l); }
.sheet .btn { width: 100%; margin-top: 10px; }
.sheet .btn-ghost { background: var(--card2); }
.sheet-x { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; font-size: 26px; line-height: 1; color: var(--muted-l); }
.sheet .warn { color: #b42318; font-size: 14px; }
.sheet .err { color: #b42318; font-size: 14px; margin-top: 8px; }
.avgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 10px 0; }
.avgrid button { aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px transparent; }
.avgrid button.on { box-shadow: 0 0 0 3px #c9a06c; }
.avgrid img { width: 100%; height: 100%; object-fit: cover; }
.nickrow { display: flex; gap: 8px; align-items: center; }
.nickrow .field { flex: 1; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-l); border-radius: 14px; margin: 8px 0; background: #fff; }
.radio.on { border-color: #c9a06c; box-shadow: 0 0 0 2px rgba(201,160,108,.25); }
.radio b { display: block; }
.radio span { font-size: 13.5px; color: var(--muted-l); }
.radio i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c9b8a4; margin-top: 3px; }
.radio.on i { border: 5px solid #8a5a22; }
.fb-stars { display: flex; gap: 6px; margin: 10px 0; }
.fb-stars button { font-size: 28px; color: #d8cbbb; }
.fb-stars button.on { color: #d89a4c; }

/* 입장 암호 · 18세 */
.dw-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 80% at 50% 20%, #221e27, #0b0a0d); color: var(--text-d); }
.gate-card { width: 100%; max-width: 360px; text-align: center; }
.gate-card .logo { font-size: 38px; margin-bottom: 6px; }
.gate-card .slogan { font: italic 18px var(--serif); color: var(--gold); margin: 0 0 22px; }
.gate-card p { color: var(--muted-d); }
.gate-card input { width: 100%; height: 52px; margin: 12px 0 8px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-d); background: rgba(255,255,255,.05); color: #fff; font-size: 16px; outline: none; text-align: center; }
.gate-card .btn { width: 100%; margin-top: 8px; }
.gate-card .err { color: #ffb3ad; font-size: 14px; }

/* 토스트 · 도는 것 */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab) + var(--safe-b) + 16px); transform: translate(-50%, 20px); max-width: min(440px, 92vw); padding: 12px 18px; border-radius: 14px; background: #2a2630; color: #fff; font-size: 14.5px; box-shadow: 0 8px 30px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: all .25s; z-index: 70; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
body.light .spinner, .sheet .spinner { border-color: rgba(0,0,0,.1); border-top-color: #8a5a22; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; min-height: 60vh; }

/* 자매품 줄 (시리즈 공통) */
.sister { padding: 22px 20px 0; }
.sister-title { display: block; font-size: 13px; color: var(--muted-d); 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: rgba(255,255,255,.05); }
.sister-icon { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 8px; }
.sister-name { display: block; font-weight: 600; font-size: 14px; }
.sister-tag { display: block; font-size: 12px; color: var(--muted-d); line-height: 1.3; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.dw-gate .btn-ghost { background: rgba(255,255,255,.08); color: var(--text-d); }
.tips .face { margin: 0 auto; }
.rec .face.lg, .rec .face.xl, .ptop .face { margin-left: auto; margin-right: auto; }
body.notab .toast { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translate(-50%, -20px); } body.notab .toast.show { transform: translate(-50%, 0); }
.ogrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; padding: 12px 20px 30px; }
.ogrid .scard { width: auto; }
.chip.on { background: var(--cream); color: #1d1814; border-color: var(--cream); }
body.light .chip.on { background: var(--text-l); color: #fff; border-color: var(--text-l); }

/* 머리 오른쪽: 검색 · How it works (2026-10-22) */
.top-acts { display: flex; align-items: center; gap: 8px; }
.ic.glass { width: 40px; height: 40px; background: rgba(0,0,0,.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; }
.ic.glass svg { width: 20px; height: 20px; }
.pill-link { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(0,0,0,.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.25); font-size: 13.5px; font-weight: 500; color: #fff; }
.searchbar { display: flex; align-items: center; gap: 10px; margin: 6px 20px 0; height: 48px; padding: 0 16px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line-d); color: var(--muted-d); font-size: 14.5px; }
.searchbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
/* 검색 화면 */
.search-top { grid-template-columns: 48px 1fr 8px; background: var(--ink); }
.sbox { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.08); }
.sbox svg { width: 18px; height: 18px; fill: none; stroke: var(--muted-d); stroke-width: 1.8; flex: none; }
.sbox input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: #fff; font-size: 16px; }
.sbox input::-webkit-search-cancel-button { filter: invert(1); }
.sres { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-d); }
.sres .thumb { width: 64px; height: 86px; border-radius: 10px; }
.sres .who { flex: 1; min-width: 0; }
.sres b { display: block; font: 500 17px/1.25 var(--serif); }
.sres .sub { display: block; font-size: 12.5px; color: var(--gold); margin-top: 2px; }
.sres .sub2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; color: var(--muted-d); margin-top: 3px; }
/* 아래 탭: 내 그림 · 무대 이름 */
.tab-face { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #2a2630; color: var(--gold); font: 600 12px var(--serif); box-shadow: 0 0 0 1.5px currentColor; }
.tabbar a.on .tab-face { box-shadow: 0 0 0 2px var(--gold); }
.tab-face img { width: 100%; height: 100%; object-fit: cover; }
.tab-nick { max-width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
