/* 별빛 여정 타로 — 크림 양피지 라이트 셸 + 카드 감상만 잉크. 토큰은 docs/gpt-ui-consult.md §3,
 * 장식 원칙은 docs/ui-art-consult.md §4(금은 시선 끝에만, 한 블록에 장식 하나, 그림 밀도는 카드 한 장). 아이콘은 전부 그린 그림(img/ui). */
@font-face { font-family: "MaruBuri"; src: url("fonts/MaruBuri-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("fonts/PretendardVariable.woff2") format("woff2-variations"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F6F0E4; --bg2: #EEE4D2; --surface: #FFFDF8; --raised: #FFFFFF;
  --text: #211D1A; --text2: #5F574F; --muted: #7A7066; --line: #D8CCB8;
  --ink: #101B24; --ink-soft: #182833; --navy: #173247; --navy-p: #102637;
  --gold: #A7792E; --gold-l: #D8BA72; --gold-d: #76501B;
  --focus: #2F6E89; --error: #C33E3E;
  --r-panel: 16px; --r-btn: 14px;
  --serif: "MaruBuri", "AppleMyungjo", "Nanum Myeongjo", serif;
  --sans: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --pad: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.65; letter-spacing: -0.01em;
  min-height: 100dvh; overscroll-behavior: none; -webkit-text-size-adjust: 100%;
  background-image: url("img/ui/paper.webp"); background-size: 360px; background-repeat: repeat;
}
body.dark { background: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--focus); }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.55; }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(24px + var(--safe-b)); }

/* 그린 아이콘(성물) */
.ui { display: inline-block; object-fit: contain; vertical-align: middle; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.btn-ico { width: 24px; height: 24px; margin: -4px 8px -4px -4px; }
.mini-ico { width: 16px; height: 16px; margin: -2px 4px 0 0; }

/* ── 카드(코드 프레임 + 번호 + 이름표, 전 덱 동일) ── */
.tc {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 7; border-radius: 4.5% / 2.6%;
  background: #1a222b; overflow: hidden; container-type: inline-size;
  box-shadow: 0 1px 0 rgba(118, 80, 27, .25), 0 10px 24px -12px rgba(16, 27, 36, .45);
}
.tc-art { position: absolute; inset: 0; }
.tc-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tc.rev .tc-art img { transform: rotate(180deg); }
.tc-fallback { display: none; }
.tc-art.noimg { background: linear-gradient(160deg, var(--navy), var(--ink)); display: grid; place-items: center; }
.tc-art.noimg img { display: none; }
.tc-art.noimg .tc-fallback { display: block; color: var(--gold-l); font-family: var(--serif); text-align: center; font-size: 9cqw; line-height: 1.4; }
/* 이중 금선: 바깥 1px, 안쪽 1px — 두께는 카드 폭의 약 3% */
.tc::before, .tc::after { content: ""; position: absolute; pointer-events: none; border-radius: inherit; }
.tc::before { inset: 0; border: 1px solid rgba(216, 186, 114, .9); box-shadow: inset 0 0 0 2.6cqw rgba(16, 27, 36, .0); }
.tc::after { inset: 3cqw; border: 1px solid rgba(216, 186, 114, .55); border-radius: 3% / 1.7%; }
.tc-num {
  position: absolute; top: 4.2cqw; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--serif); font-size: 6.4cqw; line-height: 1; letter-spacing: .08em;
  color: var(--text); background: rgba(255, 253, 248, .94); padding: 1.6cqw 3.4cqw 1.3cqw; border-radius: 0 0 2cqw 2cqw;
  box-shadow: 0 0 0 1px rgba(167, 121, 46, .55);
}
.tc-name {
  position: absolute; left: 3cqw; right: 3cqw; bottom: 3cqw; height: 15.5cqw; z-index: 2;
  display: grid; place-items: center; font-family: var(--serif); font-size: 8.4cqw; line-height: 1; letter-spacing: .04em;
  color: var(--text); background: var(--surface); border-top: 1px solid rgba(167, 121, 46, .6);
  border-radius: 0 0 2.6% 2.6% / 0 0 10% 10%;
}
.tc.back::after { inset: 3cqw; }
.tc.back .tc-art img { object-fit: cover; }

/* ── 상단 ── */
.top { display: flex; align-items: center; gap: 8px; padding: 14px var(--pad) 4px; min-height: 56px; }
.crest { width: 28px; height: 28px; }
.brand { flex: 1; margin: 0; font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: .02em; }
.ibtn { width: 48px; height: 48px; display: grid; place-items: center; margin-right: -10px; border-radius: 50%; }
.ibtn .ui { width: 32px; height: 32px; }
.ibtn:active { background: rgba(167, 121, 46, .1); }

/* ── 홈 ── */
.today { display: flex; flex-direction: column; align-items: center; padding: 18px var(--pad) 0; }
.today-card { width: min(52vw, 208px); }
.today-card.glow .tc { animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { filter: brightness(1); box-shadow: 0 10px 24px -12px rgba(16,27,36,.45), 0 0 0 0 rgba(216,186,114,0); } 50% { filter: brightness(1.08); box-shadow: 0 10px 24px -12px rgba(16,27,36,.45), 0 0 28px 2px rgba(216,186,114,.35); } }
.today-msg { margin: 14px 0 0; max-width: 300px; text-align: center; font-size: 15px; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.today-msg b { font-family: var(--serif); font-weight: 600; color: var(--text); margin-right: 4px; }
.home-cta { padding: 20px var(--pad) 0; display: grid; gap: 10px; }

/* ── 버튼 ── */
.btn {
  width: 100%; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px; border-radius: var(--r-btn);
  font-weight: 600; font-size: 16px; text-decoration: none; text-align: center; position: relative; transition: transform .12s, filter .12s;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .42; pointer-events: none; }
.btn.big { min-height: 56px; font-size: 17px; }
.btn.small { width: auto; flex: none; white-space: nowrap; min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn.primary {
  color: #FFFDF8; background: linear-gradient(180deg, #1E3D55, var(--navy) 60%, var(--navy-p));
  box-shadow: inset 0 0 0 1px rgba(216, 186, 114, .75), inset 0 0 0 4px var(--navy), inset 0 0 0 5px rgba(216, 186, 114, .35), 0 8px 18px -10px rgba(16, 38, 55, .7);
}
.home-cta .btn.primary.big::before, .home-cta .btn.primary.big::after {
  content: ""; position: absolute; top: 50%; width: 56px; height: 14px; margin-top: -7px;
  background: url("img/ui/sprig.webp") center / contain no-repeat; opacity: .95;
}
.home-cta .btn.primary.big::before { left: 12px; }
.home-cta .btn.primary.big::after { right: 12px; transform: scaleX(-1); }
.btn.ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.text { min-height: 44px; color: var(--text2); font-weight: 500; }
.btn.gold { color: var(--ink); background: linear-gradient(180deg, #E6CC8C, var(--gold-l) 55%, #C49F55); box-shadow: inset 0 0 0 1px rgba(118, 80, 27, .5), 0 10px 24px -10px rgba(0, 0, 0, .6); }
.btn.ghost-dark { color: #EDE3CF; box-shadow: inset 0 0 0 1px rgba(216, 186, 114, .45); background: rgba(255, 255, 255, .04); }
.btn-col { display: grid; gap: 10px; margin-top: 24px; }

/* 여정 줄 */
.jrow {
  display: grid; grid-template-columns: 36px 1fr 18px; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
  margin: 22px var(--pad) 0; padding: 14px 14px 14px 12px; width: calc(100% - 2 * var(--pad));
  background: var(--surface); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line);
}
.jrow-ico { grid-row: 1 / 3; grid-column: 1; width: 36px; height: 36px; }
.jrow-t { grid-column: 2; grid-row: 1; font-family: var(--serif); font-size: 16px; line-height: 1.4; }
.jrow-t b { font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--gold-d); margin-left: 4px; }
.jrow-s { grid-column: 2; grid-row: 2; font-size: 13px; color: var(--text2); line-height: 1.45; }
.chev { grid-row: 1 / 3; grid-column: 3; width: 18px; height: 18px; opacity: .85; }
.jrow.hot { box-shadow: inset 0 0 0 1px var(--gold), 0 6px 18px -12px rgba(118, 80, 27, .6); }
.jrow.hot .jrow-s { color: var(--gold-d); font-weight: 600; }
.jrow.quiet { margin: 0; width: 100%; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px var(--pad) 0; }
.quick button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 14px;
  background: var(--surface); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line), 0 4px 14px -12px rgba(16, 27, 36, .5);
  font-family: var(--serif); font-size: 15px;
}
.q-ico { width: 40px; height: 40px; }
.quick small { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-left: 2px; }
.local-note { text-align: center; font-size: 12px; color: var(--muted); margin: 16px 0 0; }

/* ── 일반 화면 ── */
.page { padding: 12px var(--pad) 32px; }
.page-t { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.4; margin: 8px 0 6px; }
.page-t::after { content: ""; display: block; width: 80px; height: 20px; margin-top: 4px; background: url("img/ui/crest.webp") left center / contain no-repeat; opacity: .9; }
.sub { color: var(--text2); font-size: 14px; margin: 0 0 16px; }
.eyebrow { font-size: 13px; color: var(--text2); letter-spacing: .04em; margin: 4px 0 12px; text-align: center; }
.sec-t { font-family: var(--serif); font-weight: 600; font-size: 18px; margin: 28px 0 8px; display: flex; align-items: center; gap: 8px; }
.sec-orn { width: 22px; height: 22px; }
.box { background: var(--surface); border-radius: var(--r-panel); padding: 16px 18px; margin-top: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.box p { margin: 0; }
.box.act { box-shadow: inset 0 0 0 1px rgba(167, 121, 46, .55); }
.lbl { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--gold-d); margin-bottom: 4px; }
.sticky-cta { position: sticky; bottom: 0; margin: 24px calc(-1 * var(--pad)) -32px; padding: 14px var(--pad) calc(16px + var(--safe-b)); background: linear-gradient(180deg, rgba(246, 240, 228, 0), var(--bg) 30%); }
.ad-slot { margin: 24px 0 8px; min-height: 0; }
.ad-slot:empty { margin: 0; }
.ad-slot.filled::before { content: "광고"; display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.ad-slot.wide { grid-column: 1 / -1; }
.disclaimer { font-size: 13px; color: var(--muted); text-align: center; margin-top: 22px; }

/* ── 주제·질문 ── */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 10px; min-height: 48px;
  background: var(--surface); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600;
  transition: box-shadow .15s, background .15s;
}
.chip-ico { width: 40px; height: 40px; }
.chip.on { background: #FFF8EA; box-shadow: inset 0 0 0 1.5px var(--gold), 0 6px 14px -10px rgba(118, 80, 27, .7); }
.sugs { margin-top: 18px; display: grid; gap: 8px; }
.sugs.fade { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sugs-empty { color: var(--muted); font-size: 14px; text-align: center; margin: 8px 0; }
.sug { text-align: left; padding: 13px 16px; min-height: 48px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; line-height: 1.45; }
.sug.on { box-shadow: inset 0 0 0 1.5px var(--navy); background: #FBF8F1; font-weight: 600; }
.own { margin-top: 14px; }
.own-toggle { color: var(--text2); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.own-box { position: relative; }
.own-box textarea, .memo textarea {
  width: 100%; border: 0; border-radius: 14px; padding: 14px 16px; font: inherit; font-size: 16px; color: var(--text); resize: none;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); outline: none;
}
.own-box textarea:focus, .memo textarea:focus { box-shadow: inset 0 0 0 1.5px var(--focus); }
.cnt { position: absolute; right: 12px; bottom: 10px; font-size: 12px; color: var(--muted); }
.q-note p { margin: 12px 0 0; padding: 12px 14px; font-size: 14px; line-height: 1.55; color: var(--text2); background: var(--bg2); border-radius: 12px; }
.limit-note { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); font-size: 14px; }
.limit-note p { margin: 0; }
.ln-ico { width: 32px; height: 32px; flex: none; }

.crisis { text-align: center; }
.crisis .page-t::after { margin: 4px auto 0; background-position: center; }
.crisis p { color: var(--text2); }
.crisis .btn { margin-top: 10px; }
.del-row { margin-top: 28px; text-align: center; }
.crisis-art { width: 120px; height: 120px; margin: 24px auto 0; display: block; }

/* ── 의식(섞기·떼기·고르기) ── */
.ritual { min-height: calc(100dvh - 24px); display: flex; flex-direction: column; align-items: center; padding: 16px var(--pad) 0; text-align: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.r-step { font-size: 13px; color: var(--text2); letter-spacing: .06em; margin: 4px 0 0; }
.r-title { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.5; margin: 6px 0 0; }
.r-q { margin: 6px 0 0; font-size: 14px; color: var(--text2); max-width: 320px; }
.r-msg { min-height: 24px; color: var(--gold-d); font-size: 14px; font-weight: 600; margin: 10px 0 0; }
.deck { position: relative; width: 172px; height: 301px; margin: 28px auto 0; touch-action: none; }
.sh-c { position: absolute; inset: 0; transition: transform 90ms linear; transform: translate(calc(var(--i) * -0.6px), calc(var(--i) * -0.8px)); }
.deck.aligned .sh-c { transition: transform 240ms ease-out; }
.sh-c.flash .tc { box-shadow: 0 0 0 2px var(--gold-l); }
.press { margin-top: auto; width: 100%; min-height: 32vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; touch-action: none; }
.ring { width: 180px; height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.ring i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-l)); transform: scaleX(0); transform-origin: left; }
.press-l { font-size: 15px; color: var(--text2); padding: 14px 26px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.press.on .press-l { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--text); }
.press.ready .press-l { background: #FFF8EA; color: var(--gold-d); font-weight: 600; }

.cut-row { display: flex; justify-content: center; gap: 14px; margin-top: auto; margin-bottom: 18vh; width: 100%; }
.cut-p { position: relative; width: 96px; min-height: 180px; padding-top: 8px; transition: transform .26s ease-out, opacity .26s; }
.cut-p .tc { position: relative; z-index: 1; }
.cut-p .tc.under { position: absolute; top: 12px; left: 3px; z-index: 0; width: 100%; filter: brightness(.85); }
.cut-row:not(.split) .cut-p:nth-child(1) { transform: translateX(110px); }
.cut-row:not(.split) .cut-p:nth-child(3) { transform: translateX(-110px); }
.cut-row.merge .cut-p:nth-child(1) { transform: translateX(110px); }
.cut-row.merge .cut-p:nth-child(3) { transform: translateX(-110px); }
.cut-p.up { transform: translateY(-8px) !important; }

.pick .slots { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.pick .slots.one { height: 0; }
.slot { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.slot::before { content: ""; width: 64px; height: 112px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); background: rgba(255, 253, 248, .6); }
.slot.full::before { display: none; }
.slot .tc { width: 64px; }
.slot.pop .tc { animation: pop .32s ease-out; }
@keyframes pop { from { transform: translateY(40px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.fan { position: relative; width: 100%; height: 270px; margin-top: auto; margin-bottom: 0; touch-action: none; overflow: hidden; }
.fan-c { position: absolute; left: 50%; bottom: 40px; width: 92px; transform-origin: 50% 120%; will-change: transform; }
.fan-c.center .tc { box-shadow: 0 0 0 2px var(--gold-l), 0 0 22px rgba(216, 186, 114, .55); }
.fan-hint { font-size: 13px; color: var(--muted); margin: 8px 0 calc(18px + var(--safe-b)); position: relative; z-index: 200; }

/* ── 뒤집기(잉크) ── */
.is-dark { background: var(--ink); color: #EDE3CF; }
.flip { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 18px 16px calc(24px + var(--safe-b)); text-align: center;
  background: radial-gradient(120% 70% at 50% 35%, #1A2B38 0%, var(--ink) 70%); }
.flip-q { font-size: 14px; color: rgba(237, 227, 207, .72); margin: 0 0 14px; max-width: 320px; min-height: 22px; }
.flip-row { display: flex; justify-content: center; gap: 10px; width: 100%; margin: auto 0; }
.flip.one .fc-wrap { width: min(78vw, 314px, calc((100dvh - 230px) * 4 / 7)); }
.flip.three .fc-wrap { width: calc((100% - 20px) / 3); max-width: 140px; }
.fc { display: block; width: 100%; perspective: 1200px; }
.fc-in { position: relative; display: block; aspect-ratio: 4 / 7; transform-style: preserve-3d; transition: transform 360ms cubic-bezier(.4, .1, .3, 1); }
.fc.open .fc-in { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fc-front { transform: rotateY(180deg); }
.fc .tc { box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8); }
.fc.open .fc-front .tc { box-shadow: 0 0 0 1px rgba(216, 186, 114, .5), 0 20px 50px -16px rgba(0, 0, 0, .9), 0 0 60px -10px rgba(216, 186, 114, .35); }
.fc-pos { display: block; font-size: 12px; color: rgba(237, 227, 207, .65); margin-top: 8px; }
.flip-hint { font-size: 14px; color: rgba(237, 227, 207, .7); margin: 18px 0 0; transition: opacity .2s; }
.flip-hint.gone { opacity: 0; }
.flip-after { width: 100%; max-width: 360px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; pointer-events: none; }
.flip-after.show { opacity: 1; transform: none; pointer-events: auto; }
.flip-names { font-family: var(--serif); font-size: 20px; color: #F3E7C9; margin: 8px 0 14px; }

/* ── 오늘의 카드 결과·도감 상세 ── */
.dr-card { display: block; width: min(64vw, 248px); margin: 0 auto; }
.sym-hint { text-align: center; font-size: 13px; color: var(--text2); margin: 12px 0 0; }
.sh-ico { width: 18px; height: 18px; margin: -3px 4px 0 0; }
.dr-name { font-family: var(--serif); font-weight: 600; text-align: center; font-size: 24px; margin: 14px 0 0; }
.dr-name small, h3 small, .v-title small { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--gold-d); background: #FFF3DA; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.dr-msg { text-align: center; font-size: 17px; margin: 6px 0 4px; }
.kw { text-align: center; color: var(--text2); font-size: 14px; margin: 4px 0 0; }
.gift { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: #FFF8EA; box-shadow: inset 0 0 0 1px rgba(167, 121, 46, .45); font-size: 14px; }
.gift p { margin: 0; }
.gift-ico { width: 36px; flex: none; }
.syms { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.syms li { background: var(--surface); border-radius: 14px; padding: 12px 16px; box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; }
.syms b { display: block; font-family: var(--serif); font-weight: 600; margin-bottom: 2px; }

/* ── 해석·종합 ── */
.rd-head { margin: 4px 0 8px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--gold-d); background: #FFF3DA; padding: 3px 10px; border-radius: 999px; }
.rd-q { font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.5; margin: 8px 0 0; }
.rd-sec { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); animation: fade .16s ease-out both; animation-delay: var(--d, 0ms); }
.rd-thumb { width: 72px; align-self: start; }
.rd-txt .pos { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--gold-d); }
.rd-txt h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 2px 0 6px; }
.rd-txt p { margin: 0; font-size: 15.5px; }
.rev-note { margin-top: 8px !important; font-size: 14px !important; color: var(--text2); }
.rev-note b { color: var(--gold-d); margin-right: 4px; }
.syn-cards { display: flex; justify-content: center; gap: 10px; margin: 8px 0 4px; }
.syn-cards .tc { width: 64px; }
.syn-flow { margin: 0; }
.remember { margin: 18px 0 0; padding: 18px 20px; text-align: center; font-family: var(--serif); font-size: 18px; line-height: 1.6;
  border-radius: var(--r-panel); background: var(--surface); box-shadow: inset 0 0 0 1px rgba(167, 121, 46, .55); }
.remember .lbl { font-family: var(--sans); }

/* ── 기록 ── */
.rec-row { display: grid; grid-template-columns: 48px 1fr; gap: 14px; width: 100%; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rec-row .tc { width: 48px; }
.rec-t { display: flex; flex-direction: column; min-width: 0; }
.rec-d { font-size: 12px; color: var(--muted); }
.rec-t b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-n, .rec-m { font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-top { display: flex; align-items: center; justify-content: space-between; }
.rec-top .eyebrow { text-align: left; margin: 0; }
.memo { display: block; position: relative; margin-top: 24px; }
.memo .lbl { margin-bottom: 8px; }
.del-btn { color: var(--error); }
.empty { text-align: center; }
.empty .page-t::after { margin: 4px auto 0; background-position: center; }
.empty-art { width: 200px; height: 150px; margin: 32px auto 0; display: block; border-radius: 16px; }
.empty p { color: var(--text2); }
.empty .btn { margin-top: 18px; }

/* ── 도감 ── */
.cx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; margin: 0 -4px; }
.cx-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cx-cell .tc { width: 100%; }
.cx-cell.unmet .tc { filter: saturate(.55) brightness(.92); }
.cx-cell.unmet .tc-num { background: rgba(255, 253, 248, .8); }
.cx-n { font-size: 13px; font-family: var(--serif); line-height: 1.3; text-align: center; }
.cx-cell.unmet .cx-n { font-family: var(--sans); font-size: 11px; color: var(--muted); }

/* ── 여정 ── */
.premise { font-size: 15px; color: var(--text2); margin: 4px 0 14px; }
.jbar { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.jbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-l)); }
.journey .sub { margin-top: 6px; }
.ch-row { display: grid; grid-template-columns: 44px 1fr; gap: 14px; width: 100%; padding: 10px 0; text-align: left; align-items: center; border-bottom: 1px solid var(--line); }
.ch-row .tc { width: 44px; }
.ch-lock { width: 44px; height: 77px; border-radius: 5px; display: grid; place-items: center; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); }
.lock-ico { width: 26px; height: 26px; opacity: .9; }
.ch-row.locked .lock-ico { opacity: .55; }
.ch-t { display: flex; flex-direction: column; }
.ch-no { font-size: 12px; color: var(--muted); }
.ch-t b { font-family: var(--serif); font-weight: 600; font-size: 16px; }
.ch-s { font-size: 13px; color: var(--text2); }
.ch-row.new .ch-s { color: var(--gold-d); font-weight: 600; }
.ch-row.locked b, .ch-row.paid b { color: var(--muted); }

.chapter { padding-left: 24px; padding-right: 24px; }
.chapter .ch-art { width: min(56vw, 220px); margin: 4px auto 0; cursor: zoom-in; }
.chapter .ch-no { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; font-size: 13px; color: var(--gold-d); letter-spacing: .08em; }
.ch-title { font-family: var(--serif); font-weight: 600; font-size: 24px; text-align: center; margin: 2px 0 28px; }
.ch-body p { font-family: var(--serif); font-size: 17px; line-height: 1.88; margin: 0 0 18px; word-break: keep-all; }
.ch-end { font-family: var(--serif); font-size: 17px; color: var(--gold-d); text-align: center; margin: 22px 0 0; padding-top: 18px;
  background: url("img/ui/divider.webp") top center / 240px auto no-repeat; }
.ch-lesson { margin-top: 18px; text-align: center; font-size: 15px; }
.ch-lesson .lbl { margin-bottom: 2px; }
.guide { display: flex; gap: 14px; align-items: center; margin-top: 24px; padding: 14px; border-radius: var(--r-panel); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.guide-art { width: 56px; height: 56px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 0 0 1px var(--gold), 0 0 0 3px var(--surface), 0 0 0 4px rgba(167, 121, 46, .4); }
.guide p { margin: 0; font-size: 15px; }
.guide b { display: block; font-family: var(--serif); font-weight: 600; }
.meet { margin-top: 24px; text-align: center; }
.meet .sec-t { justify-content: center; margin-top: 0; }
.meet-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.meet-opts .chip { font-size: 13px; padding: 12px 2px; }
.meet-done { color: var(--gold-d); font-weight: 600; }

/* ── 결제 ── */
.pay { margin-top: 28px; padding: 22px 18px 18px; border-radius: 20px; background: var(--surface); text-align: center;
  box-shadow: inset 0 0 0 1px rgba(167, 121, 46, .6), inset 0 0 0 5px var(--surface), inset 0 0 0 6px rgba(167, 121, 46, .25), 0 14px 30px -20px rgba(16, 27, 36, .6); }
.pay-hero { width: 100%; max-width: 280px; aspect-ratio: 4 / 3; border-radius: 14px; object-fit: cover; }
.pay-t { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.45; margin: 14px 0 12px; }
.pay-trail { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
.pay-trail .tc { width: 30px; }
.pay .sub { margin: 8px 0 0; }
.pay-list { list-style: none; text-align: left; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; font-size: 15px; }
.pay-list li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; }
.li-ico { width: 18px; height: 18px; margin-top: 4px; }
.pay-price { margin: 18px 0 0; display: flex; flex-direction: column; gap: 2px; }
.pay-price b { font-family: var(--serif); font-weight: 600; font-size: 20px; }
.pay-price span { font-size: 13px; color: var(--text2); }
.pay-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.pay-btns .btn { min-height: 54px; }
.pay-fine { font-size: 14px; color: var(--text2); text-align: left; margin: 14px 0 0; line-height: 1.6; }
.pay-terms { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--bg2); text-align: left; font-size: 14px; line-height: 1.6; color: var(--text2); }
.pay-terms p { margin: 0 0 6px; }
.pay-agree { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: var(--text); }
.pay-agree input { width: 20px; height: 20px; accent-color: var(--navy); margin: 0; }
.paypage .pay { margin-top: 8px; }

/* ── 설정 ── */
.set-group { margin-top: 14px; background: var(--surface); border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line); padding: 4px 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-weight: 600; font-size: 15px; }
.set-row small { display: block; color: var(--text2); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.tgl { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background .2s; margin: 0; }
.tgl::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.tgl:checked { background: var(--navy); }
.tgl:checked::after { transform: translateX(20px); }
.about { padding: 4px 18px 14px; }
.about .sec-t { margin-top: 14px; }
.about p { font-size: 14px; color: var(--text2); margin: 0 0 10px; }

/* ── 레이어 ── */
#layer { position: fixed; inset: 0; z-index: 50; display: none; }
#layer.on { display: block; }
#layer.dim { background: rgba(16, 24, 32, .55); display: grid; place-items: center; padding: 24px; }
#layer.dark { background: var(--ink); }
.dialog { width: 100%; max-width: 360px; background: var(--surface); border-radius: 20px; padding: 22px 20px 18px; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .6); }
.dialog h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 0 0 6px; }
.dialog p { margin: 0; color: var(--text2); font-size: 15px; }
.dlg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.dialog.tall { max-height: 80dvh; display: flex; flex-direction: column; gap: 12px; }
.ofl { flex: 1; overflow: auto; white-space: pre-wrap; font-size: 11px; line-height: 1.5; margin: 0; color: var(--text2); }
.dialog .meet { margin-top: 0; }

.viewer { height: 100%; display: flex; flex-direction: column; align-items: center; padding: 20px 16px calc(16px + var(--safe-b));
  background: radial-gradient(120% 70% at 50% 35%, #1A2B38 0%, var(--ink) 70%); color: #EDE3CF; }
.v-stage { flex: 1; width: 100%; display: grid; place-items: center; perspective: 1400px; min-height: 0; }
.v-card { position: relative; width: min(84vw, 340px, calc((100dvh - 230px) * 4 / 7)); transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .12s ease-out; }
.v-shine { position: absolute; inset: 0; border-radius: 4.5% / 2.6%; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 30%), rgba(255, 236, 190, .55), rgba(255, 236, 190, 0) 45%); }
.v-hots { position: absolute; inset: 0; }
.hot { position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px; display: grid; place-items: center; }
.hot span { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, #FFF6D8 0 25%, rgba(255, 228, 160, .75) 40%, rgba(255, 220, 140, 0) 70%);
  box-shadow: 0 0 0 1px rgba(255, 240, 200, .7); animation: twinkle 2.4s ease-in-out infinite; }
.hot:nth-child(2) span { animation-delay: .8s; }
.hot:nth-child(3) span { animation-delay: 1.6s; }
.hot.sel span { transform: scale(1.35); background: radial-gradient(circle, #fff 0 30%, rgba(255, 228, 160, .9) 45%, rgba(255, 220, 140, 0) 72%); }
@keyframes twinkle { 0%, 100% { opacity: .55; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }
.v-info { width: 100%; max-width: 380px; text-align: center; min-height: 112px; }
.v-title { font-family: var(--serif); font-size: 21px; color: #F3E7C9; margin: 12px 0 4px; }
.v-bubble { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(237, 227, 207, .82); }
.v-bubble b { color: #F3E7C9; font-family: var(--serif); margin-right: 4px; }
.v-close { width: 100%; max-width: 380px; margin-top: 8px; }

#toast { position: fixed; left: 50%; bottom: calc(28px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 60; opacity: 0; pointer-events: none;
  background: rgba(23, 50, 71, .96); color: #FFFDF8; font-size: 14px; padding: 12px 18px; border-radius: 999px; transition: opacity .2s, transform .2s; max-width: calc(100% - 40px); text-align: center; box-shadow: 0 0 0 1px rgba(216, 186, 114, .4); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .fc-in { transition: none; }
  .fc .fc-face { transition: opacity 120ms; }
  .fc.open .fc-in { transform: none; }
  .fc.open .fc-back { opacity: 0; }
  .fc .fc-front { transform: none; opacity: 0; }
  .fc.open .fc-front { opacity: 1; }
}
