/* ============================================================
   사주서고(四柱書庫) — 화면 스타일
   밝은 화이트 쇼핑몰 · 먹색 본문 · 골드/버건디 포인트. 모바일 390px 우선.
   ============================================================ */
:root{
  --bg:#FFFFFF; --bg2:#F8F7F4; --bg3:#F2EFE9;
  --ink:#1A1A1A; --ink2:#3F3B36; --sub:#6E6862; --mute:#9C958C;
  --gold:#B08A2E; --gold-l:#8A6A1F; --gold-d:#6E5314;
  --burgundy:#8E2F3A; --burgundy-d:#77242D;
  --line:#E6E1D8; --line2:#EFEBE3;
  --paper:#FBF6EC; --paper2:#F5EDDC; --paper-ink:#2A2118; --paper-sub:#6B5B45;
  --serif:'Noto Serif KR', 'Nanum Myeongjo', serif;
  --sans:'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html,body{margin:0; padding:0; word-break:keep-all; overflow-wrap:break-word}
body{
  background:var(--bg); color:var(--ink); font-family:var(--sans);
  font-size:15px; line-height:1.65; letter-spacing:-.01em;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%; display:block}
a{color:inherit; text-decoration:none}
button{font-family:inherit; cursor:pointer; border:0; background:none; color:inherit}
input,select{font-family:inherit; font-size:16px}
.serif{font-family:var(--serif)}
.wrap{max-width:760px; margin:0 auto; padding:0 18px}
.hide{display:none !important}

/* ---------- 상단 ---------- */
.topbar{
  position:sticky; top:0; z-index:40;
  background:rgba(255,255,255,.94); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line2);
}
.topbar .wrap{display:flex; align-items:center; justify-content:space-between; height:56px}
.brand{display:flex; align-items:center; gap:8px}
.brand:before{content:''; width:19px; height:19px; border-radius:5px; flex:0 0 auto;
  background:linear-gradient(145deg,#A63844,#77242D); box-shadow:0 2px 6px rgba(142,47,58,.28)}
.brand b{font-family:var(--serif); font-size:19px; line-height:1; letter-spacing:.06em; color:var(--ink); font-weight:800}
.brand span{font-size:10px; letter-spacing:.28em; color:var(--mute); align-self:center; margin-top:2px}
.topbar nav a{font-size:12.5px; color:var(--sub); margin-left:14px}
.topbar nav a:hover{color:var(--burgundy)}

/* ---------- 히어로 (카드뉴스형 수동 캐러셀 · 양옆 카드 peek) ---------- */
.hero{max-width:760px; margin:12px auto 0; padding:0 18px;
  touch-action:pan-y; -webkit-user-select:none; user-select:none}
.hero-card{position:relative; overflow:hidden; border-radius:20px; background:#F3EEE5}
.hero-track{display:flex; gap:12px; padding:0 18px; align-items:stretch;
  transition:transform .46s cubic-bezier(.22,.61,.36,1); will-change:transform; cursor:grab}
.hero-track.dragging{transition:none; cursor:grabbing}
.hero-track.noanim{transition:none}
.hero-slide{position:relative; flex:0 0 86%; min-width:0; aspect-ratio:4/5; overflow:hidden; border-radius:16px; background:#EDE7DC}
.hero-media{position:absolute; inset:0; overflow:hidden}
.hero-media img{width:100%; height:100%; object-fit:cover; object-position:50% 18%;
  -webkit-user-drag:none; pointer-events:none}
.hero-tag{position:absolute; left:10px; top:10px; z-index:2; font-size:10.5px; font-weight:700; letter-spacing:.02em;
  padding:5px 10px; border-radius:999px; background:rgba(255,255,255,.94); color:var(--ink2);
  border:1px solid rgba(26,26,26,.05); box-shadow:0 2px 8px rgba(20,16,10,.10)}
.hero-copy{position:absolute; left:0; right:0; bottom:0; padding:52px 15px 15px; color:#fff;
  background:linear-gradient(0deg, rgba(16,12,9,.92) 0%, rgba(16,12,9,.62) 46%, rgba(16,12,9,0) 100%)}
.hero-copy .eyebrow{font-size:10px; letter-spacing:.14em; color:#E7C9A0; font-weight:700; margin-bottom:7px}
.hero-copy h1{font-family:var(--serif); font-size:20px; line-height:1.42; margin:0 0 5px; letter-spacing:-.02em; color:#fff;
  text-shadow:0 1px 10px rgba(0,0,0,.35)}
.hero-copy p{margin:0 0 12px; font-size:12px; color:rgba(255,255,255,.82)}
.hero-copy .price{display:flex; align-items:center; justify-content:space-between; gap:10px}
.hero-copy .price b{font-family:var(--serif); font-size:19px; color:#fff; letter-spacing:-.01em}
.hero-copy .price .go{display:inline-flex; align-items:center; gap:2px; font-size:12px; font-weight:800; color:#3A1116;
  background:linear-gradient(180deg,#F6E2B0,#E7C08A); padding:8px 12px 8px 14px; border-radius:999px;
  box-shadow:0 3px 12px rgba(0,0,0,.24)}
.hero-copy .price .go svg{width:12px; height:12px}
/* 좌우 화살표 */
.hero-nav{position:absolute; top:42%; transform:translateY(-50%); z-index:4;
  width:36px; height:36px; border-radius:50%; display:grid; place-items:center;
  color:var(--ink); background:rgba(255,255,255,.9); border:1px solid rgba(26,26,26,.06);
  box-shadow:0 3px 12px rgba(26,20,10,.16);
  transition:background .2s ease, box-shadow .2s ease, transform .2s ease}
.hero-nav svg{width:15px; height:15px; display:block}
.hero-nav:hover{background:#fff; box-shadow:0 6px 18px rgba(26,20,10,.22)}
.hero-nav:active{transform:translateY(-50%) scale(.93)}
.hero-nav.prev{left:8px}
.hero-nav.next{right:8px}
/* 하단 점 — 지금 보고 있는 점만 알약처럼 늘어난다 */
.hero-dots{display:flex; justify-content:center; gap:2px; padding:12px 0 2px}
.hero-dot{width:22px; height:22px; padding:0; display:grid; place-items:center; background:none; border:0}
.hero-dot i{display:block; width:7px; height:7px; border-radius:50%; background:#DCD6CB;
  transition:width .18s cubic-bezier(.4,0,.2,1), border-radius .18s cubic-bezier(.4,0,.2,1), background .18s cubic-bezier(.4,0,.2,1)}
.hero-dot.on i{width:22px; border-radius:3.5px; background:var(--burgundy)}
@media(min-width:700px){
  .hero{margin-top:16px}
  .hero-slide{flex-basis:70%; aspect-ratio:16/10}
  .hero-copy{padding:70px 22px 20px}
  .hero-copy h1{font-size:24px}
  .hero-copy p{font-size:13px}
  .hero-nav{top:50%}
}


/* ---------- 섹션 ---------- */
.section{padding:26px 0 6px}
.sec-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:14px}
.sec-head h2{font-family:var(--serif); font-size:19px; margin:0; letter-spacing:-.02em; color:var(--ink)}
.sec-head span{font-size:11.5px; color:var(--mute)}
.chips{display:flex; gap:6px; overflow-x:auto; padding-bottom:10px; margin-bottom:8px; scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto; padding:8px 14px; border:1px solid var(--line); border-radius:999px; background:#fff;
  font-size:12.5px; color:var(--ink2); white-space:nowrap; transition:background .18s, color .18s, border-color .18s}
.chip.on{border-color:var(--burgundy); background:var(--burgundy); color:#fff; font-weight:700}

/* 상품 카드 — 쇼핑몰 리스트 */
.cards{display:grid; grid-template-columns:1fr; gap:11px}
.card{
  position:relative; display:grid; grid-template-columns:112px 1fr;
  border:1px solid var(--line2); border-radius:14px; overflow:hidden; background:#fff;
  transition:box-shadow .2s ease, transform .2s ease;
}
.card:hover{box-shadow:0 8px 22px rgba(26,20,10,.09)}
.card:active{transform:scale(.995)}
.card .thumb{position:relative; aspect-ratio:1; overflow:hidden; background:#F3EEE5}
.card .thumb img{width:100%; height:100%; object-fit:cover; object-position:50% 16%; transition:transform .5s}
.card:hover .thumb img{transform:scale(1.04)}
.card .thumb:after{content:''; position:absolute; inset:0;
  background:linear-gradient(180deg, transparent 72%, rgba(26,20,10,.10))}
.card .who{position:absolute; left:8px; top:8px; font-size:10px; font-weight:600; letter-spacing:.01em;
  padding:3px 7px; border-radius:999px; background:rgba(255,255,255,.94); color:var(--ink2);
  border:1px solid rgba(26,26,26,.05)}
.card .body{padding:12px 14px 12px; display:flex; flex-direction:column; justify-content:center; min-width:0}
.card .cat{font-size:10.5px; color:var(--gold-l); letter-spacing:.04em; font-weight:600}
.card h3{font-family:var(--serif); font-size:16px; line-height:1.4; margin:5px 0; color:var(--ink);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.card p{margin:0; font-size:12px; color:var(--sub); line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.card .foot{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:9px}
.card .price{min-width:0; flex:1 1 auto}
.card .price b{font-family:var(--serif); font-size:16px; color:var(--ink); white-space:nowrap}
.card .price s{font-size:11.5px; color:var(--mute); margin-right:6px}
.card .go{font-size:11.5px; color:var(--burgundy); font-weight:700; flex:0 0 auto; white-space:nowrap}

/* 신뢰 띠 */
.trust{display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:18px 0 4px}
.trust div{border:1px solid var(--line2); border-radius:12px; padding:13px 8px; text-align:center; background:var(--bg2)}
.trust b{display:block; font-family:var(--serif); font-size:13px; color:var(--ink); margin-bottom:3px}
.trust span{font-size:11px; color:var(--mute)}

/* ---------- 푸터 ---------- */
footer{margin-top:36px; border-top:1px solid var(--line2); padding:22px 0 34px; background:var(--bg2)}
footer .biz{font-size:11px; line-height:1.9; color:var(--mute)}
footer .biz b{color:var(--ink2); font-weight:600}
footer .links{margin:12px 0; display:flex; gap:14px; flex-wrap:wrap}
footer .links a{font-size:11.5px; color:var(--ink2); text-decoration:underline; text-underline-offset:3px}
footer .notice{font-size:10.5px; color:#A69E93; line-height:1.7; margin-top:10px}

/* ---------- 상품 입력 화면 ---------- */
.page{padding-bottom:120px; background:#fff}
.pdp-hero{position:relative; background:#fff}
.pdp-hero img{width:100%; aspect-ratio:4/5; max-height:440px; object-fit:cover; object-position:50% 16%}
.pdp-hero .veil{display:none}
.pdp-hero .copy{max-width:760px; margin:0 auto; padding:14px 18px 2px}
.pdp-hero .who{font-size:10.5px; letter-spacing:.16em; color:var(--gold-l); font-weight:600; margin-bottom:8px}
.pdp-hero h1{font-family:var(--serif); font-size:21px; line-height:1.42; margin:0 0 8px; color:var(--ink)}
.pdp-hero p{margin:0; font-size:12.5px; color:var(--sub); line-height:1.6}
.back-btn{position:absolute; left:12px; top:12px; z-index:5; width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,.92); border:1px solid rgba(26,26,26,.06); color:var(--ink); font-size:16px;
  display:grid; place-items:center; box-shadow:0 2px 10px rgba(26,20,10,.14)}

.form-card{margin-top:14px; background:#fff; border:1px solid var(--line2); border-radius:16px;
  padding:16px 16px 10px; box-shadow:0 6px 20px rgba(26,20,10,.05)}
.form-card fieldset{border:0; padding:0; margin:0 0 10px}
.form-card legend{padding:0; margin-bottom:10px; font-size:12px; color:var(--gold-l); letter-spacing:.06em; font-weight:700}
.row{display:flex; gap:8px; margin-bottom:12px}
.row.tight{gap:6px}
label.f{display:block; font-size:11.5px; color:var(--mute); margin-bottom:6px; letter-spacing:.02em}
.inp{width:100%; background:#fff; border:1px solid #DCD6CB; border-radius:10px; color:var(--ink);
  padding:12px 12px; outline:none; transition:border-color .15s, box-shadow .15s}
.inp:focus{border-color:var(--gold); box-shadow:0 0 0 3px rgba(176,138,46,.14)}
select.inp{appearance:none;
  background-image:linear-gradient(45deg, transparent 50%, #9C958C 50%),linear-gradient(135deg, #9C958C 50%, transparent 50%);
  background-position:calc(100% - 16px) 20px, calc(100% - 11px) 20px; background-size:5px 5px, 5px 5px; background-repeat:no-repeat}
.seg{display:flex; gap:6px; width:100%}
.seg button{flex:1; padding:11px 0; border:1px solid #DCD6CB; border-radius:10px; font-size:13px; color:var(--ink2); background:#fff}
.seg button.on{border-color:var(--burgundy); color:#fff; background:var(--burgundy); font-weight:700}
.chk{display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--ink2); margin:-4px 0 12px}
.chk input{width:16px; height:16px; accent-color:var(--burgundy)}
.mode-pick{display:flex; gap:8px; margin-bottom:14px}
.mode-pick button{flex:1; text-align:left; padding:12px; border:1px solid #DCD6CB; border-radius:12px; background:#fff}
.mode-pick button.on{border-color:var(--burgundy); background:#FCF5F4; box-shadow:inset 0 0 0 1px var(--burgundy)}
.mode-pick b{display:block; font-family:var(--serif); font-size:14px; color:var(--ink); margin-bottom:3px}
.mode-pick span{font-size:11px; color:var(--mute)}

/* 고정 CTA */
.dock{position:fixed; left:0; right:0; bottom:0; z-index:50; padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.97); border-top:1px solid var(--line);
  box-shadow:0 -6px 22px rgba(26,20,10,.08); backdrop-filter:blur(8px)}
.dock .inner{max-width:760px; margin:0 auto; display:flex; align-items:center; gap:12px}
.dock .pill{flex:1; min-width:0}
.dock .pill .lbl{font-size:10.5px; color:var(--mute)}
.dock .pill .amt{font-family:var(--serif); font-size:19px; color:var(--ink); line-height:1.2}
.dock button.cta{
  flex:0 0 auto; padding:14px 20px; border-radius:12px; font-weight:800; font-size:15px; letter-spacing:-.01em;
  color:#fff; background:linear-gradient(180deg,#A03844,#8E2F3A 60%,#77242D);
  box-shadow:0 6px 18px rgba(142,47,58,.26);
}
.dock button.cta:disabled{opacity:.6}
.dock .eps{display:block; font-size:10px; color:var(--mute); text-align:center; margin-top:6px}

/* ---------- 결과 화면 ---------- */
.res-head{padding:20px 0 4px; text-align:center}
.res-head .who{font-size:10.5px; letter-spacing:.2em; color:var(--gold-l); font-weight:600}
.res-head h1{font-family:var(--serif); font-size:21px; margin:8px 0 4px; line-height:1.4; color:var(--ink)}
.res-head .sub{font-size:12px; color:var(--mute)}

.msguk{border:1px solid var(--line); border-radius:16px; padding:14px 12px 12px; margin:18px 0 12px;
  background:var(--bg2); position:relative}
.msguk:before,.msguk:after{content:''; position:absolute; width:14px; height:14px; border:1px solid var(--gold); opacity:.55}
.msguk:before{left:8px; top:8px; border-right:0; border-bottom:0}
.msguk:after{right:8px; bottom:8px; border-left:0; border-top:0}
.msguk .cap{text-align:center; font-size:10.5px; letter-spacing:.22em; color:var(--gold-l); font-weight:600; margin-bottom:12px}
.paper{background:linear-gradient(180deg,var(--paper),var(--paper2)); border-radius:10px; color:var(--paper-ink); padding:14px 8px 10px;
  box-shadow:inset 0 0 0 1px rgba(120,90,30,.16), 0 6px 18px rgba(26,20,10,.08)}
.paper .g{display:grid; grid-template-columns:repeat(4,1fr); gap:4px; text-align:center}
.paper .cell{padding:6px 2px !important}
.paper .pos{font-size:10px; color:var(--paper-sub); letter-spacing:.1em}
.paper .han{font-family:var(--serif); font-size:24px; line-height:1.3; font-weight:800}
.paper .ko{font-size:10.5px; color:var(--paper-sub); margin-top:1px}
.paper .ten{font-size:9.5px; color:#8B6F3E; margin-top:3px; min-height:12px}
.paper .e0{color:#2F7A46}.paper .e1{color:#B03A2E}.paper .e2{color:#9A7412}.paper .e3{color:#6B6F76}.paper .e4{color:#2A5B8E}
.paper .unknown .han{color:#B4A78F}
.paper .bar{height:3px; border-radius:2px; margin-top:6px; opacity:.85}

.bars{margin:6px 0 4px}
.bar-row{display:flex; align-items:center; gap:10px; margin-bottom:7px}
.bar-row .n{width:22px; font-family:var(--serif); font-size:12px; color:var(--ink2)}
.bar-row .track{flex:1; height:7px; border-radius:4px; background:#EDE8DF; overflow:hidden}
.bar-row .fill{display:block; height:100%; border-radius:4px}
.bar-row .v{width:38px; text-align:right; font-size:11px; color:var(--mute)}
.bar-row.b0 .fill{background:linear-gradient(90deg,#2F7A46,#4CAF6A)}
.bar-row.b1 .fill{background:linear-gradient(90deg,#B03A2E,#E05A4A)}
.bar-row.b2 .fill{background:linear-gradient(90deg,#9A7412,#D8A81F)}
.bar-row.b3 .fill{background:linear-gradient(90deg,#7A7F86,#C9CED6)}
.bar-row.b4 .fill{background:linear-gradient(90deg,#2A5B8E,#4C8BD0)}

.free{margin:22px 0 8px; padding:18px 0 6px; border-top:1px solid var(--line2)}
.free .tag{display:inline-flex; align-items:center; gap:6px; font-size:10.5px; letter-spacing:.14em; color:var(--gold-d);
  border:1px solid var(--line); border-radius:999px; padding:4px 10px; margin-bottom:12px; background:#FCF9F2}
.free p{font-family:var(--serif); font-size:19px; line-height:1.75; margin:0 0 6px; letter-spacing:-.015em; color:var(--ink)}
.free p b{color:var(--burgundy); font-weight:800}
.free .metric{display:inline-flex; align-items:baseline; gap:8px; margin-top:10px; font-size:11.5px; color:var(--sub);
  border:1px dashed var(--line); border-radius:8px; padding:7px 10px; background:#FCFAF6}
.free .metric b{font-family:var(--serif); font-size:15px; color:var(--burgundy)}

.lock-head{display:flex; align-items:baseline; justify-content:space-between; margin:24px 0 10px}
.lock-head h2{font-family:var(--serif); font-size:16px; margin:0; color:var(--ink)}
.lock-head span{font-size:11px; color:var(--mute)}
.lock-card{position:relative; border:1px solid var(--line2); border-radius:14px; padding:14px 14px 16px; margin-bottom:10px;
  background:#FCFBF8; overflow:hidden}
.lock-card .no{font-size:10px; color:var(--gold-l); letter-spacing:.2em; font-weight:600}
.lock-card h3{font-family:var(--serif); font-size:15.5px; margin:4px 0 6px; color:var(--ink)}
.lock-card .covers{position:relative; max-height:74px; overflow:hidden}
.lock-card .covers div{height:9px; border-radius:3px; background:#E9E3D8; margin-bottom:7px; filter:blur(1.4px)}
.lock-card .covers div:nth-child(1){background:#DDD6C9; width:96%}
.lock-card .covers div:nth-child(2){width:88%}
.lock-card .covers div:nth-child(3){width:64%}
.lock-card .covers div:nth-child(4){width:76%}
.lock-card .covers:after{content:''; position:absolute; inset:0; background:linear-gradient(180deg, transparent, #FCFBF8)}
.lock-card .lock{position:absolute; right:11px; top:11px; font-size:10px; letter-spacing:.08em; color:var(--gold-d);
  border:1px solid var(--line); border-radius:999px; padding:3px 8px; background:#fff}
.lock-cta{margin:14px 0 6px; text-align:center}
.lock-cta .hint{font-size:11.5px; color:var(--sub); margin-bottom:10px}
.eps-line{font-size:10.5px; color:#A69E93; text-align:center; margin:14px 0 0; line-height:1.7}

/* ---------- 리포트 ---------- */
.report-cover{text-align:center; padding:22px 0 14px; border-bottom:1px solid var(--line2); margin-bottom:8px}
.report-cover .seal{width:54px; height:54px; margin:0 auto 12px; border:1px solid var(--gold); border-radius:50%;
  display:grid; place-items:center; font-family:var(--serif); font-size:15px; color:var(--gold-d); letter-spacing:.06em;
  background:#FCF9F2}
.report-cover h1{font-family:var(--serif); font-size:22px; margin:0 0 6px; line-height:1.4; color:var(--ink)}
.report-cover .by{font-size:12px; color:var(--gold-l)}
.report-cover .info{font-size:11.5px; color:var(--mute); margin-top:10px; line-height:1.8}
.chap{margin:26px 0 0; padding-top:6px}
.chap .h{display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--line2); padding-bottom:8px; margin-bottom:12px}
.chap .h .n{font-size:10.5px; color:var(--gold-l); letter-spacing:.18em; font-weight:600}
.chap .h h2{font-family:var(--serif); font-size:18px; margin:0; flex:1; color:var(--ink)}
.chap .h .hj{font-family:var(--serif); color:var(--gold-d); font-size:13px; opacity:.9}
.chap .lead{font-family:var(--serif); font-size:15.5px; color:var(--ink); margin:0 0 12px; line-height:1.7}
.chap p{margin:0 0 12px; font-size:14.5px; line-height:1.85; color:#3C3833}
.chap ul{margin:0 0 12px; padding-left:18px}
.chap li{font-size:14px; line-height:1.85; color:#3C3833; margin-bottom:5px}
.chap blockquote{margin:14px 0; padding:14px 16px; border-left:2px solid var(--gold); background:#FCF7EC;
  font-family:var(--serif); font-size:15px; line-height:1.9; color:var(--ink)}
.chap table{width:100%; border-collapse:collapse; margin:8px 0 14px; font-size:12.5px}
.chap th,.chap td{border:1px solid var(--line); padding:7px 6px; text-align:left}
.chap th{background:#FAF6EC; color:var(--ink2); font-weight:600; font-size:11.5px}
.chap td{color:var(--ink2)}
.face-card{border:1px solid var(--line2); border-radius:12px; overflow:hidden; margin:6px 0 14px; background:#fff}
.face-card img{width:100%; aspect-ratio:3/4; object-fit:cover}
.face-card figcaption{font-size:11px; color:var(--mute); padding:9px 12px; text-align:center}
.report-actions{display:flex; gap:8px; margin:20px 0 8px}
.report-actions button{flex:1; padding:13px; border-radius:12px; border:1px solid var(--line);
  background:#fff; color:var(--ink2); font-size:13px; font-weight:600}
.report-actions button.solid{background:linear-gradient(180deg,#A03844,#8E2F3A); color:#fff; border:0}

/* ---------- 결제 모달 ---------- */
.modal{position:fixed; inset:0; z-index:90; background:rgba(26,22,16,.42); display:flex; align-items:flex-end; justify-content:center}
.sheet{width:100%; max-width:520px; background:#fff; border-radius:18px 18px 0 0; border:1px solid var(--line2);
  box-shadow:0 -10px 40px rgba(26,20,10,.18);
  padding:18px 18px calc(18px + env(safe-area-inset-bottom)); max-height:92vh; overflow:auto}
.sheet .grip{width:38px; height:3px; border-radius:2px; background:#DED8CD; margin:0 auto 14px}
.sheet h3{font-family:var(--serif); font-size:18px; margin:0 0 4px; color:var(--ink)}
.sheet .sub{font-size:12px; color:var(--mute); margin-bottom:16px}
.pay-sum{border:1px solid var(--line2); border-radius:12px; padding:12px; margin-bottom:14px; background:var(--bg2)}
.pay-sum .l{display:flex; justify-content:space-between; font-size:12.5px; color:var(--sub); margin-bottom:6px}
.pay-sum .l b{color:var(--ink); font-family:var(--serif); font-size:15px}
.acct{border:1px dashed var(--gold); border-radius:12px; padding:14px; margin-bottom:12px; background:#FCF7EC}
.acct .bank{font-size:11.5px; color:var(--gold-d); letter-spacing:.06em; margin-bottom:6px; font-weight:600}
.acct .num{display:flex; align-items:center; justify-content:space-between; gap:10px}
.acct .num b{font-family:var(--serif); font-size:19px; letter-spacing:.03em; color:var(--ink)}
.acct .num button{font-size:11.5px; border:1px solid var(--line); border-radius:999px; padding:6px 10px; color:var(--ink2); background:#fff}
.acct .who{font-size:11.5px; color:var(--sub); margin-top:6px}
.safety{font-size:11px; color:var(--mute); line-height:1.8; border-top:1px solid var(--line2); padding-top:10px; margin-top:10px}
.safety b{color:var(--ink2); font-weight:600}
.err{color:#B03A2E; font-size:12px; margin:0 0 8px}
.waiting{text-align:center; padding:26px 6px 10px}
.waiting .spin{width:34px; height:34px; margin:0 auto 14px; border-radius:50%;
  border:2px solid #EFE8DA; border-top-color:var(--burgundy); animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.waiting p{font-family:var(--serif); font-size:16px; margin:0 0 6px; color:var(--ink)}
.waiting span{font-size:12px; color:var(--mute)}
.done-ico{width:52px; height:52px; margin:6px auto 14px; border-radius:50%; display:grid; place-items:center;
  border:1px solid var(--gold); color:var(--gold-d); font-size:22px; background:#FCF7EC}
.btn-wide{width:100%; padding:14px; border-radius:12px; font-weight:800; font-size:15px; color:#fff;
  background:linear-gradient(180deg,#A03844,#8E2F3A 60%,#77242D); margin-top:6px;
  box-shadow:0 6px 18px rgba(142,47,58,.22)}
.btn-ghost{width:100%; padding:12px; border-radius:12px; font-size:13px; color:var(--ink2);
  border:1px solid var(--line); background:#fff; margin-top:8px}

/* ---------- 카테고리 타일 · 고정 탭 (사주별관 방식) ---------- */
.cats{display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin:22px 0 6px}
.cat-tile{display:flex; flex-direction:column; align-items:center; gap:6px; padding:6px 2px; background:none; border:0}
.cat-tile .ico{width:54px; height:54px; border-radius:16px; display:grid; place-items:center; font-size:25px;
  background:var(--bg2); border:1px solid var(--line2); transition:transform .16s ease, background .16s ease, box-shadow .16s ease}
.cat-tile b{font-size:12px; color:var(--ink); font-weight:700; letter-spacing:-.02em}
.cat-tile i{font-size:10px; color:var(--mute); font-style:normal; margin-top:-3px}
.cat-tile:active .ico{transform:scale(.94); background:#fff; box-shadow:0 6px 16px rgba(26,20,10,.10)}
.catbar{position:sticky; top:56px; z-index:30; display:flex; gap:20px; padding:11px 0 10px; margin:0 -18px;
  padding-left:18px; padding-right:18px; background:rgba(255,255,255,.96); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line2); overflow-x:auto; scrollbar-width:none}
.catbar::-webkit-scrollbar{display:none}
.cat-tab{flex:0 0 auto; font-size:13.5px; color:var(--sub); background:none; border:0; padding:2px 0; position:relative; white-space:nowrap}
.cat-tab.on{color:var(--ink); font-weight:800}
.cat-tab.on:after{content:''; position:absolute; left:0; right:0; bottom:-9px; height:2px; border-radius:2px; background:var(--burgundy)}
.section{padding-top:14px}

/* ---------- 상품 목록 행 (사주별관 리스트) ---------- */
.card .thumb{aspect-ratio:4/3}
.cards{gap:16px}
.card{border:0; border-radius:0; background:transparent; padding-bottom:16px; border-bottom:1px solid var(--line2);
  grid-template-columns:112px 1fr; column-gap:14px; align-items:start}
.card:hover{box-shadow:none}
.card .thumb{border-radius:12px; box-shadow:0 3px 12px rgba(26,20,10,.07)}
.card .body{padding:2px 0 0}
.card .cat{font-size:10.5px; color:var(--mute)}
.card h3{font-family:var(--sans); font-size:16.5px; font-weight:700; line-height:1.4; margin:4px 0 6px; letter-spacing:-.02em}
.card p{font-size:12px; -webkit-line-clamp:2}
.card .foot{margin-top:10px}
.card .foot .price b{font-family:var(--sans); font-size:17px; font-weight:800}
.card .go{display:inline-flex; align-items:center; gap:3px; color:var(--mute); font-weight:600}
.card .go svg{width:13px; height:13px}

/* ---------- 상품 화면: 뒤로+제목 띠 ---------- */
.subhead{position:sticky; top:56px; z-index:35; display:grid; grid-template-columns:40px 1fr 40px; align-items:center;
  height:52px; background:rgba(255,255,255,.97); backdrop-filter:blur(8px); border-bottom:1px solid var(--line2)}
.subhead b{text-align:center; font-size:15px; font-weight:700; letter-spacing:-.02em; color:var(--ink);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.subhead .back{width:38px; height:38px; margin-left:6px; display:grid; place-items:center; border-radius:50%; color:var(--ink)}
.subhead .back svg{width:19px; height:19px}
.pdp-hero img{aspect-ratio:1/1; max-height:none; object-position:50% 20%}
.pdp-hero .copy{padding-top:16px}

/* ---------- 입력 폼: 라벨 줄 + 오른쪽 작은 선택 ---------- */
.form-card{border:0; box-shadow:none; background:#fff; padding:6px 0 10px; margin-top:6px; border-radius:0}
.form-title{font-family:var(--sans); font-size:17px; font-weight:800; letter-spacing:-.03em; margin:6px 0 14px; color:var(--ink)}
.form-divider{height:1px; background:var(--line2); margin:22px 0 18px}
.form-card fieldset{margin:0 0 4px}
.field{margin-bottom:14px}
.field-head{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px}
.field-head .f{margin:0}
label.f{font-size:13px; color:var(--ink2); font-weight:600; margin-bottom:7px}
label.f .opt{font-size:11px; color:var(--mute); font-weight:400; margin-left:2px}
.mini-seg{display:flex; gap:2px; background:var(--bg2); border-radius:999px; padding:2px}
.mini-seg button{font-size:11.5px; padding:4px 9px; border-radius:999px; color:var(--mute); background:none; border:0}
.mini-seg button.on{background:#fff; color:var(--ink); font-weight:700; box-shadow:0 1px 4px rgba(26,20,10,.10)}
.mini-chk{display:inline-flex; align-items:center; gap:5px; font-size:11.5px; color:var(--sub); background:none}
.mini-chk input{width:15px; height:15px; accent-color:var(--burgundy)}
.inp{height:48px; border-radius:10px; padding:0 12px; font-size:15px}
select.inp{padding-right:34px; background-position:calc(100% - 17px) 21px, calc(100% - 12px) 21px; background-color:#fff}
.inp.dim{color:var(--mute); background:#FAF8F4}
.inp:disabled{opacity:.75}
.seg button{height:48px; border-radius:10px; font-size:14.5px}
.row.tight .inp{padding:0 6px; text-align:center; padding-right:6px; background-image:none}
.chk{font-size:12px; margin:-2px 0 10px}
.mode-pick button{padding:12px 12px; border-radius:12px}

/* ---------- 결과 화면: 캐릭터 히어로 + 정보 카드 ---------- */
.res-hero{position:relative; overflow:hidden; background:#EDE7DC}
.res-hero img{width:100%; aspect-ratio:4/5; max-height:460px; object-fit:cover; object-position:50% 16%}
.res-hero .veil{position:absolute; inset:0; background:linear-gradient(0deg, rgba(16,12,9,.78) 0%, rgba(16,12,9,.25) 38%, rgba(16,12,9,0) 64%)}
.rh-copy{position:absolute; left:0; right:0; bottom:64px; padding:0 18px; max-width:760px; margin:0 auto; color:#fff}
.rh-copy .rh-who{font-size:10.5px; letter-spacing:.14em; color:#E7C9A0; font-weight:700; margin-bottom:6px}
.rh-copy h1{font-family:var(--serif); font-size:26px; margin:0; line-height:1.3; letter-spacing:-.02em; text-shadow:0 2px 14px rgba(0,0,0,.4)}
.info-cards{position:relative; z-index:3; display:grid; grid-template-columns:1fr; gap:10px; margin-top:-48px}
.info-cards.two{grid-template-columns:1fr 1fr; gap:8px}
.info-card{background:linear-gradient(180deg,#FFFDF8,#FBF6EC); border:1px solid rgba(150,116,50,.22); border-radius:14px;
  padding:14px 12px; text-align:center; box-shadow:0 8px 22px rgba(26,20,10,.08); position:relative}
.info-card:before,.info-card:after{content:''; position:absolute; width:10px; height:10px; border:1px solid var(--gold); opacity:.5}
.info-card:before{left:6px; top:6px; border-right:0; border-bottom:0}
.info-card:after{right:6px; bottom:6px; border-left:0; border-top:0}
.info-card .ic-k{display:inline-block; font-size:10px; letter-spacing:.12em; color:var(--gold-d); font-weight:700; margin-bottom:6px}
.info-card b{display:block; font-family:var(--serif); font-size:14.5px; color:var(--paper-ink); margin-bottom:5px; letter-spacing:-.02em}
.info-card span{display:block; font-size:11.5px; color:var(--paper-sub); line-height:1.7}
.info-card .nm{font-weight:700; color:var(--paper-ink); margin-top:2px}
.res-line{text-align:center; font-family:var(--serif); font-size:14.5px; color:var(--ink); margin:20px 0 4px; letter-spacing:-.01em}
.sec-cap{text-align:center; margin:26px 0 10px}
.sec-cap:before{content:''; display:block; width:28px; height:1px; background:var(--gold); opacity:.55; margin:0 auto 10px}
.sec-cap span,.sec-cap{font-family:var(--serif); font-size:17px; color:var(--ink); letter-spacing:-.02em}
.msguk{margin:0 0 14px; background:#FCFAF5}
.chap-divider{margin:26px -18px 8px; padding:38px 18px; background:radial-gradient(120% 90% at 50% 0%, #2A1B16 0%, #150E0B 70%);
  color:#F3E7D2; text-align:center; position:relative; overflow:hidden}
.chap-divider:before{content:''; position:absolute; inset:0; background:radial-gradient(60% 50% at 50% 120%, rgba(176,138,46,.22), transparent 70%)}
.chap-divider .cd-in{position:relative}
.chap-divider span{display:inline-grid; place-items:center; width:38px; height:38px; border:1px solid rgba(243,231,210,.4);
  border-radius:50%; font-family:var(--serif); font-size:12px; letter-spacing:.1em; margin-bottom:14px; color:#E7C9A0}
.chap-divider p{font-family:var(--serif); font-size:18px; margin:0 0 6px; letter-spacing:-.01em; color:#FBF3E6}
.chap-divider i{font-style:normal; font-size:11.5px; color:rgba(243,231,210,.62); letter-spacing:.06em}

/* ---------- 결제 시트 (결제 화면형) ---------- */
html.lock{overflow:hidden}
.sheet{max-width:560px; border-radius:20px 20px 0 0; padding:0 18px calc(18px + env(safe-area-inset-bottom)); max-height:94vh}
.sheet .grip{margin:10px auto 6px}
.pay-head{display:flex; align-items:center; justify-content:space-between; padding:6px 0 10px}
.pay-head h3{font-family:var(--sans); font-size:19px; font-weight:800; margin:0; letter-spacing:-.02em}
.pay-x{width:34px; height:34px; border-radius:50%; background:var(--bg2); color:var(--ink2); font-size:13px; display:grid; place-items:center}
.pay-prod{padding:6px 0 14px; border-bottom:1px solid var(--line2)}
.pp-k{font-size:11px; color:var(--mute); letter-spacing:.1em; margin-bottom:5px}
.pp-n{font-family:var(--serif); font-size:17px; color:var(--ink); line-height:1.4; margin-bottom:6px}
.pp-s{font-size:12px; color:var(--sub)}
.pay-lines{padding:14px 0 6px}
.pay-lines .l{display:flex; justify-content:space-between; align-items:baseline; font-size:13px; color:var(--sub); margin-bottom:9px}
.pay-lines .l b{font-family:var(--sans); font-size:14.5px; color:var(--ink); font-weight:700}
.pay-lines .l.total{border-top:1px solid var(--line2); padding-top:10px; margin-top:2px; color:var(--ink); font-weight:700}
.pay-lines .l.total b{font-size:20px; font-weight:800}
.pay-method{margin:10px 0 16px}
.method{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px; border-radius:12px;
  border:1.5px solid var(--burgundy); background:#FCF6F5}
.method b{display:block; font-size:14px; color:var(--ink); margin-bottom:3px}
.method span{font-size:11.5px; color:var(--sub)}
.method i{font-style:normal; font-size:10.5px; font-weight:800; color:#fff; background:var(--burgundy); padding:3px 8px; border-radius:999px}
.sheet .inp{margin:0 0 14px}

/* ---------- 헤더 메뉴(드로어) ---------- */
.menu-btn{width:38px; height:38px; display:grid; place-content:center; gap:4px; margin-right:-8px; background:none}
.menu-btn i{display:block; width:19px; height:1.8px; border-radius:2px; background:var(--ink)}
.drawer{position:fixed; inset:0; z-index:100; background:rgba(20,16,12,.42)}
.drawer[hidden]{display:none}
.drawer-panel{position:absolute; right:0; top:0; bottom:0; width:min(84vw,340px); background:#fff; display:flex; flex-direction:column;
  padding:0 20px calc(20px + env(safe-area-inset-bottom)); box-shadow:-10px 0 40px rgba(20,16,12,.18); animation:slidein .24s ease}
@keyframes slidein{from{transform:translateX(24px); opacity:.6} to{transform:none; opacity:1}}
.drawer-top{display:flex; align-items:center; justify-content:space-between; height:56px}
.drawer-brand{font-family:var(--serif); font-size:14px; letter-spacing:.18em; color:var(--gold-d)}
.drawer-close{width:34px; height:34px; border-radius:50%; background:var(--bg2); color:var(--ink2); font-size:13px}
.drawer-nav{display:flex; flex-direction:column; padding:8px 0 10px}
.drawer-nav a{padding:13px 2px; font-size:15px; color:var(--ink); border-bottom:1px solid var(--line2); font-weight:600; letter-spacing:-.02em}
.drawer-nav a:last-child{border-bottom:0}
.drawer-sub{display:flex; flex-wrap:wrap; gap:14px; padding:10px 2px 0}
.drawer-sub a{font-size:12px; color:var(--sub); text-decoration:underline; text-underline-offset:3px}
.drawer-note{margin-top:auto; font-size:11px; color:var(--mute); line-height:1.7; padding-top:20px}

/* ---------- 푸터 (회색 블록 · 가운데 정렬) ---------- */
footer{background:#F4F4F5; border-top:1px solid var(--line2); padding:34px 0 40px; margin-top:40px}
.foot-brand{display:flex; align-items:center; justify-content:center; gap:8px; margin-bottom:18px}
.foot-brand .seal{width:28px; height:28px; border-radius:8px; display:grid; place-items:center; color:#fff; font-family:var(--serif); font-size:13px;
  background:linear-gradient(145deg,#A63844,#77242D)}
.foot-brand b{font-family:var(--serif); font-size:19px; letter-spacing:.04em; color:var(--ink)}
.foot-brand .hj{font-size:10px; letter-spacing:.24em; color:var(--mute)}
footer .biz{text-align:center; font-size:11.5px; line-height:1.95; color:#8B8480}
footer .biz b{color:#6E6862; font-weight:600}
footer .links{justify-content:center; margin:14px 0 10px}
footer .links a{color:#6E6862}
footer .notice{text-align:center; font-size:10.5px; color:#A29B93; margin:8px auto 0; max-width:520px}

/* ---------- 관리자 대시보드 ---------- */
.admin{min-height:100vh; background:var(--bg2); padding-bottom:30px}
.ad-login{min-height:calc(100vh - 56px); display:grid; place-items:center; padding:24px 18px}
.ad-login-box{width:100%; max-width:360px; background:#fff; border:1px solid var(--line2); border-radius:18px; padding:26px 20px 22px;
  box-shadow:0 12px 34px rgba(26,20,10,.08); text-align:center}
.ad-seal{width:52px; height:52px; margin:0 auto 14px; border-radius:50%; border:1px solid var(--gold); display:grid; place-items:center;
  font-family:var(--serif); font-size:16px; color:var(--gold-d); background:#FCF9F2}
.ad-login-box h1{font-family:var(--serif); font-size:20px; margin:0 0 6px; letter-spacing:-.02em}
.ad-sub{font-size:12.5px; color:var(--sub); margin:0 0 16px}
.ad-login-box .inp{margin-bottom:8px; text-align:center; letter-spacing:.2em}
.ad-login-box .err{min-height:18px}
.ad-login-box .btn-wide{margin-top:4px}
.ad-note{font-size:11px; color:var(--mute); margin:12px 0 0; line-height:1.7}
.ad-top{position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between;
  height:56px; padding:0 16px; background:#fff; border-bottom:1px solid var(--line2)}
.ad-top b{font-family:var(--serif); font-size:16px; letter-spacing:-.01em}
.ad-acts{display:flex; gap:6px}
.ad-acts button{font-size:11.5px; color:var(--ink2); border:1px solid var(--line); border-radius:999px; padding:6px 11px; background:#fff}
.ad-wrap{max-width:760px; margin:0 auto; padding:16px}
.ad-when{font-size:11.5px; color:var(--sub); margin-bottom:12px; display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.ad-when b{font-size:13px; color:var(--ink)}
.ad-when span{margin-left:auto; color:var(--mute); font-size:10.5px}
.kpis{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:12px}
.kpi{background:#fff; border:1px solid var(--line2); border-radius:14px; padding:13px 13px 12px}
.kpi span{display:block; font-size:11px; color:var(--sub); margin-bottom:6px}
.kpi b{display:block; font-family:var(--serif); font-size:22px; line-height:1.15; color:var(--ink); letter-spacing:-.02em}
.kpi i{display:block; font-style:normal; font-size:10.5px; color:var(--mute); margin-top:4px}
.ad-card{background:#fff; border:1px solid var(--line2); border-radius:14px; padding:14px; margin-bottom:12px}
.ad-h{display:flex; align-items:baseline; justify-content:space-between; gap:8px; font-size:13.5px; font-weight:800; color:var(--ink); margin-bottom:10px}
.ad-h span{font-size:10.5px; color:var(--mute); font-weight:400}
.tbl-wrap{overflow-x:auto}
.funnel{width:100%; border-collapse:collapse; font-size:12px}
.funnel th{font-size:10.5px; color:var(--mute); font-weight:600; text-align:right; padding:6px 4px; border-bottom:1px solid var(--line2)}
.funnel th:first-child{text-align:left}
.funnel td{text-align:right; padding:9px 4px; border-bottom:1px solid #F4F0E9; color:var(--ink2)}
.funnel td.pn{text-align:left; line-height:1.35}
.funnel td.pn b{display:block; font-size:12px; color:var(--ink)}
.funnel td.pn span{display:block; font-size:10px; color:var(--mute); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:120px}
.funnel td.paid{font-weight:800; color:var(--burgundy)}
.funnel tr.dim{opacity:.42}
.ad-bars{display:flex; flex-direction:column; gap:8px}
.ad-bar{display:grid; grid-template-columns:38px 1fr 34px; align-items:center; gap:8px; font-size:11.5px; color:var(--sub)}
.ad-bar i{height:8px; border-radius:4px; background:#EFEAE1; overflow:hidden}
.ad-bar i b{display:block; height:100%; border-radius:4px; background:linear-gradient(90deg,#B08A2E,#8E2F3A)}
.ad-bar em{font-style:normal; text-align:right; font-weight:700; color:var(--ink2)}
.ord{display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid #F4F0E9}
.ord:last-child{border-bottom:0}
.ord-l b{display:block; font-size:12px; color:var(--ink); line-height:1.4; max-width:190px}
.ord-l span{display:block; font-size:10.5px; color:var(--mute); margin-top:3px}
.ord-r{text-align:right; flex:0 0 auto}
.ord-r b{display:block; font-size:12.5px; color:var(--ink); font-weight:800}
.ord-r i{display:block; font-style:normal; font-size:10px; color:var(--mute); margin-top:3px}
.st{display:inline-block; font-size:9.5px; font-weight:800; padding:2px 6px; border-radius:999px; margin-top:4px}
.st.paid{background:#EAF6EE; color:#1E7A44}
.st.pending{background:#FDF3E4; color:#9A6E16}
.st.cancelled{background:#F2F1EF; color:#8B8480}
.ad-empty{font-size:12px; color:var(--mute); text-align:center; padding:14px 0}
.kv{display:flex; justify-content:space-between; gap:12px; font-size:12px; color:var(--sub); padding:7px 0; border-bottom:1px solid #F4F0E9}
.kv:last-child{border-bottom:0}
.kv b{color:var(--ink2); font-weight:600; text-align:right}
.kv b.ok{color:#1E7A44}
.kv b.warn{color:#9A6E16}

/* ---------- 인쇄(PDF) ---------- */
@media print{
  body{background:#fff; color:#111}
  .topbar,.dock,.hero,.admin-badge,footer,.report-actions,.modal,.back-btn,.lock-card,.free .tag{display:none !important}
  .wrap{max-width:none; padding:0}
  .report-cover{padding-top:0}
  .report-cover h1,.chap .h h2,.chap .lead,.chap blockquote{color:#111}
  .chap p,.chap li,.chap td{color:#222}
}
