/* Dear Mentors — 시안(docs/mock-overview.png): 따뜻한 미색 바탕 · 세리프 제목(Libre Caslon) · 남색 버튼 · 세피아 초상 · 가운데 떠 있는 Post 버튼 */
:root {
  --bg: #f5f0e6; --paper: #fbf8f2; --card: #fffdf9; --line: #e8e0d1; --line2: #d8cdb9;
  --ink: #1b2232; --ink2: #3c4354; --muted: #777365; --faint: #a59f91;
  --navy: #1f3866; --deep: #17213a; --blue: #2b5aa3; --blue-bg: #e2ebf7; --bubble: #efe9de;
  --gold: #b9853a; --gold-bg: #f8ecd6; --red: #d8464d; --green: #2f8a57;
  --serif: 'Libre Caslon Text', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
  --nav-h: 66px; --r: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #ece5d8; color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
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; }
[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(60, 45, 20, .08); }
.main { padding-bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); min-height: 100dvh; }
body[data-view="chat"] .main, body[data-view="welcome"] .main { padding-bottom: 0; }

/* ── 글자 ── */
.serif { font-family: var(--serif); }
h1, h2, h3 { margin: 0; font-weight: 700; }
.page-title { font: 700 30px/1.15 var(--serif); letter-spacing: -.01em; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); line-height: 1.5; }
.err { color: var(--red); font-size: 13.5px; margin: 6px 0 0; }
.warn { color: #8a5a1c; background: var(--gold-bg); padding: 10px 12px; border-radius: 12px; font-size: 13.5px; }
.link-btn { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ── 머리 · 탭 ── */
.top { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 18px 6px; }
.logo { font: 700 25px/1 var(--serif); letter-spacing: -.01em; }
.logo sup { font: 600 9px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-left: 6px; vertical-align: 10px; }
.top-r { display: flex; gap: 4px; align-items: center; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; position: relative; color: var(--ink); }
.icon-btn:active { background: rgba(0, 0, 0, .05); }
.icon-btn.gold { color: var(--gold); }
.icon-btn .dot, .nav .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.bar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: calc(6px + env(safe-area-inset-top)) 8px 6px; background: rgba(245, 240, 230, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bar h1 { text-align: center; font: 700 17px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pad { padding: 0 18px; }

.tabs { display: flex; gap: 6px; padding: 10px 18px 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 550; color: var(--ink2); white-space: nowrap; border: 1px solid transparent; }
.tabs .on { background: var(--deep); color: #fff; }
.chips { display: flex; gap: 6px; padding: 8px 18px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); font-size: 12.5px; font-weight: 550; color: var(--ink2); white-space: nowrap; }
.chip.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--bubble); color: var(--ink2); font-size: 12px; font-weight: 550; }
.seg { display: flex; border-bottom: 1px solid var(--line); margin: 6px 18px 0; }
.seg a { flex: 1; text-align: center; padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.seg a.on { color: var(--ink); border-color: var(--ink); }

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: 15px; transition: transform .1s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-cta { background: var(--deep); color: #fff; }
.btn-blue { background: var(--navy); color: #fff; }
.btn-ghost { border: 1px solid var(--line2); background: var(--card); color: var(--ink); }
.btn-white { background: #fff; color: var(--ink); }
.btn-danger { background: #fbe9e9; color: #a32a30; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn svg { width: 18px; height: 18px; }

/* ── 아바타 ── */
.mav { position: relative; display: inline-block; flex: none; border-radius: 50%; overflow: hidden; background: linear-gradient(145deg, #d9c7a6, #a98f69); }
.mav img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.16) saturate(.92) contrast(1.02); }
.mav .mono { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1em/1 var(--serif); color: #fff8ec; letter-spacing: .02em; }
.uav { display: inline-block; flex: none; border-radius: 50%; overflow: hidden; background: #f1e9da; border: 2px solid var(--ring, #e3d6bf); }
.uav img { width: 100%; height: 100%; object-fit: cover; }
.uav.ring0 { --ring: #e8b4a0; } .uav.ring1 { --ring: #b9cfe8; } .uav.ring2 { --ring: #c6dcb2; } .uav.ring3 { --ring: #e9d18f; }
.uav.ring4 { --ring: #d6bfe6; } .uav.ring5 { --ring: #f0bfcf; } .uav.ring6 { --ring: #a9d8d2; } .uav.ring7 { --ring: #d8c3a5; }
.ai { display: inline-block; padding: 1px 5px; border-radius: 5px; background: var(--bubble); color: var(--muted); font: 700 9.5px/1.4 var(--sans); letter-spacing: .06em; vertical-align: 1px; margin-left: 4px; }
.bio-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; background: radial-gradient(circle at 30% 25%, #f4dfb8, #c99a57 70%, #9c6f33); color: #fffaf0; }
.bio-av svg { width: 24px; height: 24px; }

/* ── 카드 · 피드 ── */
.feed { display: flex; flex-direction: column; gap: 12px; padding: 6px 12px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .who b { display: block; font-size: 14.5px; line-height: 1.25; }
.post-head .who span { display: block; color: var(--muted); font-size: 12.5px; }
.post-img { position: relative; margin: 12px -14px 0; overflow: hidden; background: #e9dfcd; aspect-ratio: 3 / 2; }
.post-img img { width: 100%; height: 100%; object-fit: cover; }
.post-img .ai-chip { position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(23, 33, 58, .62); color: #fff; font: 600 10.5px/1.4 var(--sans); letter-spacing: .03em; backdrop-filter: blur(4px); }
.post-img.empty { display: grid; place-items: center; color: #a1906f; }
.post-title { font: 700 20px/1.25 var(--serif); margin: 12px 0 4px; }
.post-text { white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.6; }
.post-text.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.acts { display: flex; align-items: center; gap: 16px; margin-top: 12px; color: var(--ink2); }
.act { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 550; }
.act svg { width: 21px; height: 21px; }
.act.like.on { color: var(--red); }
.act.like.on svg { fill: var(--red); stroke: var(--red); }
.act.save.on svg { fill: var(--ink); }
.acts .grow { flex: 1; }
.disclose { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); line-height: 1.5; }
.disclose a { text-decoration: underline; text-underline-offset: 2px; }
.peek { display: flex; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); font-size: 13.5px; }
.peek p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.status { margin-top: 10px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.care { margin-top: 12px; padding: 14px; border-radius: 14px; background: #eef4ee; border: 1px solid #cfe1d2; color: #24432f; font-size: 14.5px; line-height: 1.6; }
.banner { margin: 8px 12px 4px; padding: 14px; border-radius: var(--r); background: var(--gold-bg); border: 1px solid #ecd9b4; display: flex; gap: 12px; align-items: center; }
.banner .txt { flex: 1; min-width: 0; }
.banner b { display: block; font-size: 14.5px; }
.banner p { margin: 2px 0 0; font-size: 13px; color: var(--ink2); }
.banner .star { width: 36px; height: 36px; border-radius: 50%; background: #e8b04f; color: #fff; display: grid; place-items: center; flex: none; }
.banner.blue { background: var(--blue-bg); border-color: #c9d8ee; }
.faces { display: flex; }
.faces > * { margin-left: -8px; border: 2px solid var(--card); }
.faces > *:first-child { margin-left: 0; }
.empty { text-align: center; padding: 50px 28px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font: 700 19px/1.3 var(--serif); margin: 12px 0 6px; }
.empty p { margin: 0 0 16px; font-size: 14px; }
.empty .stamp { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--bubble); color: var(--gold); }
.loading { display: grid; place-items: center; padding: 60px 0; color: var(--muted); gap: 10px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line2); border-top-color: var(--navy); animation: spin .8s linear infinite; display: inline-block; }
.spinner.sm { width: 15px; height: 15px; border-width: 2px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade { animation: fadeUp .35s ease both; }

/* ── 댓글 (멘토의 답) ── */
.section-title { font: 700 16px/1.3 var(--serif); padding: 18px 18px 8px; }
.thread { padding: 0 14px; display: flex; flex-direction: column; gap: 4px; }
.cmt { display: flex; gap: 10px; padding: 10px 4px; }
.cmt.child { margin-left: 42px; padding-top: 4px; }
.cmt .body { flex: 1; min-width: 0; }
.cmt .name { font-size: 13.5px; font-weight: 650; }
.cmt .name small { font-weight: 450; color: var(--muted); margin-left: 4px; }
.cmt .text { margin-top: 2px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.cmt .row { display: flex; gap: 14px; margin-top: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; align-items: center; }
.cmt .row button, .cmt .row a { color: var(--muted); }
.kind { display: inline-block; font: 650 10.5px/1.5 var(--sans); letter-spacing: .03em; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.kind.empathy { background: #f9e3e1; color: #9b3a33; } .kind.experience { background: #e6eef9; color: #2b5287; }
.kind.question { background: #f6ecd6; color: #84601c; } .kind.another-view { background: #e5f0e6; color: #2f6a3f; }
.quote { margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--gold); background: var(--paper); border-radius: 0 10px 10px 0; font: italic 400 14.5px/1.55 var(--serif); color: var(--ink); }
.quote cite { display: block; margin-top: 6px; font: 500 11.5px/1.45 var(--sans); font-style: normal; color: var(--muted); }
.quote cite b { color: var(--gold); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 10px; margin-right: 4px; }
.typing { display: flex; gap: 8px; align-items: center; padding: 8px 18px; color: var(--muted); font-size: 13px; }
.dots3 { display: inline-flex; gap: 3px; }
.dots3 i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.dots3 i:nth-child(2) { animation-delay: .2s; } .dots3 i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* ── 아래 입력칸 ── */
.composer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(480px, 100%); z-index: 50; background: rgba(251, 248, 242, .97); border-top: 1px solid var(--line); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); backdrop-filter: blur(10px); }
.composer .to { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); padding: 0 6px 6px; }
.composer .row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; padding: 10px 14px; border-radius: 22px; border: 1px solid var(--line2); background: #fff; outline: none; line-height: 1.4; font-size: 15px; }
.composer textarea:focus { border-color: var(--navy); }
.send { width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.send[disabled] { opacity: .4; }
.send svg { width: 19px; height: 19px; }
.mic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); flex: none; }
.mic.on { background: #fde8e8; color: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(216, 70, 77, .35); } 50% { box-shadow: 0 0 0 8px rgba(216, 70, 77, 0); } }
body[data-view="post"] .main { padding-bottom: 150px; }

/* ── 바텀 탭 ── */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(480px, 100%); z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: rgba(251, 248, 242, .96); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); backdrop-filter: blur(12px); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--muted); position: relative; padding-top: 4px; }
.nav a.on { color: var(--navy); }
.nav a svg { width: 23px; height: 23px; }
.nav .plus { width: 54px; height: 54px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; margin-top: -26px; box-shadow: 0 8px 22px rgba(31, 56, 102, .35); border: 4px solid var(--bg); }
.nav .plus svg { width: 26px; height: 26px; stroke-width: 2.2; }
.nav .dot { top: 0; right: calc(50% - 16px); }
body[data-view="chat"] .nav, body[data-view="post"] .nav, body[data-view="welcome"] .nav, body[data-view="new"] .nav, body[data-view="focus"] .nav { display: none; }
body[data-view="focus"] .main { padding-bottom: 20px; }

/* ── 첫 화면 (Onboarding) ── */
.welcome { min-height: 100dvh; position: relative; color: #fff; background: #120f0c; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.welcome .collage { position: absolute; inset: 0 0 34% 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 0; }
.welcome .collage img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.35) saturate(.85) brightness(.85) contrast(1.05); }
.welcome .collage .big { grid-column: 2; grid-row: 1 / 3; }
.welcome::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 15, 12, .15) 0%, rgba(18, 15, 12, .35) 30%, rgba(18, 15, 12, .92) 62%, #120f0c 78%); pointer-events: none; }
.welcome .inner { position: relative; z-index: 2; padding: 0 26px calc(30px + env(safe-area-inset-bottom)); }
.welcome h1 { font: 700 54px/1 var(--serif); letter-spacing: -.02em; }
.welcome .lead { font: 400 20px/1.35 var(--serif); margin: 14px 0 22px; color: #f1e6d2; }
.welcome ul { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.welcome li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: #efe6d6; }
.welcome li i { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); display: grid; place-items: center; font-style: normal; }
.welcome li i svg { width: 16px; height: 16px; }
.welcome .btn-white { width: 100%; min-height: 52px; font-size: 16px; }
.welcome .sub { text-align: center; margin-top: 14px; font-size: 13.5px; color: #cbbfa9; }
.welcome .sub button { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.welcome .fine { text-align: center; margin-top: 16px; font-size: 11.5px; color: #9d917c; line-height: 1.5; }

/* ── 입장 · 나이 · 시트 ── */
.dw-gate { position: fixed; inset: 0; z-index: 200; background: #120f0c; color: #f3eadb; display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.gate-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.gate-card .logo { font-size: 38px; color: #fff; }
.gate-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #e1d5c0; }
.gate-card input { height: 48px; border-radius: 14px; border: 1px solid #4a4135; background: #1d1914; padding: 0 16px; color: #fff; outline: none; }
.gate-card .btn-cta { background: #fff; color: var(--ink); }
.gate-card .btn-ghost { background: transparent; color: #e9dfcd; border-color: #4a4135; }
.gate-card .tiny { color: #9d917c; }
.gate-card .faces { justify-content: center; }
.gate-card .faces > * { border-color: #120f0c; }
.gate-card .slogan { font: 400 22px/1.3 var(--serif); color: #f6ecd9; }
.overlay { position: fixed; inset: 0; z-index: 150; background: rgba(23, 20, 15, .48); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { position: relative; width: min(480px, 100%); max-height: 92dvh; overflow-y: auto; background: var(--paper); border-radius: 22px 22px 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: fadeUp .25s ease; }
.sheet h2 { font: 700 22px/1.25 var(--serif); padding-right: 30px; }
.sheet p { margin: 0; }
.sheet-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; font-size: 22px; color: var(--muted); }
.menu-sheet { gap: 8px; }
.gbtn { min-height: 46px; display: grid; place-items: center; }
.keep { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13.5px; color: var(--ink2); }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.fld em { font-style: normal; font-weight: 400; color: var(--muted); }
.fld input, .fld textarea, .fld select { border: 1px solid var(--line2); border-radius: 12px; background: #fff; padding: 11px 13px; font-size: 15px; font-weight: 400; outline: none; color: var(--ink); }
.fld textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.fld input:focus, .fld textarea:focus { border-color: var(--navy); }
.pf-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; }
.pf-card b { font: 700 18px/1.2 var(--serif); }
.pf-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.switch input { width: 44px; height: 26px; appearance: none; -webkit-appearance: none; background: var(--line2); border-radius: 999px; position: relative; transition: background .2s; flex: none; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--navy); }
.switch input:checked::after { transform: translateX(18px); }
.fb-stars { display: flex; gap: 6px; justify-content: center; }
.fb-stars button { font-size: 30px; color: var(--line2); }
.fb-stars button.on { color: #e3a73a; }
.sheet textarea#fbText { border: 1px solid var(--line2); border-radius: 12px; padding: 12px; background: #fff; outline: none; resize: vertical; }
.modal { position: fixed; inset: 0; z-index: 160; background: rgba(23, 20, 15, .48); display: flex; align-items: flex-end; justify-content: center; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 300; background: var(--deep); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; max-width: min(420px, calc(100% - 32px)); text-align: center; transition: .25s; pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 인터뷰 (AI Life Interview) · 1:1 대화 ── */
.chat { display: flex; flex-direction: column; min-height: 100dvh; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 10px 18px 12px; }
.chat-head h2 { font: 700 20px/1.2 var(--serif); }
.chat-head p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.progress { padding: 0 18px 10px; }
.progress .lbl { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--navy); }
.progress .lbl span:last-child { color: var(--muted); font-weight: 500; }
.progress .track { height: 4px; border-radius: 4px; background: var(--line); margin-top: 6px; overflow: hidden; }
.progress .track i { display: block; height: 100%; background: var(--navy); border-radius: 4px; transition: width .4s; }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 8px 14px 20px; }
.bub { max-width: 84%; padding: 11px 14px; border-radius: 18px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; animation: fadeUp .3s ease both; }
.bub.them { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-top-left-radius: 6px; }
.bub.me { align-self: flex-end; background: var(--blue-bg); color: #16294a; border-top-right-radius: 6px; }
.bub.skipped { align-self: flex-end; background: transparent; color: var(--faint); font-style: italic; padding: 2px 6px; }
.mrow { display: flex; gap: 8px; align-items: flex-end; align-self: flex-start; max-width: 92%; }
.mrow .bub { max-width: 100%; }
.mrow .stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mrow .quote { margin-top: 0; }
.chat-foot { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(245, 240, 230, 0), var(--bg) 22%); padding: 14px 12px calc(10px + env(safe-area-inset-bottom)); }
.bigmic { width: 62px; height: 62px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; margin: 0 auto 10px; box-shadow: 0 8px 22px rgba(43, 90, 163, .35); }
.bigmic svg { width: 28px; height: 28px; }
.bigmic.on { background: var(--red); animation: pulse 1.4s infinite; }
.inrow { display: flex; gap: 8px; align-items: flex-end; background: #fff; border: 1px solid var(--line2); border-radius: 26px; padding: 5px 5px 5px 14px; }
.inrow textarea { flex: 1; border: 0; outline: none; resize: none; background: transparent; min-height: 36px; max-height: 150px; padding: 8px 0; font-size: 15px; line-height: 1.4; }
.inrow .mic, .inrow .send { width: 38px; height: 38px; }
.foot-acts { display: flex; justify-content: center; gap: 16px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ctx { margin: 0 14px 8px; padding: 10px 12px; border-radius: 12px; background: var(--paper); border: 1px dashed var(--line2); font-size: 13px; color: var(--muted); }
.ending { text-align: center; padding: 30px 20px; color: var(--muted); }
.ending b { display: block; font: 700 18px/1.3 var(--serif); color: var(--ink); margin: 10px 0 4px; }

/* ── 내 이야기 (Interview Progress) ── */
.chapters { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; }
.chap { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; }
.chap .art { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, #e8d6b5, #c7a675); color: #5d4524; }
.chap .art svg { width: 26px; height: 26px; }
.chap .txt { flex: 1; min-width: 0; }
.chap b { display: block; font-size: 15px; }
.chap span { display: block; font-size: 12.5px; color: var(--muted); }
.chap .st { width: 26px; height: 26px; display: grid; place-items: center; flex: none; color: var(--faint); }
.chap .st svg { width: 20px; height: 20px; }
.chap.done .st { color: var(--green); }
.chap.next .st, .chap.started .st { color: var(--blue); }
.chap.locked { opacity: .72; }
.chap.locked .art { filter: grayscale(.5); }

/* ── 멘토 서클 ── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 10px; padding: 14px 16px; }
.mcell { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.mcell b { font-size: 13px; line-height: 1.2; }
.mcell span { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.mcell .add { width: 92px; height: 92px; border-radius: 50%; border: 1.5px dashed var(--line2); display: grid; place-items: center; color: var(--muted); background: var(--paper); }
.mcell .add svg { width: 30px; height: 30px; }

/* ── 멘토 프로필 ── */
.hero { position: relative; aspect-ratio: 4 / 4.2; max-height: 62dvh; overflow: hidden; background: #2a231b; color: #fff; }
.hero img.pic { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; filter: sepia(.28) saturate(.85) contrast(1.04); }
.hero .mono-big { position: absolute; inset: 0; display: grid; place-items: center; font: 700 96px/1 var(--serif); color: rgba(255, 245, 225, .5); background: linear-gradient(160deg, #5d4a33, #241c14); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 45%, rgba(18, 14, 10, .88) 100%); }
.hero .nav-row { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; z-index: 3; display: flex; justify-content: space-between; }
.hero .nav-row .icon-btn { color: #fff; background: rgba(0, 0, 0, .22); backdrop-filter: blur(6px); }
.hero .cap { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 2; }
.hero h1 { font: 700 34px/1.1 var(--serif); }
.hero .yrs { font-size: 15px; color: #eadcc4; margin-top: 4px; }
.hero .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.hero .tags span { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); font-size: 12px; font-weight: 550; backdrop-filter: blur(4px); }
.prose { padding: 4px 18px; }
.prose h3 { font: 700 16px/1.3 var(--serif); margin: 18px 0 8px; }
.prose p { margin: 0 0 10px; line-height: 1.65; }
.km { display: flex; flex-direction: column; }
.km .it { display: grid; grid-template-columns: 50px 14px 1fr; gap: 8px; position: relative; padding-bottom: 12px; }
.km .y { font-weight: 700; font-size: 13.5px; color: var(--navy); padding-top: 1px; }
.km .ln { position: relative; }
.km .ln::before { content: ''; position: absolute; left: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--card); border: 2px solid var(--navy); }
.km .ln::after { content: ''; position: absolute; left: 10px; top: 18px; bottom: -6px; width: 1.5px; background: var(--line2); }
.km .it:last-child .ln::after { display: none; }
.km .t b { display: block; font-size: 14.5px; line-height: 1.35; }
.km .t span { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.stage { border-left: 2px solid var(--line2); padding: 0 0 4px 14px; margin: 0 0 16px 4px; }
.stage .ag { font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: .04em; text-transform: uppercase; }
.stage b { display: block; font: 700 16px/1.3 var(--serif); margin: 2px 0 4px; }
.stage p { font-size: 14px; color: var(--ink2); margin: 0 0 6px; }
.why { display: flex; flex-direction: column; gap: 10px; }
.why .reason { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); line-height: 1.55; }
.par { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.par > div { background: var(--card); padding: 10px 12px; font-size: 13.5px; line-height: 1.45; }
.par small { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.diff { padding: 10px 14px; border-radius: 14px; background: var(--paper); border: 1px dashed var(--line2); font-size: 13.5px; color: var(--ink2); }
.principle { font-size: 12.5px; color: var(--muted); line-height: 1.55; padding: 10px 12px; border-radius: 12px; background: var(--bubble); }
.sticky-cta { position: sticky; bottom: 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(245, 240, 230, 0), var(--bg) 30%); display: flex; gap: 8px; z-index: 20; }
.sticky-cta .btn { flex: 1; }
body[data-view="mentor"] .main { padding-bottom: 20px; }
body[data-view="mentor"] .nav { display: none; }
.src { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.src a { color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; }

/* ── 새 멘토 · 첫 멘토 ── */
.found { padding: calc(10px + env(safe-area-inset-top)) 22px 30px; text-align: center; }
.found .head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.found .head h2 { font: 700 19px/1.2 var(--serif); }
.found .pic { width: 150px; height: 150px; margin: 18px auto 12px; }
.found h1 { font: 700 26px/1.2 var(--serif); }
.found .yrs { color: var(--muted); margin-top: 2px; }
.found .motto { font: italic 400 16px/1.45 var(--serif); color: var(--ink2); margin: 10px 18px 0; }
.found .box { text-align: left; margin: 20px 0 14px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.found .box h3 { font: 700 16px/1.3 var(--serif); margin-bottom: 6px; }
.found .box p { margin: 0 0 8px; line-height: 1.6; font-size: 14.5px; }
.pick { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line); text-align: left; width: 100%; }
.pick.on { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31, 56, 102, .08); }
.pick .txt { flex: 1; min-width: 0; }
.pick b { font: 700 17px/1.25 var(--serif); }
.pick .yrs { font-size: 12.5px; color: var(--muted); }
.pick p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink2); }
.pick .ck { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; flex: none; color: #fff; }
.pick.on .ck { background: var(--navy); border-color: var(--navy); }
.pick .ck svg { width: 15px; height: 15px; stroke-width: 2.6; }
.list { display: flex; flex-direction: column; gap: 10px; padding: 10px 14px; }
.mrow-l { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.mrow-l .txt { flex: 1; min-width: 0; }
.mrow-l b { display: block; font-size: 14.5px; }
.mrow-l span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { margin: 8px 18px 0; display: flex; gap: 8px; align-items: center; padding: 0 14px; height: 44px; border-radius: 14px; background: #fff; border: 1px solid var(--line2); color: var(--muted); }
.search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--ink); }

/* ── My Life ── */
.chart { position: relative; margin: 6px 14px 0; padding: 14px 6px 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.chart svg { width: 100%; height: auto; display: block; }
.chart .face { position: absolute; transform: translate(-50%, -50%); }
.chart .face .mav { border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.chart .axis { display: flex; justify-content: space-between; padding: 2px 10px 0; font-size: 11px; color: var(--muted); }
.themes { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px; }
.themes .tag { font-size: 13px; padding: 6px 12px; background: var(--card); border: 1px solid var(--line); }
.insight { margin: 0 14px 10px; padding: 14px; border-radius: 16px; background: var(--blue-bg); border: 1px solid #cad9ef; display: flex; gap: 12px; font-size: 14.5px; line-height: 1.55; color: #1c2f52; }
.insight .ic { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--blue); flex: none; }
.insight .ic svg { width: 19px; height: 19px; }
.rec { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; }
.rec .age { min-width: 42px; font-weight: 700; font-size: 12.5px; color: var(--navy); padding-top: 2px; }
.rec .txt { flex: 1; min-width: 0; }
.rec b { display: block; font-size: 14.5px; line-height: 1.35; }
.rec p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.rec .lock { color: var(--gold); }
.rec .lock svg { width: 16px; height: 16px; }
.rec-actions { display: flex; flex-direction: column; gap: 6px; }
.rv { padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.rv.gone { opacity: .45; }
.rv input:not([type=checkbox]), .rv textarea { width: 100%; border: 1px solid transparent; border-radius: 10px; padding: 6px 8px; margin: -6px -8px; background: transparent; outline: none; }
.rv input:not([type=checkbox]) { font-weight: 650; font-size: 15px; }
.rv textarea { font-size: 14px; color: var(--ink2); resize: none; line-height: 1.5; overflow: hidden; }
.rv input:not([type=checkbox]):focus, .rv textarea:focus { border-color: var(--line2); background: #fff; }
.rv .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }

/* ── 쓰기 ── */
.new-post { padding: 6px 18px; }
.new-post textarea { width: 100%; min-height: 200px; border: 0; outline: none; background: transparent; resize: none; font: 400 18px/1.55 var(--serif); padding: 6px 0; }
.prompts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px; }

/* ── 설정 · 안내 ── */
.menu-list { margin: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.menu-list > * { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; text-align: left; }
.menu-list > *:last-child { border-bottom: 0; }
.menu-list svg { width: 20px; height: 20px; color: var(--muted); }
.menu-list .danger { color: #a32a30; }
.menu-list select { margin-left: auto; border: 1px solid var(--line2); border-radius: 10px; padding: 6px 8px; background: #fff; }
.guide { padding: 6px 20px 30px; }
.guide h2 { font: 700 26px/1.2 var(--serif); margin: 8px 0 10px; }
.guide h3 { font: 700 17px/1.3 var(--serif); margin: 22px 0 6px; }
.guide p, .guide li { line-height: 1.65; color: var(--ink2); }
.guide ol, .guide ul { padding-left: 20px; }
.act-row { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.act-row.fresh { background: #fbf4e6; }
.act-row .txt { flex: 1; min-width: 0; font-size: 14px; }
.act-row .txt span { display: block; font-size: 12px; color: var(--muted); }

/* ── DearWorld 공통: 자매품 · 설치 팝업 ── */
.sister { width: 100%; min-width: 0; max-width: 100%; padding: 22px 0 6px; }
.sister-title { display: block; text-align: center; font: 600 9.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.sister-home { 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: 0 14px 4px; }
.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; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.sister-icon { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 22%; object-fit: contain; background: #e9e4d8; }
.sister-name { align-self: end; font: 600 13.5px/1.2 var(--sans); white-space: nowrap; }
.sister-tag { align-self: start; font: 400 11px/1.3 var(--sans); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dwi { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 140; display: flex; justify-content: center; padding: 0 12px 12px; pointer-events: none; animation: fadeUp .4s ease both; }
body[data-view="new"] .dwi, body[data-view="post"] .dwi, body[data-view="chat"] .dwi, body[data-view="welcome"] .dwi, body[data-view="mentor"] .dwi, body[data-view="focus"] .dwi { display: none; }
.dwi-card { pointer-events: auto; width: min(440px, 100%); background: var(--card); color: var(--ink); border: 1px solid var(--line2); border-radius: 18px; padding: 16px 16px 14px; box-shadow: 0 18px 50px rgba(40, 30, 10, .2); 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(--deep); color: #fff; font-weight: 650; }
.dwi-ghost { border: 1px solid var(--line2); color: var(--ink2); }
.dwi-more { font-size: 13.5px; color: var(--ink); }
.dwi-steps { margin: 0; padding-left: 20px; line-height: 1.9; list-style: decimal; }
.dwi-ico { display: inline-flex; vertical-align: -4px; padding: 2px 4px; border-radius: 6px; background: var(--bubble); color: var(--navy); }
.dwi-guide { margin: 0 0 8px; line-height: 1.6; }

@media (min-width: 520px) {
  body { padding: 0; }
  .shell { border-left: 1px solid #e2d9c8; border-right: 1px solid #e2d9c8; }
}
.loading p { margin: 0; text-align: center; padding: 0 32px; font-size: 14px; }
.post-head .who b .ai, .cmt .name .ai { display: inline-block; width: auto; color: var(--muted); font-size: 9.5px; }
.composer textarea, .inrow textarea { overflow-y: auto; scrollbar-width: none; }
.composer textarea::-webkit-scrollbar, .inrow textarea::-webkit-scrollbar { display: none; }

/* North Star — 직접 고른 한 명 */
.ns-wrap { position: relative; display: inline-block; }
.ns-badge { position: absolute; right: 2px; bottom: 2px; width: 28px; height: 28px; border-radius: 50%; background: #e8b04f; color: #fff; display: grid; place-items: center; border: 3px solid var(--bg); font-style: normal; }
.ns-badge svg { width: 14px; height: 14px; }
.mcell.ns span:last-child { color: var(--gold); font-weight: 650; }
.ns-note { margin: 14px 18px 0; padding: 12px 14px; border-radius: 14px; background: var(--gold-bg); border: 1px solid #ecd9b4; font-size: 13.5px; line-height: 1.55; color: var(--ink2); display: flex; gap: 8px; align-items: flex-start; }
.ns-note svg { width: 16px; height: 16px; color: var(--gold); flex: none; margin-top: 2px; }
