/* Conversation-first skin. Functional camera, payment and data styles stay in style.css. */
:root {
  color-scheme: light;
  --bg: #fcfcfb; --surface: #fff; --surface-2: #f0f1ee;
  --ink: #242525; --ink-2: #626660; --ink-3: #777c75; --line: #e6e8e2;
  --accent: #a85a3a; --accent-ink: #fff; --accent-soft: #f6eee8;
  --ai-bubble: transparent; --me-bubble: #f0f1ee; --me-ink: #242525;
  --cta: #272a27; --cta-ink: #fff; --shadow: none; --violet: #a85a3a; --cyan: #a85a3a;
}
body.app-shell { background: var(--bg); }
body.app-shell button, body.app-shell a, body.app-shell summary { -webkit-tap-highlight-color: transparent; }
body.app-shell :focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
body.app-shell button:disabled { cursor: default; opacity: .38; }
body.app-shell #splash { display: none; }
body.app-shell .top {
  height: calc(68px + env(safe-area-inset-top, 0px)); padding: calc(12px + env(safe-area-inset-top, 0px)) 24px 10px;
  align-items: center; background: var(--bg); border-bottom: 1px solid transparent; gap: 12px;
}
body.app-shell .top-left { display: flex; align-items: center; gap: 2px; }
body.app-shell .top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
body.app-shell .round-btn { min-width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; box-shadow: none; }
@media (hover: hover) { body.app-shell .round-btn:hover { background: var(--surface-2); } }
body.app-shell .round-btn:active { background: var(--surface-2); }
body.app-shell .round-btn svg { width: 20px; height: 20px; stroke-width: 1.6; }
body.app-shell .round-btn.pill { border: 1px solid var(--line); padding: 0 15px; height: 34px; font-size: 13px; border-radius: 20px; }
body.app-shell .persona { position: static; transform: none; display: block; margin-right: auto; }
body.app-shell .tag { display: flex; gap: 10px; align-items: baseline; padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; min-width: 0; }
body.app-shell .tag b { font-size: 24px; font-weight: 750; }
body.app-shell .tag span { font-size: 12px; max-width: 240px; text-overflow: ellipsis; overflow: hidden; }
body.app-shell .top-left .voice { order: 2; }
body.app-shell .voice[aria-pressed=true] { background: transparent; border: 0; }
body.app-shell #thread, body.app-shell.chat #thread {
  width: 100%; max-width: 752px; padding: calc(88px + env(safe-area-inset-top, 0px)) 24px calc(var(--composer-height, 148px) + var(--kb, 0px) + 32px);
  gap: 16px; margin: 0 auto; min-height: 100dvh;
}
body.app-shell .row { margin: 0; }
body.app-shell .row.ai .bubble,
body.app-shell.chat .row.ai:not(.wide):not(.typing) .bubble {
  max-width: 100%; width: 100%; padding: 4px 0; background: transparent; border: 0;
  box-shadow: none; border-radius: 0; font-size: 16px; line-height: 1.85;
}
body.app-shell .row.me { margin: 14px 0 8px; }
body.app-shell .row.me .bubble, body.app-shell.chat .row.me .bubble {
  max-width: 85%; padding: 11px 17px; background: var(--me-bubble); color: var(--ink);
  border-radius: 20px; font-size: 15px; line-height: 1.65; box-shadow: none;
}
body.app-shell .bubble p { margin: 0 0 14px; }
body.app-shell .bubble p:last-child { margin-bottom: 0; }
body.app-shell .bubble h3::before { display: none; }
body.app-shell .bubble h3 { font-size: 17px; margin: 24px 0 8px; }
body.app-shell .row.wide .bubble { flex: 1; overflow: visible; }
body.app-shell .row.typing .bubble { padding: 10px 0; }
body.app-shell .sys { background: transparent; border-radius: 0; font-size: 12px; color: var(--ink-3); }
body.app-shell .report-head { background: transparent; border: 0; padding: 12px 0 18px; }
body.app-shell .report-head h2 { font-size: 23px; letter-spacing: -.04em; }
body.app-shell .report-body { padding: 0; }
body.app-shell .report .src { margin-top: 14px; }
body.app-shell .report .src span { background: var(--surface-2); border: 0; color: var(--ink-2); }
body.app-shell .cover { color: var(--ink-2); }
body.app-shell .say-line { margin: 8px 0 0; padding: 0; border: 0; }
body.app-shell .say-btn { border: 0; background: transparent; color: var(--ink-3); }
body.app-shell .next-qs { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 24px; margin: 0; }
body.app-shell .next-h { width: 100%; margin: 0 0 2px; font-size: 12px; color: var(--ink-3); }
body.app-shell .next-q { display: inline-flex; gap: 10px; width: auto; min-height: 40px; border: 1px solid var(--line); border-radius: 20px; background: transparent; padding: 8px 14px; font-size: 13px; line-height: 1.45; }
body.app-shell .next-q svg { width: 14px; height: 14px; flex: none; }
body.app-shell .next-q:hover { background: var(--surface-2); border-color: #cdd1c9; }
body.app-shell .composer { padding: 10px 24px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
body.app-shell .composer::before { height: 30px; background: linear-gradient(transparent, var(--bg)); }
body.app-shell .composer > *, body.app-shell.chat .composer > * { max-width: 704px; }
body.app-shell .inputrow, body.app-shell.chat .inputrow {
  display: block; padding: 14px 14px 10px; border: 1px solid #dfe2db; border-radius: 24px;
  background: var(--surface); box-shadow: 0 2px 6px rgb(30 40 25 / .025);
}
body.app-shell .inputrow:focus-within { border-color: #b8beb3; box-shadow: 0 0 0 3px rgb(125 138 115 / .06); }
body.app-shell .composer.off .inputrow { display: none; }
body.app-shell #q { width: 100%; padding: 2px 6px 8px; min-height: 36px; font-size: 16px; line-height: 1.5; background: transparent; border: 0; outline: 0; }
body.app-shell #q::placeholder { color: #8a8f86; }
body.app-shell .composer-controls { display: flex; gap: 8px; align-items: center; }
body.app-shell .composer-context { font-size: 11px; color: var(--ink-3); margin-right: auto; }
body.app-shell .attach { width: 34px; height: 34px; padding: 0; background: transparent; border: 0; font-size: 26px; font-weight: 300; border-radius: 50%; }
body.app-shell .attach:hover { background: var(--surface-2); }
body.app-shell .mic { margin-left: auto; width: 34px; height: 34px; border: 0; background: transparent; }
body.app-shell .mic.on { background: #fae8e4; color: #ab3327; }
body.app-shell .send { width: 36px; height: 36px; min-width: 36px; padding: 0; margin-left: auto; border: 0; border-radius: 50%; background: var(--cta); color: #fff; box-shadow: none; }
body.app-shell .mic:not([hidden]) + .send { margin-left: 0; }
body.app-shell .send svg { width: 20px; height: 20px; stroke: currentColor; }
body.app-shell .hint { color: var(--ink-3); font-size: 11px; min-height: 18px; margin: 7px auto 0; }
body.app-shell .hint.bad { color: var(--bad); }
body.app-shell .chip { border: 1px solid var(--line); background: var(--surface); box-shadow: none; color: var(--ink); font-size: 14px; }
body.app-shell .chip.main { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
body.app-shell .new-answer { bottom: calc(var(--composer-height, 148px) + var(--kb, 0px) + 12px); background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: 0 3px 12px #0000000a; }
.welcome { width: 100%; max-width: 752px; margin: 0 auto; padding: max(135px, calc(25dvh)) 24px calc(var(--composer-height, 148px) + var(--kb, 0px) + 36px); }
.grain-mark { display: flex; gap: 5px; align-items: center; height: 30px; margin-bottom: 24px; }
.grain-mark i { width: 3px; height: 20px; border-radius: 3px; background: var(--accent); transform: rotate(24deg); }
/* 11-24 이름 '별에서 온 도사' — 빗금(결) 대신 삿갓 그림 */
.grain-mark img { width: 48px; height: 48px; display: block; margin-left: -4px; }
body.app-shell .tag b { display: flex; align-items: center; gap: 4px; }
.brand-hat { width: 24px; height: 24px; flex: none; margin-top: -3px; }
.grain-mark i:nth-child(2) { height: 29px; }.grain-mark i:nth-child(3) { height: 14px; }
.welcome h1 { font-size: clamp(30px, 4vw, 38px); line-height: 1.4; font-weight: 600; letter-spacing: -.055em; margin: 0 0 17px; }
.welcome-copy { font-size: 15px; color: var(--ink-2); line-height: 1.8; margin: 0; }
.starters { display: grid; gap: 3px; margin: 30px 0 20px; }
.starters button { display: flex; align-items: center; gap: 13px; background: transparent; border: 0; text-align: left; padding: 10px 0; font-size: 14px; color: var(--ink-2); border-radius: 8px; }
.starters button:hover { color: var(--ink); background: var(--surface-2); }
.starters button span { display: grid; place-items: center; width: 24px; font-size: 20px; color: #747b70; flex: none; }
.resume-chat { background: none; border: 0; color: var(--ink-3); font-size: 12px; padding: 10px 0; }
.resume-chat span { margin-left: 5px; }
#welcomeLogin { max-width: 360px; margin-top: 32px; }
#welcomeLogin:empty { display: none; }
body.app-shell #welcomeLogin .login { padding: 0; }
body.app-shell #welcomeLogin .fine { font-size: 11px; line-height: 1.7; color: var(--ink-3); }
body.app-shell .kakao { border-radius: 14px; }
body.app-shell .evidence, body.app-shell .ana { border: 1px solid var(--line); background: transparent; border-radius: 12px; padding: 0; font-size: 13px; }
body.app-shell .evidence > summary, body.app-shell .ana-head { padding: 12px 14px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
body.app-shell .evidence > summary { list-style: none; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.evidence > summary::-webkit-details-marker { display: none; }
.evidence > summary > span:last-child { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.evidence-dot { width: 6px; height: 6px; border-radius: 50%; background: #7f9175; }
body.app-shell .ana-head b { font-size: 13px; font-weight: 500; }
body.app-shell .ana .pct { font-size: 11px; color: var(--ink-3); }
body.app-shell .ana .steps { padding: 0 14px 14px; }
body.app-shell .ana .bar { margin: 0 14px 10px; height: 2px; }
body.app-shell .ana .bar i { background: #9aab8c; }
body.app-shell .finished .ana { border-color: transparent; }
body.app-shell .finished .ana-head { padding-left: 0; }
body.app-shell .finished .pct { display: none; }
body.app-shell .birth-form { max-width: 460px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 24px; }
body.app-shell .birth-form h3 { font-size: 18px; margin: 0 0 6px; }
body.app-shell .birth-note { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.calendar-tabs { display: flex; border: 0; padding: 4px; margin: 22px 0 18px; background: var(--surface-2); border-radius: 10px; }
.calendar-tabs label { position: relative; flex: 1; cursor: pointer; text-align: center; }
.calendar-tabs input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.calendar-tabs span { display: block; padding: 7px; font-size: 13px; border-radius: 7px; color: var(--ink-2); }
.calendar-tabs input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #0000000d; }
.calendar-tabs input:focus-visible + span { outline: 2px solid var(--accent); }
.birth-form .fld small { color: var(--ink-3); font-size: 11px; margin-left: 6px; font-weight: 400; }
.birth-form .fld { margin-bottom: 16px; }
.birth-form .unknown-time { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); margin: 6px 0 18px; }
.birth-form input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--cta); }
.birth-form input:disabled { background: var(--surface-2); opacity: .55; }
.birth-form .birth-error { font-size: 12px; color: var(--bad); line-height: 1.6; margin: 10px 0; }
.birth-form .btn { font-size: 14px; justify-content: space-between; border-radius: 12px; }
body.app-shell .sheet {
  top: 0; bottom: 0; right: auto; left: 0; margin: 0; width: min(320px, 88vw); max-height: 100dvh;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 0; background: var(--surface); box-shadow: 8px 0 40px #00000040; overflow-y: auto; animation: drawer-in .2s ease;
}
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
body.app-shell .sheet-bg, body.app-shell .panel-bg { background: rgb(25 30 22 / .2); backdrop-filter: blur(2px); }
body.app-shell.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; }
.drawer-head b { font-size: 25px; }.drawer-head small { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 8px; }
body.app-shell .sheet .drawer-head button { width: 40px; padding: 0; font-size: 26px; text-align: center; }
body.app-shell .sheet .drawer-label { margin: 22px 12px 8px; font-size: 11px; color: var(--ink-3); }
body.app-shell .sheet > button { padding: 11px 12px; border: 0; font-size: 14px; border-radius: 8px; min-height: 44px; }
body.app-shell .sheet > button:hover:not(:disabled) { background: var(--surface-2); }
body.app-shell .sheet > button.danger { margin-top: 16px; font-size: 12px; }
body.app-shell .panel { border-radius: 20px 20px 0 0; background: var(--bg); box-shadow: 0 8px 50px #00000012; overflow: hidden; }
body.app-shell .panel-top { background: var(--bg); }
body.app-shell .panel-top h2 { font-size: 17px; }
body.app-shell .fld input, body.app-shell .fld textarea, body.app-shell .fld select { background: var(--surface); border-radius: 10px; border: 1px solid var(--line); }
body.app-shell .p-item { background: transparent; border: 1px solid var(--line); box-shadow: none; border-radius: 12px; }
body.app-shell .p-search input { background: var(--surface-2); }
.profile-summary { text-align: center; padding: 12px 0 20px; }
.profile-initial { width: 52px; height: 52px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 19px; }
.profile-summary h3 { font-size: 18px; margin: 10px 0 4px; }.profile-summary p { font-size: 13px; color: var(--ink-2); margin: 0; }
.source-status { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-bottom: 24px; }
.source-status span { background: var(--surface-2); color: var(--ink-2); border-radius: 7px; padding: 4px 8px; font-size: 11px; }
body.app-shell .info-actions .p-item { display: flex; justify-content: space-between; width: 100%; margin: 8px 0; font-size: 14px; }
body.app-shell .today { background: transparent; box-shadow: none; border: 0; padding: 0; margin: 0; }
body.app-shell .td-line em { background: var(--surface-2); color: var(--ink-2); }
@media (min-width: 800px) { body.app-shell .panel { top: 70px; bottom: 40px; border-radius: 20px; } }
@media (min-width: 601px) and (max-height: 800px) {
  .welcome { padding-top: 100px; padding-bottom: calc(var(--composer-height, 148px) + var(--kb, 0px) + 20px); }
  .welcome .grain-mark { margin-bottom: 16px; }
  .welcome .starters { margin-top: 20px; margin-bottom: 12px; }
  .welcome .starters button span { font-size: 18px; line-height: 24px; }
}
@media (max-width: 600px) {
  body.app-shell .top { padding-left: 12px; padding-right: 12px; gap: 6px; }
  body.app-shell .top-left { gap: 0; }
  body.app-shell .top-left .voice { min-width: 32px; width: 32px; }
  body.app-shell .tag { gap: 6px; }
  body.app-shell .tag b { font-size: 23px; }
  body.app-shell .tag span { font-size: 10px; max-width: 92px; }
  body.app-shell .top-actions { gap: 2px; }
  body.app-shell .round-btn.pill { font-size: 12px; padding: 0 12px; }
  body.app-shell #thread, body.app-shell.chat #thread { padding-left: 20px; padding-right: 20px; }
  body.app-shell .composer { padding-left: 14px; padding-right: 14px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .welcome { padding-left: 28px; padding-right: 24px; padding-top: max(124px, 22dvh); }
  .welcome h1 { font-size: 31px; }
  .welcome-copy { font-size: 14px; }
  .starters button { font-size: 13px; }
  body.app-shell .birth-form { padding: 20px; }
  body.app-shell .row.me .bubble, body.app-shell.chat .row.me .bubble { max-width: 92%; }
}
@media (max-width: 370px) { .starters button { font-size: 12px; } }
/* 11-24 이름이 '별에서 온 도사'로 길어져 좁은 폰에선 위 막대 작은 글을 숨김(작업 중 표시는 입력창 위 막대가 맡음) */
@media (max-width: 440px) { body.app-shell .tag span { display: none; } body.app-shell .tag b { font-size: 21px; letter-spacing: -.02em; } }
@media (prefers-reduced-motion: reduce) { body.app-shell .sheet { animation: none; } }

/* 11-24 첫 페이지 소개(처음 온 사람만) */
.welcome.intro { padding-top: max(112px, 16dvh); }
.welcome.intro h1 { margin-bottom: 14px; }
.welcome.intro .welcome-copy { max-width: 520px; }
.pitch { margin-top: 30px; max-width: 620px; }
.pitch ol { list-style: none; margin: 0; padding: 0; }
.pitch-cards { display: grid; gap: 12px; }
.pitch-cards li, .pitch-sum { border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 16px; background: var(--surface); }
.pitch .pk { display: block; font-size: 12px; letter-spacing: .02em; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.pitch-cards b, .pitch-sum b { display: block; font-size: 17px; line-height: 1.45; font-weight: 650; letter-spacing: -.03em; color: var(--ink); }
.pitch-cards p, .pitch-sum p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.pitch-sum { margin-top: 12px; background: var(--accent-soft); border-color: transparent; }
.pitch-steps { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px !important; font-size: 13px; color: var(--ink-2); }
.pitch-steps li { display: flex; align-items: center; gap: 7px; }
.pitch-steps i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--cta); color: var(--cta-ink); font-style: normal; font-size: 11px; font-weight: 600; }
.pitch-steps em { font-style: normal; color: var(--accent); font-weight: 650; margin-left: 2px; }
.welcome.intro #welcomeLogin { margin-top: 22px; }
@media (min-width: 720px) {
  .pitch-cards { grid-template-columns: repeat(3, 1fr); }
  .pitch { max-width: 704px; }
}
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 26px; }
.hero-cta .btn { min-width: 220px; }
.hero-cta small { font-size: 12px; color: var(--ink-3); }
@media (max-width: 560px) { .welcome.intro { padding-top: 92px; } .welcome.intro h1 { font-size: 20px; } .pitch { margin-top: 22px; } .hero-cta .btn { width: 100%; } }
.pitch-note { margin-top: 22px; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); }
.pitch-note b { display: block; font-size: 14px; font-weight: 650; color: var(--ink); }
.pitch-note p { margin: 6px 0 10px; font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.pitch-note ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pitch-note li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.pitch-note li b { display: inline; font-size: 13px; }
/* 11-24 첫 풀이 마무리 점검 안내 */
.checking { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }
.checking .dots { display: inline-flex; gap: 4px; }
.checking .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: chk 1.2s infinite ease-in-out; }
.checking .dots i:nth-child(2) { animation-delay: .15s; } .checking .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chk { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .checking .dots i { animation: none; } }
/* 11-24 소유자 "이쪽 칸 조정": 긴 상품 이름에서 '추천'이 세로로 깨지던 것 — 이름은 글처럼 줄바꿈, 꼬리표·가격은 안 쪼개짐 */
.pack .pk-n { display: block; line-height: 1.45; word-break: keep-all; }
.pack .pk-n em { display: inline-block; white-space: nowrap; vertical-align: 2px; margin-left: 6px; line-height: 1.6; }
.pack .pk-p { white-space: nowrap; }
.pack small { word-break: keep-all; line-height: 1.5; }
/* 11-24 입력창 위 '풀이 중' 줄 */
.work-bar { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 auto 8px; padding: 8px 14px; max-width: 100%; width: fit-content; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 550; line-height: 1.4; text-align: center; word-break: keep-all; }
.work-bar[hidden] { display: none; }
.work-bar .dots { display: inline-flex; gap: 4px; flex: none; }
.work-bar .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: chk 1.2s infinite ease-in-out; }
.work-bar .dots i:nth-child(2) { animation-delay: .15s; } .work-bar .dots i:nth-child(3) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .work-bar .dots i { animation: none; } }
/* 11-24 스캔 기록 */
.photo.scanned { background: #0b1a26; width: 220px; }
.photo .scan-img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: contain; }
.photo.scanned figcaption { padding: 7px 10px 8px; font-size: 11.5px; color: #cfeeff; background: #0b1a26; }
.report .scans { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; padding-bottom: 2px; }
.report .scans figure { margin: 0; flex: none; width: 92px; border-radius: 12px; overflow: hidden; background: #0b1a26; }
.report .scans img { display: block; width: 100%; height: 112px; object-fit: cover; }
.report .scans figcaption { font-size: 11px; color: #cfeeff; padding: 4px 8px 6px; }

/* 11-24 세 단계: 가볍게 답 아래 '깊게 보기' 버튼 */
.deep-cta { margin: 6px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); max-width: 520px; }
.deep-cta.hot { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.deep-hint { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--accent); }
.deep-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font: inherit; cursor: pointer; }
.deep-btn b { font-size: 15px; font-weight: 700; }
.deep-btn span { font-size: 13px; opacity: .85; white-space: nowrap; }
.deep-cta small { display: block; margin-top: 8px; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
/* 감정서: 스캔 기록 · 달력 · 공유 카드 */
.report-scans { margin: 4px 0 14px; }
.report-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.report-tools .btn { flex: 1 1 160px; }
.cal-legend { display: flex; gap: 14px; margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.cal-legend .good, .cal-g i.good { color: var(--accent); }
.cal-legend .care, .cal-g i.care { color: #3a63b8; }
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 12px; }
.cal-m h4 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.cal-m h4 em { font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 8px; }
.cal-best { background: var(--accent-soft); color: var(--accent); }
.cal-care { background: #e8eefb; color: #3a63b8; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: 11px; text-align: center; }
.cal-g b { font-weight: 600; color: var(--ink-3); font-size: 10px; }
.cal-g i { font-style: normal; padding: 3px 0; border-radius: 6px; color: var(--ink-2); }
.cal-g i.good { background: var(--accent-soft); font-weight: 700; }
.cal-g i.care { background: #e8eefb; font-weight: 700; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }

/* ───── 11-24 월하당 밤 테마: 달빛 남색 + 붉은 실 ───── */
:root {
  color-scheme: dark;
  --bg: #0d1020; --surface: #151a2e; --surface-2: #1d2340;
  --ink: #f2ede3; --ink-2: #c6c1b5; --ink-3: #8f8b84; --line: #2a3050;
  --accent: #e0645a; --accent-ink: #fff; --accent-soft: #2c1c27;
  --ai-bubble: transparent; --me-bubble: #232a4a; --me-ink: #f2ede3;
  --cta: #d9574b; --cta-ink: #fff; --violet: #e0645a; --cyan: #e0645a;
}
body.app-shell {
  background: linear-gradient(180deg, rgba(13, 16, 32, .9), rgba(13, 16, 32, .97)), url('/media/bg-room.jpg') center top / cover no-repeat fixed, var(--bg);
}
@supports (-webkit-touch-callout: none) { body.app-shell { background-attachment: scroll; } }
body.app-shell .top, body.app-shell .composer { background: rgba(13, 16, 32, .92); }
.deep-btn { background: var(--cta); color: #fff; }
.deep-cta.hot { background: rgba(224, 100, 90, .08); }
.cal-care { background: rgba(90, 130, 220, .18); color: #9db8f5; }
.cal-g i.care { background: rgba(90, 130, 220, .18); }
.cal-legend .care, .cal-g i.care { color: #9db8f5; }
/* 상담가 고르기 카드 */
.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.persona-card { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.persona-card .pc-media { width: 100%; aspect-ratio: 9 / 14; object-fit: cover; display: block; background: #000; }
.persona-card .pc-body { display: flex; flex-direction: column; gap: 3px; padding: 9px 9px 11px; }
.persona-card b { font-size: 15px; }
.persona-card em { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 600; }
.persona-card small { font-size: 11px; color: var(--ink-2); line-height: 1.45; }
.persona-card .pc-fit { color: var(--ink-3); }
.persona-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(224, 100, 90, .35); }
.persona-card:disabled:not(.on) { opacity: .45; }
.ai-mark { font-size: 11px; color: var(--ink-3); margin: 8px 0 0; }
/* 답 쓰는 동안 상담가 영상 */
.fwait.vwait { display: flex; align-items: center; gap: 12px; }
.fwait.vwait .fw-media { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: center 30%; border: 2px solid rgba(224, 100, 90, .5); box-shadow: 0 0 18px rgba(224, 100, 90, .25); }
.env-wait { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.env-wait .env-media { width: min(260px, 70vw); aspect-ratio: 9 / 12; object-fit: cover; border-radius: 16px; }
/* 첫 페이지 오프닝 */
.welcome .opening { margin: 0 0 22px; }
.welcome .opening .op-media { width: 100%; max-height: 44vh; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 18px; display: block; background: #000; }
.welcome .opening .ai-mark { text-align: right; }
.welcome.intro .grain-mark { display: none; }
/* 11-24: 메뉴는 늘 눌리고, 아직 못 쓰는 건 살짝만 흐리게 + 누르면 아래 안내 */
body.app-shell .sheet > button.locked { color: var(--ink-2); }
.menu-toast { position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); max-width: min(340px, 88vw); padding: 11px 16px; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-size: 13px; line-height: 1.5; box-shadow: 0 6px 24px #00000055; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 1000; text-align: center; }
.menu-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ───── 11-24 메신저 모드(상담가를 고른 뒤): 왼쪽 프로필·이름·말풍선, 오른쪽 내 말풍선(카톡 느낌) ───── */
body.app-shell.msgr #thread, body.app-shell.chat.msgr #thread { gap: 12px; padding-left: 14px; padding-right: 14px; }
body.msgr .row.msg.ai { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 9px; }
body.msgr .row.msg.ai .ava { flex: none; width: 40px; height: 40px; border-radius: 15px; object-fit: cover; box-shadow: 0 0 0 1px rgb(255 255 255 / .08); }
body.msgr .row.msg.ai .mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
body.msgr .row.msg .who { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 1px 0 5px 2px; }
body.msgr .row.msg .mline { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
body.msgr .row.msg .tm { flex: none; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; padding-bottom: 2px; }
body.app-shell.msgr .row.msg.ai .bubble, body.app-shell.chat.msgr .row.msg.ai:not(.wide):not(.typing) .bubble {
  width: auto; max-width: min(560px, calc(100vw - 120px)); padding: 10px 14px; background: #1f2747; color: var(--ink);
  border-radius: 4px 18px 18px 18px; font-size: 15px; line-height: 1.68; box-shadow: 0 1px 0 rgb(0 0 0 / .25);
}
body.msgr .row.msg.ai .bubble h3 { font-size: 15.5px; margin: 14px 0 6px; }
body.msgr .row.msg.ai .bubble p { margin: 0 0 10px; }
body.msgr .row.msg.ai .bubble p:last-child { margin-bottom: 0; }
body.msgr .row.msg.ai.cont { margin-top: -6px; }
body.msgr .row.msg.ai.cont .ava { visibility: hidden; height: 0; }
body.msgr .row.msg.ai.cont .who { display: none; }
body.app-shell.msgr .row.msg.ai.cont .bubble { border-radius: 18px; }
body.msgr .row.msg.me { justify-content: flex-end; margin: 4px 0; }
body.app-shell.msgr .row.msg.me .bubble, body.app-shell.chat.msgr .row.msg.me .bubble {
  max-width: min(78vw, 520px); padding: 9px 14px; background: #fee500; color: #191919; border-radius: 18px 4px 18px 18px; font-size: 15px; line-height: 1.6;
}
body.msgr .row.msg.ai:has(+ .row.msg.ai.cont) .tm, body.msgr .row.msg.me:has(+ .row.msg.me) .tm { visibility: hidden; }
body.msgr .row.msg.typing .bubble { padding: 12px 16px; }
body.msgr .row.msg .say-line { margin: 4px 0 0 2px; }
body.msgr #thread > .next-qs, body.msgr #thread > .deep-cta { margin-left: 49px; }
/* 위 막대: 고른 상담가 얼굴·이름(카톡 대화방 제목처럼) */
body.app-shell .tag b .hdr-ava { width: 28px; height: 28px; border-radius: 10px; object-fit: cover; vertical-align: -6px; margin-right: 8px; }
body.msgr .tag b { font-size: 19px; }

/* 답을 쓰는 동안: 프로필 사진 자리에서 영상 창이 커지며 나와 점을 봄 */
body.app-shell.msgr .row.msg.fw .bubble { padding: 6px; background: #1f2747; border-radius: 4px 18px 18px 18px; }
body.msgr .fwait.vwait { flex-direction: column; align-items: stretch; gap: 6px; }
body.msgr .fwait.vwait .fw-media { width: min(220px, 56vw); height: auto; aspect-ratio: 9 / 13; border-radius: 14px; border: 0; object-fit: cover; object-position: center 35%; box-shadow: none; }
body.msgr .fwait.vwait .fw-cap { font-size: 12.5px; color: var(--ink-2); padding: 0 6px 4px; }
@keyframes emerge {
  0% { transform: translate(-46px, -22px) scale(.16); border-radius: 50%; opacity: .2; filter: blur(3px) brightness(1.6); }
  55% { opacity: 1; filter: blur(0) brightness(1.25); }
  100% { transform: none; border-radius: 14px; opacity: 1; filter: none; }
}
body.msgr .fwait.emerge { transform-origin: top left; animation: emerge .85s cubic-bezier(.2, .9, .25, 1.15) both; }
body.msgr .row.msg.fw .ava { animation: ava-glow 1.6s ease-in-out infinite; }
@keyframes ava-glow { 50% { box-shadow: 0 0 0 2px rgb(224 100 90 / .7), 0 0 16px rgb(224 100 90 / .45); } }
@media (prefers-reduced-motion: reduce) { body.msgr .fwait.emerge, body.msgr .row.msg.fw .ava { animation: none; } }

/* 11-24 소유자 "채팅창이 너무 크다 — 카카오톡 크기로": 한 줄 입력칸 + 오른쪽 작은 보내기 버튼 */
body.app-shell .composer, body.app-shell.chat .composer { padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)); }
body.app-shell .inputrow, body.app-shell.chat .inputrow {
  display: flex; align-items: flex-end; gap: 4px; padding: 4px 4px 4px 14px; min-height: 42px; border-radius: 21px; border-color: var(--line);
}
body.app-shell #q { flex: 1; min-width: 0; min-height: 34px; padding: 7px 0 6px; font-size: 15px; line-height: 1.4; }
body.app-shell .composer-controls { flex: none; gap: 2px; }
body.app-shell .composer-context { display: none; }
body.app-shell .attach { width: 32px; height: 32px; font-size: 22px; order: -1; }
body.app-shell .inputrow > .composer-controls > .attach:not([hidden]) { margin-right: 2px; }
body.app-shell .mic { width: 32px; height: 32px; }
body.app-shell .mic svg { width: 19px; height: 19px; }
body.app-shell .send { width: 34px; height: 34px; min-width: 34px; }
body.app-shell .send svg { width: 18px; height: 18px; }
body.app-shell .hint { min-height: 0; margin: 3px auto 0; }
body.app-shell .hint:empty { display: none; }

/* 11-24 카톡 프로필 보기: 프로필 사진·위 막대 이름을 누르면 큰 셀카와 소개 */
body.msgr .row.msg.ai .ava, body.msgr .top .tag { cursor: pointer; }
.pview { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; justify-content: flex-end; background: #0b0e1a; color: #fff; animation: pv-in .22s ease both; overflow-y: auto; }
.pview.out { animation: pv-out .18s ease both; }
@keyframes pv-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pv-out { to { opacity: 0; transform: translateY(16px); } }
.pview .pv-bg { position: fixed; inset: 0; background-size: cover; background-position: center; filter: blur(18px) brightness(.45); transform: scale(1.15); }
.pview .pv-x { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(0 0 0 / .3); color: #fff; font-size: 28px; line-height: 1; z-index: 2; cursor: pointer; }
.pview .pv-body { position: relative; z-index: 1; padding: 80px 24px calc(28px + env(safe-area-inset-bottom, 0px)); text-align: center; max-width: 480px; width: 100%; margin: 0 auto; }
.pview .pv-photo { width: min(220px, 58vw); aspect-ratio: 1; object-fit: cover; border-radius: 38%; box-shadow: 0 10px 40px rgb(0 0 0 / .5); }
.pview h2 { margin: 18px 0 6px; font-size: 22px; font-weight: 700; }
.pview .pv-status { margin: 0 auto 22px; max-width: 320px; font-size: 14px; line-height: 1.55; color: rgb(255 255 255 / .82); }
.pview .pv-info { margin: 0 0 22px; padding: 14px 16px; border-radius: 16px; background: rgb(255 255 255 / .08); text-align: left; display: grid; gap: 10px; }
.pview .pv-info div { display: flex; gap: 12px; font-size: 14px; line-height: 1.5; }
.pview .pv-info dt { flex: none; width: 70px; color: rgb(255 255 255 / .55); }
.pview .pv-info dd { margin: 0; color: #fff; }
.pview .pv-acts { display: flex; gap: 10px; justify-content: center; border-top: 1px solid rgb(255 255 255 / .12); padding-top: 18px; }
.pview .pv-acts button { flex: 1; max-width: 160px; min-height: 46px; border-radius: 14px; border: 0; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.pview .pv-chat { background: #fee500; color: #191919; }
.pview .pv-change { background: rgb(255 255 255 / .14); color: #fff; }

/* 11-24 소유자 "영상 비율은 유지, 글씨는 좀 작게, 월하당 옆에 한자": 오프닝은 9:16 그대로(잘라내지 않음), 첫 화면 제목·설명 작게 */
.welcome .opening .op-media { width: auto; height: min(58vh, calc((100vw - 48px) * 16 / 9), 640px); max-height: none; aspect-ratio: 9 / 16; object-fit: contain; margin: 0 auto; }
.welcome h1 { font-size: clamp(22px, 3vw, 28px); line-height: 1.42; margin-bottom: 12px; }
.welcome-copy { font-size: 13.5px; line-height: 1.75; }
@media (max-width: 560px) { .welcome h1 { font-size: 23px; } .welcome-copy { font-size: 13px; } }
body.app-shell .tag b .brand-hanja { font-size: .58em; font-weight: 500; color: var(--ink-2); margin-left: 4px; letter-spacing: .02em; }
/* 11-24 소유자 "영상 좌우 공백 — 비율 조정, 아래 글씨 더 작게, 한자는 월하당과 같은 크기" */
.welcome .opening .op-media { width: 100%; height: auto; max-height: 64vh; aspect-ratio: 2 / 3; object-fit: cover; object-position: center 45%; }
.welcome h1 { font-size: clamp(19px, 2.6vw, 24px); }
.welcome-copy { font-size: 12.5px; }
@media (max-width: 560px) { .welcome h1 { font-size: 20px; } .welcome-copy { font-size: 12.5px; } }
body.app-shell .tag b .brand-hanja { font-size: 1em; font-weight: inherit; color: inherit; margin-left: 2px; letter-spacing: 0; }
.welcome.intro h1 { font-size: clamp(19px, 2.6vw, 24px); }
@media (max-width: 560px) { .welcome.intro h1 { font-size: 20px; } }
/* 11-24 소유자 "무료로 내 운세 보기가 스크롤 안 하고도 보여야 함": 첫 화면 영상 높이를 화면 높이에 맞춰 줄여 버튼까지 한 화면에 */
@media (max-width: 560px) { .welcome.intro { padding-top: calc(64px + env(safe-area-inset-top, 0px)); } }
.welcome.intro .opening { margin-bottom: 14px; }
.welcome.intro .opening .op-media { max-height: max(200px, calc(100svh - 360px)); }
.welcome.intro .opening .op-media { object-position: center 22%; }
/* 11-24: 첫 화면 영상 높이는 app.js fitOpening 이 정함(버튼이 첫 화면 맨 아래), 잘리는 위치도 시간에 따라 옮김 */
.welcome.intro .opening .op-media { width: 100%; max-height: none; aspect-ratio: auto; object-fit: cover; object-position: center 0%; }
.welcome.intro .intro-copy { margin: 18px 0 0; }
.welcome.intro .hero-cta small { display: block; }

/* 11-25 누끼 캐릭터: 네모 화면 없이 프로필 사진 자리에서 캐릭터만 튀어나와 채팅방에서 점을 봄 */
body.app-shell.msgr .row.msg.nk .bubble { background: transparent !important; box-shadow: none !important; padding: 0 !important; }
body.msgr .nukki { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
body.msgr .nukki .nk-canvas { width: min(200px, 52vw); height: auto; aspect-ratio: 3 / 4; -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); filter: drop-shadow(0 8px 18px rgb(0 0 0 / .45)); transform-origin: 0 0; animation: nk-out .9s cubic-bezier(.2, .9, .25, 1.15) both; }
body.msgr .nukki .fw-cap { font-size: 12.5px; color: var(--ink-2); padding-left: 6px; }
@keyframes nk-out {
  0% { transform: translate(-46px, -26px) scale(.18); opacity: 0; filter: blur(4px) brightness(1.8); }
  50% { opacity: 1; }
  100% { transform: none; opacity: 1; filter: drop-shadow(0 8px 18px rgb(0 0 0 / .45)); }
}
@media (prefers-reduced-motion: reduce) { body.msgr .nukki .nk-canvas { animation: none; } }
/* 11-25 아래 칸: 두 줄(하는 일 / 기다려 달라는 말) */
.work-bar .work-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 1px; }
.work-bar .work-text b { font-weight: 600; font-size: 13px; }
.work-bar .work-text small { font-size: 11.5px; font-weight: 450; opacity: .8; }
.work-bar { border-radius: 16px; }

/* 11-25 답을 쓰는 동안 보내기 버튼 = 멈춤(■) */
body.app-shell .send.stop { background: var(--ink, #e8e8f0); color: var(--bg, #0d1020); opacity: 1; }
body.app-shell .send.stop svg { width: 14px; height: 14px; }

/* 11-25 소유자 "누끼 딴 영상은 채팅방 전체를 덮어야 함": 위 막대(z 10)·입력칸(z 8) 아래, 대화 위를 가득 채우는 무대 */
.nk-stage { position: fixed; inset: 0; z-index: 7; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgb(11 14 26 / .35), rgb(11 14 26 / .82) 75%);
  transform-origin: var(--ox, 40px) var(--oy, 60%); animation: nk-stage-in .75s cubic-bezier(.2, .9, .25, 1.08) both; }
.nk-stage .nk-canvas { position: absolute; left: 0; right: 0; top: calc(60px + env(safe-area-inset-top, 0px));
  width: 100%; height: calc(100% - 124px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - var(--kb, 0px)); object-fit: cover; object-position: 50% 30%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 84%, transparent); mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 84%, transparent); }
.nk-stage.nk-off { animation: nk-stage-out .25s ease forwards; }
@keyframes nk-stage-in { 0% { transform: scale(.06); opacity: 0; filter: blur(6px) brightness(1.8); } 45% { opacity: 1; } 100% { transform: none; opacity: 1; filter: none; } }
@keyframes nk-stage-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nk-stage { animation: none; } }
body.msgr .row.nk .nukki { min-height: 20px; }
