/* DearMoment — 시안(_reference/시안.png): 크림 바탕 · 따뜻한 갈색 단추 · 세리프 제목 · 그림이 주인공. 주제 고르기 · 그리는 중 · 영상은 어두운 화면 */
:root {
  --bg: #f6eee3;
  --bg2: #ede2d3;
  --card: #fbf6ef;
  --paper: #fffaf2;
  --ink: #3b2a20;
  --ink2: #6b5646;
  --muted: #a08b79;
  --line: #e6d8c6;
  --brown: #7a5440;
  --brown2: #5f3f2e;
  --gold: #e3b46b;
  --rose: #c9796b;
  --dark: #17100b;
  --shadow: 0 8px 26px rgba(80, 50, 30, .10);
  --radius: 18px;
  --tabs: 72px;
  --serif: 'Cormorant Garamond', 'Gowun Batang', Georgia, serif;
  /* 감성 글꼴 (2026-10-16 사용자 요청): 한글은 고운바탕, 영문은 Cormorant */
  --serif-ko: 'Cormorant Garamond', 'Gowun Batang', Georgia, serif;
  --story: 'Gowun Batang', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg2); color: var(--ink); font: 15px/1.55 var(--sans); letter-spacing: -.005em; }
body.dark { background: #0d0906; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; box-shadow: 0 0 60px rgba(80, 50, 30, .08); }
body.dark .shell { background: var(--dark); }
.main { padding-bottom: calc(var(--tabs) + 24px + env(safe-area-inset-bottom)); min-height: 100dvh; }
body.no-tabs .main { padding-bottom: 0; }
body.no-tabs .tabs { display: none; }

/* ── 하단 탭 (시안: 홈 · 기록 · ＋ · 영상 · 더보기) ── */
.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30;
  height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(251, 246, 239, .96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 500; }
.tabs a.on { color: var(--brown2); font-weight: 700; }
.tabs a.on svg { stroke-width: 2.1; }
.tab-plus { display: flex; justify-content: center; align-items: center; }
.tab-plus b { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--brown); box-shadow: 0 6px 18px rgba(95, 63, 46, .35); }
.tab-plus b svg { width: 26px; height: 26px; stroke-width: 2.2; }

/* ── 머리 · 글자 ── */
.logo { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: .005em; color: var(--ink); margin: 0; display: inline-flex; align-items: flex-start; }
.logo i { font-style: italic; }
.logo sup { font: 700 9px var(--sans); letter-spacing: .12em; text-transform: uppercase; margin: 3px 0 0 5px; opacity: .75; }
.logo.light { color: #fff8ee; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.tagline { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink2); }
.ibtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; color: var(--ink); flex: none; }
.ibtn:active { background: rgba(0, 0, 0, .06); }
.ibtn.light { color: #fff; }
.ibtn.on { color: var(--brown); background: rgba(122, 84, 64, .1); }
.bar { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; padding: 10px 8px; position: sticky; top: 0; z-index: 20; background: rgba(246, 238, 227, .94); backdrop-filter: blur(10px); }
.bar .bar-t { text-align: center; min-width: 0; }
.bar .bar-t small { display: block; font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); line-height: 1.1; }
.bar h1 { margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .bar-r { justify-self: end; display: flex; align-items: center; }
.bar.left { grid-template-columns: 1fr; padding: 18px 20px 10px; }
.bar.left h1 { text-align: left; font-family: var(--serif); font-size: 30px; font-weight: 600; }
.bar.clear { background: none; backdrop-filter: none; position: relative; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.btn svg { width: 18px; height: 18px; }
.btn-cta, .btn-brown { background: var(--brown); color: #fff8ee; box-shadow: 0 6px 18px rgba(95, 63, 46, .22); }
.btn-cta:disabled, .btn-brown:disabled { opacity: .5; box-shadow: none; }
.btn-ghost { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.btn-danger { background: #b4493f; color: #fff; }
.btn-glass { background: rgba(255, 248, 238, .16); color: #fff8ee; border: 1px solid rgba(255, 248, 238, .55); backdrop-filter: blur(8px); height: 52px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.link { color: var(--brown); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link.center { display: block; margin: 14px auto 0; }
.link-sm { color: var(--brown); font-weight: 700; font-size: 13.5px; padding: 6px 4px; white-space: nowrap; }
.center { text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 48px 24px; margin: 0; }
.loading { display: grid; place-items: center; padding: 90px 0; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brown); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }

/* ── 홈 (시안 01) ── */
.hero { position: relative; min-height: min(88dvh, 720px); background: #2a1d14 center/cover no-repeat; color: #fff8ee; display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top)) 22px 26px; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 12, 6, .55) 0%, rgba(20, 12, 6, .05) 32%, rgba(20, 12, 6, .1) 55%, rgba(20, 12, 6, .78) 100%); }
.hero > * { position: relative; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.guide-link { font-size: 13px; font-weight: 600; color: #fff8ee; opacity: .92; padding: 6px 0; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.hero-text { margin-top: 34px; }
.hero-text h2 { font-family: var(--serif-ko); font-weight: 400; font-size: 27px; line-height: 1.45; margin: 0; text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
.hero-text p { font-family: var(--serif); font-style: italic; font-size: 17px; margin: 10px 0 0; opacity: .9; }
.hero .btn-glass { margin-top: auto; align-self: stretch; }
.sample-note { margin: 14px 18px 0; padding: 12px 14px; border-radius: 14px; background: var(--card); color: var(--ink2); font-size: 13.5px; box-shadow: var(--shadow); }
.sample-note .link { font-size: 13.5px; }
.pet-row { display: flex; gap: 8px; padding: 16px 18px 2px; overflow-x: auto; scrollbar-width: none; }
.pet-row::-webkit-scrollbar { display: none; }
.pet-row.center { justify-content: center; flex-wrap: wrap; padding: 4px 22px 14px; }
.pet-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; white-space: nowrap; }
.pet-pill.on { border-color: var(--brown); color: var(--brown2); }
.pet-pill.add { padding: 4px 14px 4px 10px; color: var(--ink2); }
.pet-pill.add svg { width: 18px; height: 18px; }
.pface { border-radius: 50%; object-fit: cover; flex: none; background: var(--bg2); }
.pface-e { display: inline-grid; place-items: center; color: var(--ink2); }
.pface-e svg { width: 18px; height: 18px; }
.home-sec { padding: 18px 18px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.sec-head h3 { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 600; }
.sec-head a { font-size: 13px; color: var(--brown); font-weight: 600; }
.mo-strip { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 6px; }
.mo-strip::-webkit-scrollbar { display: none; }
.mo-tile { flex: 0 0 210px; }
.mo-tile b { display: block; margin-top: 8px; font-family: var(--serif-ko); font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-tile small { color: var(--muted); font-size: 12px; }
.mo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.mo-pair img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: how; }
.how li { counter-increment: how; background: var(--card); border-radius: 16px; padding: 14px 16px 14px 52px; position: relative; box-shadow: var(--shadow); }
.how li::before { content: counter(how); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--brown); color: #fff; font: 700 12px/24px var(--sans); text-align: center; }
.how b { display: block; font-size: 15px; }
.how span { color: var(--ink2); font-size: 13.5px; }

/* ── 주제 고르기 (시안 02, 어두운 화면) ── */
.topics, .painting { --photo: linear-gradient(160deg, #6b4a33, #2a1a10 70%); }
.topics { min-height: 100dvh; color: #fff8ee; position: relative; padding-bottom: 28px; background: var(--dark); }
.topics::before { content: ''; position: absolute; inset: 0; background: center/cover no-repeat; background-image: var(--photo); filter: blur(2px) brightness(.42); }
.topics > * { position: relative; }
.topics .ibtn { color: #fff8ee; }
.topics h2 { margin: 18px 24px 8px; text-align: center; font-family: var(--serif-ko); font-weight: 400; font-size: 25px; line-height: 1.5; }
.topics > p { text-align: center; margin: 0 24px 16px; opacity: .85; font-size: 14px; }
.topics .pet-pill { background: rgba(255, 248, 238, .12); border-color: rgba(255, 248, 238, .3); color: #fff8ee; }
.topics .pet-pill.on { background: rgba(255, 248, 238, .26); border-color: #fff8ee; }
.topic-list { display: grid; gap: 10px; padding: 6px 22px; }
.topic { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: rgba(251, 246, 239, .94); color: var(--ink); text-align: left; position: relative; }
.topic.plain { justify-content: center; background: rgba(251, 246, 239, .2); color: #fff8ee; border: 1px solid rgba(255, 248, 238, .5); min-height: 52px; }
.topic b { display: block; font-size: 15px; }
.topic small { color: var(--ink2); font-size: 12.5px; }
.topic:disabled { opacity: .7; }
.topic .spinner { position: absolute; right: 16px; }
.t-art { width: 44px; height: 44px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; color: var(--brown2); flex: none; }
.t-art svg { width: 30px; height: 30px; stroke-width: 1.4; }

/* ── 인터뷰 (시안 03) ── */
.iv { min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); }
.iv-bar { background: rgba(255, 250, 242, .95); border-bottom: 1px solid var(--line); }
.timer { font-family: var(--serif) !important; font-weight: 500 !important; font-size: 30px !important; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--rose); }
.chat { flex: 1; padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.chat.static { padding: 6px 4px; }
.chat-day { text-align: center; font-size: 11.5px; color: var(--muted); margin: 4px 0; }
.msg { display: flex; gap: 8px; max-width: 86%; animation: fadeUp .25s ease; }
.msg p { margin: 0; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.msg.host p { background: #fff; border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.me { align-self: flex-end; flex-direction: column; align-items: flex-end; }
.msg.me p { background: #efe2d0; border-top-right-radius: 4px; }
.msg-ph { width: 180px; border-radius: 14px; }
.host-av { width: 32px; height: 32px; border-radius: 50%; background: #e8d9c6; display: grid; place-items: center; color: var(--brown2); flex: none; margin-top: 2px; }
.host-av svg { width: 20px; height: 20px; }
.typing { display: flex; gap: 4px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; border-top-left-radius: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 0 16px 8px; }
.quick button { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 13.5px; color: var(--ink2); }
.ready-card { margin: 4px 16px 14px; padding: 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); text-align: center; display: grid; gap: 10px; }
.ready-card p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 19px; }
.composer { position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 2px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 250, 242, .97); border-top: 1px solid var(--line); }
.composer .ibtn { color: var(--ink2); }
.composer textarea { flex: 1; min-height: 40px; max-height: 120px; resize: none; border: 1.5px solid var(--line); border-radius: 20px; padding: 9px 14px; background: #fff; outline: none; font-size: 15px; }
.composer .send { width: 40px; height: 40px; border-radius: 50%; background: var(--brown); color: #fff; display: grid; place-items: center; margin-left: 4px; flex: none; }
.composer .send svg { width: 20px; height: 20px; stroke-width: 2.2; }

/* ── 스케치 (시안 04) ── */
.sk { min-height: 100dvh; padding-bottom: 20px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--bg2); gap: 4px; }
.seg2 button { height: 40px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.seg2 button.on { background: var(--brown); color: #fff8ee; }
.sk-seg { margin: 4px 18px 10px; }
.sk-hint { margin: 0 22px 10px; color: var(--ink2); font-size: 13.5px; text-align: center; }
.sk-paper { margin: 0 18px; border-radius: 18px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); aspect-ratio: 3/4; position: relative; }
.sk-paper canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.sk-photo { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.sk-photo span { display: grid; justify-items: center; gap: 6px; color: var(--ink2); text-align: center; width: 100%; height: 100%; align-content: center; }
.sk-photo span svg { width: 40px; height: 40px; stroke-width: 1.3; }
.sk-photo span small { color: var(--muted); }
.sk-photo img { width: 100%; height: 100%; object-fit: cover; }
.sk-tools { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 10px 18px 2px; }
.sk-sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.sk-color { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line); margin: 0 4px; }
.sk-color.on { box-shadow: 0 0 0 2px var(--ink); }
.sk-go { padding: 14px 18px 0; display: grid; gap: 10px; justify-items: center; }
.sk-go .link { font-size: 13.5px; font-weight: 500; color: var(--ink2); }

/* ── 그리는 중 (시안 05) ── */
.painting { min-height: 100dvh; position: relative; color: #fff8ee; background: var(--dark); overflow: hidden; }
.painting::before { content: ''; position: absolute; inset: -20px; background-image: var(--photo); background-size: cover; background-position: center; filter: blur(3px) brightness(.5) saturate(1.1); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.05); } to { transform: scale(1.14) translateY(-10px); } }
.painting-in { position: relative; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(80px + env(safe-area-inset-top)) 30px calc(40px + env(safe-area-inset-bottom)); }
.painting h2 { font-family: var(--serif-ko); font-weight: 400; font-size: 27px; line-height: 1.55; text-align: center; margin: 0; }
.p-step { text-align: center; margin: 18px 0 0; font-family: var(--serif); font-style: italic; font-size: 18px; opacity: .9; min-height: 1.6em; }
.p-foot { margin-top: auto; }
.p-note { text-align: center; font-size: 13.5px; opacity: .8; margin: 0 0 16px; }
.p-row { display: flex; align-items: center; gap: 12px; }
.p-bar { flex: 1; height: 4px; border-radius: 3px; background: rgba(255, 248, 238, .25); overflow: hidden; }
.p-bar i { display: block; height: 100%; width: 0; background: #fff8ee; border-radius: 3px; transition: width .3s linear; }
.p-bar.light { background: var(--line); } .p-bar.light i { background: var(--brown); }
.p-pct { font-size: 13px; font-variant-numeric: tabular-nums; width: 36px; text-align: right; }
.center-msg { padding: 60px 26px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.center-msg h2 { font-family: var(--serif); font-size: 26px; margin: 0; }

/* ── 결과 (시안 06 · 07) ── */
.eyes { min-height: 100dvh; display: flex; flex-direction: column; background: var(--card); }
.eyes-pic { position: relative; flex: 1; min-height: 60dvh; background: #2a1d14; }
.eyes-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fadeIn .5s ease; }
.eyes-n { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 16px; padding: 4px 11px; border-radius: 999px; background: rgba(20, 12, 6, .45); color: #fff; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(6px); }
.eyes-x { position: absolute !important; top: calc(8px + env(safe-area-inset-top)); right: 8px; background: rgba(20, 12, 6, .35); }
.eyes-card { padding: 18px 22px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; margin-top: -22px; background: var(--card); position: relative; }
.eyes-head { display: flex; align-items: center; justify-content: space-between; }
.eyes-head b { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink2); }
.like { color: var(--rose); }
.like.on svg { fill: var(--rose); }
.like.paw { color: var(--gold); }
.like.paw:not(.on) svg { opacity: .45; }
.eyes-line { font-family: var(--serif-ko); font-size: 17px; line-height: 1.7; margin: 6px 0 18px; min-height: 3.4em; }
.eyes-nav { display: flex; align-items: center; justify-content: space-between; }
.round { width: 44px; height: 44px; border-radius: 12px; background: var(--brown); color: #fff8ee; display: grid; place-items: center; }
.dots { display: flex; gap: 6px; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); } .dots i.on { background: var(--brown); }

/* ── 완성된 Moment (시안 08) ── */
.done { padding-bottom: 30px; }
.done-date { text-align: center; color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.done-title { text-align: center; font-family: var(--serif-ko); font-weight: 700; font-size: 25px; margin: 6px 18px 18px; line-height: 1.4; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.pair img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow); }
.pair b { display: block; margin: 10px 2px 2px; font-family: var(--serif); font-size: 15px; color: var(--ink2); }
.pair p { margin: 0 2px; font-family: var(--serif-ko); font-size: 13.5px; line-height: 1.65; color: var(--ink); }
.play-card { margin: 20px 16px 0; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); position: relative; }
.pc-img { width: 64px; height: 64px; border-radius: 12px; background: center/cover; flex: none; }
.pc-btn { position: absolute; left: 30px; top: 30px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 248, 238, .92); display: grid; place-items: center; color: var(--brown2); }
.pc-btn svg { width: 16px; height: 16px; margin-left: 2px; }
.pc-t b { display: block; font-size: 15px; } .pc-t small { color: var(--muted); font-size: 12.5px; }
.done-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 16px 0; }
.done-btns .btn { padding: 0 10px; font-size: 14px; }

/* ── 영상 (시안 09) ── */
.player { position: relative; height: 100dvh; background: #000; overflow: hidden; display: grid; place-items: center; }
.player canvas { width: 100%; height: 100%; object-fit: contain; display: block; max-height: 100dvh; aspect-ratio: 9/16; }
.pv-top { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; display: grid; grid-template-columns: 40px 1fr 40px 40px; }
.pv-big { position: absolute; width: 74px; height: 74px; border-radius: 50%; background: rgba(255, 248, 238, .2); border: 1px solid rgba(255, 248, 238, .6); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.pv-big svg { width: 32px; height: 32px; margin-left: 4px; }
.pv-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .5)); }
.pv-bottom input { width: 100%; accent-color: #fff8ee; }
.pv-ctl { display: flex; align-items: center; gap: 6px; color: #fff; }
.pv-time { flex: 1; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ── 기록 · 영상 모아보기 (시안 11 · 12) ── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding: 2px 20px 6px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips button { padding: 7px 15px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.chips button.on { background: var(--brown); border-color: var(--brown); color: #fff8ee; }
.mo-list { padding: 8px 20px 10px; display: grid; gap: 22px; }
.mo-item small { color: var(--muted); font-size: 12.5px; }
.mo-item b { display: block; font-family: var(--serif-ko); font-size: 17px; margin: 1px 0 8px; }
.mo-pair.big { gap: 6px; }
.vid-list { padding: 4px 20px 10px; display: grid; gap: 14px; }
.vid { position: relative; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 16/10; border-radius: 18px; overflow: hidden; background: #2a1d14 center/cover; color: #fff8ee; padding: 16px; box-shadow: var(--shadow); }
.vid::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 12, 6, .55), rgba(20, 12, 6, .05) 55%, rgba(20, 12, 6, .45)); }
.vid > * { position: relative; }
.vid-t b { display: block; font-family: var(--serif-ko); font-size: 19px; } .vid-t small { opacity: .85; }
.vid-p { display: flex; align-items: center; gap: 8px; } .vid-p svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; border: 1.5px solid #fff8ee; }

/* ── 설정 (시안 13) ── */
.set { padding: 0 18px; }
.set h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 22px 4px 8px; }
.set-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.set-card.list { overflow: hidden; }
.me-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.me-card > div { flex: 1; min-width: 0; } .me-card b { display: block; } .me-card small { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.set-row:last-child { border-bottom: 0; }
.set-row > span:not(.tr-ic):not(.check):not(.pface) { flex: 1; min-width: 0; }
.set-row b { display: block; font-weight: 600; font-size: 14.5px; } .set-row small { color: var(--muted); font-size: 12.5px; display: block; }
.set-row small.val { flex: none; }
.set-row svg { width: 18px; height: 18px; color: var(--muted); }
.set-row.danger b { color: #b4493f; }
.set-row input[type=range] { width: 50%; accent-color: var(--brown); }
.track .tr-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--brown); font-size: 15px; flex: none; }
.track.on .tr-ic { background: var(--brown); color: #fff8ee; }
.tr-play { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 10px; color: var(--ink2); flex: none; }
.check { width: 18px; color: var(--brown); font-weight: 700; text-align: center; flex: none; }
.toggle { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; cursor: pointer; transition: .2s; flex: none; margin: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.toggle:checked { background: var(--brown); } .toggle:checked::after { left: 21px; }
.uav { border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none; padding: 2px; background: #f7838f; }
.uav img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.uav.ring0 { background: #f7838f; } .uav.ring1 { background: #f6b26b; } .uav.ring2 { background: #ffd966; } .uav.ring3 { background: #93c47d; }
.uav.ring4 { background: #76a5af; } .uav.ring5 { background: #6fa8dc; } .uav.ring6 { background: #8e7cc3; } .uav.ring7 { background: #c27ba0; }

/* ── 사용법 ── */
.guide { padding: 0 20px 30px; }
.g-hero { text-align: center; }
.g-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.g-pair img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.g-hero h2 { font-family: var(--serif); font-size: 32px; font-weight: 600; line-height: 1.15; margin: 20px 0 10px; }
.g-hero p { color: var(--ink2); margin: 0; }
.g-steps { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 14px; }
.g-steps li { display: flex; gap: 14px; }
.g-n { width: 28px; height: 28px; border-radius: 50%; background: var(--brown); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.g-steps b { font-size: 15px; } .g-steps p { margin: 2px 0 0; color: var(--ink2); font-size: 14px; }
.g-tabs { display: grid; gap: 8px; background: var(--card); border-radius: 16px; padding: 14px 16px; }
.g-tabs div { display: grid; grid-template-columns: 82px 1fr; font-size: 13.5px; } .g-tabs span { color: var(--ink2); }
.g-note { color: var(--muted); font-size: 13px; margin: 16px 2px; }

/* ── 시트 · 겹 화면 ── */
.overlay, .modal { position: fixed; inset: 0; z-index: 100; background: rgba(30, 20, 12, .42); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease; }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: fadeUp .25s ease; }
.sheet.tall { min-height: 70dvh; }
.sheet h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; padding-right: 30px; }
.sheet-x { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; color: var(--muted); }
.sheet-art { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 16px; overflow: hidden; height: 150px; }
.sheet-art img { width: 100%; height: 100%; object-fit: cover; }
.muted { color: var(--ink2); margin: 0; font-size: 14px; }
.tiny { color: var(--muted); font-size: 12.5px; margin: 0; font-weight: 400; }
.warn { color: #9a6a1c; background: #fbefd9; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; margin: 0; }
.err { color: #b4493f; margin: 0; font-size: 13.5px; }
.keep { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink2); }
.gbtn { min-height: 48px; display: grid; place-items: center; gap: 8px; }
.sheet input[type=text], .sheet input:not([type]), .sheet textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; outline: none; background: var(--paper); font-size: 15px; }
.sheet input[type=text]:focus, .sheet textarea:focus { border-color: var(--brown); }
.sheet textarea { resize: none; }
.sheet label b { font-size: 14px; }
.sheet .chips button { padding: 7px 12px; }
.pf-me { display: flex; gap: 14px; align-items: center; }
.pf-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-upload { cursor: pointer; }
.pf-rings { display: flex; gap: 6px; } .pf-rings button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.pf-rings button.on { box-shadow: 0 0 0 2px var(--ink); }
.pf-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-height: 200px; overflow-y: auto; padding: 2px; }
.pf-grid button { border-radius: 50%; padding: 2px; background: #fff; aspect-ratio: 1; }
.pf-grid button.on { box-shadow: 0 0 0 2.5px var(--brown); }
.pf-grid img { border-radius: 50%; width: 100%; height: 100%; object-fit: cover; }
.pt-photos { display: flex; gap: 8px; }
.pt-ph, .pt-add { width: 84px; height: 84px; border-radius: 14px; position: relative; overflow: hidden; flex: none; }
.pt-ph img { width: 100%; height: 100%; object-fit: cover; }
.pt-ph button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; line-height: 22px; }
.pt-add { border: 1.5px dashed var(--muted); display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.row-btn { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line); font-weight: 600; text-align: left; }
.row-btn.danger { color: #b4493f; border-bottom: 0; }
.save-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--card); text-align: left; box-shadow: var(--shadow); }
.save-row:disabled { opacity: .5; }
.save-row > span:nth-child(2) { flex: 1; } .save-row b { display: block; font-size: 15px; } .save-row small { color: var(--muted); font-size: 12.5px; }
.save-row > svg { width: 18px; height: 18px; color: var(--muted); }
.sv-ic { width: 54px; height: 44px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--bg2); flex: none; color: var(--brown2); }
.sv-ic img { width: 100%; height: 100%; object-fit: cover; }
.sv-ic.two { grid-template-columns: 1fr 1fr; gap: 2px; }
.sv-ic.vid { background: #2a1d14; color: #fff8ee; }
.rec { padding: 8px 4px 0; } .rec p { margin: 0 0 8px; font-size: 13.5px; color: var(--ink2); }
.fb-stars { display: flex; gap: 6px; justify-content: center; }
.fb-stars button { font-size: 32px; color: var(--line); } .fb-stars button.on { color: var(--gold); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + 20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff8ee; padding: 11px 18px; border-radius: 14px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 300; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.care-note { margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: #fff7e8; border: 1px solid #f0d9ae; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.care-note small { display: block; margin-top: 6px; color: var(--ink2); }

/* ── 입장 암호 · 18세 ── */
.dw-gate { position: fixed; inset: 0; z-index: 200; background: linear-gradient(170deg, #f8f1e7, #ecdcc6); display: grid; place-items: center; padding: 24px; }
.gate-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.gate-card .logo { font-size: 46px; margin: 0 auto; }
.gate-card .tagline { margin-top: -6px; }
.gate-card p { margin: 0; color: var(--ink2); }
.gate-card input { height: 50px; border-radius: 16px; border: 1.5px solid var(--line); padding: 0 16px; text-align: center; outline: none; background: var(--paper); }

/* ── 자매품 · 의견 ── */
.foot { padding: 34px 18px 10px; text-align: center; }
.foot-link { color: var(--muted); font-size: 13.5px; text-decoration: underline; }
.sisters { margin-top: 22px; text-align: left; min-width: 0; max-width: 100%; }
.sisters-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 4px; }
.sisters-title a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sister-row { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 18px 8px; margin: 0 -18px; }
.sister-row::-webkit-scrollbar { display: none; }
.sister-card { flex: 0 0 198px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; gap: 1px 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.sister-icon { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 22%; object-fit: contain; }
.sister-name { align-self: end; font-size: 14px; font-weight: 700; white-space: nowrap; }
.sister-tag { align-self: start; color: var(--muted); font-size: 11.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* ── 앱 설치 팝업 (install.js, DearWorld 공통) ── */
.dwi { position: fixed; left: 0; right: 0; bottom: 0; z-index: 140; display: flex; justify-content: center; padding: 0 12px calc(var(--tabs) + 12px + env(safe-area-inset-bottom)); pointer-events: none; animation: fadeUp .4s ease both; }
.dwi-card { pointer-events: auto; width: min(440px, 100%); background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 16px 14px; box-shadow: 0 18px 50px rgba(60, 35, 20, .25); 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(--ink2); }
.dwi-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.dwi-btn { padding: 9px 14px; border-radius: 999px; font-size: 13px; }
.dwi-main { background: var(--brown); color: #fff; }
.dwi-ghost { border: 1px solid var(--line); color: var(--ink2); }
.dwi-more { font-size: 13.5px; color: var(--ink); }
.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(--bg); color: #2f7cf6; }
.dwi-guide { margin: 0 0 8px; line-height: 1.6; }

/* 한국어 · 일본어 문장이 낱말 중간에서 끊기지 않게 */
.eyes-line, .pair p, .done-title, .mo-tile b, .mo-item b, .vid-t b, .hero-text h2, .painting h2, .topics h2, .msg p { word-break: keep-all; overflow-wrap: anywhere; }

/* 이야기 글자 — 인터뷰 말풍선 · 두 문장 · 빠른 답 */
.msg p, .quick button, .composer textarea, .eyes-line, .pair p, .ready-card p { font-family: var(--story); }
.msg p { font-size: 15px; line-height: 1.7; letter-spacing: 0; }
.msg p.typed::after { content: '▍'; margin-left: 1px; color: var(--muted); animation: blink 1s infinite; }
.eyes-line { font-size: 16.5px; line-height: 1.8; }
.look-nudge { display: flex; align-items: center; gap: 10px; margin: 0 18px 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-size: 13px; color: var(--ink2); }
.look-nudge span { flex: 1; }
.look-nudge .btn { flex: none; cursor: pointer; }

/* 인터뷰: 음악 버튼 · 그만 그리기 */
.iv-bar .ibtn.on { color: var(--brown); background: rgba(122, 84, 64, .1); }
.iv-done { display: block; margin: 0 auto 10px; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* 인터뷰 배경: 반려동물 사진을 연하게 (화면에 고정, 말풍선 뒤) */
.iv.has-bg { position: relative; }
.iv.has-bg::before { content: ''; position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 480px); z-index: 0; pointer-events: none;
  background: var(--photo) center / cover no-repeat; opacity: .16; filter: saturate(.8) blur(1px); }
.iv.has-bg::after { content: ''; position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 480px); z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 250, 242, .55), rgba(255, 250, 242, .15) 35%, rgba(255, 250, 242, .15) 65%, rgba(255, 250, 242, .6)); }
.iv.has-bg > * { position: relative; z-index: 1; }
.iv.has-bg .composer { position: sticky; z-index: 2; }
.iv.has-bg .iv-bar { position: sticky; top: 0; z-index: 3; }
/* 말풍선은 배경 없이 투명하게 — 사진이 비치고, 테두리와 글자만 (2026-10-16 사용자 요청) */
/* 테두리도 없이 글자만 (2026-10-16 사용자 요청) — 내 말은 오른쪽 · 갈색 글자로 구분 */
.iv .msg.host p, .iv .typing { background: transparent; border: 0; padding-left: 4px; padding-right: 4px; }
.iv .msg.me p { background: transparent; border: 0; color: var(--brown2); text-align: right; padding-left: 4px; padding-right: 4px; }
.iv.has-bg .msg p { text-shadow: 0 0 6px rgba(255, 250, 242, .95), 0 0 2px rgba(255, 250, 242, .9); }
.iv .quick button { background: rgba(255, 255, 255, .35); }

/* 양쪽 글꼴을 다르게 (2026-10-16 사용자 요청): 인터뷰어는 송명, 내 말은 나눔펜(펜 손글씨, 사용자가 8개 후보 중 1번을 골랐다) */
.iv .msg.me p, .iv .composer textarea { font-family: 'Nanum Pen Script', var(--sans); font-size: 22px; line-height: 1.35; letter-spacing: 0; }
.iv .quick button { font-family: 'Nanum Pen Script', var(--sans); font-size: 19px; }
/* 인터뷰어의 말: 송명 (2026-10-16 사용자가 여섯 글꼴 중 4번을 골랐다) — 내 말(개구 손글씨)과 짝 */
.iv .msg.host p, .ready-card p { font-family: 'Song Myung', 'Gowun Batang', serif; font-size: 16px; line-height: 1.75; color: #3b2a20; }
