/* 흑묘당 손님용 사이트 스타일 — 폰 화면을 기준으로 만들고, 큰 화면에서는 가운데 폰 폭으로 보여 줘요 */
:root {
    --bg: #0a0907; --bg2: #110f0b; --card: #16130e; --card2: #1d1910;
    --line: rgba(234, 197, 90, .22); --line2: rgba(255, 255, 255, .08);
    --gold: #eac55a; --gold2: #f6e3a6; --goldd: #9a7f2a;
    --text: #f3ead3; --muted: #a59c86; --danger: #ef7a70; --ok: #7ad3a0;
    --serif: 'Noto Serif KR', 'Nanum Myeongjo', 'Batang', 'Noto Serif CJK KR', serif;
    --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.7; font-size: 16px; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.page { width: 100%; max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
.page.wide { max-width: 1040px; }
@media (min-width: 560px) { body { background: radial-gradient(ellipse at 50% 0, #1b150a 0, #0a0907 60%); } .page:not(.wide) { box-shadow: 0 0 80px rgba(0, 0, 0, .7); border-left: 1px solid var(--line2); border-right: 1px solid var(--line2); } }
.pad { padding-left: 20px; padding-right: 20px; }
.serif { font-family: var(--serif); }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 버튼 */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 20px; border-radius: 14px; font-size: 1.05rem; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s, filter .15s; touch-action: manipulation; }
.btn:active { transform: scale(.985); }
.btn-gold { background: linear-gradient(135deg, #f6e3a6 0%, #eac55a 45%, #c79a2b 100%); color: #1a1400; box-shadow: 0 8px 26px rgba(234, 197, 90, .28); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { background: rgba(255, 255, 255, .05); color: var(--gold2); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(234, 197, 90, .1); }
.btn[disabled], .btn.off { background: #2a261d; color: #8d856f; box-shadow: none; cursor: not-allowed; }
.btn-sm { min-height: 40px; font-size: .9rem; border-radius: 10px; width: auto; padding: 0 14px; }

/* 맨 위 이름표 */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; text-decoration: none; color: var(--gold2); display: inline-flex; align-items: center; gap: 8px; }
.logo svg { width: 22px; height: 22px; }

/* ── 첫 화면 ── */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
.hero .topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; background: linear-gradient(#0a0907cc, transparent); }
.hero-bg { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
.hero-bg img { position: absolute; top: 0; left: 0; width: 100%; height: auto; transform-origin: 50% 18%; animation: kb 26s ease-in-out infinite alternate; }
.hero-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
@keyframes kb { from { transform: scale(1.0); } to { transform: scale(1.12) translateY(-1%); } }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(10, 9, 7, .30) 0, rgba(10, 9, 7, 0) 20%, rgba(10, 9, 7, 0) 44%, rgba(10, 9, 7, .82) 66%, #0a0907 84%); }
.dust { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.dust i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: radial-gradient(circle, #fff3c4 0, #eac55a 45%, transparent 70%); opacity: 0; animation: float 9s linear infinite; }
@keyframes float { 0% { transform: translateY(30px) scale(.6); opacity: 0; } 15% { opacity: .9; } 85% { opacity: .6; } 100% { transform: translateY(-260px) translateX(18px) scale(1.1); opacity: 0; } }
.hero-copy { padding: 0 24px 14px; }
.eyebrow { color: var(--gold); font-size: .86rem; letter-spacing: .12em; font-weight: 600; }
.hero h1 { font-family: var(--serif); font-size: 2.2rem; line-height: 1.28; font-weight: 700; margin: 6px 0 10px; color: #fff7de; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, #f6e3a6, #eac55a 60%, #c79a2b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { color: #e2d7bb; font-size: .98rem; margin-bottom: 16px; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 9, 7, .55); color: var(--gold2); backdrop-filter: blur(6px); }
.scroll-hint { text-align: center; color: var(--muted); font-size: .78rem; padding-bottom: 14px; letter-spacing: .1em; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .hero-bg img, .hero-bg video, .dust i, .scroll-hint { animation: none; } html { scroll-behavior: auto; } }

/* 본문 구역 */
.sec { padding: 54px 0 6px; }
.sec h2 { font-family: var(--serif); font-size: 1.55rem; line-height: 1.4; padding: 0 20px; margin-bottom: 8px; color: #fff4d2; }
.sec .sub { color: var(--muted); padding: 0 20px; margin-bottom: 22px; font-size: .96rem; }
.sec-tag { display: block; padding: 0 20px; color: var(--gold); font-size: .78rem; letter-spacing: .16em; margin-bottom: 6px; font-weight: 600; }

/* 풀이 샘플 가로 넘기기 */
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 14px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 62%; max-width: 250px; scroll-snap-align: center; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); cursor: zoom-in; position: relative; }
.shot img { width: 100%; height: auto; }
.shot span { position: absolute; left: 8px; bottom: 8px; font-size: .72rem; background: rgba(10, 9, 7, .78); color: var(--gold2); padding: 3px 9px; border-radius: 999px; }
.note { color: var(--muted); font-size: .8rem; padding: 0 20px; }

/* 후기 */
.rev { margin: 0 20px 12px; padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); }
.rev .stars { color: var(--gold); letter-spacing: 2px; font-size: .95rem; }
.rev p { margin: 8px 0 10px; color: #e7dec6; }
.rev small { color: var(--muted); }

/* 상품 카드 */
.prod { margin: 0 20px 16px; border-radius: 20px; background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); overflow: hidden; }
.prod-top { display: flex; gap: 14px; padding: 18px 18px 8px; align-items: flex-start; }
.prod-thumb { flex: 0 0 74px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.prod-thumb img { width: 100%; height: 108px; object-fit: cover; object-position: top; }
.prod .badge { display: inline-block; font-size: .72rem; font-weight: 700; color: #1a1400; background: var(--gold); border-radius: 999px; padding: 2px 9px; margin-bottom: 6px; }
.prod h3 { font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; }
.prod .en { color: var(--gold); font-size: .72rem; letter-spacing: .18em; }
.prod .price { font-size: 1.5rem; font-weight: 800; color: var(--gold2); margin-top: 4px; }
.prod .tag { color: #d9cfb3; padding: 4px 18px 0; }
.prod ul { list-style: none; padding: 10px 18px 4px; }
.prod li { position: relative; padding: 3px 0 3px 22px; font-size: .92rem; color: #cfc6ab; }
.prod li::before { content: ''; position: absolute; left: 2px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); opacity: .8; }
.prod .meta { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 18px 14px; }
.prod .meta span { font-size: .78rem; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 3px 10px; }
.prod .go { padding: 0 18px 18px; }

/* 이용 방법 */
.steps { list-style: none; padding: 0 20px; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); }
.steps li::before { content: counter(s); flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1a1400; font-weight: 800; }
.steps b { display: block; color: #fff4d2; margin-bottom: 2px; }
.steps span { color: var(--muted); font-size: .92rem; }
.why { display: grid; gap: 12px; padding: 0 20px; }
.why div { padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); }
.why b { color: var(--gold2); display: block; margin-bottom: 4px; }
.why span { color: #cfc6ab; font-size: .93rem; }

/* 자주 묻는 질문 */
.faq { padding: 0 20px; }
.faq details { border-bottom: 1px solid var(--line2); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 28px 16px 0; font-weight: 600; position: relative; color: #f1e7cb; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; color: var(--gold); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: '–'; }
.faq p { padding: 0 0 16px; color: var(--muted); font-size: .94rem; }

/* 꼬리말 */
.foot { margin-top: 56px; padding: 30px 20px 120px; background: #070605; border-top: 1px solid var(--line2); color: #8f8771; font-size: .8rem; line-height: 1.8; }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }
.foot .links a { color: #cdbf93; text-decoration: none; }
.foot b { color: #bfb391; font-weight: 600; }
.foot .disc { margin-top: 12px; color: #756d5a; }

/* 아래에 붙는 버튼 줄 */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center; pointer-events: none; transform: translateY(110%); transition: transform .3s; }
.dock.show { transform: none; }
.dock > div { pointer-events: auto; width: 100%; max-width: 520px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, #0a0907 70%, #0a0907e6); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.dock .price { color: var(--gold2); font-weight: 800; font-size: 1.15rem; flex: none; }
.dock .price small { display: block; color: var(--muted); font-weight: 500; font-size: .7rem; }

/* 확대해서 보기 */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .92); display: none; align-items: center; justify-content: center; padding: 16px; }
.lb.on { display: flex; }
.lb img { max-height: 92vh; max-width: 94vw; border-radius: 10px; }
.lb button { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #17140f; color: var(--gold2); font-size: 1.4rem; cursor: pointer; }

/* ── 입력 화면 ── */
.head-img { position: relative; padding: 0 0 6px; overflow: hidden; isolation: isolate; }
.head-img::before { content: ''; position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 30%; opacity: .55; }
.head-img::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(10, 9, 7, .3), #0a0907 98%); }
.head-img.o::before { background-image: url('img/bg_order.jpg'); }
.head-img.w::before { background-image: url('img/bg_wait.jpg'); }
.head-img.f::before { background-image: url('img/bg_find.jpg'); }
.head-img h1 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.4; padding: 22px 20px 6px; color: #fff4d2; }
.head-img p { padding: 0 20px 22px; color: #d7ccae; font-size: .96rem; }
.form { padding: 8px 20px 140px; }
.blk { margin-bottom: 18px; padding: 18px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line2); }
.blk > h3 { font-size: 1rem; color: var(--gold2); margin-bottom: 12px; font-family: var(--serif); }
.fld { margin-bottom: 16px; }
.fld:last-child { margin-bottom: 0; }
.fld > label, .fld > .lab { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 7px; color: #efe5c9; }
.fld .opt { color: var(--muted); font-weight: 400; font-size: .84rem; }
.fld small { display: block; color: var(--muted); font-size: .82rem; margin-top: 6px; line-height: 1.55; }
.inp, .sel, .txt { width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 12px; background: #0f0d09; border: 1px solid rgba(234, 197, 90, .3); color: var(--text); font-size: 16px; font-family: var(--sans); outline: none; -webkit-appearance: none; appearance: none; }
.sel { background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.txt { min-height: 130px; resize: vertical; line-height: 1.6; }
.inp:focus, .sel:focus, .txt:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(234, 197, 90, .18); }
.inp::placeholder, .txt::placeholder { color: #6f6858; }
input[type=date].inp { min-height: 52px; color-scheme: dark; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { flex: 1 1 0; min-width: 0; cursor: pointer; }
.seg.wrap label { flex: 1 1 44%; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 50px; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(234, 197, 90, .26); background: #0f0d09; color: #d6ccb0; font-size: .95rem; line-height: 1.35; transition: .15s; }
.seg input:checked + span { background: rgba(234, 197, 90, .16); border-color: var(--gold); color: #fff1c4; font-weight: 700; box-shadow: inset 0 0 0 1px var(--gold); }
.seg input:focus-visible + span { outline: 2px solid var(--gold2); outline-offset: 2px; }
.ck { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .92rem; color: #d6ccb0; line-height: 1.55; padding: 4px 0; }
.ck input { flex: none; width: 22px; height: 22px; margin-top: 2px; appearance: none; -webkit-appearance: none; border: 1.5px solid rgba(234, 197, 90, .55); border-radius: 6px; background: #0f0d09; display: grid; place-content: center; cursor: pointer; }
.ck input:checked { background: var(--gold); border-color: var(--gold); }
.ck input:checked::after { content: ''; width: 6px; height: 11px; border: solid #1a1400; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.ck input:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
.ck input:disabled { opacity: .4; cursor: not-allowed; }
.seg input[type=checkbox] { appearance: none; -webkit-appearance: none; }
.err { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: rgba(239, 122, 112, .12); border: 1px solid rgba(239, 122, 112, .5); color: #ffc9c3; font-size: .95rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.focus-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.focus-grid .seg span { min-height: 46px; }

/* 시간 고르는 창 (기존 프로그램과 같은 방식) */
.tp { position: relative; }
.tp-show { cursor: pointer; caret-color: transparent; user-select: none; -webkit-user-select: none; }
.tp-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; display: grid; grid-template-columns: 76px 1fr 1fr; gap: 8px; padding: 10px; border-radius: 14px; background: #17171a; border: 1px solid rgba(234, 197, 90, 0.45); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55); }
.tp-panel[hidden] { display: none; }
.tp-ap { display: flex; flex-direction: column; gap: 8px; }
.tp-col { position: relative; max-height: 232px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 4px; padding-right: 2px; }
.tp-panel button { flex: none; height: 38px; border-radius: 10px; border: 1px solid rgba(234, 197, 90, 0.25); background: rgba(255, 255, 255, 0.06); color: #ffffff; font-size: 1rem; cursor: pointer; touch-action: manipulation; }
.tp-ap button { height: 56px; font-weight: 600; }
.tp-panel button:hover { background: rgba(234, 197, 90, 0.18); }
.tp-panel button.on { background: #eac55a; color: #15120a; border-color: #eac55a; font-weight: 700; }

/* ── 미리보기 / 주문 ── */
.card { margin: 0 20px 16px; padding: 18px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line2); }
.card h2 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 4px; color: #fff4d2; padding: 0; }
.card .hint { color: var(--muted); font-size: .86rem; margin-bottom: 14px; }
.badge-free { display: inline-block; font-size: .7rem; font-weight: 700; color: #08140d; background: var(--ok); border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: middle; font-family: var(--sans); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pcell { border: 1px solid var(--line2); border-radius: 14px; padding: 8px 4px 10px; text-align: center; background: #100e0a; }
.pcell.me { border-color: var(--gold); background: rgba(234, 197, 90, .08); box-shadow: 0 0 0 1px var(--gold) inset; }
.pcell .pl { font-size: .74rem; color: var(--muted); margin-bottom: 6px; }
.pcell .pl b { display: block; color: var(--gold2); font-weight: 600; }
.glyph { margin: 5px auto; width: 100%; max-width: 62px; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: #fff; position: relative; }
.glyph i { position: absolute; bottom: 2px; font-style: normal; font-family: var(--sans); font-size: .62rem; font-weight: 600; opacity: .9; }
.el-wood { background: #2fa862; } .el-fire { background: #e5483b; } .el-earth { background: #d9a31a; } .el-metal { background: #aab4c4; color: #1f2937; } .el-water { background: #2f6fd6; }
.pcell.unk .glyph { background: #1b1812; border: 1px dashed rgba(234, 197, 90, .4); color: #7d7662; font-size: 1.4rem; }
.me-line { margin-top: 14px; padding: 14px; border-radius: 14px; background: rgba(234, 197, 90, .07); border: 1px solid var(--line); font-size: .95rem; color: #e7dec6; }
.me-line b { color: var(--gold2); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: .78rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.five-svg { width: 100%; height: auto; display: block; margin: .2rem auto 0; max-width: 440px; }
.five-svg .fe-grid { fill: none; stroke: #6a6a73; stroke-width: 1.6; }
.five-svg .fe-spoke { stroke: #8f8f99; stroke-width: 2.2; }
.five-svg .fe-dot { fill: #d6d6d3; }
.five-svg .fe-band { stroke: rgba(18, 18, 22, .92); stroke-width: 3; stroke-linejoin: round; }
.five-svg .fe-lab-empty { fill: none; stroke-width: 4; stroke-dasharray: 9 7; }
.five-svg .fe-tag-hi { fill: #f2c94c; } .five-svg .fe-tag-lo { fill: #5b6577; }
.five-svg .fe-tag-txt { fill: #fff; font-size: 18px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.five-svg .fe-tag-hi + .fe-tag-txt { fill: #1a1400; }
.two { display: grid; gap: 12px; }
.who { font-family: var(--serif); color: var(--gold2); margin: 4px 0 10px; }

/* 잠긴 편 */
.locks { list-style: none; display: grid; gap: 10px; }
.lock { position: relative; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line2); background: #100e0a; overflow: hidden; }
.lock .t { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #efe5c9; }
.lock .n { flex: none; font-size: .72rem; color: var(--gold); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.lock .ic { margin-left: auto; color: var(--gold); }
.lock .d { color: var(--muted); font-size: .84rem; margin: 2px 0 8px; }
.lock .skel { display: grid; gap: 7px; filter: blur(3.2px); opacity: .55; }
.lock .skel s { display: block; height: 9px; border-radius: 5px; background: linear-gradient(90deg, #6b5d34, #4a4129); text-decoration: none; }
.lock .skel s:nth-child(2) { width: 88%; } .lock .skel s:nth-child(3) { width: 64%; }

/* 결제 칸 */
.paybox { margin: 0 20px 16px; padding: 20px 16px; border-radius: 20px; background: linear-gradient(180deg, #211b0e, #16130e); border: 1px solid var(--gold); box-shadow: 0 0 40px rgba(234, 197, 90, .08); }
.paybox .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.paybox .nm { font-family: var(--serif); font-size: 1.15rem; }
.paybox .pr { font-size: 1.7rem; font-weight: 800; color: var(--gold2); }
.paybox ul { list-style: none; margin: 10px 0 14px; }
.paybox li { padding: 2px 0 2px 20px; position: relative; font-size: .9rem; color: #d3c9ad; }
.paybox li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); }
.paybox .fine { color: var(--muted); font-size: .8rem; margin-top: 10px; line-height: 1.6; }
.paybox .fine a { color: var(--gold2); }
.test-note { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(122, 211, 160, .08); border: 1px dashed rgba(122, 211, 160, .5); color: #bfe9d0; font-size: .8rem; }
.closed-note { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(234, 197, 90, .08); border: 1px dashed var(--line); color: var(--gold2); font-size: .84rem; }

/* 기다리는 화면 */
.wait-card { margin: 0 20px 16px; padding: 26px 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.moon { width: 84px; height: 84px; margin: 0 auto 14px; position: relative; }
.moon::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff7dc, #eac55a 60%, #9a7f2a); box-shadow: 0 0 40px rgba(234, 197, 90, .55); animation: glow 3s ease-in-out infinite; }
.moon::after { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--gold); border-bottom-color: rgba(234, 197, 90, .3); animation: spin 3.4s linear infinite; }
@keyframes glow { 50% { box-shadow: 0 0 62px rgba(234, 197, 90, .85); transform: scale(1.04); } }
@keyframes spin { to { transform: rotate(360deg); } }
.wait-card h2 { font-family: var(--serif); font-size: 1.3rem; padding: 0; margin-bottom: 6px; }
#wmsg { min-height: 3em; color: #d6ccb0; transition: opacity .4s; }
.bar { height: 9px; border-radius: 999px; background: #0f0d09; border: 1px solid var(--line2); overflow: hidden; margin: 18px 0 8px; }
.bar i { display: block; height: 100%; width: 3%; background: linear-gradient(90deg, #c79a2b, #f6e3a6); border-radius: 999px; transition: width 1.2s linear; }
.link-box { margin: 0 20px 16px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); font-size: .9rem; color: #cfc6ab; }
.link-box code { display: block; margin: 8px 0 10px; padding: 10px 12px; background: #0f0d09; border: 1px solid var(--line2); border-radius: 10px; color: var(--gold2); font-size: .8rem; word-break: break-all; }

/* 안내·법적 문서 */
.doc { padding: 6px 20px 60px; }
.doc h2 { font-family: var(--serif); font-size: 1.1rem; color: var(--gold2); margin: 26px 0 8px; padding: 0; }
.doc p, .doc li { color: #d0c6aa; font-size: .95rem; margin-bottom: 8px; }
.doc ul, .doc ol { padding-left: 20px; margin-bottom: 8px; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: .88rem; }
.doc th, .doc td { border: 1px solid var(--line2); padding: 9px 10px; text-align: left; vertical-align: top; color: #d0c6aa; }
.doc th { background: #14110c; color: var(--gold2); width: 34%; }
.msg-box { margin: 40px 20px; padding: 34px 20px; text-align: center; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.msg-box h1 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 10px; color: #fff4d2; }
.msg-box p { color: #cfc6ab; margin-bottom: 20px; }

/* 주인 화면 */
.own { padding: 10px 16px 80px; }
.own h2 { font-family: var(--serif); color: var(--gold2); margin: 26px 0 10px; font-size: 1.15rem; padding: 0; }
.own .stat { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.own .stat span { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line2); font-size: .85rem; }
.own .tbl { overflow-x: auto; }
.own table { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 760px; }
.own th, .own td { padding: 9px 8px; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: top; }
.own th { color: var(--gold2); font-weight: 600; white-space: nowrap; }
.own .st { font-weight: 700; }
.st-done { color: var(--ok); } .st-failed { color: var(--danger); } .st-running, .st-paid { color: var(--gold); } .st-draft { color: var(--muted); }
.own form.inl { display: inline; }
.own .mini { min-height: 34px; padding: 0 10px; font-size: .78rem; width: auto; border-radius: 8px; display: inline-flex; }
.todo { margin: 14px 0; padding: 14px 16px; border-radius: 14px; background: rgba(234, 197, 90, .08); border: 1px solid var(--line); font-size: .9rem; }
.todo ul { padding-left: 18px; margin-top: 6px; }
.flash { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: rgba(122, 211, 160, .1); border: 1px solid rgba(122, 211, 160, .5); color: #c9f0d9; font-size: .9rem; }

/* 입력칸 안의 체크 줄이 '글자 위에' 떠 버리지 않게 */
.fld > label.ck { display: flex; font-weight: 400; font-size: .92rem; margin-bottom: 0; color: #d6ccb0; }

/* 큰 화면(PC·태블릿): 글을 위쪽 하늘 부분에 올려서 아래쪽의 고양이가 가려지지 않게 */
@media (min-width: 560px) {
    .hero { justify-content: flex-start; }
    .hero-copy { padding-top: 84px; }
    .hero::after { background: linear-gradient(to bottom, rgba(10, 9, 7, .78) 0, rgba(10, 9, 7, .55) 34%, rgba(10, 9, 7, 0) 52%, rgba(10, 9, 7, 0) 66%, rgba(10, 9, 7, .85) 88%, #0a0907 100%); }
    .scroll-hint { margin-top: auto; }
}
@media (min-width: 560px) { .hero { min-height: min(100svh, 840px); } }
@media (max-width: 559px) and (max-height: 700px) { .hero .lead, .hero-chips { display: none; } }

/* 상품마다 다른 분위기의 머리 그림 (입력 → 미리보기 → 기다리는 화면까지 같은 분위기가 이어져요) */
.head-img.t-premium::before { background-image: url('img/t_premium.jpg'); }
.head-img.t-lite::before { background-image: url('img/t_lite.jpg'); }
.head-img.t-match::before { background-image: url('img/t_match.jpg'); background-position: center 40%; }
.head-img.t-newyear::before { background-image: url('img/t_newyear.jpg'); }
.head-img .theme-tag { display: inline-block; margin: 20px 20px 0; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 9, 7, .55); color: var(--gold2); font-size: .74rem; letter-spacing: .14em; }
.head-img .theme-tag + h1 { padding-top: 10px; }
.head-img.t-match::after { background: linear-gradient(to bottom, rgba(40, 10, 24, .35), #0a0907 98%); }
.head-img.t-newyear::after { background: linear-gradient(to bottom, rgba(46, 12, 8, .35), #0a0907 98%); }
.head-img.t-lite::after { background: linear-gradient(to bottom, rgba(40, 24, 6, .25), #0a0907 98%); }
.saved-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: .78rem; }
.saved-note a { color: var(--gold2); cursor: pointer; text-decoration: underline; }

/* 신년운세 '어느 해' 칩: 숫자가 중간에서 끊기지 않게 위아래로 쌓아요 */
.yr-box { display: block; font-style: normal; }
.yr-box b { display: block; font-size: 1.08rem; white-space: nowrap; }
.yr-box small { display: block; margin: 3px 0 0; font-size: .74rem; font-weight: 400; color: inherit; opacity: .75; line-height: 1.4; }

/* ══ 첫 화면: 카드 고르기 ══ */
.pick-top { position: relative; isolation: isolate; overflow: hidden; padding-bottom: 4px; }
.pick-top .hero-bg { z-index: -3; }
.pick-top .hero-bg img { height: 100%; object-fit: cover; object-position: 36% 66%; transform-origin: 36% 70%; }
.pick-top::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(10, 9, 7, .45) 0, rgba(10, 9, 7, .08) 28%, rgba(10, 9, 7, .72) 74%, #0a0907 100%); }
.pick-top .topbar { position: relative; z-index: 3; }
.pick-copy { padding: 26px 24px 20px; }
.pick-copy h1 { font-family: var(--serif); font-size: 2rem; line-height: 1.3; font-weight: 700; margin: 4px 0 10px; color: #fff7de; text-shadow: 0 2px 24px rgba(0, 0, 0, .7); }
.pick-copy h1 em { font-style: normal; background: linear-gradient(135deg, #f6e3a6, #eac55a 60%, #c79a2b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pick-copy .lead { color: #e7dcc0; font-size: .95rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .7); }

/* 옆으로 넘기는 표지 카드 */
.deck { --cw: min(74%, 320px); position: relative; margin-top: 2px; background: radial-gradient(ellipse 78% 62% at 50% 46%, rgba(234, 197, 90, .2), rgba(234, 197, 90, .06) 55%, transparent 78%); }
.deck-track { position: relative; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 0 22px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; outline: none; }
.deck-track::-webkit-scrollbar { display: none; }
.deck-track::before, .deck-track::after { content: ''; flex: 0 0 calc((100% - var(--cw)) / 2 - 10px); }
.cv { flex: 0 0 var(--cw); aspect-ratio: 2 / 3; scroll-snap-align: center; scroll-snap-stop: always; position: relative; border-radius: 4px 16px 16px 4px; overflow: hidden; border: 2px solid rgba(234, 197, 90, .78); outline: 1px solid rgba(246, 227, 166, .38); outline-offset: -9px; text-decoration: none; color: inherit; background: var(--card); box-shadow: 4px 3px 0 -1px #e7dcbc, 7px 6px 0 -2px #b4a888, 0 0 0 1px rgba(0, 0, 0, .75), 0 0 30px rgba(234, 197, 90, .28), 0 18px 40px rgba(0, 0, 0, .75); transform: scale(.94); opacity: .8; transition: transform .35s ease, opacity .35s ease; }
.cv.on { transform: none; opacity: 1; }
.cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cv::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(0, 0, 0, .6) 0, rgba(255, 232, 168, .34) 5px, rgba(0, 0, 0, .42) 10px, rgba(0, 0, 0, 0) 17px), linear-gradient(90deg, rgba(10, 9, 7, .55) 0, rgba(10, 9, 7, 0) 58%); }
.cv::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 56%; z-index: 1; background: linear-gradient(to top, rgba(10, 9, 7, .96) 14%, rgba(10, 9, 7, 0)); }
.card-badge { position: absolute; z-index: 3; top: 14px; right: 14px; font-size: .72rem; font-weight: 700; color: #1a1400; background: var(--gold); border-radius: 999px; padding: 3px 10px; }
.card-vt { position: absolute; z-index: 3; top: 16px; left: 18px; display: flex; gap: 8px; writing-mode: vertical-rl; text-orientation: upright; }
.card-vt b, .card-vt i { flex: none; white-space: nowrap; }
.card-vt b { font-family: 'East Sea Dokdo', var(--serif); font-weight: 400; font-size: clamp(2.6rem, 12vw, 3.5rem); line-height: 1; color: #fff7de; text-shadow: 0 2px 16px rgba(0, 0, 0, .8), 0 0 3px rgba(0, 0, 0, .6); }
.card-vt i { font-style: normal; font-size: .74rem; letter-spacing: .22em; color: var(--gold2); text-shadow: 0 1px 8px rgba(0, 0, 0, .9); padding-top: 6px; }
.card-bot { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 0 18px 18px; }
.card-en { color: var(--gold); font-size: .7rem; letter-spacing: .2em; }
.card-bot h3 { font-family: var(--serif); font-size: 1.4rem; line-height: 1.3; color: #fff4d2; }
.card-bot p { color: #e3d9bd; font-size: .9rem; line-height: 1.5; margin-top: 2px; }
.card-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.card-price { color: var(--gold2); font-size: 1.3rem; font-weight: 800; }
.card-go { font-size: .84rem; font-weight: 700; color: #1a1400; background: linear-gradient(135deg, #f6e3a6, #eac55a 60%, #c79a2b); border-radius: 999px; padding: 6px 14px; }
.deck-arrow { display: none; position: absolute; top: 40%; z-index: 5; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(10, 9, 7, .82); color: var(--gold2); font-size: 1.6rem; line-height: 1; cursor: pointer; place-items: center; padding-bottom: 3px; }
.deck-arrow.prev { left: 6px; } .deck-arrow.next { right: 6px; }
.deck-arrow:hover { background: rgba(234, 197, 90, .18); }
@media (hover: hover) and (pointer: fine) { .deck-arrow { display: grid; } .cv:hover { border-color: var(--gold); } }
.deck-dots { display: flex; justify-content: center; gap: 8px; padding: 0 0 14px; }
.deck-dots button { position: relative; width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: #4a4333; cursor: pointer; transition: width .25s, background .25s; }
.deck-dots button::after { content: ''; position: absolute; inset: -12px -5px; }
.deck-dots button.on { width: 22px; background: var(--gold); }
.hero-chips.center { justify-content: center; padding: 0 20px; }

/* 한눈에 고르기 · 다른 풀이 목록 */
.pick-list { display: grid; gap: 12px; padding: 0 20px; }
.pick { display: flex; gap: 14px; align-items: center; padding: 12px 14px 12px 12px; border-radius: 18px; background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.pick:active { transform: scale(.985); }
.pick:hover { border-color: var(--gold); }
.pick img { flex: 0 0 72px; width: 72px; height: 108px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.pick > div { flex: 1; min-width: 0; }
.pick .badge { display: inline-block; font-size: .68rem; font-weight: 700; color: #1a1400; background: var(--gold); border-radius: 999px; padding: 1px 8px; margin-bottom: 4px; }
.pick h3 { font-family: var(--serif); font-size: 1.12rem; line-height: 1.35; }
.pick p { color: #cfc6ab; font-size: .86rem; line-height: 1.5; }
.pick .pm { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pick .pm b { color: var(--gold2); font-size: 1.1rem; font-weight: 800; }
.pick .pm span { color: var(--muted); font-size: .76rem; }
.pick .chev { color: var(--gold); font-size: 1.7rem; line-height: 1; }

/* 후기 알림 (진짜 후기가 있을 때만) */
.toast-rev { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); width: min(calc(100% - 28px), 492px); z-index: 60; padding: 11px 14px 12px; border-radius: 18px; background: rgba(23, 20, 15, .95); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); backdrop-filter: blur(8px); transition: opacity .25s; }
.toast-rev[hidden] { display: none; }
.toast-rev.swap { opacity: 0; }
.tr-head { display: flex; justify-content: space-between; align-items: center; color: var(--gold2); font-size: .76rem; font-weight: 700; letter-spacing: .04em; }
.tr-head button { width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.tr-line { display: flex; gap: 8px; align-items: center; font-size: .82rem; }
.tr-stars { color: var(--gold); letter-spacing: 1px; font-weight: 400; }
.tr-name { color: var(--muted); }
.tr-text { margin-top: 2px; color: #eee3c8; font-size: .9rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 아래 고정 메뉴 */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(calc(100% - 28px), 492px); z-index: 70; display: flex; padding: 5px; border-radius: 999px; background: rgba(20, 17, 12, .93); border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 5px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; }
.tabbar a.on { color: var(--gold2); background: rgba(234, 197, 90, .12); }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ══ 풀이 상세 설명 페이지 ══ */
.pd-hero { position: relative; isolation: isolate; min-height: min(86svh, 640px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.pd-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kb 26s ease-in-out infinite alternate; }
.pd-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(10, 9, 7, .5) 0, rgba(10, 9, 7, 0) 24%, rgba(10, 9, 7, 0) 34%, rgba(10, 9, 7, .86) 68%, #0a0907 94%); }
.pd-hero .topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.pd-copy { padding: 0 22px 22px; }
.pd-copy .theme-tag { margin: 0 0 8px; }
.pd-copy h1 { font-family: var(--serif); font-size: 1.8rem; line-height: 1.38; font-weight: 700; color: #fff7de; text-shadow: 0 2px 22px rgba(0, 0, 0, .7); }
.pd-name { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 10px; }
.pd-name b { color: var(--gold2); font-size: 1.15rem; }
.pd-name span { color: var(--gold); font-size: .72rem; letter-spacing: .18em; }
.pd-card { margin: 0 20px; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line2); }
.pd-card > b { display: block; color: var(--gold2); margin-bottom: 6px; }
.ticks { list-style: none; }
.ticks li { position: relative; padding: 5px 0 5px 26px; color: #e1d8bd; font-size: .95rem; }
.ticks li::before { content: '✓'; position: absolute; left: 2px; color: var(--gold); font-weight: 800; }
.incl { list-style: none; padding: 0 20px; display: grid; gap: 10px; }
.incl li { position: relative; padding: 14px 16px 14px 42px; border-radius: 14px; background: var(--card); border: 1px solid var(--line2); color: #e7dec6; font-size: .95rem; }
.incl li::before { content: ''; position: absolute; left: 17px; top: 21px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.toc { list-style: none; padding: 0 20px; }
.toc li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line2); }
.toc .n { flex: 0 0 30px; color: var(--gold); font-family: var(--serif); font-weight: 700; }
.toc b { display: block; color: #f3e9cd; }
.toc small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .pd-bg { animation: none; } .cv, .toast-rev { transition: none; } .deck-track { scroll-behavior: auto; } }
