/* 심야사주식당 디자인 시스템 v3 — 어두운 이자카야 (기본이 다크)
 * 원칙: 따뜻한 근흑(近黑) 바탕 + 등불 앰버 1색 + 남색 보조, 종이색 잉크, 낮은 그림자.
 * 라이트는 data-theme="light"를 명시할 때만 (예전 v2 팔레트).
 */
:root {
  --bg: #13141B;
  --surface: #1B1C25;
  --surface-2: #24252F;
  --ink: #EFE7D8;
  --ink-soft: #C4BBAA;
  --ink-mute: #8C857A;
  --line: #2F3040;
  --primary: #F2B45C;
  --primary-deep: #FFC97A;
  --pink: #F2B45C;
  --pink-deep: #FFC97A;
  --pink-tint: #3A2E1C;
  --blue: #8FB0FF;
  --blue-tint: #222A44;
  --ok: #8FBF8A; --ok-tint: #1E2E22;
  --warn: #FFC46B; --warn-tint: #38301C;
  --bad: #E07A6B; --bad-tint: #3A2226;
  --on-pink: #1A1410;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 10px 28px rgba(0, 0, 0, .38);
  color-scheme: dark;
}
:root[data-theme="dark"] {
  --bg: #13141B; --surface: #1B1C25; --surface-2: #24252F;
  --ink: #EFE7D8; --ink-soft: #C4BBAA; --ink-mute: #8C857A; --line: #2F3040;
  --primary: #F2B45C; --primary-deep: #FFC97A;
  --pink: #F2B45C; --pink-deep: #FFC97A; --pink-tint: #3A2E1C;
  --blue: #8FB0FF; --blue-tint: #222A44;
  --ok: #8FBF8A; --ok-tint: #1E2E22;
  --warn: #FFC46B; --warn-tint: #38301C;
  --bad: #E07A6B; --bad-tint: #3A2226;
  --on-pink: #1A1410;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 10px 28px rgba(0, 0, 0, .38);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F9F6F0; --surface: #FFFFFF; --surface-2: #F1EDE4;
  --ink: #1D1C24; --ink-soft: #4D4A55; --ink-mute: #857F76; --line: #E3DDD0;
  --primary: #B8771A; --primary-deep: #8F5A10;
  --pink: #B8771A; --pink-deep: #8F5A10; --pink-tint: #FBEFD9;
  --blue: #3182F6; --blue-tint: #EAF2FE;
  --ok: #3D7A3A; --ok-tint: #E7F3E6;
  --warn: #96660A; --warn-tint: #FFF3D6;
  --bad: #B6432F; --bad-tint: #FDECEE;
  --on-pink: #FFFFFF;
  --shadow-1: 0 1px 2px rgba(25, 31, 40, .04);
  --shadow-2: 0 6px 20px rgba(25, 31, 40, .06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  background: var(--bg); color: var(--ink); margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  font-size: 15.5px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
.disp { font-weight: 800; letter-spacing: -0.02em; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 640px; }

/* ---------- 상단 알림/내비 ---------- */
.proto {
  background: var(--surface-2); color: var(--ink-soft); text-align: center;
  font-size: .78rem; padding: 7px 12px; font-weight: 500;
}
nav.top { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
nav.top .wrap { display: flex; align-items: center; gap: 18px; height: 56px; }
.logo { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo .dot { color: var(--primary); }
nav.top .links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
nav.top .links a.navlink {
  color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 600;
  padding: 7px 10px; border-radius: 8px;
}
nav.top .links a.navlink:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 760px) { nav.top .links a.navlink { display: none; } }

/* ---------- 햄버거 메뉴 ---------- */
.navtoggle {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  width: 36px; height: 36px; background: none; border: none; cursor: pointer; padding: 0; flex: none;
}
.navtoggle span { display: block; width: 19px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .18s, opacity .18s; }
.navtoggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navtoggle.open span:nth-child(2) { opacity: 0; }
.navtoggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.navpanel-overlay {
  position: fixed; inset: 0; background: rgba(20, 20, 26, .38); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .16s;
}
.navpanel-overlay.open { opacity: 1; pointer-events: auto; }
.navpanel {
  position: fixed; top: 0; right: 0; height: 100%; width: min(320px, 86vw);
  background: var(--surface); z-index: 91; box-shadow: -10px 0 28px rgba(0,0,0,.14);
  transform: translateX(100%); transition: transform .2s ease; overflow-y: auto;
  padding: 18px 20px 32px;
}
.navpanel.open { transform: translateX(0); }
.navpanel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.navpanel-head b { font-size: 1.05rem; }
.navpanel-close { background: none; border: none; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--ink-mute); padding: 6px; }
.navgroup { margin-bottom: 22px; }
.navgroup h4 { font-size: .74rem; letter-spacing: .04em; color: var(--ink-mute); text-transform: uppercase; margin: 0 0 6px; font-weight: 700; }
.navgroup a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 4px; color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.navgroup a:last-child { border-bottom: none; }
.navgroup a .tag { font-size: .72rem; color: var(--primary); font-weight: 700; flex: none; }
body.navopen { overflow: hidden; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary); color: var(--on-pink);
  border-radius: 12px; padding: 13px 20px; font-weight: 700; font-size: .95rem;
  text-decoration: none; border: none; cursor: pointer; font-family: inherit;
  transition: background .15s, transform .06s;
  letter-spacing: -0.01em;
}
.btn:hover { background: var(--primary-deep); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.ghost:hover { background: var(--line); }
.btn.small { padding: 9px 14px; font-size: .85rem; border-radius: 10px; }
.btn.big { padding: 15px 24px; font-size: 1rem; }
.btn.full { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; cursor: default; }
a:focus-visible, .btn:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, label:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- 히어로/섹션 ---------- */
.hero { padding: clamp(44px, 8vw, 88px) 0 clamp(32px, 5vw, 56px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; line-height: 1.28; margin: 0 0 14px; letter-spacing: -0.03em; text-wrap: balance; }
.hero h1 .pk { color: var(--primary); }
.hero p.sub { color: var(--ink-soft); font-size: 1.02rem; max-width: 46ch; margin: 0 0 24px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 10px; }

section.sec { padding: clamp(48px, 7vw, 84px) 0 0; }
.eyebrow { font-size: .78rem; letter-spacing: .02em; color: var(--primary); font-weight: 700; margin-bottom: 8px; }
h2.st { font-size: clamp(1.45rem, 3.6vw, 2rem); font-weight: 800; line-height: 1.3; margin: 0 0 12px; letter-spacing: -0.02em; text-wrap: balance; }
p.lead { color: var(--ink-soft); max-width: 62ch; margin: 0 0 24px; }

/* ---------- 카드/목업 ---------- */
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-2); padding: 20px; max-width: 400px; margin-left: auto; }
@media (max-width: 820px) { .mock { margin: 0 auto; } }
.mock .mh { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; color: var(--ink-mute); margin-bottom: 12px; }
.mock .mh .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.bubble { background: var(--pink-tint); border-radius: 16px 16px 16px 4px; padding: 14px 16px; font-size: .93rem; line-height: 1.65; margin-bottom: 10px; }
.bubble.alt { border-radius: 16px 16px 4px 16px; background: var(--surface-2); }
.bubble b { color: var(--primary); }
.bubble b { color: var(--primary); }
.datum { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: .8rem; color: var(--ink-soft); line-height: 1.6; }
.datum b { color: var(--blue); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { display: inline-block; font-size: .74rem; font-weight: 700; border-radius: 8px; padding: 4px 10px; background: var(--blue-tint); color: var(--blue); white-space: nowrap; }
.chip.pink { background: var(--pink-tint); color: var(--primary); }
.chip.gray { background: var(--surface-2); color: var(--ink-soft); }

.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); margin-top: clamp(40px, 6vw, 64px); }
.strip .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; }
.strip .s { padding: 20px 18px; border-left: 1px solid var(--line); font-size: .88rem; line-height: 1.55; }
.strip .s:first-child { border-left: none; }
@media (max-width: 720px) { .strip .s { border-left: none; border-top: 1px solid var(--line); } .strip .s:first-child { border-top: none; } }
.strip .s b { display: block; font-size: .93rem; font-weight: 700; }
.strip .s span { color: var(--ink-mute); font-size: .8rem; }

/* ---------- 기능 카드 ---------- */
.featgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.fcard {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-1); transition: transform .12s, box-shadow .12s;
}
.fcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.fcard .ficon { width: 56px; height: 56px; }
.fcard .ficon svg { width: 100%; height: 100%; }
.fcard h3 { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
.fcard p { margin: 0; font-size: .87rem; color: var(--ink-soft); line-height: 1.6; }
.fcard .go { margin-top: auto; font-size: .85rem; font-weight: 700; color: var(--primary); }
.fcard .badge { align-self: flex-start; font-size: .72rem; font-weight: 700; background: var(--pink-tint); color: var(--primary); border-radius: 8px; padding: 3px 9px; }

/* ---------- 3단계/표 ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-1); }
.step .n { font-size: .8rem; font-weight: 800; color: var(--blue); background: var(--blue-tint); display: inline-block; border-radius: 8px; padding: 4px 10px; margin-bottom: 12px; }
.step h3 { margin: 0 0 8px; font-size: 1.02rem; font-weight: 800; }
.step p { margin: 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.7; }
.step p b { color: var(--ink); }

.dd { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 18px; }
.ddcol { border-radius: 20px; padding: 22px 24px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); }
.ddcol h3 { margin: 0 0 10px; font-size: .95rem; font-weight: 800; }
.ddcol.do h3 { color: var(--ok); }
.ddcol.dont h3 { color: var(--bad); }
.ddcol ul { margin: 0; padding-left: 1.15em; font-size: .88rem; line-height: 1.65; color: var(--ink-soft); }
.ddcol li { margin: 7px 0; }
.ddcol.do li::marker { color: var(--ok); content: "✓ "; }
.ddcol.dont li::marker { color: var(--bad); content: "✕ "; }

.prin { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.pcard { border-radius: 20px; padding: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.pcard h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 800; color: var(--primary); }
.pcard p { margin: 0; font-size: .88rem; line-height: 1.7; color: var(--ink-soft); }

.faq { max-width: 720px; }
.faq-collapse { position: relative; max-height: 90px; overflow: hidden; transition: max-height .45s ease; }
.faq-collapse.open { max-height: 3000px; }
.faq-collapse .faq-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 70px;
  background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; transition: opacity .3s;
}
.faq-collapse.open .faq-fade { opacity: 0; }
.faq-toggle {
  display: flex; align-items: center; gap: 6px; margin: 14px auto 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 18px; font-weight: 700; font-size: .88rem; color: var(--ink); cursor: pointer; font-family: inherit;
}
.faq-toggle:hover { background: var(--surface-2); }
.faq-toggle .chev { transition: transform .25s; color: var(--ink-mute); }
.faq-toggle.open .chev { transform: rotate(180deg); }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; margin: 10px 0; box-shadow: var(--shadow-1); }
summary { cursor: pointer; font-weight: 700; font-size: .95rem; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--ink-mute); font-size: 1.15rem; flex: none; font-weight: 400; }
details[open] summary::after { content: "−"; }
details .a { padding: 0 0 18px; font-size: .88rem; color: var(--ink-soft); line-height: 1.75; }
details .a b { color: var(--ink); }

/* ---------- 플로우 공통 ---------- */
.flow { padding: clamp(32px, 5vw, 56px) 0 clamp(56px, 8vw, 88px); }
.flow-head { margin-bottom: 22px; }
.flow-head h1 { font-size: clamp(1.55rem, 4.4vw, 2.2rem); font-weight: 800; margin: 0 0 8px; line-height: 1.3; letter-spacing: -0.025em; }
.flow-head p { color: var(--ink-soft); margin: 0; max-width: 56ch; font-size: .95rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1); padding: clamp(20px, 4vw, 28px); margin: 14px 0; }
.panel h2 { font-size: 1.08rem; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.02em; }
.panel h2 .who { color: var(--primary); }

.field { margin: 14px 0; }
.field label { display: block; font-size: .84rem; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-mute); font-size: .78rem; margin-left: 5px; }
.field input[type="date"], .field input[type="time"], .field input[type="text"], .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--ink); font-family: inherit; font-size: .95rem;
  transition: border-color .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); background: var(--surface); outline: none; }
.field textarea { min-height: 110px; resize: vertical; }
.field .check { display: flex; align-items: flex-start; gap: 9px; font-size: .85rem; font-weight: 400; color: var(--ink-soft); }
.field .check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* 세그먼트 컨트롤 (양력/음력, 시간모드) */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg-btn {
  border: none; background: transparent; color: var(--ink-soft); font-family: inherit;
  font-size: .86rem; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
.seg-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg-btn:hover:not(.active) { color: var(--ink); }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

.notice { background: var(--blue-tint); color: var(--blue); border-radius: 12px; padding: 11px 14px; font-size: .8rem; line-height: 1.6; margin: 12px 0; }
.notice.warn { background: var(--pink-tint); color: var(--primary); }
.notice.gray { background: var(--surface-2); color: var(--ink-soft); }
.err { color: var(--bad); font-size: .84rem; font-weight: 700; margin-top: 10px; min-height: 1.2em; }

/* ---------- 팔자 표 ---------- */
.pillars { overflow-x: auto; }
.pillars table { border-collapse: collapse; width: 100%; min-width: 400px; text-align: center; }
.pillars th { font-size: .72rem; color: var(--ink-mute); padding: 8px 6px; border-bottom: 1px solid var(--line); font-weight: 700; }
.pillars td { padding: 10px 6px; }
.pillars .hj { font-size: 1.6rem; line-height: 1.25; font-weight: 700; }
.pillars .ko { font-size: .76rem; color: var(--ink-mute); }
.tagline-beta { font-size: .74rem; color: var(--ink-mute); margin-top: 8px; }

/* 오행 분포 바 */
.elem-bars { display: grid; gap: 7px; margin: 12px 0; }
.ebar { display: grid; grid-template-columns: 34px 1fr 22px; align-items: center; gap: 10px; font-size: .8rem; }
.ebar .lb { font-weight: 700; color: var(--ink-soft); }
.ebar .track { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.ebar .fill { height: 100%; border-radius: 99px; background: var(--blue); }
.ebar .ct { color: var(--ink-mute); font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- 주문/결제 ---------- */
.order { max-width: 480px; }
.order .row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.order .row:last-of-type { border-bottom: none; }
.order .row .amt { font-variant-numeric: tabular-nums; font-weight: 700; }
.order .row.total { font-size: 1.05rem; font-weight: 800; }
.order .row.total .amt { color: var(--primary); }
.order .row .off { color: var(--blue); }
.order .row .off2 { color: var(--ok); }
.testbadge { display: inline-block; background: var(--bad-tint); color: var(--bad); font-size: .74rem; font-weight: 700; border-radius: 8px; padding: 4px 10px; margin-bottom: 10px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2.5px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 리포트 ---------- */
.report-sec { margin: 8px 0; }
.report-sec .rhead { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.report-sec .ricon { width: 52px; height: 52px; flex: none; }
.report-sec .ricon svg { width: 100%; height: 100%; }
.report-sec .rlabel { font-size: .72rem; font-weight: 800; color: var(--primary); letter-spacing: .04em; }
.report-sec h3 { font-size: 1.15rem; font-weight: 800; margin: 2px 0 0; letter-spacing: -0.02em; }
.report-sec h4 { font-size: .98rem; font-weight: 800; margin: 18px 0 6px; }
.report-sec p { margin: 8px 0; font-size: .92rem; line-height: 1.8; color: var(--ink-soft); }
.report-sec p.strong { color: var(--ink); }
.rule-ref { display: inline-block; background: var(--blue-tint); color: var(--blue); font-size: .72rem; font-weight: 700; border-radius: 8px; padding: 3px 9px; margin-left: 6px; vertical-align: 2px; }
.advice2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 12px; }
.hidden { display: none !important; }

.success { text-align: center; padding: 24px 12px; }
.success .big { font-size: 2.2rem; line-height: 1; margin-bottom: 10px; }
.success h2 { margin: 0 0 8px; font-weight: 800; }
.success p { color: var(--ink-soft); margin: 0 auto 18px; max-width: 44ch; }

/* ---------- 신호등 ---------- */
.traffic { display: flex; align-items: center; gap: 18px; }
.tlight { flex: none; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); border-radius: 20px; padding: 16px 14px; }
/* 오늘의 잔 — 오방색 적(위험)·황(주의)·청(안전) 잔. 서양식 신호등 원이 아니라 고풍스러운 잔 실루엣 */
.tlight .lamp { width: 46px; height: 52px; opacity: .38; filter: grayscale(.65) saturate(.6); transition: opacity .3s ease, filter .3s ease, transform .3s ease; }
.tlight .lamp .cupsvg { width: 100%; height: 100%; display: block; }
.tlight .lamp.on { opacity: 1; filter: none; transform: translateY(-3px); }
.tlight .lamp .cup-rim { fill: #E9CE8E; }
.tlight .lamp .cup-stem, .tlight .lamp .cup-base { fill: #C9A24A; }
.tlight .lamp .cup-glaze { fill: rgba(255,255,255,.35); }
.tlight .lamp.r .cup-body { fill: #A7222B; }
.tlight .lamp.y .cup-body { fill: #C99A2E; }
.tlight .lamp.g .cup-body { fill: #1F6B72; }
.tlight .lamp.r.on { filter: drop-shadow(0 0 10px rgba(196,45,55,.75)); }
.tlight .lamp.y.on { filter: drop-shadow(0 0 10px rgba(212,163,42,.75)); }
.tlight .lamp.g.on { filter: drop-shadow(0 0 10px rgba(37,116,124,.75)); }
.tres h3 { margin: 0 0 6px; font-size: 1.3rem; font-weight: 800; }
.tres p { margin: 0; color: var(--ink-soft); font-size: .93rem; line-height: 1.7; }

.lockbox { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-top: 14px; background: var(--surface-2); }
.lockbox.locked .content { filter: blur(6px); pointer-events: none; user-select: none; }
.lockbox .lockmsg {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; text-align: center; padding: 20px;
  background: color-mix(in srgb, var(--surface) 55%, transparent); border-radius: 16px;
}
.lockbox .lockmsg b { font-size: .95rem; }
.lockbox .lockmsg span { font-size: .82rem; color: var(--ink-soft); max-width: 36ch; }
.lockbox .content p { margin: 8px 0; font-size: .9rem; line-height: 1.75; color: var(--ink-soft); }

/* ---------- 챌린지 ---------- */
.streakhero { text-align: center; padding: 8px 0 4px; }
.streakhero .dlabel { font-size: .82rem; font-weight: 700; color: var(--ink-mute); }
.streakhero .dnum { font-size: 4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.streakhero .dnum small { font-size: 1.6rem; color: var(--primary); }
.streakhero .dsub { color: var(--ink-soft); font-size: .88rem; }
.statrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.stat { background: var(--surface-2); border-radius: 14px; padding: 12px; text-align: center; }
.stat .v { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.stat .k { font-size: .74rem; color: var(--ink-mute); }
.dawncard { display: flex; gap: 14px; align-items: center; background: #232436; color: #EFEAF8; border-radius: 20px; padding: 18px 20px; margin-bottom: 14px; }
.dawncard .micon { width: 52px; height: 52px; flex: none; }
.dawncard .micon svg { width: 100%; height: 100%; }
.dawncard b { display: block; margin-bottom: 2px; }
.dawncard p { margin: 0; font-size: .85rem; color: #B9B4CC; line-height: 1.6; }

/* ---------- 캡슐 ---------- */
.promiselist { display: grid; gap: 8px; }
.prow { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 11px 14px; font-size: .9rem; }
.prow input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--ok); flex: none; }
.prow.done { text-decoration: line-through; color: var(--ink-mute); }
.prow .pdisc { margin-left: auto; font-size: .74rem; font-weight: 700; color: var(--ok); white-space: nowrap; }
.caplist { display: grid; gap: 10px; }
.caprow {
  display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-1);
}
.caprow .cicon { width: 40px; height: 40px; flex: none; }
.caprow .cicon svg { width: 100%; height: 100%; }
.caprow .cmeta { min-width: 0; }
.caprow .cmeta b { display: block; font-size: .92rem; }
.caprow .cmeta span { font-size: .78rem; color: var(--ink-mute); }
.caprow .cbtn { margin-left: auto; flex: none; }
.quotebox { background: var(--surface-2); border-left: 3px solid var(--primary); border-radius: 0 12px 12px 0; padding: 14px 16px; font-size: .9rem; line-height: 1.75; color: var(--ink-soft); white-space: pre-wrap; }

/* ---------- 알림/푸터 ---------- */
.notify { margin-top: clamp(48px, 7vw, 80px); background: var(--surface); border-top: 1px solid var(--line); }
.notify .wrap { padding-top: clamp(44px, 6vw, 72px); padding-bottom: clamp(44px, 6vw, 72px); text-align: center; }
.notify h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; margin: 0 0 10px; letter-spacing: -0.025em; }
.notify h2 .pk { color: var(--primary); }
.notify p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 22px; font-size: .95rem; }
.notify .fake { display: inline-flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.notify .soon { font-size: .78rem; color: var(--ink-mute); }

/* ---------- 리포트 심화 요소 ---------- */
.minilabel { font-size: .78rem; font-weight: 700; color: var(--ink-mute); margin: 14px 0 4px; }
.shadow-note { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: .88rem; color: var(--ink-soft); }
.badge-n { font-size: .68rem; font-weight: 700; border-radius: 6px; padding: 2px 7px; vertical-align: 2px; margin-left: 4px; }
.badge-n.over { background: var(--pink-tint); color: var(--primary); }
.badge-n.lack { background: var(--warn-tint); color: var(--warn); }
.badge-n.mid { background: var(--surface-2); color: var(--ink-mute); }
.ebar .fill.hot { background: var(--primary); }

/* 한 장 요약 */
.panel.summary { background: linear-gradient(180deg, var(--pink-tint), var(--surface) 60%); border-color: transparent; }
.panel.summary h3 { font-size: 1.2rem; font-weight: 800; margin: 4px 0 14px; letter-spacing: -0.02em; }
.sumgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sumcell { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.sumcell .k { display: block; font-size: .72rem; color: var(--ink-mute); font-weight: 700; }
.sumcell b { display: block; font-size: .98rem; margin: 2px 0; letter-spacing: -0.01em; }
.sumcell .s { display: block; font-size: .76rem; color: var(--ink-soft); line-height: 1.5; }
.sumnote { font-size: .82rem; color: var(--ink-soft); margin: 14px 0 0; }

/* 십성표 / 대운표 */
.godtable, .dutable { overflow-x: auto; margin: 12px 0; }
.godtable table, .dutable table { border-collapse: collapse; width: 100%; font-size: .86rem; }
.godtable th, .dutable th {
  text-align: left; font-size: .72rem; color: var(--ink-mute); font-weight: 700;
  padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.godtable th:first-child, .dutable th:first-child { border-radius: 8px 0 0 0; }
.godtable th:last-child, .dutable th:last-child { border-radius: 0 8px 0 0; }
.godtable td, .dutable td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.godtable td.pos, .dutable td:first-child { color: var(--ink-mute); font-size: .8rem; white-space: nowrap; }
.godtable td.hjs, .dutable td.hjs { font-size: 1.05rem; font-weight: 700; }
.godtable td.god { font-weight: 700; color: var(--primary); }
.dutable tr.now { background: var(--pink-tint); }
.dutable tr.now td { font-weight: 700; }

/* ---------- 오행 색상 토큰 (오방색 — 테마 무관 고정) ---------- */
:root {
  --el-mok: #2F9E63; --el-mok-tint: #E5F5EC;
  --el-hwa: #E0483D; --el-hwa-tint: #FBEAE8;
  --el-to:  #D9A234; --el-to-tint:  #FBF1DE;
  --el-geum:#8E8358; --el-geum-tint:#F1EEE3;
  --el-su:  #2C4C7C; --el-su-tint:  #E7ECF3;
}

/* 오행 히어로 라디얼 (결제 직후 최상단) */
.elem-hero { text-align: center; padding: 8px 0 4px; }
.elem-hero .eh-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.elem-hero .eh-sub { font-size: .85rem; color: var(--ink-soft); margin-bottom: 18px; }
.eh-donut-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.eh-donut-wrap svg { width: 100%; height: 100%; }
.eh-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.eh-center b { font-size: 1.5rem; font-weight: 800; }
.eh-center span { font-size: .74rem; color: var(--ink-mute); }
.eh-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 20px; max-width: 460px; margin-left: auto; margin-right: auto; }
.eh-chip { border-radius: 14px; padding: 10px 8px; text-align: center; }
.eh-chip b { display: block; font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.eh-chip span { font-size: .76rem; font-weight: 700; }
.eh-chip.el-목 { background: var(--el-mok-tint); } .eh-chip.el-목 b, .eh-chip.el-목 span { color: var(--el-mok); }
.eh-chip.el-화 { background: var(--el-hwa-tint); } .eh-chip.el-화 b, .eh-chip.el-화 span { color: var(--el-hwa); }
.eh-chip.el-토 { background: var(--el-to-tint); } .eh-chip.el-토 b, .eh-chip.el-토 span { color: var(--el-to); }
.eh-chip.el-금 { background: var(--el-geum-tint); } .eh-chip.el-금 b, .eh-chip.el-금 span { color: var(--el-geum); }
.eh-chip.el-수 { background: var(--el-su-tint); } .eh-chip.el-수 b, .eh-chip.el-수 span { color: var(--el-su); }

/* 섹션 헤드라인 (한 줄 요약) */
.sec-headline {
  font-size: 1.15rem; font-weight: 800; line-height: 1.5; letter-spacing: -0.01em;
  background: var(--pink-tint); color: var(--primary-deep, var(--primary));
  border-radius: 14px; padding: 14px 18px; margin: 12px 0 18px;
}
.sec-headline { color: var(--primary); }

/* 궁합 총평 배지 */
.bandbadge { display: inline-flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 16px; padding: 12px 20px; }
.bandbadge .bscore { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.bandbadge .blabel { font-size: .95rem; font-weight: 700; }
.bandbadge.big { padding: 16px 26px; }
.bandbadge.big .bscore { font-size: 2.6rem; }
.bandbadge.band-great { background: var(--ok-tint); } .bandbadge.band-great .bscore, .bandbadge.band-great .blabel { color: var(--ok); }
.bandbadge.band-good { background: var(--blue-tint); } .bandbadge.band-good .bscore, .bandbadge.band-good .blabel { color: var(--blue); }
.bandbadge.band-caution { background: var(--warn-tint); } .bandbadge.band-caution .bscore, .bandbadge.band-caution .blabel { color: var(--warn); }
.bandbadge.band-hard { background: var(--bad-tint); } .bandbadge.band-hard .bscore, .bandbadge.band-hard .blabel { color: var(--bad); }

/* ---------- 메인 상품 카드 (랜딩) ---------- */
.mainprod {
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
  background: linear-gradient(135deg, var(--pink-tint), var(--surface) 65%);
  border: 1px solid var(--line); border-radius: 22px; padding: 28px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1);
  transition: transform .12s, box-shadow .12s;
}
.mainprod:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.mp-left { flex: 1 1 320px; }
.mp-left h3 { font-size: 1.5rem; font-weight: 800; margin: 10px 0 8px; letter-spacing: -0.02em; }
.mp-left p { font-size: .9rem; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.7; }
.mp-right { flex: 0 0 auto; text-align: right; }
.mp-right s { display: block; font-size: .9rem; color: var(--ink-mute); }
.mp-right b { display: block; font-size: 2.4rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.mp-right > span { display: block; font-size: .76rem; color: var(--ink-mute); }
.mp-right .go { margin-top: 10px; font-size: .88rem; font-weight: 700; color: var(--primary); }

/* ---------- 풀코스: 가격 카드 ---------- */
.pricecard { background: linear-gradient(180deg, var(--pink-tint), var(--surface) 70%); border-color: transparent; }
.pcflag { display: inline-block; font-size: .72rem; font-weight: 800; color: var(--on-pink); background: var(--primary); border-radius: 8px; padding: 4px 10px; margin-bottom: 12px; }
.pcrow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pcrow > div:first-child { flex: 1 1 200px; }
.pcrow b { display: block; font-size: 1.15rem; font-weight: 800; }
.pcrow span { font-size: .84rem; color: var(--ink-soft); }
.pcprice { text-align: right; }
.pcprice s { display: block; font-size: .85rem; color: var(--ink-mute); }
.pcprice b { font-size: 1.9rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.pcprice span { font-size: .74rem; color: var(--ink-mute); }

/* 목차 그리드 */
.tocgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.tocitem { display: flex; align-items: center; gap: 9px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: .87rem; font-weight: 500; }
.tocitem .n { font-size: .74rem; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }

/* 출처 */
.srcitem { border-left: 3px solid var(--blue); background: var(--surface-2); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 10px 0; }
.srcitem b { font-size: .95rem; }
.srcitem .au { font-size: .78rem; color: var(--ink-mute); margin-left: 8px; }
.srcitem p { margin: 6px 0 0; font-size: .85rem; color: var(--ink-soft); line-height: 1.65; }
.srcref { display: block; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .78rem; color: var(--blue); font-weight: 600; }

/* 음양 바 */
.yybar { display: flex; height: 40px; border-radius: 12px; overflow: hidden; margin: 14px 0; font-size: .82rem; font-weight: 700; }
.yybar .yang { background: var(--primary); color: var(--on-pink); display: flex; align-items: center; justify-content: center; }
.yybar .yin { background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; }

/* 왕상휴수사 배지 */
.wsbadge { font-size: .68rem; font-weight: 800; border-radius: 5px; padding: 1px 6px; margin-left: 6px; }
.ws-왕 { background: var(--pink-tint); color: var(--primary); }
.ws-상 { background: var(--ok-tint); color: var(--ok); }
.ws-휴 { background: var(--surface-2); color: var(--ink-mute); }
.ws-수 { background: var(--warn-tint); color: var(--warn); }
.ws-사 { background: var(--surface-2); color: var(--ink-mute); }
.ebar { grid-template-columns: 34px 1fr 22px auto; }

/* 용신 3칸 */
.ysgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.yscell { border-radius: 14px; padding: 14px 12px; text-align: center; border: 1px solid var(--line); }
.yscell .k { display: block; font-size: .72rem; font-weight: 700; color: var(--ink-mute); }
.yscell b { display: block; font-size: 1.4rem; font-weight: 800; margin: 2px 0; }
.yscell .s { font-size: .74rem; color: var(--ink-soft); }
.yscell.use { background: var(--ok-tint); } .yscell.use b { color: var(--ok); }
.yscell.help { background: var(--blue-tint); } .yscell.help b { color: var(--blue); }
.yscell.avoid { background: var(--warn-tint); } .yscell.avoid b { color: var(--warn); }

/* 결제수단 · 약관 */
.paymethods { display: grid; gap: 8px; }
.pm-opt { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 13px 16px; cursor: pointer; font-size: .92rem; font-weight: 500; border: 1.5px solid transparent; }
.pm-opt input { width: 18px; height: 18px; accent-color: var(--primary); }
.pm-opt:has(input:checked) { border-color: var(--primary); background: var(--pink-tint); }
.agreelist { display: grid; gap: 10px; padding-left: 4px; border-left: 2px solid var(--line); margin-left: 8px; padding-top: 4px; }
.agreelist .check { font-size: .86rem; }

/* 영수증 */
.receipt { background: var(--surface-2); border-style: dashed; }
.rc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-badge { background: var(--ok-tint); color: var(--ok); font-size: .78rem; font-weight: 800; border-radius: 8px; padding: 4px 12px; }
.rc-test { font-size: .74rem; color: var(--ink-mute); }
.rc-rows { display: grid; gap: 8px; }
.rc-rows > div { display: flex; justify-content: space-between; gap: 12px; font-size: .89rem; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.rc-rows > div:last-child { border-bottom: none; }
.rc-rows span { color: var(--ink-soft); }
.rc-rows b { font-variant-numeric: tabular-nums; }

/* ---------- 섹션별 추천/보완 (오행 색상) ---------- */
.rec2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 14px 0 6px; }
.reccard { border-radius: 14px; padding: 13px 15px; background: var(--rc-tint); border: 1px solid var(--rc-tint); }
.reccard .rk { display: flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 800; color: var(--rc); margin-bottom: 6px; letter-spacing: .01em; }
.reccard .rk .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); flex: none; }
.reccard p { margin: 0; font-size: .86rem; line-height: 1.7; color: var(--ink); }
.reccard .rc-body p + p { margin-top: 7px; }
.reccard p b { color: var(--rc); }

/* 용신/희신/기신 3칸 — 오행 점 추가 */
.yscell .edot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }

/* ---------- 대운 pip (탭/클릭·호버로 상세 토글) ---------- */
.dutable td.hjs.pip { cursor: pointer; position: relative; color: var(--blue); text-decoration: underline dotted; text-underline-offset: 3px; }
.dutable td.hjs.pip:hover { color: var(--primary); }
.pip-hint { font-size: .78rem; color: var(--ink-mute); margin: 8px 0 0; }
.dupop {
  display: none; margin: 6px 0 10px; padding: 12px 14px; background: var(--surface-2);
  border-radius: 12px; font-size: .85rem; line-height: 1.7; color: var(--ink-soft); border-left: 3px solid var(--blue);
}
.dupop.open { display: block; }
.dupop b { color: var(--ink); }

/* ---------- 주소 검색 ---------- */
.addr-field { display: flex; gap: 8px; }
.addr-field input { flex: 1; }
.addr-result { margin-top: 10px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: .87rem; display: none; }
.addr-result.show { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.addr-result b { font-size: .92rem; }
.addr-result .chg { color: var(--blue); font-size: .82rem; font-weight: 700; cursor: pointer; background: none; border: none; font-family: inherit; }
.addr-note { font-size: .78rem; color: var(--ink-mute); margin-top: 6px; }

/* ---------- 클로징 요약집 ---------- */
.finalgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 14px 0; }
.finalcell { background: var(--surface-2); border-radius: 12px; padding: 11px 12px; }
.finalcell .k { display: block; font-size: .7rem; color: var(--ink-mute); font-weight: 700; }
.finalcell b { display: block; font-size: .92rem; margin-top: 2px; letter-spacing: -0.01em; }
.finalkeywords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- 공유 도구 ---------- */
.sharegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.sharegrid .btn { font-size: .88rem; padding: 12px 14px; }
.copytoast { display: none; font-size: .82rem; color: var(--ok); font-weight: 700; margin-top: 8px; text-align: center; }
.copytoast.show { display: block; }

/* ---------- 지역 지도 ---------- */
.mapwrap { text-align: center; position: relative; }
.mapwrap svg { max-width: 100%; height: auto; }
.mapwrap path.region {
  stroke: var(--surface); stroke-width: 1.2; cursor: pointer;
  transition: opacity .12s, filter .12s;
}
.mapwrap path.region:hover { opacity: .82; }
.mapwrap path.region.me { stroke: var(--ink); stroke-width: 2.4; }
.mapwrap path.region.picked { filter: drop-shadow(0 0 0 2px var(--blue)); stroke: var(--blue); stroke-width: 2.4; }
.maptip {
  position: absolute; top: 0; left: 0; transform: translate(-50%, -100%) translateY(-8px);
  background: var(--ink); color: var(--bg); font-size: .78rem; font-weight: 700;
  padding: 5px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .08s; z-index: 30;
}
.maptip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
.maptip.show { opacity: 1; }
.mapaddr {
  margin-top: 10px; font-size: .86rem; color: var(--ink-soft);
  background: var(--surface-2); border-radius: 10px; padding: 8px 12px;
}
.mapaddr b { color: var(--ink); }
.mapsearch { position: relative; margin-top: 10px; }
.mapsearch input {
  width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: .9rem; font-family: inherit;
}
.mapsearch input:focus { outline: none; border-color: var(--primary); }
.mapsearch-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 15;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.1); max-height: 280px; overflow-y: auto; padding: 6px;
}
.mapsearch-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%;
  text-align: left; background: none; border: none; cursor: pointer; font-family: inherit;
  padding: 10px 10px; border-radius: 8px; font-size: .88rem; color: var(--ink);
}
.mapsearch-item:hover, .mapsearch-item.active { background: var(--surface-2); }
.mapsearch-item .prov { color: var(--ink-mute); font-size: .78rem; flex: none; }
.mapsearch-empty { padding: 12px 10px; font-size: .84rem; color: var(--ink-mute); }
.maplegend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.maplegend .lg { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-soft); }
.maplegend .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.mapback { font-size: .84rem; color: var(--blue); font-weight: 700; background: none; border: none; cursor: pointer; font-family: inherit; margin-top: 10px; }
.explorebox { margin-top: 14px; text-align: left; background: var(--surface-2); border-radius: 14px; padding: 16px 18px; }
.explorebox .exname { font-size: 1.02rem; font-weight: 800; margin-bottom: 6px; }
.explorebox p { margin: 8px 0; font-size: .88rem; line-height: 1.75; color: var(--ink-soft); }
.explorebox p b { color: var(--ink); }
.explore-hint { font-size: .8rem; color: var(--ink-mute); margin-top: 10px; }

/* 이사 후보지 랭킹 */
.candlist { display: grid; gap: 8px; margin-top: 12px; }
.candrow { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 11px 14px; background: var(--rc-tint); }
.candrow .crank { font-size: .72rem; font-weight: 800; color: var(--rc); background: var(--surface); border-radius: 6px; padding: 2px 8px; flex: none; }
.candrow .cbody { min-width: 0; }
.candrow .cbody b { display: block; font-size: .88rem; color: var(--rc); }
.candrow .cbody span { font-size: .8rem; color: var(--ink); line-height: 1.6; }

/* ---------- 인쇄(PDF 저장) ---------- */
@media print {
  .proto, nav.top, .adslot, footer.foot, #step1, #step2, .receipt, #fcSharePreview,
  .btn, #fcShareGenBtn, #fcShareDlBtn, .rec2, .pip-hint, .dupop { display: none !important; }
  body { background: #fff; font-size: 11.5px; }
  .panel { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; margin: 8px 0; }
  .report-sec h3 { font-size: 1rem; }
  a[href]:after { content: ""; }
}

/* ---------- 광고 슬롯 (AdSense 승인 후 활성화) ---------- */
.adslot {
  max-width: 640px; margin: 28px auto 0; padding: 0 20px;
}
.adslot .adbox {
  border: 1px dashed var(--line); border-radius: 12px; background: var(--surface);
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  font-size: .76rem; color: var(--ink-mute); gap: 6px;
}
.adslot .adtag { font-size: .66rem; font-weight: 700; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }

footer.foot { border-top: 1px solid var(--line); background: var(--bg); }
footer.foot.tight { margin-top: 0; }
footer.foot .wrap { padding-top: 32px; padding-bottom: 44px; font-size: .8rem; color: var(--ink-mute); }
footer.foot .cols { display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; margin-bottom: 18px; }
footer.foot a { color: var(--ink-mute); }
footer.foot .legal { line-height: 1.8; }
footer.foot .disc { background: var(--surface-2); border-radius: 12px; padding: 13px 16px; line-height: 1.65; }

/* ═══ 재회 「4주의 새벽」 — 4주 프로그램 UI (v0.8.1) ═══ */
.ch2.radio { cursor: pointer; }
.ch2.radio input { margin-right: 6px; accent-color: var(--primary); }
.wkbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 14px; }
.wktab { border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--ink); position: relative; }
.wktab .wn { display: block; font-size: .7rem; letter-spacing: .08em; color: var(--ink-mute); }
.wktab .wt { display: block; font-weight: 800; font-size: .92rem; margin-top: 2px; }
.wktab .ws { display: block; font-size: .72rem; color: var(--ink-mute); margin-top: 4px; }
.wktab.on { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent); }
.wktab.lock { opacity: .62; cursor: default; }
.wktab.done .wt::after { content: " ✓"; color: var(--ok); }
.wktab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 520px) { .wkbar { grid-template-columns: repeat(2, 1fr); } }
.wkhead { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; }
.wkhead .clipwrap { position: relative; }
.wkhead video.wkclip, .wkhead img.wkclip { width: 96px; aspect-ratio: 9/16; object-fit: cover; border-radius: 12px; background: #1b1511; display: block; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.wkhead .wkintro { font-size: .95rem; }
.wkhead .wkintro .eyebrow { font-size: .72rem; letter-spacing: .1em; color: var(--primary); font-weight: 800; margin-bottom: 4px; }
.wkhead .wkintro h2 { margin: 0 0 8px; }
@media (max-width: 520px) { .wkhead { grid-template-columns: 72px 1fr; } .wkhead video.wkclip, .wkhead img.wkclip { width: 72px; } }
.dawnnote { border-left: 3px solid var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); padding: 10px 12px; border-radius: 0 10px 10px 0; font-size: .9rem; margin: 12px 0 0; }
.dawnnote b { color: var(--primary); }
.situ { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: .92rem; margin: 10px 0 14px; }
.situ b { color: var(--primary); }
.taskbox { border: 1.5px dashed var(--primary); border-radius: 14px; padding: 16px; margin-top: 8px; }
.taskbox h3 { margin: 0 0 6px; }
.taskbox textarea { width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--surface); color: var(--ink); resize: vertical; }
.taskbox .tfoot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.taskbox .tmsg { font-size: .86rem; color: var(--ink-mute); }
.taskbox.done { border-style: solid; border-color: var(--ok); background: var(--ok-tint); }
.daygrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0; }
.daygrid label { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: .74rem; cursor: pointer; }
.daygrid label input { accent-color: var(--primary); }
.daygrid label.today { border-color: var(--primary); }
.daygrid label.future { opacity: .45; cursor: default; }
.forklist { display: grid; gap: 8px; margin: 10px 0 14px; }
.forklist label { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.forklist label input { margin-top: 3px; accent-color: var(--primary); }
.forklist small { display: block; color: var(--ink-mute); font-size: .78rem; margin-top: 2px; }
.forklist label.auto { border-color: var(--ok); }
.verdict-go, .verdict-wait { border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.verdict-go { background: var(--ok-tint); border: 1px solid var(--ok); }
.verdict-wait { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border: 1px solid var(--primary); }
.script { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 12px; }
.script.lead { border-color: var(--primary); }
.script .stag { font-size: .72rem; letter-spacing: .1em; color: var(--ink-mute); font-weight: 800; }
.script .sopen { font-size: 1.02rem; font-weight: 700; margin: 6px 0 8px; line-height: 1.55; }
.script .sdont { font-size: .86rem; color: var(--ink-mute); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.lockpanel { text-align: center; padding: 34px 18px; }
.lockpanel .big { font-size: 2rem; }
.lockpanel h3 { margin: 6px 0; }
.lockpanel p { color: var(--ink-mute); font-size: .92rem; max-width: 46ch; margin: 6px auto; }
.devchip { display: inline-block; font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: #333; color: #ffd27a; margin-left: 8px; vertical-align: middle; }

/* ═══ 합석 2인화 — 질문 카드 덱 · 규칙 한 장 · 재측정 (v0.8.2) ═══ */
.stagechip { display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .04em; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 14%, var(--surface)); color: var(--primary); margin-left: 8px; vertical-align: middle; }
.qdeck { position: relative; }
.qprog { display: flex; gap: 4px; margin: 6px 0 12px; }
.qprog i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.qprog i.on { background: var(--primary); }
.qprog i.done { background: var(--ok); }
.qcard { border: 1px solid var(--line); border-radius: 16px; padding: 22px 20px 16px; background: var(--surface); box-shadow: 0 14px 34px rgba(0,0,0,.14); min-height: 200px; display: flex; flex-direction: column; gap: 10px; }
.qcard .qn { font-size: .72rem; letter-spacing: .1em; color: var(--ink-mute); font-weight: 800; }
.qcard .qq { font-size: 1.18rem; font-weight: 800; line-height: 1.45; }
.qcard .qturn { font-size: .8rem; color: var(--primary); font-weight: 700; }
.qcard .qwhy { font-size: .86rem; color: var(--ink-mute); border-top: 1px dashed var(--line); padding-top: 10px; display: none; }
.qcard.open .qwhy { display: block; }
.qcard textarea { width: 100%; min-height: 64px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; background: var(--surface-2); color: var(--ink); resize: vertical; }
.qcard .qfoot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.qcard .qfoot .btn { padding: 8px 14px; font-size: .88rem; }
.qdone { text-align: center; padding: 20px; border: 1px dashed var(--ok); border-radius: 14px; background: var(--ok-tint); }
.rulelist { display: grid; gap: 8px; margin: 10px 0; }
.rulelist .rule { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.rulelist .rule .rn { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: .82rem; display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.rulelist .rule input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; background: var(--surface); color: var(--ink); }
.rulelist .rule input:read-only { background: var(--surface-2); border-style: dashed; }
.rulelist .rule small { grid-column: 2; color: var(--ink-mute); font-size: .76rem; }
.rulesheet { border: 2px solid var(--primary); border-radius: 16px; padding: 18px; margin-top: 12px; background: var(--surface); }
.rulesheet .rtitle { font-weight: 800; font-size: 1.05rem; }
.rulesheet .rmeta { font-size: .78rem; color: var(--ink-mute); margin-bottom: 8px; }
.rulesheet ol { margin: 0; padding-left: 20px; }
.rulesheet li { margin-bottom: 6px; }
.rulesheet .rsign { margin-top: 12px; font-size: .82rem; color: var(--ink-mute); display: flex; gap: 14px; }
.scorehist { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.scorehist .sh { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: .84rem; background: var(--surface-2); }
.scorehist .sh b { display: block; font-size: 1.15rem; }

/* ═══ 타이밍 달력 — 커리어 · 이사 공용 (v0.8.3) ═══ */
.calgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0 8px; }
@media (max-width: 560px) { .calgrid { grid-template-columns: repeat(4, 1fr); } }
.calm { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px 10px; text-align: center; background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.calm .cy { font-size: .64rem; color: var(--ink-mute); }
.calm .cm { font-weight: 800; font-size: .95rem; }
.calm .cp { font-size: .8rem; font-family: "Noto Serif KR", serif; }
.calm .cg { font-size: .7rem; color: var(--ink-mute); }
.calm .dot, .callegend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin: 4px auto 0; background: var(--line); }
.calm.green { border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); background: var(--ok-tint); }
.calm.green .dot, .callegend .dot.green { background: var(--ok); }
.calm.yellow { border-color: color-mix(in srgb, #e0b13a 60%, var(--line)); background: color-mix(in srgb, #e0b13a 10%, var(--surface)); }
.calm.yellow .dot, .callegend .dot.yellow { background: #e0b13a; }
.calm.red { border-color: color-mix(in srgb, #d9705f 60%, var(--line)); background: color-mix(in srgb, #d9705f 9%, var(--surface)); }
.calm.red .dot, .callegend .dot.red { background: #d9705f; }
.calm.now { box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 45%, transparent); }
.calm .calmark { position: absolute; top: -8px; right: -4px; font-size: .62rem; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: var(--primary); color: #fff; white-space: nowrap; }
.callegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--ink-mute); margin: 6px 0 2px; }
.callegend .dot { margin: 0 4px 0 0; vertical-align: middle; }
.calwin { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.calwin span { font-size: .78rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); }
.calwin span.in { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.offerbox { border: 1.5px solid var(--primary); border-radius: 14px; padding: 14px 16px; margin: 10px 0; background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.offerbox .ov { font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; }
.ritual { display: grid; gap: 6px; margin: 8px 0; }
.ritual .r { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: .9rem; }
.ritual .r input { margin-top: 3px; accent-color: var(--primary); }
.regcmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
@media (max-width: 560px) { .regcmp { grid-template-columns: 1fr; } }
.regcmp .rc { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); }
.regcmp .rc b { display: block; margin-bottom: 4px; }
.regcmp .rc .rel { font-size: .78rem; color: var(--primary); font-weight: 700; }

/* ═══ 주인장 여는 말 · 닫는 말 (v0.8.5) ═══ */
.hostbar { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.hostbar.closing { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 9%, var(--surface)), var(--surface)); }
.hostbar .wkintro h2 { font-size: 1.25rem; }
.hostbar .wkintro p { font-size: .95rem; color: var(--ink-soft); }
.hostcta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hostcta .btn { padding: 9px 14px; font-size: .88rem; }
/* 강조는 등불색 */
.report-sec p b, .report-sec li b, .panel.summary b, .notice b, .step p b, .flow-head p b, .sumcell b { color: var(--primary); }
.datum b, .rc-rows b, .receipt b { color: var(--ink); }
/* 오행 색 — 두 가지 이상 구분이 필요한 모든 곳 */
:root { --el-mok: #6FBF73; --el-hwa: #E86A5A; --el-to: #E8B84A; --el-geum: #C9D3DE; --el-su: #6FA3FF;
        --el-mok-tint: #1D2E22; --el-hwa-tint: #33211F; --el-to-tint: #33291A; --el-geum-tint: #2A2E36; --el-su-tint: #1F2740; }
:root[data-theme="light"] { --el-mok: #2E8B57; --el-hwa: #C8462F; --el-to: #B8860B; --el-geum: #6B7A8F; --el-su: #2F6FD6;
        --el-mok-tint: #E6F4EA; --el-hwa-tint: #FBE9E5; --el-to-tint: #FBF1D9; --el-geum-tint: #EEF1F5; --el-su-tint: #E6EEFB; }
.el-목 { color: var(--el-mok); } .el-화 { color: var(--el-hwa); } .el-토 { color: var(--el-to); } .el-금 { color: var(--el-geum); } .el-수 { color: var(--el-su); }
.ebar .fill.el-목 { background: var(--el-mok); } .ebar .fill.el-화 { background: var(--el-hwa); } .ebar .fill.el-토 { background: var(--el-to); } .ebar .fill.el-금 { background: var(--el-geum); } .ebar .fill.el-수 { background: var(--el-su); }
.ebar .lb.el-목, .ebar .lb.el-화, .ebar .lb.el-토, .ebar .lb.el-금, .ebar .lb.el-수 { color: inherit; }
/* 십성 다섯 그룹 색 */
:root { --g-bigeop: #F2B45C; --g-siksang: #6FBF73; --g-jae: #6FA3FF; --g-gwan: #E86A5A; --g-in: #B48CF2; }
.g-비겁 { color: var(--g-bigeop); } .g-식상 { color: var(--g-siksang); } .g-재성 { color: var(--g-jae); } .g-관성 { color: var(--g-gwan); } .g-인성 { color: var(--g-in); }
.ebar .fill.g-비겁 { background: var(--g-bigeop); } .ebar .fill.g-식상 { background: var(--g-siksang); } .ebar .fill.g-재성 { background: var(--g-jae); } .ebar .fill.g-관성 { background: var(--g-gwan); } .ebar .fill.g-인성 { background: var(--g-in); }
.godtable td.god.g-비겁 { color: var(--g-bigeop); } .godtable td.god.g-식상 { color: var(--g-siksang); } .godtable td.god.g-재성 { color: var(--g-jae); } .godtable td.god.g-관성 { color: var(--g-gwan); } .godtable td.god.g-인성 { color: var(--g-in); }
.eh-chip.el-화 { background: var(--el-hwa-tint); } .eh-chip.el-화 b, .eh-chip.el-화 span { color: var(--el-hwa); }
.eh-chip.el-토 { background: var(--el-to-tint); } .eh-chip.el-토 b, .eh-chip.el-토 span { color: var(--el-to); }
.eh-chip.el-금 { background: var(--el-geum-tint); } .eh-chip.el-금 b, .eh-chip.el-금 span { color: var(--el-geum); }
.eh-chip.el-수 { background: var(--el-su-tint); } .eh-chip.el-수 b, .eh-chip.el-수 span { color: var(--el-su); }
.calm .cp.el-목 { color: var(--el-mok); } .calm .cp.el-화 { color: var(--el-hwa); } .calm .cp.el-토 { color: var(--el-to); } .calm .cp.el-금 { color: var(--el-geum); } .calm .cp.el-수 { color: var(--el-su); }
.calnotes { display: grid; gap: 4px; margin: 8px 0 4px; font-size: .84rem; }
.calnotes .cn { padding: 6px 10px; border-left: 3px solid var(--line); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.calnotes .cn.green { border-left-color: var(--ok); } .calnotes .cn.yellow { border-left-color: #e0b13a; } .calnotes .cn.red { border-left-color: #d9705f; }
.calnotes .cn b { color: var(--ink); margin-right: 6px; }
.msg[data-close] .bb2 { border-color: color-mix(in srgb, var(--primary) 40%, transparent); }

/* ═══ 페이지 넘김 · 말풍선 · 소리 토글 (v0.9.0) ═══ */
.sndbtn { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); border-radius: 999px; font: inherit; font-size: .74rem; padding: 4px 10px; cursor: pointer; margin-right: 6px; }
.sndbtn[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); }
.pager { position: relative; }
.pghead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 10px; }
.pgdots { display: flex; gap: 6px; flex-wrap: wrap; }
.pgdots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: inline-block; cursor: pointer; }
.pgdots i.done { background: color-mix(in srgb, var(--primary) 55%, var(--line)); }
.pgdots i.on { background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.pgdots i.open, .pgdots i.close { border-radius: 3px; }
.pgall { border: 0; background: none; color: var(--ink-mute); font: inherit; font-size: .78rem; text-decoration: underline dotted; cursor: pointer; }
.pgbubble { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; margin: 0 0 12px; }
.pgbubble .ava { width: 34px; height: 34px; border-radius: 50%; background: #3f3428; border: 1px solid #5b4a35; color: var(--primary); font-weight: 800; font-size: .82rem; display: flex; align-items: center; justify-content: center; }
.pgbubble .txt { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 10px 14px; font-size: .95rem; min-height: 42px; position: relative; }
.pgbubble .txt::after { content: "▍"; color: var(--primary); animation: blink 1s steps(2) infinite; margin-left: 2px; }
@keyframes blink { to { opacity: 0; } }
.pgstage { min-height: 200px; }
.pgstage.in-r { animation: slideL .32s ease-out; } .pgstage.in-l { animation: slideR .32s ease-out; }
@keyframes slideL { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slideR { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.pgfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 6px; position: sticky; bottom: 10px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(6px); padding: 8px; border-radius: 14px; }
.pgcount { font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .pgstage.in-r, .pgstage.in-l { animation: none; } .pgbubble .txt::after { animation: none; } }

/* ═══ 지도 장식 — 구·군 경계 · 한강 (v0.9.2) ═══ */
.mapdeco .sgg-line { fill: none; stroke: rgba(239,231,216,.55); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; }
.mapdeco .sido-line { fill: none; stroke: rgba(239,231,216,.8); stroke-width: 1.6; stroke-linejoin: round; }
.mapdeco .river { fill: none; stroke: #8FB0FF; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }
.mapdeco .river-glow { fill: none; stroke: #8FB0FF; stroke-width: 11; stroke-linecap: round; opacity: .22; }
.mapwrap path.region { stroke: rgba(19,20,27,.55); stroke-width: .35; }
.mapwrap path.region.me { stroke: var(--primary); stroke-width: 1.6; }
.mapwrap path.region:hover { filter: brightness(1.15); cursor: pointer; }
.mapwrap path.region.drill { cursor: zoom-in; }
.maphint { font-size: .78rem; color: var(--ink-mute); margin-top: 6px; }

/* ═══ 주인장이 직접 말하는 장면 (v0.9.3) ═══ */
.hostscene { position: fixed; inset: 0; z-index: 120; display: grid; place-items: end center; padding: 0 0 max(18px, env(safe-area-inset-bottom)); }
.hostscene .hs-back { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 100%, rgba(242,180,92,.10), transparent 60%), rgba(8,9,14,.82); backdrop-filter: blur(6px); animation: hsFade .3s ease-out both; }
.hostscene .hs-stage { position: relative; width: min(100vw, 560px); display: grid; grid-template-columns: 1fr; gap: 0; align-items: end; }
.hostscene .hs-host { position: relative; width: min(64vw, 280px); margin: 0 auto; }
.hostscene .hs-vid { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 18px 18px 0 0; display: block; box-shadow: 0 30px 60px rgba(0,0,0,.6); background: #1b1511; }
.hostscene.pos-l .hs-host { margin: 0 0 0 6%; } .hostscene.pos-r .hs-host { margin: 0 6% 0 auto; }
.hostscene .hs-bubble { position: absolute; left: 50%; bottom: 62%; transform: translate(-50%, 0) scale(.6); transform-origin: 50% 100%; width: min(92vw, 420px); background: #F6F0E4; color: #1D1C24; border-radius: 18px; padding: 14px 16px 12px; font-size: 1.02rem; line-height: 1.55; opacity: 0; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.hostscene.pos-l .hs-bubble { left: auto; right: 4%; transform-origin: 20% 100%; }
.hostscene.pos-r .hs-bubble { left: 4%; transform: translate(0,0) scale(.6); transform-origin: 80% 100%; }
.hostscene .hs-bubble.pop { animation: bubPop .42s cubic-bezier(.2,1.4,.4,1) .12s both; }
.hostscene .hs-bubble::after { content: ""; position: absolute; bottom: -14px; left: 50%; width: 0; height: 0; border: 14px solid transparent; border-top-color: #F6F0E4; border-bottom: 0; transform: translateX(-50%); }
.hostscene.pos-l .hs-bubble::after { left: 24%; } .hostscene.pos-r .hs-bubble::after { left: 76%; }
.hostscene .hs-txt b { color: #B8771A; font-weight: 800; }
.hostscene .hs-txt::after { content: "▍"; color: #B8771A; animation: blink 1s steps(2) infinite; margin-left: 2px; }
.hostscene .hs-go { margin-top: 10px; border: 0; background: #1D1C24; color: #F6F0E4; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.hostscene .hs-go[hidden] { display: none; }
/* 말풍선 모양 3종 */
.hostscene.bub-burst .hs-bubble { border-radius: 8px; clip-path: polygon(0 8%, 4% 0, 96% 3%, 100% 10%, 98% 92%, 94% 100%, 6% 98%, 0 90%); }
.hostscene.bub-burst .hs-bubble::after { display: none; }
.hostscene.bub-cloud .hs-bubble { border-radius: 40px; }
.hostscene.bub-cloud .hs-bubble::after { border: 0; width: 14px; height: 14px; border-radius: 50%; background: #F6F0E4; bottom: -20px; box-shadow: -12px 12px 0 -4px #F6F0E4; }
/* 등장 4종 */
.hostscene.ent-l .hs-host { animation: hsFromL .5s cubic-bezier(.2,.9,.3,1) both; }
.hostscene.ent-r .hs-host { animation: hsFromR .5s cubic-bezier(.2,.9,.3,1) both; }
.hostscene.ent-up .hs-host { animation: hsFromUp .5s cubic-bezier(.2,.9,.3,1) both; }
.hostscene.ent-zoom .hs-host { animation: hsZoom .45s cubic-bezier(.2,1.2,.4,1) both; }
.hostscene.out .hs-host { animation: hsOut .3s ease-in both; } .hostscene.out .hs-bubble { animation: bubOut .25s ease-in both; } .hostscene.out .hs-back { animation: hsFadeOut .3s ease-in both; }
@keyframes hsFade { from { opacity: 0; } to { opacity: 1; } } @keyframes hsFadeOut { to { opacity: 0; } }
@keyframes hsFromL { from { transform: translateX(-70px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hsFromR { from { transform: translateX(70px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hsFromUp { from { transform: translateY(90px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hsZoom { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hsOut { to { transform: translateY(40px); opacity: 0; } }
@keyframes bubPop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 100% { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.hostscene.pos-r .hs-bubble.pop { animation-name: bubPopR; } @keyframes bubPopR { 0% { opacity: 0; transform: translate(0, 10px) scale(.6); } 100% { opacity: 1; transform: translate(0, 0) scale(1); } }
@keyframes bubOut { to { opacity: 0; transform: translate(-50%, 8px) scale(.9); } }
@media (prefers-reduced-motion: reduce) { .hostscene * { animation: none !important; } .hostscene .hs-bubble { opacity: 1; transform: translate(-50%,0); } }

/* v0.9.3b — 말풍선은 얼굴을 가리지 않는다: 머리 위에, 꼬리는 아래로. 클립은 상체 위주로 크롭 */
.hostscene { align-items: end; }
.hostscene .hs-stage { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100dvh; width: min(100vw, 560px); padding: 0 12px; box-sizing: border-box; }
.hostscene .hs-host { width: auto; height: min(54dvh, 520px); aspect-ratio: 9 / 16; margin: 0 auto; flex: none; }
.hostscene .hs-vid { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; border-radius: 18px 18px 0 0; }
.hostscene.pos-l .hs-host { margin: 0 auto 0 4%; } .hostscene.pos-r .hs-host { margin: 0 4% 0 auto; }
.hostscene .hs-bubble { position: relative; left: auto; right: auto; bottom: auto; transform: none; width: min(92vw, 440px); margin: 0 auto 18px; transform-origin: 50% 100%; }
.hostscene.pos-l .hs-bubble, .hostscene.pos-r .hs-bubble { left: auto; right: auto; transform: none; }
.hostscene.pos-l .hs-bubble::after { left: 26%; } .hostscene.pos-r .hs-bubble::after { left: 74%; }
.hostscene .hs-bubble.pop, .hostscene.pos-r .hs-bubble.pop { animation: bubPop2 .42s cubic-bezier(.2,1.4,.4,1) .12s both; }
@keyframes bubPop2 { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 100% { opacity: 1; transform: none; } }
.hostscene.out .hs-bubble { animation: bubOut2 .25s ease-in both; } @keyframes bubOut2 { to { opacity: 0; transform: translateY(8px) scale(.9); } }
@media (min-width: 700px) { .hostscene .hs-host { height: min(60dvh, 560px); } }
/* 말풍선이 캐릭터 아래(대사창)에 놓이므로 꼬리는 위를 향한다 */
.hostscene .hs-bubble::after { bottom: auto; top: -14px; border: 14px solid transparent; border-bottom-color: #F6F0E4; border-top: 0; }
.hostscene.bub-cloud .hs-bubble::after { border: 0; top: -20px; bottom: auto; box-shadow: -12px -12px 0 -4px #F6F0E4; }
.hostscene .hs-bubble { margin: 10px auto 18px; }
/* v0.9.4 — 장면은 터치로만 진행: 힌트 */
.hostscene .hs-hint { font-size: .74rem; color: #6b655a; margin-top: 8px; }
.hostscene.typed .hs-hint { display: none; }
.hostscene .hs-go { display: none; } .hostscene.typed .hs-go { display: inline-block; }

/* ═══ 인라인 스피커 — 언니가 제자리에서 말한다 (v0.9.5, 팝업 없음) ═══ */
.hostsay { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; margin: 6px 0 14px; }
.hostsay[hidden] { display: none; }
.hostsay .hs-host { width: 96px; }
.hostsay .hs-vid { width: 96px; aspect-ratio: 9/16; object-fit: cover; object-position: 50% 12%; border-radius: 12px; display: block; background: #1b1511; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.hostsay .hs-bubble { position: relative; background: #F6F0E4; color: #1D1C24; border-radius: 4px 16px 16px 16px; padding: 12px 14px 10px; font-size: 1rem; line-height: 1.55; min-height: 56px; cursor: pointer; opacity: 0; }
.hostsay .hs-bubble.pop { animation: sayPop .32s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes sayPop { from { opacity: 0; transform: translateX(-8px) scale(.94); } to { opacity: 1; transform: none; } }
.hostsay .hs-bubble::before { content: ""; position: absolute; left: -10px; top: 14px; border: 8px solid transparent; border-right-color: #F6F0E4; border-left: 0; }
.hostsay .hs-txt b { color: #B8771A; font-weight: 800; }
.hostsay.speaking:not(.typed) .hs-txt::after { content: "▍"; color: #B8771A; animation: blink 1s steps(2) infinite; margin-left: 2px; }
.hostsay .hs-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-height: 26px; }
.hostsay .hs-go { display: none; border: 0; background: #1D1C24; color: #F6F0E4; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.hostsay.typed .hs-go { display: inline-block; }
.hostsay .hs-hint { font-size: .74rem; color: #6b655a; }
.hostsay.typed .hs-hint { display: none; }
.hostsay.bub-burst .hs-bubble { border-radius: 8px; clip-path: polygon(0 8%, 4% 0, 96% 3%, 100% 10%, 98% 92%, 94% 100%, 6% 98%, 0 90%); }
.hostsay.bub-burst .hs-bubble::before { display: none; }
.hostsay.bub-cloud .hs-bubble { border-radius: 26px; }
/* 카운터(인트로)에선 영상 없이 말풍선만: 언니 영상은 위 hostSlot */
#hostSay { grid-template-columns: 1fr; max-width: 560px; margin: 10px auto 14px; }
#hostSay .hs-bubble { border-radius: 16px; }
#hostSay .hs-bubble::before { left: 50%; top: -10px; margin-left: -8px; border: 8px solid transparent; border-bottom-color: #F6F0E4; border-top: 0; }
/* 팝업 장면은 더 이상 쓰지 않는다 */
.hostscene { display: none !important; }

/* ═══ v0.9.6 — 주인장 고정 독: 상단에 붙어 있고, 말풍선은 그 옆에 팝업처럼 ═══ */
.hostsay { position: sticky; top: 58px; z-index: 60; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 8px 6px 8px 0; margin: 0 0 12px; border-bottom: 1px solid var(--line); grid-template-columns: 84px 1fr; }
.hostsay .hs-host, .hostsay .hs-vid { width: 84px; }
.hostsay .hs-vid { border-radius: 10px; }
.hostsay:not(.speaking) .hs-bubble { display: none; }
.hostsay:not(.speaking) { grid-template-columns: 84px 1fr; }
.hostsay .hs-bubble { margin-top: 6px; }
/* 인트로 독은 화면에 완전히 고정 */
#hostSay.dock { position: fixed; top: 58px; left: 0; right: 0; margin: 0; padding: 8px max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left)); grid-template-columns: 84px 1fr; max-width: none; z-index: 110; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
#hostSay.dock .hs-bubble { border-radius: 4px 16px 16px 16px; }
#hostSay.dock .hs-bubble::before { left: -10px; top: 14px; margin: 0; border: 8px solid transparent; border-right-color: #F6F0E4; border-left: 0; border-bottom: 8px solid transparent; }
#hostSay.dock:not(.speaking) { padding-bottom: 8px; }
body:has(#hostSay.dock:not([hidden])) .s-counter { padding-top: 190px; }

/* 독 위치는 내비 아래(실측) */
.hostsay { top: var(--dock-top, 58px); }
#hostSay.dock { top: var(--dock-top, 58px); }

/* 소리 켜기 안내 — 브라우저가 자동 재생을 막았을 때만 */
.sndprompt { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 130; border: 1px solid color-mix(in srgb, var(--primary) 50%, transparent); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); color: var(--ink); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: .88rem; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: sndPulse 1.8s ease-in-out infinite; cursor: pointer; }
@keyframes sndPulse { 0%,100% { box-shadow: 0 10px 30px rgba(0,0,0,.4); } 50% { box-shadow: 0 10px 30px rgba(0,0,0,.4), 0 0 0 6px color-mix(in srgb, var(--primary) 18%, transparent); } }

/* ═══ v0.9.8 — 주인장은 무조건 풀화면 ═══ */
.hostsay.speaking, #hostSay.dock { position: fixed; inset: 0; top: 0 !important; z-index: 120; display: block; margin: 0; padding: 0; background: #0b0c12; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; max-width: none; }
.hostsay.speaking .hs-host, #hostSay.dock .hs-host { position: absolute; inset: 0; width: 100%; height: 100%; }
.hostsay.speaking .hs-vid, #hostSay.dock .hs-vid { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; border-radius: 0; box-shadow: none; }
.hostsay.speaking .hs-host::after, #hostSay.dock .hs-host::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(180deg, transparent, rgba(8,9,14,.85)); pointer-events: none; }
.hostsay.speaking .hs-bubble, #hostSay.dock .hs-bubble { position: absolute; left: 12px; right: 12px; bottom: calc(18px + env(safe-area-inset-bottom)); margin: 0; border-radius: 16px; font-size: 1.05rem; padding: 14px 16px 12px; z-index: 2; }
.hostsay.speaking .hs-bubble::before, #hostSay.dock .hs-bubble::before { display: none; }
#hostSay.dock:not(.speaking) .hs-bubble { display: none; }
#hostSay.dock .hs-extra { position: absolute; left: 12px; right: 12px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 2; display: grid; gap: 8px; }
#hostSay.dock .hs-extra .choices2 { margin: 0; }
#hostSay.dock .hs-extra .ch2 { background: rgba(246,240,228,.94); color: #1D1C24; border-color: transparent; }
#hostSay.dock .hs-extra .ch2 small { color: #6b655a; }
#hostSay.dock .hs-extra .gobtn { display: block; text-align: center; background: var(--primary); color: #1A1410; border-radius: 12px; padding: 12px; font-weight: 800; text-decoration: none; }
/* 결과지: 말이 끝나고 글 화면으로 가면 작은 스티키 바로 돌아온다 (기존 규칙) */
body:has(#hostSay.dock:not([hidden])) .s-counter { padding-top: 24px; }
/* 결과지: 말하지 않을 땐 작은 바를 숨긴다 — 언니는 풀화면 아니면 안 보인다 */
.pager .hostsay:not(.speaking) { display: none; }

/* ═══ v0.9.9 — 끊기지 않는 주인장: talk/idle 두 겹 크로스페이드, 프레임 전체 표시(인물 조금 작게), 흐린 배경 ═══ */
.hostsay.speaking .hs-host, #hostSay.dock .hs-host { background: #0b0c12; }
.hostsay .hs-bg { position: absolute; inset: -20px; background: url("../video/host/poster.jpg") center/cover no-repeat; filter: blur(28px) brightness(.45) saturate(.9); transform: scale(1.1); }
.hostsay.speaking .hs-vid, #hostSay.dock .hs-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 40%; border-radius: 0; box-shadow: none; transition: opacity .7s ease; }
.hostsay .hs-idle { opacity: 0; }
.hostsay.idle .hs-idle { opacity: 1; }
.hostsay.idle .hs-talk { opacity: 0; }
.hostsay.speaking .hs-host::after, #hostSay.dock .hs-host::after { height: 40%; }
/* 작은 바(사용 안 함) */
/* 하단 지시문 */
.hostsay .hs-cue { display: none; }
.hostsay.speaking .hs-cue, #hostSay.dock .hs-cue { display: block; position: absolute; left: 0; right: 0; bottom: calc(6px + env(safe-area-inset-bottom)); text-align: center; font-size: .74rem; letter-spacing: .04em; color: rgba(239,231,216,.7); z-index: 3; pointer-events: none; }
.hostsay .hs-cue[hidden] { display: none !important; }
.hostsay.speaking .hs-bubble, #hostSay.dock .hs-bubble, #hostSay.dock .hs-extra { bottom: calc(34px + env(safe-area-inset-bottom)); }
.hostsay .hs-hint { display: none; }
/* 인물은 조금 작게 — 배경(블러 포스터)은 그대로 꽉 채우고 인물 층만 살짝 줄인다 */
.hostsay.speaking .hs-vid, #hostSay.dock .hs-vid { transform: scale(.88); transform-origin: 50% 22%; }

/* 서빙 컷 위의 종이 메뉴표 — 글씨는 영상이 아니라 화면에서 얹는다 */
.hs-paper { position: absolute; left: 14px; bottom: 30%; z-index: 2; background: #efe4cc; color: #3a2a18; padding: 8px 12px; border-radius: 3px; font-size: .95rem; font-weight: 800; letter-spacing: .02em; transform: rotate(-4deg); box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.hs-paper::before { content: ""; position: absolute; left: 50%; top: -6px; width: 26px; height: 10px; margin-left: -13px; background: rgba(242,180,92,.55); }
.hs-paper[hidden] { display: none; }

/* 뒤로가기 — 풀화면 주인장 화면에서 나가는 길 */
.hs-back { position: absolute; left: 10px; top: calc(10px + env(safe-area-inset-top)); z-index: 5; background: rgba(11,12,18,.55); color: var(--ink, #EFE7D8); border: 1px solid rgba(239,231,216,.25); border-radius: 999px; padding: 7px 14px; font-size: .82rem; font-weight: 700; backdrop-filter: blur(6px); }
.hs-back:active { background: rgba(11,12,18,.8); }
