/* 도사네 — 크림 한지 + 먹 + 손그림. 모바일 퍼스트 (360 기준). */
:root {
  --paper: #faf6ef;
  --paper-deep: #f3ecdf;
  --ink: #2b2320;
  --ink-soft: #6b5f56;
  --line: #d8cdbc;
  --accent: #c0455e;
  --n: #8a7a5f; --r: #7c8a96; --sr: #b8860b; --ssr1: #e75480; --ssr2: #7f5fd4; --ssr3: #2fa7a0;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
/* 서비스 폰트는 Gowun Dodum 하나 (2026-10-09 zero, 손글씨 제목체 폐지). --fd 는 같은 파일의 size-adjust 86% 별칭
   (fonts/gowun-disp.css) — 옛 제목체 자리의 시각 크기를 지켜 레이아웃 수치를 안 건드린다. 자간: 본문 -.01em, 제목류 -.02em.
   한자 부품(AppleMyungjo)만 예외. */
:root { --f: 'Gowun Dodum', -apple-system, 'Apple SD Gothic Neo', sans-serif; --fd: 'Gowun Disp', var(--f); }
body {
  background: var(--paper-deep);
  color: var(--ink);
  font-family: var(--f);
  line-height: 1.65;
  letter-spacing: -.01em;
}
#frame {
  max-width: 480px; margin: 0 auto; min-height: 100dvh;
  background: var(--paper);
  box-shadow: 0 0 40px rgba(43,35,32,.08);
  position: relative; overflow-x: hidden;
  display: flex; flex-direction: column;
}
#app { flex: 1; display: flex; flex-direction: column; padding: 20px 20px calc(28px + env(safe-area-inset-bottom)); }

h1, h2, h3, .disp, .btn, .chip { font-family: var(--fd); letter-spacing: -.02em; }
h1 { font-size: 2rem; line-height: 1.3; }
h2 { font-size: 1.5rem; }
.dim { color: var(--ink-soft); font-size: .92rem; }
.center { text-align: center; }

/* 손그림 테두리 */
.wobbly {
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}
.wobbly2 {
  border: 2px solid var(--ink);
  border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px;
}

.btn {
  display: block; width: 100%; padding: 14px 18px;
  background: var(--ink); color: var(--paper);
  font-size: 1.15rem; font-weight: 700; text-align: center;
  border: none; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  cursor: pointer; transition: transform .12s;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn.accent { background: var(--accent); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn + .btn { margin-top: 10px; }

.chip {
  display: inline-block; padding: 7px 14px; margin: 4px 3px;
  border: 1.8px solid var(--ink); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  background: #fff; font-size: .98rem; cursor: pointer; user-select: none;
  transition: background .12s, color .12s;
}
.chip.on { background: var(--ink); color: var(--paper); }

input, select, textarea, button { font-family: inherit; } /* 입력 계열 폰트 통일 (v16 item 12) — .btn/.chip 등은 뒤에서 var(--fd)로 재지정 */
input[type=text], input[type=password], input[type=tel], select {
  width: 100%; padding: 12px 14px; font-size: 1.05rem;
  font-family: inherit; background: #fff; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 14px; outline: none;
}
input:focus { border-color: var(--accent); }
label.fld { display: block; margin: 14px 0 6px; font-weight: 700; font-family: var(--fd); font-size: 1.1rem; letter-spacing: -.02em; }

/* 랜딩 */
.trust { font-size: .85rem; color: var(--ink-soft); text-align: center; }

/* 고민 선택 */

/* 소환(로딩) */
.summon { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; text-align: center; }
.summon .orb {
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e8, #e8d9b8 60%, #d0bd94);
  border: 2px solid var(--ink); position: relative;
  animation: breathe 2.2s ease-in-out infinite;
}
.summon .orb::after { content: ''; position: absolute; inset: 14px; border-radius: 50%; border: 1.5px dashed rgba(43,35,32,.35); animation: spin 9s linear infinite; z-index: 2; }
/* 기다리는 사람이 보는 건 빈 원이 아니라 판을 읽고 있는 담당의 얼굴이다 (zero) */
/* img 는 대체 요소라 inset 만으로는 안 늘어난다 — auto 가 고유 크기로 풀려 원 밖으로 터진다. 폭·높이를 직접 준다 */
.summon .orb .orb-face { position: absolute; top: 9px; left: 9px; width: calc(100% - 18px); height: calc(100% - 18px);
  border-radius: 50%; object-fit: cover; object-position: center 20%; z-index: 1; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-msg { font-family: var(--fd); font-size: 1.3rem; min-height: 2.2em; letter-spacing: -.02em; }
.progress { width: 78%; height: 10px; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0%; transition: width .8s ease; }

/* 도사 소개 */
.dosa-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.dosa-hero .portrait {
  width: 210px; height: 210px; border-radius: 50%; padding: 18px;
  border: 2.5px solid var(--ink); background: #fff;
  animation: pop .5s cubic-bezier(.2,1.6,.4,1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.dosa-name { font-family: var(--fd); font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; }
.dosa-title { color: var(--ink-soft); }
.profile-card { background: #fff; padding: 16px 18px; text-align: left; font-size: .95rem; width: 100%; }

/* 풀이(채팅) */
.reading-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1.5px dashed var(--line); margin-bottom: 14px; }
.reading-head img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; padding: 3px; }
.chat { display: flex; flex-direction: column; gap: 12px; }
.blk-narr { text-align: center; color: var(--ink-soft); font-style: italic; font-size: .9rem; padding: 4px 20px; animation: fadeup .5s; }
.blk-say { display: flex; gap: 9px; align-items: flex-end; animation: fadeup .5s; }
.blk-say img { width: 34px; height: 34px; border-radius: 50%; border: 1.8px solid var(--ink); background: #fff; padding: 2px; flex: none; }
.blk-say .bubble {
  background: #fff; padding: 10px 14px; max-width: 82%;
  border: 1.8px solid var(--ink);
  border-radius: 4px 18px 18px 18px;
  font-size: 1.02rem;
}
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

/* 블러 (유료 구간) */
.blur-wrap { position: relative; margin-top: 18px; }
.blur-zone { filter: blur(7px); pointer-events: none; user-select: none; max-height: 380px; overflow: hidden; }
.blur-overlay {
  position: absolute; inset: -6px; display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 10px; text-align: center;
  background: linear-gradient(180deg, rgba(250,246,239,0) 0%, rgba(250,246,239,.88) 26%, rgba(250,246,239,.96) 100%);
  padding: 20px;
}
.blur-overlay b { font-family: var(--fd); font-size: 1.25rem; letter-spacing: -.02em; }

/* 부적 카드 */
.pull-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.pouch { font-size: 5rem; animation: shake .5s ease-in-out infinite; cursor: pointer; }
@keyframes shake { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.card {
  width: 230px; height: 322px; border-radius: 14px; position: relative;
  background: var(--paper); border: 3px solid var(--ink);
  display: flex; flex-direction: column; padding: 12px;
  box-shadow: 0 8px 24px rgba(43,35,32,.25);
  animation: reveal .7s cubic-bezier(.2,1.4,.4,1);
}
@keyframes reveal { from { transform: rotateY(90deg) scale(.7); opacity: 0; } }
.card .c-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--fd); font-weight: 700; letter-spacing: -.02em; }
.card .c-name { font-size: 1.35rem; }
.card .c-grade { font-size: 1rem; padding: 1px 8px; border-radius: 8px; border: 1.5px solid currentColor; }
.card .c-art {
  flex: 1; margin: 10px 0; border-radius: 10px; border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  background: #fff; position: relative; overflow: hidden;
}
.card .c-art .c-amulet { height: 100%; width: auto; max-width: 100%; }
.card .c-art .c-dosa-badge {
  position: absolute; right: 6px; bottom: 6px; width: 38px; height: 38px;
  border-radius: 50%; border: 1.8px solid var(--ink); background: #fff; padding: 2px;
}
.card .c-stat { font-family: var(--fd); font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; }
.card .c-effect { font-size: .82rem; line-height: 1.5; min-height: 3.6em; color: var(--ink-soft); margin-top: 4px; }
.card .c-serial { font-size: .7rem; text-align: right; color: var(--ink-soft); margin-top: 4px; font-family: monospace; }
.card.g-N { border-color: var(--n); } .card.g-N .c-grade { color: var(--n); }
.card.g-R { border-color: var(--r); box-shadow: 0 8px 24px rgba(124,138,150,.4); } .card.g-R .c-grade { color: var(--r); }
.card.g-SR { border-color: var(--sr); box-shadow: 0 8px 28px rgba(184,134,11,.45); } .card.g-SR .c-grade { color: var(--sr); }
.card.g-SR .c-art { background: linear-gradient(135deg, #fffbe8, #f7e8b8); }
.card.g-SSR .c-art { background: linear-gradient(120deg, #fdf3f8, #f0ecfc, #e8f8f6); }
.card.g-SSR .c-grade { color: var(--ssr2); }
.grade-banner { font-family: var(--fd); font-size: 1.7rem; font-weight: 700; animation: pop .5s cubic-bezier(.2,1.6,.4,1); letter-spacing: -.02em; }
.grade-banner.g-SSR { background: linear-gradient(90deg, var(--ssr1), var(--ssr2), var(--ssr3)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 컬렉션 */
.prob-note { margin-top: 16px; font-size: .78rem; color: var(--ink-soft); }

/* 헤더/기타 */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.topbar .back { font-family: var(--fd); font-size: 1.05rem; background: none; border: none; color: var(--ink-soft); cursor: pointer; letter-spacing: -.02em; }
.today-line { text-align: center; font-size: .88rem; color: var(--ink-soft); }
.gate-note { text-align: center; padding: 10px 14px; background: #fff; }
#toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--paper); padding: 10px 20px; border-radius: 20px;
  font-size: .92rem; opacity: 0; pointer-events: none; transition: all .3s; max-width: 86%;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.footer-links { margin-top: 26px; text-align: center; font-size: .74rem; color: var(--ink-soft); }
.footer-links a { color: inherit; }
.biz-info { margin-top: 10px; text-align: center; font-size: .68rem; line-height: 1.6; color: var(--ink-soft); opacity: .85; }
.biz-info span { display: block; }
/* 결제 (충전 화면) */
.checkout { text-align: left; }
.checkout-sum { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 10px; }
.checkout-sum b { font-size: 1.15rem; }
.checkout-note { font-size: .78rem; margin: 10px 0 12px; }
#pay-method, #pay-agree { background: #fff; border-radius: 12px; overflow: hidden; }
#pay-agree { margin-top: 8px; }
.pay-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; font-size: .9rem; background: #eef5ea; color: #2e5a3c; }
.pay-note.bad { background: #fbeceb; color: #8f2f24; }
.pay-hist { margin-top: 16px; font-size: .84rem; }
.pay-hist > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed rgba(0,0,0,.12); }
.pay-hist a, .pay-note a, .checkout-note a { color: inherit; text-decoration: underline; }
.birth-row { display: flex; gap: 8px; }
.birth-row input, .birth-row select { text-align: center; }
.gender-row { display: flex; gap: 8px; }
.gender-row .chip { flex: 1; text-align: center; margin: 0; padding: 11px; }

/* ---------- v2: 메뉴 홈 ---------- */

/* ---------- v2: 오늘의 운세 ---------- */
.today-dial { background: #fff; padding: 20px 18px; text-align: center; margin: 14px 0 18px; }
.dial-num { font-family: var(--fd); font-size: 3.4rem; font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -.02em; }
.dial-line { font-family: var(--fd); font-size: 1.2rem; margin-top: 6px; letter-spacing: -.02em; }
.dial-notes { margin-top: 10px; font-size: .84rem; color: var(--ink-soft); text-align: left; }
.fbar { margin: 12px 0; }
.fbar-head { display: flex; justify-content: space-between; font-family: var(--fd); font-size: 1.05rem; letter-spacing: -.02em; }
.fbar-track { height: 12px; border: 1.8px solid var(--ink); border-radius: 8px; background: #fff; overflow: hidden; margin: 4px 0; }
.fbar-track i { display: block; height: 100%; background: linear-gradient(90deg, #e0b13e, var(--accent)); }

/* ---------- v2: 궁합 ---------- */
.gh-pair { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 6px; text-align: center; }
.gh-person b { font-family: var(--fd); font-size: 1.25rem; letter-spacing: -.02em; }
.gh-person .dim { font-size: .8rem; }
.gh-x { font-size: 1.6rem; color: var(--ink-soft); }
.flame-wrap { text-align: center; margin: 10px 0 16px; }
.flames { font-size: 1.5rem; letter-spacing: 6px; }
.flames .fl { color: #ddd3c2; }
.flames .fl.on { color: #e0561f; text-shadow: 0 0 8px rgba(224, 86, 31, .5); }
.flame-score { font-family: var(--fd); font-size: 2.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.flame-score small { font-size: 1.1rem; }
.flame-grade { font-family: var(--fd); font-size: 1.15rem; color: var(--accent); letter-spacing: -.02em; }
.rel-card { background: #fff; padding: 12px 16px; margin: 8px 0; }
.rel-card b { font-family: var(--fd); font-size: 1.15rem; letter-spacing: -.02em; }
.factors { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.factor { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.f-delta { font-family: var(--fd); font-weight: 700; min-width: 34px; text-align: center; border-radius: 8px; padding: 2px 0; letter-spacing: -.02em; }
.f-delta.plus { background: #e0efec; color: #2e6e63; }
.f-delta.minus { background: #f6e3e7; color: var(--accent); }

/* ---------- v2: 인연 랭킹/관계 지도 ---------- */
.rel-map { width: 100%; height: auto; border-radius: 14px; margin: 8px 0 4px; }
.rel-legend { text-align: center; font-size: .8rem; margin-bottom: 10px; }
.rank-row { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 12px; margin: 8px 0; position: relative; }
.rank-row.top { border-width: 2.5px; box-shadow: 0 3px 10px rgba(192, 69, 94, .18); }
.rank-no { font-family: var(--fd); font-size: 1.4rem; font-weight: 700; min-width: 26px; text-align: center; color: var(--ink-soft); letter-spacing: -.02em; }
.rank-row.top .rank-no { color: var(--accent); }
.rank-body { flex: 1; min-width: 0; }
.rank-body b { font-family: var(--fd); font-size: 1.12rem; letter-spacing: -.02em; }
.rank-rel { font-size: .82rem; font-weight: 700; }
.rank-score { font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }
.rank-score b { font-family: var(--fd); font-size: 1.3rem; color: var(--ink); letter-spacing: -.02em; }
.rank-del { position: absolute; top: 6px; right: 8px; border: none; background: none; color: #c9bda9; font-size: .85rem; cursor: pointer; padding: 3px; }

/* ---------- v2: 대운 타임라인 ---------- */
.daeun-sec { margin-top: 20px; }
.daeun-head b { font-family: var(--fd); font-size: 1.2rem; letter-spacing: -.02em; }
.daeun-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 6px; padding-bottom: 6px; }
.save-check { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; font-size: .84rem; color: var(--ink-soft); }
.save-check input { margin-top: 2px; accent-color: var(--accent); }

/* ---------- v3: 단골(가입)·복채·벽 ---------- */
.bok-badge { font-family: var(--fd); font-size: .95rem; background: #fff; border: 1.8px solid var(--sr); color: var(--sr); border-radius: 16px; padding: 4px 12px; letter-spacing: -.02em; }
.bok-badge b { font-size: 1.1rem; }
.tier-badge { font-size: .8rem; border: 1.5px dashed var(--line); border-radius: 16px; padding: 4px 12px; color: var(--ink-soft); cursor: pointer; }
.tier-badge.member { border-style: solid; border-color: #2e6e63; color: #2e6e63; cursor: default; }
.benefit-box { background: #fff; padding: 14px 16px; font-size: .92rem; display: flex; flex-direction: column; gap: 6px; }
.code-box { font-family: monospace; font-size: 1.9rem; font-weight: 700; letter-spacing: 4px; background: #fff; padding: 14px 22px; text-align: center; }
.wall { background: #fff; padding: 18px 16px; text-align: center; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.wall b { font-family: var(--fd); font-size: 1.25rem; letter-spacing: -.02em; }
.wall p { font-size: .9rem; color: var(--ink-soft); line-height: 1.6; }
.unlock-head { margin-top: 18px; padding-top: 14px; border-top: 1.5px dashed var(--line); }
.unlock-head b { font-family: var(--fd); font-size: 1.2rem; letter-spacing: -.02em; }
textarea { width: 100%; padding: 12px 14px; font-size: 1.05rem; font-family: inherit; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; outline: none; resize: vertical; }
textarea:focus { border-color: var(--accent); }

/* ---------- v4: 훅 ---------- */
.hook {
  position: fixed; inset: 0; max-width: 480px; margin: 0 auto;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; z-index: 5;
}
.hook::before { content: ''; position: absolute; inset: 0; background: rgba(250,246,239,.55); }
.hook-inner { position: relative; width: 100%; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.hook-logo { font-family: var(--fd); font-weight: 700; font-size: 2rem; letter-spacing: -.02em; }
.hook-logo small { font-size: .85rem; color: var(--ink-soft); margin-left: 4px; }
.hook-q { font-family: var(--fd); font-size: 1.8rem; font-weight: 700; line-height: 1.35; animation: fadeup .6s; letter-spacing: -.02em; }
.hook-sub { color: var(--ink-soft); font-size: .92rem; }
.hook-chips { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.hook-chip {
  font-family: var(--fd); font-size: 1.25rem; padding: 15px; width: 100%;
  background: rgba(255,255,255,.92); border: 2px solid var(--ink); cursor: pointer;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  animation: fadeup .5s backwards; letter-spacing: -.02em; }
.hook-chip:nth-child(2) { animation-delay: .08s; } .hook-chip:nth-child(3) { animation-delay: .16s; } .hook-chip:nth-child(4) { animation-delay: .24s; }
.hook-chip:active { transform: scale(.97); }
.hook-skip { background: none; border: none; color: var(--ink-soft); font-size: .85rem; text-decoration: underline; margin-top: 8px; cursor: pointer; }
.hook input[type=text], input[type=password] { background: rgba(255,255,255,.95); text-align: center; font-size: 1.2rem; }
.draw-wrap { position: relative; width: 190px; overflow: hidden; border-radius: 10px; filter: drop-shadow(0 8px 18px rgba(43,35,32,.3)); }
.draw-wrap svg { display: block; width: 100%; height: auto; }
.draw-cover { position: absolute; inset: 0; background: #f7f1e4; }
.draw-cover.go { animation: wipe 2.4s ease-in-out forwards; }
@keyframes wipe { to { transform: translateY(101%); } }
.draw-tip { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #b03a2e; opacity: 0; }
.draw-tip.go { opacity: .8; animation: wipe 2.4s ease-in-out forwards; }
.hook-engrave { font-family: var(--fd); font-size: 1.2rem; min-height: 1.5em; letter-spacing: -.02em; }
.hook-engrave b { color: #b03a2e; }

/* ---------- v4: 홈 리디자인 ---------- */
.home2 { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.top-row { display: flex; justify-content: space-between; align-items: center; }
.logo-sm { font-family: var(--fd); font-weight: 700; font-size: 1.7rem; letter-spacing: -.02em; }
.top-right { display: flex; gap: 6px; align-items: center; }
.th-body { flex: 1; min-width: 0; }
.th-name { font-family: var(--fd); font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; }
.th-line { font-size: .9rem; margin: 3px 0; }
.feature-card { background: linear-gradient(115deg, #fdf1f3, #fff); padding: 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.feature-card .fc-copy { flex: 1; }
.feature-card b { font-family: var(--fd); font-size: 1.45rem; letter-spacing: -.02em; }
.feature-card .dim { font-size: .84rem; margin-top: 2px; }
.fc-live { font-size: .76rem; color: var(--accent); margin-top: 6px; font-weight: 700; }
.fc-faces { display: flex; flex-direction: column; gap: -4px; }
.fc-faces img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; padding: 2px; margin-top: -8px; }
.fc-faces img:first-child { margin-top: 0; }
.tile { padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; transition: transform .12s; }
.tile:active { transform: scale(.97); }
.tile b { font-family: var(--fd); font-size: 1.12rem; letter-spacing: -.02em; }
.tile .dim { font-size: .76rem; }
.col-strip-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: -6px; }
.col-strip-head b { font-family: var(--fd); font-size: 1.15rem; letter-spacing: -.02em; }
.col-strip-head .dim { font-size: .78rem; }
.col-strip { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 8px; cursor: pointer; -webkit-overflow-scrolling: touch; }
.mini-card { flex: none; width: 58px; border: 2px solid var(--n); border-radius: 8px; background: #fff; padding: 4px; text-align: center; }
.mini-card img { width: 100%; height: auto; }
.mini-card span { display: block; font-family: var(--fd); font-size: .66rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em; }
.mini-card.g-R { border-color: var(--r); } .mini-card.g-SR { border-color: var(--sr); box-shadow: 0 2px 8px rgba(184,134,11,.35); }
.mini-card.g-SSR { border-color: var(--ssr2); box-shadow: 0 2px 10px rgba(127,95,212,.4); }
.mini-card.silhouette { opacity: .4; }
.col-strip .mini-card { width: 74px; } /* 부적 이름이 읽히는 폭 (리뷰 P2-6) */
.mini-card.silhouette img { filter: brightness(0); opacity: .4; }
.dosa-hero .portrait.photo { object-fit: cover; padding: 0; }

/* ---------- v16: 도사 초상 v2 — 표정·동작 세트 (배경 없음) ---------- */
.dosa-hero .portrait { transition: opacity .18s; }
.dosa-hero .portrait:active { opacity: .82; }
/* 밤 점방에서는 낮 그림이 그대로 뜨면 눈이 아프다 — 등불 아래로 톤을 내린다. */
body.night .blk-say img, body.night .reading-head img, body.night .fc-faces img,
body.night .dp-face, body.night .picked-head img, body.night .dosa-hero .portrait,
body.night .c-dosa-badge { filter: saturate(.82) brightness(.9); }

/* ---------- v4.1: 실사 아바타 ---------- */
.blk-say img, .reading-head img, .fc-faces img, .concern-card img, .c-dosa-badge { object-fit: cover; padding: 0 !important; }

/* ---------- v5: 도감 ---------- */
.dex-progress { background: #fff; padding: 12px 14px; margin: 10px 0; font-size: .95rem; }
.dex-progress b { font-family: var(--fd); font-size: 1.3rem; color: var(--accent); letter-spacing: -.02em; }
.dex-bar { height: 10px; border: 1.6px solid var(--ink); border-radius: 8px; background: var(--paper); overflow: hidden; margin: 6px 0 4px; }
.dex-bar i { display: block; height: 100%; background: linear-gradient(90deg, #e0b13e, var(--accent)); }
.dex-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0 8px; padding-bottom: 4px; }
.dex-tab { font-family: var(--fd); font-size: .95rem; padding: 5px 13px; border: 1.8px solid var(--ink); background: #fff; border-radius: 14px; cursor: pointer; white-space: nowrap; letter-spacing: -.02em; }
.dex-tab.on { background: var(--ink); color: var(--paper); }
.dex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dex-cell { background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 5px 3px 4px; text-align: center; cursor: pointer; }
.dex-cell img { width: 100%; height: auto; }
.dex-nm { font-size: .62rem; line-height: 1.25; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dex-cell.silhouette img, .mini-card.dexcard.silhouette img { filter: grayscale(1) brightness(0.55) contrast(0.6); opacity: .45; }
.dex-cell.silhouette .dex-nm { color: #b6ab99; }
.dex-overlay { position: fixed; inset: 0; background: rgba(43,35,32,.55); display: flex; align-items: center; justify-content: center; z-index: 30; padding: 24px; }
/* 부적 완성 무대 — 공방 결과를 페이지 끝이 아니라 화면 한가운데서 보인다 (zero) */
.am-stage { width: 100%; max-width: 320px; max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #f4ece0; text-align: center; }
.am-stage .combine-stage, .am-stage .reveal-stage { width: 100%; }
.am-stage .card { margin: 0 auto; color: var(--ink); } /* 무대 글자색(밝은 크림)이 카드 안까지 흘러 이름·효험이 지워졌다 */
#amOv { background: rgba(24,18,15,.88); } /* 완성 순간엔 방을 어둡게 — 밝은 종이 위 밝은 글씨는 안 읽힌다 */
.am-btns { display: flex; gap: 10px; width: 100%; max-width: 260px; }
.am-btns .btn { width: auto; flex: 1; padding: 11px 14px; font-size: 1rem; }
.am-btns .btn + .btn { margin-top: 0; }
.am-btns .btn.ghost { color: #f4ece0; border-color: #f4ece0; }
.am-stage .cmb, .am-stage .stamp, .am-stage .ink-splash { filter: brightness(1.6); } /* 인주 빨강이 어두운 무대에 묻히지 않게 (night 처리와 같은 방식) */
.am-close { background: none; border: none; color: rgba(244,236,224,.72); font-size: .88rem; text-decoration: underline; cursor: pointer; padding: 4px 8px; }
body.night .am-btns .btn.ghost { background: transparent; color: #dde5f5; border-color: #dde5f5; }
.dex-detail { background: var(--paper); padding: 18px; max-width: 320px; width: 100%; text-align: center; max-height: 86vh; overflow-y: auto; }
.dex-detail img { width: 220px; max-width: 68vw; }
.dex-detail b { font-family: var(--fd); font-size: 1.3rem; display: block; margin-top: 6px; letter-spacing: -.02em; }
.dex-story { font-size: .86rem; text-align: left; margin: 10px 0; color: #4a3f38; }
.dex-own { margin: 6px 0; }
.g-chip { font-family: var(--fd); font-size: .78rem; border: 1.5px solid var(--n); color: var(--n); border-radius: 8px; padding: 1px 7px; letter-spacing: -.02em; }
.g-chip.gR { border-color: var(--r); color: var(--r); } .g-chip.gSR { border-color: var(--sr); color: var(--sr); } .g-chip.gSSR { border-color: var(--ssr2); color: var(--ssr2); }
.silhouette-soft img { filter: grayscale(1) brightness(0.6); opacity: .5; }
.mini-card.dexcard span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .62rem; }

/* ---------- v5: 시나리오 ---------- */
.scen-card { display: flex; align-items: center; gap: 12px; background: #fff; padding: 12px 14px; margin: 10px 0; cursor: pointer; position: relative; transition: transform .12s; }
.scen-card:active { transform: scale(.98); }
.scen-card img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; flex: none; }
.scen-card .scen-body { flex: 1; min-width: 0; padding-right: 56px; }
.scen-card b { font-family: var(--fd); font-size: 1.15rem; letter-spacing: -.02em; }
.scen-done { font-size: .68rem; color: #2e6e63; border: 1px solid #2e6e63; border-radius: 8px; padding: 0 6px; }
.m-badge { display: inline-block; font-family: var(--fd); font-size: .74rem; font-weight: 700; padding: 1px 9px; border-radius: 9px; background: var(--ink); color: #faf6ef; white-space: nowrap; line-height: 1.5; letter-spacing: -.02em; }
.m-badge.free { background: #2e6e63; }
.scen-card .m-badge { position: absolute; top: 12px; right: 12px; } /* 목록 카드는 우상단 고정 (v16 item 11) */

/* ---------- v6: 수집 시스템 + 공방 + 조합 연출 ---------- */
.axis-bars { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.axis-bar-row { display: flex; align-items: center; gap: 6px; font-size: .72rem; }
.axis-bar-row .ab-name { width: 44px; flex: none; font-family: var(--fd); font-size: .85rem; letter-spacing: -.02em; }
.axis-bar-row .ab-track { flex: 1; height: 6px; background: #eee3d0; border-radius: 3px; overflow: hidden; }
.axis-bar-row .ab-track i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.axis-bar-row .ab-num { width: 46px; text-align: right; color: var(--ink-soft); }
.axis-bar-row .ab-reward { width: 62px; text-align: right; color: #8a6410; font-size: .68rem; }
.axis-bar-row.done .ab-track i { background: #2e6e50; }
.axis-bar-row.done .ab-reward { color: #2e6e50; }
.pity-line { font-size: .76rem; text-align: center; margin-top: 8px; }
.shard-box { background: #fff; padding: 10px 12px; margin: 10px 0; font-size: .84rem; }
.shard-btns { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.shard-box .chip { font-family: var(--fd); border: 1.6px solid var(--ink); background: #fff; border-radius: 12px; padding: 3px 11px; cursor: pointer; letter-spacing: -.02em; }

/* 조합 연출: 글자 둘이 날아와 합쳐진다 */
.combine-stage { position: relative; height: 150px; width: 100%; overflow: hidden; }
.cmb { position: absolute; top: 50%; font-family: 'AppleMyungjo', serif; font-size: 3rem; font-weight: 700; color: #b5271c; transform: translateY(-50%); }
.cmb-l { left: 8%; animation: cmbL .9s cubic-bezier(.5,-0.2,.5,1.2) forwards; }
.cmb-r { right: 8%; animation: cmbR .9s cubic-bezier(.5,-0.2,.5,1.2) forwards; }
@keyframes cmbL { 70% { left: 44%; opacity: 1; } 100% { left: 46%; opacity: 0; } }
@keyframes cmbR { 70% { right: 44%; opacity: 1; } 100% { right: 46%; opacity: 0; } }
.cmb-burst { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: #b5271c; opacity: 0; transform: translate(-50%,-50%); animation: burst .45s .8s ease-out forwards; }
@keyframes burst { 0% { opacity: .9; box-shadow: 0 0 0 0 rgba(181,39,28,.5); } 100% { opacity: 0; box-shadow: 0 0 0 70px rgba(181,39,28,0); } }
.ssr-flash { position: fixed; inset: 0; background: radial-gradient(circle, rgba(255,215,80,.85), rgba(255,215,80,0) 70%); opacity: 0; animation: ssrflash 1.2s .6s ease-out forwards; pointer-events: none; z-index: 40; }
@keyframes ssrflash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

/* 공방 */
.forge h2 { margin-bottom: 4px; }
.forge-step { margin-top: 14px; }
.forge-step > b { font-family: var(--fd); font-size: 1.05rem; letter-spacing: -.02em; }
.forge-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 6px; }
.forge-grid.verbs { grid-template-columns: repeat(4, 1fr); }
.forge-grid .chip { font-family: 'AppleMyungjo', serif; font-size: 1.25rem; font-weight: 700; color: #8d1a12; background: #fff; border: 1.6px solid var(--line); border-radius: 10px; padding: 7px 0 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.forge-grid .chip span { font-family: 'Gowun Dodum'; font-size: .62rem; color: var(--ink-soft); }
.forge-grid .chip.on { border-color: #b5271c; background: #fdf3e4; box-shadow: 0 0 0 1.5px #b5271c; }
.forge-preview { background: #fff; padding: 14px; margin: 14px 0; text-align: center; min-height: 90px; }
.fp-formula { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; font-family: 'AppleMyungjo', serif; }
.fp-g { font-size: 2rem; font-weight: 700; color: #b5271c; }
.fp-plus, .fp-eq { font-size: 1.2rem; color: var(--ink-soft); }
.fp-name { font-family: var(--fd); font-size: 1.15rem; letter-spacing: -.02em; }
.forge .btn.accent { width: 100%; }
.forge .btn.accent:disabled { opacity: .45; }
.sr-flash { position: fixed; inset: 0; background: radial-gradient(circle, rgba(220,190,120,.55), rgba(220,190,120,0) 65%); opacity: 0; animation: ssrflash 1s .55s ease-out forwards; pointer-events: none; z-index: 40; }

/* ---------- v7: 뷰어 등급 연출 (오리엔탈) — 이미지가 아니라 뷰어가 등급을 입힌다 ---------- */
.dex-badge { position: absolute; top: 4px; right: 4px; font-family: var(--fd); font-size: .62rem; padding: 0 5px; border-radius: 7px; color: #fff; background: #a99f90; z-index: 2; letter-spacing: -.02em; }
.dex-badge.bR { background: #7d8aa0; }
.dex-badge.bSR { background: linear-gradient(135deg, #b8860b, #e0b040); }
.dex-badge.bSSR { background: linear-gradient(135deg, #8d1a12, #c8992f, #8d1a12); }
.dex-badge.big { position: static; font-size: .8rem; padding: 1px 9px; display: block; width: fit-content; margin: 0 auto 6px; }
.fp-formula .dex-badge { position: static; margin-left: 4px; }
.dex-cell { position: relative; }
/* 도감 셀: 가벼운 정적 차등 (188셀 성능) */
.dex-cell.vfx-R { border-color: #9aa5b5; }
.dex-cell.vfx-SR { border-color: #c8992f; border-width: 2px; }
.dex-cell.vfx-SSR { border-color: #c8992f; border-width: 2px; box-shadow: 0 0 8px rgba(200,153,47,.45); }
/* 카드·상세: 살아있는 연출 */
.card.vfx-R, .dex-detail.vfx-R { box-shadow: 0 0 0 2px #aeb8c6, 0 0 14px rgba(150,165,190,.5); }
.card.vfx-SR, .dex-detail.vfx-SR { box-shadow: 0 0 0 2.5px #c8992f, 0 0 18px rgba(200,153,47,.55); position: relative; }
.card.vfx-SR { overflow: hidden; }
.dex-detail.vfx-SR { overflow-x: hidden; }
.card.vfx-SSR, .dex-detail.vfx-SSR { position: relative; }
.card.vfx-SSR { overflow: hidden; animation: reveal .7s cubic-bezier(.2, 1.4, .4, 1), ssr-ring 3.4s linear infinite; } /* 입장 애니 병기 (H4) */
.dex-detail.vfx-SSR { overflow-x: hidden; animation: ssr-ring 3.4s linear infinite; }
@keyframes ssr-ring {
  0%, 100% { box-shadow: 0 0 0 3.5px #d84f6c, 0 0 30px rgba(216,79,108,.65); }
  33% { box-shadow: 0 0 0 3.5px #d8ab3a, 0 0 34px rgba(216,171,58,.85); }
  66% { box-shadow: 0 0 0 3.5px #4bb8c0, 0 0 30px rgba(75,184,192,.65); }
}
.card.vfx-SR::after, .card.vfx-SSR::after, .dex-detail.vfx-SR::after, .dex-detail.vfx-SSR::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 46%; left: -60%;
  background: linear-gradient(100deg, transparent 20%, rgba(255,245,200,.35) 48%, rgba(255,255,255,.55) 50%, rgba(255,245,200,.35) 52%, transparent 80%);
  transform: skewX(-10deg); animation: sheen 3.2s ease-in-out infinite; pointer-events: none;
}
.card.vfx-SSR::after, .dex-detail.vfx-SSR::after {
  background: linear-gradient(100deg, transparent 15%, rgba(255,120,120,.22) 38%, rgba(255,235,150,.5) 50%, rgba(140,220,255,.22) 62%, transparent 85%);
  animation-duration: 2.4s;
}
@keyframes sheen { 0% { left: -60%; } 55%, 100% { left: 115%; } }
.card.vfx-SSR .c-art { position: relative; }
/* 상세 모달은 g-* 유산이 없어 ::before가 비어 있다 — 입자를 거기에 */
.dex-detail.vfx-SSR::before {
  content: ''; position: absolute; inset: 0 0 40% 0; pointer-events: none; z-index: 1;
  background-image: radial-gradient(circle 3px at 30% 30%, rgba(255,236,150,.95) 45%, transparent 65%),
    radial-gradient(circle 2.4px at 70% 18%, rgba(255,236,150,.9) 45%, transparent 65%),
    radial-gradient(circle 2.8px at 58% 60%, rgba(255,255,255,.9) 45%, transparent 65%);
  animation: gleam 1.9s ease-in-out infinite alternate;
}
.card.vfx-SSR .c-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle 3px at 16% 22%, rgba(255,236,150,.95) 45%, transparent 65%),
    radial-gradient(circle 2.2px at 78% 12%, rgba(255,236,150,.9) 45%, transparent 65%),
    radial-gradient(circle 3.4px at 64% 80%, rgba(255,236,150,.95) 45%, transparent 65%),
    radial-gradient(circle 2.4px at 26% 68%, rgba(255,236,150,.85) 45%, transparent 65%),
    radial-gradient(circle 2px at 88% 52%, rgba(255,236,150,.85) 45%, transparent 65%),
    radial-gradient(circle 2.6px at 44% 40%, rgba(255,255,255,.9) 45%, transparent 65%);
  animation: gleam 1.9s ease-in-out infinite alternate;
}
@keyframes gleam { from { opacity: .2; } to { opacity: 1; } }

/* ---------- v7: 획득 리빌 (혼불 예고 → 도장 쾅 → 폭발 → 여운) ---------- */
.reveal-stage { position: relative; min-height: 240px; display: flex; align-items: center; justify-content: center; }
.honbul { width: 26px; height: 26px; border-radius: 50%; filter: blur(1.5px);
  animation: honbul-float 1.1s ease-in-out infinite alternate; transition: background .45s, box-shadow .45s, transform .3s; }
.honbul.hN { background: radial-gradient(circle, #f2f6fa, #b9c8d6 70%); box-shadow: 0 0 22px 8px rgba(190,210,230,.6); }
.honbul.hR { background: radial-gradient(circle, #f4f7ff, #a9b6cc 70%); box-shadow: 0 0 26px 10px rgba(169,182,204,.7); }
.honbul.hSR { background: radial-gradient(circle, #fdf3d8, #d0a545 70%); box-shadow: 0 0 30px 12px rgba(208,165,69,.7); }
.honbul.hSSR { background: radial-gradient(circle, #fff4d0, #e0a92f 70%); box-shadow: 0 0 40px 16px rgba(224,169,47,.75); }
.honbul.squeeze { transform: scale(.45); filter: blur(.5px); }
@keyframes honbul-float { from { transform: translateY(-7px); } to { transform: translateY(7px); } }
.stamp { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border: 4px solid #b5271c; border-radius: 14px; color: #b5271c; display: flex; align-items: center; justify-content: center;
  font-family: 'AppleMyungjo', serif; font-size: 3rem; font-weight: 700;
  animation: stamp-down .42s cubic-bezier(.2, 2.4, .4, 1) forwards; }
@keyframes stamp-down { 0% { transform: scale(3.2) rotate(-14deg); opacity: 0; } 55% { opacity: 1; } 100% { transform: scale(1) rotate(-6deg); opacity: 1; } }
.ink-splash { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%;
  background: rgba(181,39,28,.5); animation: splash .5s .3s ease-out forwards; opacity: 0; }
@keyframes splash { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(24); } }
.shake-sm { animation: rshake .35s ease-in-out; } .shake-lg { animation: rshake .6s ease-in-out 2; }
@keyframes rshake { 0%, 100% { transform: translate(0); } 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-4px, -2px); } 80% { transform: translate(4px, 2px); } }
.gold-flake { position: fixed; top: -4vh; font-size: 11px; color: #d8ab3a; z-index: 45; pointer-events: none;
  animation: flake-fall linear forwards; text-shadow: 0 0 6px rgba(216,171,58,.8); }
@keyframes flake-fall { to { transform: translateY(110vh) rotate(540deg); opacity: .25; } }
.edge-glow { position: fixed; inset: 0; pointer-events: none; z-index: 44; opacity: 0;
  box-shadow: inset 0 0 60px 18px rgba(200,153,47,.65); animation: edge-pulse .9s ease-out forwards; }
@keyframes edge-pulse { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }

/* v9: 공방 미리보기 제거 — 뒷면 카드 */
.forge-mystery { width: 96px; height: 160px; margin: 0 auto; border: 2.5px solid #b5271c; border-radius: 8px;
  background: repeating-linear-gradient(135deg, #f0c845, #f0c845 7px, #e8bd38 7px, #e8bd38 14px);
  display: flex; align-items: center; justify-content: center; font-family: var(--fd); font-size: 3rem; font-weight: 700; color: #b5271c; letter-spacing: -.02em; }

/* ---------- v10: 전역 전환·모션 (US-801) ---------- */
.page-in { animation: pageIn .42s cubic-bezier(.22,.9,.3,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.stag-in { animation: stagIn .5s cubic-bezier(.22,.9,.3,1) backwards; }
@keyframes stagIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.btn, .chip, .tile, .dosa-pick, .mini-card, .dex-cell, .scen-card, .dex-tab { transition: transform .14s cubic-bezier(.34,1.56,.64,1), box-shadow .14s; }
.btn:active, .chip:active, .tile:active, .dosa-pick:active, .mini-card:active, .dex-cell:active, .scen-card:active { transform: scale(.95); }
#toast.show { animation: toastPop .45s cubic-bezier(.2,1.8,.4,1); }
@keyframes toastPop { 0% { transform: translateX(-50%) scale(.6) rotate(-4deg); opacity: 0; } 100% { transform: translateX(-50%) scale(1) rotate(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .page-in, .stag-in, #toast.show, .honbul, .stamp, .gold-flake, .edge-glow, .cmb, .cmb-burst, .ssr-flash, .sr-flash,
  .amb, .today-hero2, .breathing img, .live-dot,   .pick-stamp, .dosa-hero .portrait, .p-beat, .p-sway, .p-twinkle, .p-wiggle, .scen-slide.skeleton, .card.vfx-SSR, .dex-detail.vfx-SSR, .card.vfx-SR::after, .card.vfx-SSR::after,
  .dex-detail.vfx-SR::after, .dex-detail.vfx-SSR::after, .card.vfx-SSR .c-art::after, .dex-detail.vfx-SSR::before,
  .ebar-fill, .pil-col, .blk-rich, .ask-chips, .blk-me, .brush-veil, .sum-card, .new-pill,
  .pouch, .shake-sm, .shake-lg, .summon .orb, .summon .orb::after, .grade-banner, .card,
  .hook-q, .hook-chip, .ink-splash, .rise-in,
  .blk-say, .blk-narr, .typing i, .tap-bubble { animation: none !important; }
  * { transition-duration: .01s !important; }
  .brush-veil { display: none !important; } /* 휘호는 즉시 완성본 */
  .fx-veil { display: none !important; } /* 전막 연출은 모션 자체가 본체 — 통째로 생략 (인라인 밴드가 캡션 전달) */
  .draw-cover.go { animation: none !important; transform: translateY(101%); } /* forwards=상태 이동 애니 — none이 아니라 종료 상태 고정 (리뷰 P0: 훅 부적 영구 가림) */
  .draw-tip.go { animation: none !important; opacity: 0 !important; }
  .brush-cycle .bc-img { animation: none !important; } .brush-cycle .bc0 { opacity: .85 !important; } /* 회전 정지 — 첫 장 정적. 시트 뒤쪽의 .bc-img 본 규칙에 지지 않게 !important */
}

/* ---------- v10: 홈 리치화 (US-802) ---------- */
.logo-hanja { font-size: .9rem; color: var(--ink-soft); font-weight: 400; }
.fu-badge { cursor: pointer; }
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ambient .amb { position: absolute; width: 8px; height: 8px; background: var(--accent); opacity: .07;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: ambFloat 16s linear infinite; }
.amb0 { left: 8%; top: 20%; animation-delay: 0s; } .amb1 { left: 84%; top: 12%; animation-delay: -3s; width: 12px; height: 12px; }
.amb2 { left: 20%; top: 70%; animation-delay: -6s; } .amb3 { left: 70%; top: 55%; animation-delay: -9s; width: 10px; height: 10px; }
.amb4 { left: 45%; top: 32%; animation-delay: -12s; } .amb5 { left: 90%; top: 82%; animation-delay: -14s; }
@keyframes ambFloat { 0% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-26px) rotate(160deg); } 100% { transform: translateY(0) rotate(360deg); } }
.home2 { position: relative; z-index: 1; }
.today-hero2 { background: linear-gradient(120deg, #fffdf7, #fbf2dd); padding: 14px 16px; display: flex; gap: 14px; align-items: center; cursor: pointer; animation: heroFloat 5s ease-in-out infinite; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.th2-body { flex: 1; min-width: 0; }
.th2-score { font-family: var(--fd); margin-top: 2px; letter-spacing: -.02em; }
.th2-score b { font-size: 1.7rem; color: var(--accent); }
.fc-voice { font-family: var(--fd); font-size: 1.02rem; color: #8d4a42; margin: 2px 0; letter-spacing: -.02em; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #c0392b; margin-right: 5px; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.75); } }
.breathing img { animation: breathe 3.4s ease-in-out infinite; }
.breathing img:nth-child(2) { animation-delay: .5s; } .breathing img:nth-child(3) { animation-delay: 1s; } .breathing img:nth-child(4) { animation-delay: 1.5s; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.tile-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile-grid2 .t-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; }
.tile-grid2 .t-wide b { font-size: 1.3rem; display: block; } /* 제목·설명이 한 줄에 붙지 않게 (다른 타일과 같은 2단) */
.tile-grid2 .t-wide .dim { font-size: .82rem; }

/* ---------- v10: 고민 선택 카드화 (US-803) ---------- */
.dosa-pick { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px 14px; margin: 12px 0; cursor: pointer; overflow: hidden; }
.dosa-pick .dp-face { width: 72px; height: 72px; border-radius: 50%; border: 2.5px solid var(--ink); object-fit: cover; flex: none; background: #fff; }
.dosa-pick .dp-body { flex: 1; min-width: 0; }
.dosa-pick b { font-family: var(--fd); font-size: 1.35rem; letter-spacing: -.02em; }
.dosa-pick .dim { font-size: .8rem; }
.dp-bubble { font-family: var(--fd); font-size: 1.05rem; color: #6d4a3f; margin-bottom: 2px; letter-spacing: -.02em; }
.dp-master { font-size: .74rem; color: var(--accent); font-weight: 700; margin-top: 3px; }
.dosa-pick.picked { transform: scale(1.02); box-shadow: 0 6px 22px rgba(181,39,28,.25); }
.pick-stamp { position: absolute; right: 14px; bottom: 26px; width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid #b5271c; color: #b5271c; font-family: var(--fd); font-size: 1.5rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.6);
  animation: stamp-down .4s cubic-bezier(.2,2.4,.4,1) forwards; letter-spacing: -.02em; }
.picked-head { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 4px; }
.picked-head img { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; flex: none; }
.picked-head b { font-family: var(--fd); font-size: 1.25rem; letter-spacing: -.02em; }
/* 도사 소개 등장 모션 (US-803) */
.dosa-hero .portrait { animation: inkIn .7s cubic-bezier(.2,1.3,.4,1); }
@keyframes inkIn { 0% { opacity: 0; transform: scale(.6) rotate(-5deg); filter: blur(6px); } 100% { opacity: 1; transform: none; filter: none; } }
.dosa-pick .dp-body { padding-right: 30px; }

/* ---------- v11: 에디토리얼 톤 — UI는 물러나고 부적이 주인공 ---------- */
.logo-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #b5271c; margin-left: 3px; vertical-align: super; }
.today-hero2 { background: #fffdf7; border: 1.5px solid var(--line); border-radius: 14px; animation: none; }
.th2-num { text-align: center; min-width: 70px; }
.th2-num b { font-family: var(--fd); font-size: 2.9rem; line-height: 1; color: #b5271c; display: block; letter-spacing: -.02em; }
.th2-num span { font-size: .7rem; color: var(--ink-soft); letter-spacing: .2em; }
.th2-go { flex: none; font-size: 1.3rem; color: #b5271c; font-weight: 700; }
.feature-card { background: #fffdf7; border: 1.5px solid var(--line); border-radius: 14px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: -4px; }
.sec-head b { font-family: var(--fd); font-size: 1.15rem; letter-spacing: -.02em; }
.sec-head .dim { font-size: .76rem; }

/* 시나리오 가로 캐러셀 — 좌우 스와이프 */
.scen-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scen-rail::-webkit-scrollbar { display: none; }
.scen-slide { flex: 0 0 76%; scroll-snap-align: start; background: #fffdf7; border: 1.5px solid var(--line);
  border-radius: 16px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: transform .16s, box-shadow .16s; }
.scen-slide:active { transform: scale(.97); }
/* 이야기 썸네일은 편마다 다른 4:3 장면컷이라 비율 그대로 둔다.
   예전엔 정사각 얼굴 초상을 168px 가로 스트립으로 잘라 써서 무엇을 넣든 얼굴만 남았다(얼빡). */
.scen-slide img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; object-position: center; }
/* 썸네일이 없어 초상으로 떨어진 편만 예전 얼굴 맞춤 크롭을 쓴다 */
.scen-slide img.ss-fallback { aspect-ratio: auto; height: 168px; object-position: center 18%; }
.scen-slide .ss-body { padding: 10px 13px 12px; }
.scen-slide b { font-family: var(--fd); font-size: 1.22rem; letter-spacing: -.02em; }
.ss-desc { font-size: .8rem; color: var(--ink-soft); margin: 3px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ss-foot { display: flex; align-items: center; gap: 8px; }
.ss-read { font-size: .7rem; color: #2e6e63; }
.scen-slide.skeleton { height: 325px; background: linear-gradient(100deg, #f5efe2 40%, #fbf6ea 50%, #f5efe2 60%); background-size: 200% 100%; animation: skel 1.2s linear infinite; border-style: dashed; }
@keyframes skel { to { background-position: -200% 0; } }

/* 타일: 4색 그라데이션·한자 인장 폐지 → 크림 카드 + 픽토그램 + 빨강 포인트 */
.tile-grid2 .tile { background: #fffdf7 !important; border: 1.5px solid var(--line); border-radius: 14px; }
.pict { display: inline-flex; width: 34px; height: 34px; color: #b5271c; margin-bottom: 4px; flex: none; }
.pict svg { width: 100%; height: 100%; }
.t-count { margin-left: auto; font-family: var(--fd); font-size: 1.5rem; font-weight: 700; color: #b5271c; letter-spacing: -.02em; }
.p-beat { animation: pBeat 1.8s ease-in-out infinite; }
@keyframes pBeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.14); } 24% { transform: scale(1); } 36% { transform: scale(1.09); } 48% { transform: scale(1); } }
.p-sway { animation: pSway 3.6s ease-in-out infinite; }
@keyframes pSway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.p-twinkle { animation: pTwk 2.6s ease-in-out infinite; }
@keyframes pTwk { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.p-wiggle { animation: pWig 4s ease-in-out infinite; }
@keyframes pWig { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(9deg); } 96% { transform: rotate(-9deg); } }
/* 홈 카드류 wobbly 완화: 크롬은 직선, 손맛은 부적·말풍선·타이포에만 */
.home2 .wobbly, .home2 .wobbly2 { border-radius: 14px !important; }

/* ---------- v11.1: 오늘의 효험 (아이디어 4) ---------- */
.duty-card { display: flex; gap: 12px; align-items: center; background: #fffdf7; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 10px 14px; cursor: pointer; }
.duty-card img { width: 44px; flex: none; border-radius: 4px; }
.duty-body { min-width: 0; }
.duty-tag { font-size: .66rem; letter-spacing: .14em; color: #b5271c; font-weight: 700; }
.duty-card b { font-family: var(--fd); font-size: 1.08rem; display: block; letter-spacing: -.02em; }
.duty-card .dim { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- v11.1: 스크롤 떠오름 (아이디어 5) ---------- */
.rise-in { animation: riseIn .6s cubic-bezier(.22,.9,.3,1) backwards; }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- v11.1: 밤 점방 (아이디어 3) — 먹색 + 등불 톤 ---------- */
.theme-btn { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.theme-btn i { width: 12px; height: 12px; border-radius: 50%; background: #e8b23a; box-shadow: inset -3px -2px 0 rgba(181,39,28,.35); }
body.night, body.night #frame { background: #0e1526; color: #dde5f5; }
body.night { --ink: #dde5f5; --ink-soft: #8fa0c0; --paper: #0e1526; --paper-deep: #0b1120; } /* 토큰 자체 갱신 — var 소비처 38곳 일괄 (리뷰 P1-2) */
body.night textarea { background: #17203a; border-color: #2a3a5e; color: #dde5f5; }
body.night .rel-card, body.night .factor { background: #17203a; border-color: #2a3a5e; }
body.night .dex-cell.silhouette .dex-nm { color: #8fa0c0; }
body.night .code-box, body.night .benefit-box, body.night .today-dial, body.night .rank-row { background: #17203a; border-color: #2a3a5e; }
body.night .theme-btn i { background: #f0d089; box-shadow: -4px 2px 0 -2px #0e1526 inset; }
body.night .ambient .amb { background: #e0a94a; opacity: .1; }
body.night .today-hero2, body.night .feature-card, body.night .scen-slide, body.night .duty-card,
body.night .tile-grid2 .tile, body.night .mini-card, body.night .dex-cell, body.night .dex-progress,
body.night .shard-box, body.night .forge-preview, body.night .picked-head, body.night .dosa-pick,
body.night .dex-detail, body.night .card, body.night .scen-card, body.night .wall, body.night .gate-note,
body.night .profile-card, body.night input, body.night select, body.night .forge-grid .chip {
  background: #17203a !important; border-color: #2a3a5e; color: #dde5f5;
}
body.night .dim, body.night .trust, body.night .footer-links a, body.night .biz-info { color: #8fa0c0; }
body.night h2, body.night .logo-sm, body.night .th-name, body.night b { color: #eef2fb; }
body.night .bok-badge, body.night .tier-badge { background: #17203a; border-color: #2a3a5e; color: #dde5f5; }
body.night .btn.ghost, body.night .dex-tab { background: #17203a; color: #dde5f5; border-color: #3a4c74; }
body.night .btn:not(.ghost) { background: #b5271c; border-color: #b5271c; color: #f6ead0; }
body.night .chip { background: #17203a; border-color: #3a4c74; color: #dde5f5; }
body.night .chip.on { background: #b5271c; border-color: #b5271c; color: #f6ead0; }
body.night .th2-num b, body.night .t-count, body.night .pict, body.night .duty-tag, body.night .th2-go { color: #e0a94a; }
body.night .fc-voice, body.night .dp-bubble { color: #c3cde8; }
body.night .blk-narr { color: #93a4c6; }
body.night .blk-say .bubble { background: #17203a; border-color: #2a3a5e; color: #dde5f5; }
body.night .sec-head b, body.night .col-strip-head b { color: #eef2fb; }
body.night .dex-nm { color: #8fa0c0; }
body.night .m-badge { background: #2a3a5e; color: #dde5f5; }
body.night .card .c-art, body.night .progress, body.night .fbar-track { background: #17203a; }
body.night .f-delta.plus { background: #1d3a33; color: #7fc7b3; }
body.night .f-delta.minus { background: #3a2230; color: #e08aa0; }
body.night .stamp, body.night .cmb, body.night .ink-splash { filter: brightness(1.6); } /* 인주 빨강이 네이비에 묻히지 않게 */
body.night .hook::before { background: rgba(10, 16, 32, .62); }
body.night .hook-chip { background: rgba(23, 32, 58, .92); }
body.night .m-badge.free { background: #2e5c4e; }
body.night .dex-overlay { background: rgba(0,0,0,.7); }
body.night .forge-mystery { border-color: #e0a94a; background: repeating-linear-gradient(135deg, #2a3a5e, #2a3a5e 7px, #1f2a48 7px, #1f2a48 14px); color: #e0a94a; }

/* ---------- v12: 회원 인증 UI ---------- */
.auth-tabs { display: flex; gap: 8px; margin: 6px 0 14px; }
.auth-tab { flex: 1; font-family: var(--fd); font-size: 1.05rem; padding: 9px 0; border: 1.8px solid var(--line); background: transparent; border-radius: 12px; cursor: pointer; color: var(--ink-soft); letter-spacing: -.02em; }
.auth-tab.on { border-color: var(--ink); color: var(--ink); background: #fffdf7; font-weight: 700; }
.social-col { display: flex; flex-direction: column; gap: 9px; }
.social-btn { width: 100%; font-weight: 700; border-width: 1.5px; }
.social-btn .soon { font-size: .72rem; opacity: .65; font-weight: 400; }
.or-line { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; color: var(--ink-soft); font-size: .78rem; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* 내 사주 — 저장된 명식 카드 (등록 폼 대신 이게 기본 얼굴) */
.saju-card { background: #fffdf7; padding: 14px 16px; margin: 14px 0 12px; }
.saju-name { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.saju-name b { font-family: var(--fd); font-size: 1.35rem; letter-spacing: -.02em; }
.saju-type { font-size: .84rem; border: 1.6px solid var(--ink); border-radius: 12px; padding: 1px 9px; }
.saju-birth { font-size: .84rem; margin-top: 2px; }
.saju-dm { font-size: .95rem; margin-top: 10px; }
.saju-dm b { font-size: 1.15rem; }
.saju-line { font-size: .84rem; margin-top: 2px; }
.saju-edit { margin-top: 22px; text-align: center; }
.saju-edit .btn.ghost { width: auto; padding: 10px 22px; margin: 0 auto; }
.saju-edit .btn.ghost[disabled] { opacity: .4; }
body.night .saju-card { background: #17203a; }
.acct-box { background: #fffdf7; padding: 12px 14px; margin-top: 26px; }
.sm-btn { padding: 6px 14px; font-size: .9rem; }
body.night .auth-tab.on, body.night .acct-box { background: #17203a; }
body.night .social-btn[data-p=google] { background: #17203a !important; color: #dde5f5 !important; border-color: #3a4c74 !important; }

/* ---------- v13: 몰입형 풀이 (리치 블록·질문·휘호·다음 골목) ---------- */
.blk-rich { background: #fff; border: 1.6px solid #d8cdbc; border-radius: 14px; padding: 14px 14px 10px; margin: 6px 0; animation: richRise .6s cubic-bezier(.2, .8, .3, 1); }
@keyframes richRise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.rich-title { font-family: var(--fd); font-weight: 700; font-size: 1.02rem; margin-bottom: 8px; letter-spacing: -.02em; }
.rich-cap { color: var(--ink-soft); font-size: .84rem; font-style: italic; margin-top: 8px; text-align: center; }
.ebar { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.ebar-name { flex: none; width: 20px; font-weight: 700; font-size: .9rem; }
.ebar-track { flex: 1; height: 12px; background: var(--paper-deep); border-radius: 7px; overflow: hidden; }
.ebar-fill { display: block; height: 100%; width: var(--w); border-radius: 7px; transform-origin: left; animation: barGrow .9s cubic-bezier(.2, .8, .3, 1) var(--d, 0ms) backwards; }
.ebar-val { flex: none; width: 30px; text-align: right; font-size: .8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pil-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pil-col { text-align: center; animation: fadeup .5s var(--d, 0ms) backwards; }
.pil-label { font-size: .68rem; color: var(--ink-soft); margin-bottom: 4px; }
.pil-cell { border: 1.4px solid #d8cdbc; border-radius: 10px; background: var(--paper); padding: 6px 2px 5px; margin-top: 4px; }
.pil-cell b { display: block; font-size: 1.45rem; line-height: 1.15; font-weight: 700; }
.pil-cell span { display: block; font-size: .62rem; color: var(--ink-soft); margin-top: 2px; }
.pil-me .pil-cell { border-color: var(--accent); border-width: 2px; background: #fdf3f5; }
.pil-me .pil-label { color: var(--accent); font-weight: 700; }
.pil-unknown .pil-cell { opacity: .45; }
.blk-rich .daeun-sec { margin: 0; border: 0; padding: 0; background: none; }

/* 질문 인터랙션 */
.bubble-ask { border-color: var(--accent) !important; border-width: 2px !important; }
.blk-me { display: flex; justify-content: flex-end; animation: fadeup .4s; }
.blk-me .bubble { background: var(--accent); color: #faf6ef; border: 1.8px solid #8f2f44; border-radius: 16px 16px 4px 16px; padding: 9px 14px; max-width: 78%; font-size: .95rem; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 4px 0 2px; animation: fadeup .5s; }
.ask-chip { font-family: var(--fd); font-size: .98rem; padding: 9px 16px; border-radius: 20px; border: 1.8px solid var(--accent); color: var(--accent); background: #fff; cursor: pointer; transition: transform .15s, background .15s, color .15s; letter-spacing: -.02em; }
.ask-chip:active { transform: scale(.95); background: var(--accent); color: #fff; }

/* 부적 휘호 */
.brush-sec { margin-top: 22px; text-align: center; }
.brush-wrap { position: relative; display: inline-block; width: 148px; border: 0; background: none; padding: 0; margin-top: 10px; cursor: pointer; }
.brush-amulet { width: 100%; display: block; border: 2px solid #d8cdbc; border-radius: 10px; background: #fff; }
.brush-veil { position: absolute; inset: 2px; border-radius: 8px; background: linear-gradient(#fff 0 96%, transparent); animation: brushReveal 2.4s steps(12) .3s forwards; pointer-events: none; }
@keyframes brushReveal { from { transform: scaleY(1); transform-origin: bottom; } to { transform: scaleY(0); transform-origin: bottom; } }
.brush-note { font-size: .84rem; margin-top: 8px; }
.brush-cycle { aspect-ratio: 3 / 5; overflow: hidden; border: 2px solid #d8cdbc; border-radius: 10px; background: #fff; }
.brush-cycle .bc-img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: cover; opacity: 0; filter: blur(2.5px) saturate(.8); animation: bcCycle 9.6s linear infinite; }
.brush-cycle .bc-ink { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(30,24,18,.18) 30%, rgba(30,24,18,.72)); pointer-events: none; }
@keyframes bcCycle { 0%, 22% { opacity: .85; } 28%, 94% { opacity: 0; } 100% { opacity: .85; } }

/* 다음 골목 (풀이 종점·타 콘텐츠 역연결) */
.alley-sec { margin-top: 26px; }
.alley-head { font-family: var(--fd); font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; letter-spacing: -.02em; }
.alley-card { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; font: inherit; background: #fff; border: 1.6px solid #d8cdbc; border-radius: 14px; padding: 12px 40px 12px 14px; margin-bottom: 8px; cursor: pointer; position: relative; transition: transform .15s, border-color .15s; }
.alley-card:active { transform: scale(.985); border-color: var(--accent); }
.alley-card b { font-size: .98rem; }
.alley-card span { color: var(--ink-soft); font-size: .84rem; margin-top: 2px; }
.alley-arrow { position: absolute; right: 15px; top: 50%; width: 9px; height: 9px; border-top: 2px solid var(--ink-soft); border-right: 2px solid var(--ink-soft); transform: translateY(-50%) rotate(45deg); }

/* 도사 소개 — 약점 한 줄 */
.profile-card .flaw { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d8cdbc; color: var(--ink-soft); font-size: .86rem; font-style: italic; }

/* 밤 점방 대응 */
body.night .blk-rich, body.night .alley-card, body.night .ask-chip, body.night .brush-amulet { background: #17203a; border-color: #2a3a5e; }
body.night .pil-cell { background: #121a30; border-color: #2a3a5e; }
body.night .pil-me .pil-cell { background: #2b1d33; border-color: var(--accent); }
body.night .ebar-track { background: #121a30; }
body.night .brush-veil { background: linear-gradient(#17203a 0 96%, transparent); }
body.night .brush-cycle { background: #17203a; border-color: #2a3a5e; }
body.night .brush-cycle .bc-ink { background: linear-gradient(160deg, rgba(8,12,24,.62), rgba(8,12,24,.2) 45%, rgba(8,12,24,.58)); }

/* ---------- v14: 소환 미리보기 + 스트리밍 ---------- */
.sum-pv-head { font-family: var(--fd); font-weight: 700; font-size: 1rem; margin-bottom: 6px; letter-spacing: -.02em; }
.sum-pv-dm { font-size: .95rem; }
.sum-pv-dm b { font-size: 1.15rem; }
.sum-pv-line { color: var(--ink-soft); font-size: .84rem; font-style: italic; margin: 3px 0 8px; }
.sum-pv-bars .ebar { margin: 3px 0; }
/* 로딩 카드 덱 — 내 명식에서 뽑은 이야기를 한 장씩 (v27) */
.sum-card { margin: 18px auto 0; max-width: 320px; text-align: left; animation: richRise .5s cubic-bezier(.2,.8,.3,1); }
.sum-card > .sum-pv-head { font-family: var(--fd); font-weight: 700; font-size: 1rem; margin-bottom: 6px; letter-spacing: -.02em; }
.sum-card .blk-rich { margin: 0; }
.sum-big { font-family: var(--fd); font-size: 1.6rem; line-height: 1.2; letter-spacing: -.02em; }
.sum-big span { font-family: var(--f); font-size: .82rem; color: var(--ink-soft); margin-left: 5px; }
.sum-note { font-size: .84rem; color: var(--ink-soft); margin-top: 5px; line-height: 1.5; }
.sum-note.dim2 { opacity: .72; font-size: .8rem; }
.sum-dots { display: flex; gap: 5px; justify-content: center; margin-top: 12px; }
.sum-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.sum-dots i.on { background: var(--accent); }

/* ---------- v15: 스마트 스크롤 배지 ---------- */
.new-pill { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; font-family: var(--fd); font-size: .88rem; padding: 9px 18px; border-radius: 20px; border: 1.8px solid var(--accent); background: var(--accent); color: #faf6ef; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); animation: fadeup .3s; letter-spacing: -.02em; }

/* ---------- v15: 한국적 낮/밤 앰비언트 (해·달·산수 능선) ---------- */
#sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#frame { position: relative; z-index: 1; background: transparent; }
body { position: relative; background: var(--paper); }
body.night { background: #0e1526; }
body.night #frame { background: transparent; }
@media (min-width: 481px) { body { background: var(--paper-deep); } #sky { max-width: 480px; left: 50%; transform: translateX(-50%); right: auto; width: 100%; } body:not(.night) #sky { background: var(--paper); } body.night #sky { background: #0e1526; } body.night { background: #0b1120; } }
.sky-day, .sky-night { position: absolute; inset: 0; transition: opacity .8s; }
/* 밤낮 토큰 플립 완화 — 하늘 밝기에서 유도된 body.night 전환 순간(0.9s)에만 붙는 클래스 */
@media (prefers-reduced-motion: no-preference) {
  body.theme-fade, body.theme-fade * { transition: background-color .7s ease, color .7s ease, border-color .7s ease, box-shadow .7s ease !important; }
}
.sky-day { opacity: 1; }
.sky-night { opacity: 0; }
body.night .sky-day { opacity: 0; }
body.night .sky-night { opacity: 1; }
.sky-sun { position: absolute; top: 58px; right: 4%; width: 74px; height: 74px; border-radius: 50%; transition: opacity 1.4s;
  background: radial-gradient(circle at 38% 38%, #f7dfae, #edc167 62%, rgba(237,193,103,0) 72%); opacity: .55; }
.sky-cloud { position: absolute; height: 16px; border-radius: 12px; background: #fff; opacity: .5; animation: cloudDrift 90s linear infinite; }
.sky-cloud::before { content: ''; position: absolute; top: -8px; left: 22%; width: 45%; height: 16px; border-radius: 10px; background: inherit; }
.sky-cloud.c1 { top: 72px; left: -140px; width: 120px; }
.sky-cloud.c2 { top: 148px; left: -320px; width: 88px; animation-duration: 130s; opacity: .35; }
@keyframes cloudDrift { to { transform: translateX(820px); } } /* #sky 480px 컬럼 기준 — 100vw는 데스크톱에서 주기 대부분이 화면 밖 (리뷰 P2) */
.sky-ridge { position: absolute; left: 0; right: 0; bottom: 0; }
.sky-ridge svg { display: block; width: 100%; height: 110px; }
.sky-moon { position: absolute; top: 60px; right: 5%; width: 62px; height: 62px; border-radius: 50%; transition: opacity 1.4s;
  background: radial-gradient(circle at 42% 40%, #f6ecca, #e8d491 66%);
  box-shadow: 0 0 34px 10px rgba(240, 220, 150, .16); opacity: .9; }
.sky-moon::after { content: ''; position: absolute; left: 16px; top: 20px; width: 9px; height: 9px; border-radius: 50%; background: rgba(190,170,110,.35); box-shadow: 18px 8px 0 -2px rgba(190,170,110,.28); }
.sky-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #dfe6f8; opacity: .7; animation: starTwinkle 3.4s ease-in-out infinite; }
@keyframes starTwinkle { 50% { opacity: .18; } }
@media (prefers-reduced-motion: reduce) { .sky-cloud, .sky-star { animation: none !important; } }
.rich-diagram { --dg-ink: #2b2320; --dg-sub: #6b5f56; --dg-halo: #fff; }
body.night .rich-diagram { --dg-ink: #dde5f5; --dg-sub: #93a4c6; --dg-halo: #17203a; }
.rich-diagram text { paint-order: stroke; stroke: var(--dg-halo); stroke-width: 3.5px; stroke-linejoin: round; } /* 선·도형이 라벨을 관통해도 읽히게 (v21.3) */
body.night .rich-diagram [fill="#b5271c"] { fill: var(--accent-t); }
body.night .rich-diagram [stroke="#b5271c"] { stroke: var(--accent-t); }
body.night .rich-diagram [fill="#4a7c59"] { fill: #7fc7b3; }
body.night .rich-diagram [stroke="#4a7c59"] { stroke: #7fc7b3; }

/* v15: 심층 대화·출석·자유 답변 */
.deep-chat { margin-top: 26px; border-top: 2px dashed #d8cdbc; padding-top: 18px; }
.dc-thread { display: flex; flex-direction: column; gap: 8px; }
.dc-live { display: flex; flex-direction: column; gap: 8px; } /* 생성 중 블록도 완성 턴과 같은 간격 (v16 item 4) */
.ask-freerow { display: flex; gap: 8px; width: 100%; margin-top: 6px; }
.ask-freerow input { flex: 1; margin: 0; font-size: .9rem; padding: 9px 12px; border-radius: 20px; }
.ask-freerow .ask-chip { flex: none; }
/* 출석 도장 시즌 트랙 (v24) — 30칸을 한눈에. 색은 아끼고 테두리 굵기와 작은 표식으로 구분한다 */
.pass-bar { height: 8px; background: #e7dfd2; border-radius: 6px; overflow: hidden; margin: 12px 0 4px; }
.pass-bar i { display: block; height: 100%; background: var(--ink); border-radius: 6px; transition: width .5s ease-out; }
.pass-count { font-size: .82rem; color: var(--ink-soft); margin-bottom: 14px; }
.pass-count b { font-family: var(--fd); font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }
.pass-today { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.6px solid #d8cdbc; border-radius: 14px; padding: 13px 15px; margin-bottom: 14px; }
.pass-today > div { flex: 1; }
.pass-today b { font-family: var(--fd); font-size: 1.1rem; letter-spacing: -.02em; }
.pass-today .dim { font-size: .8rem; margin-top: 2px; }
.pass-today .btn { width: auto; padding: 10px 18px; }
.pass-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pass-cell { position: relative; min-width: 0; aspect-ratio: 1 / 1.06; border: 1.6px solid #d8cdbc; border-radius: 10px;
  background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; padding: 13px 2px 5px; }
.pass-cell .pc-day { position: absolute; top: 3px; left: 5px; font-family: var(--fd); font-size: .7rem; color: var(--ink-soft); font-style: normal; letter-spacing: -.02em; }
.pass-cell .pc-face { font-size: .68rem; line-height: 1.1; text-align: center; padding: 0 2px; }
.rw-art { width: 26px; height: 26px; display: block; }
.pass-cell .rw-art { width: 24px; height: 30px; margin-bottom: 1px; }
.pass-cell.k-bokchae .rw-art, .pass-cell.k-shards .rw-art { height: 24px; }
/* 홈 카드에도 오늘 받을 것을 그림으로 — 글자만 있으면 눈에 안 들어온다 */
.checkin-card .ci-art { flex: none; width: 34px; height: 40px; display: flex; align-items: center; justify-content: center; }
.checkin-card .ci-art .rw-art { width: 30px; height: 38px; }
.checkin-card .ci-body b { font-family: var(--fd); font-size: 1.06rem; letter-spacing: -.02em; }
.checkin-card .dim b { color: var(--ink); font-family: var(--fd); font-size: 1rem; letter-spacing: -.02em; }
.pass-cell.k-amulet_sr { border-color: #c8992f; border-width: 2px; }
.pass-cell.k-amulet_ssr { border-color: #8d1a12; border-width: 2.4px; }
.pass-cell.k-bokchae { border-color: var(--accent); border-width: 2px; }
.pass-cell.k-bokchae .pc-face { color: var(--accent); font-family: var(--fd); font-size: .95rem; letter-spacing: -.02em; }
.pass-cell.k-shards { border-style: dashed; }
/* 받은 칸: 어둡게 덮는 대신 붉은 인장을 찍는다. 도장판이니 도장이 찍혀야 맞다 (zero).
   칸 내용은 그대로 살려 무엇을 받았는지 나중에도 읽히게 한다. */
.pass-cell.done { opacity: .82; }
.pass-cell.done .rw-art { opacity: .5; }
.pass-cell .pc-seal { position: absolute; right: 4px; bottom: 3px; width: 19px; height: 19px; border-radius: 3px;
  background: rgba(181,39,28,.92); color: #fff6ee; font-family: 'AppleMyungjo', serif; font-size: .72rem;
  display: flex; align-items: center; justify-content: center; transform: rotate(-9deg);
  box-shadow: 0 1px 4px rgba(140,32,22,.4); animation: stamp-down .34s cubic-bezier(.2,2.2,.4,1) both; }
.pass-cell.now { box-shadow: 0 0 0 3px rgba(192, 69, 94, .28); border-color: var(--accent); opacity: 1; }
.reward-big { font-family: var(--fd); font-size: 2.4rem; font-weight: 700; margin: 6px 0 2px; animation: pop .5s cubic-bezier(.2,1.6,.4,1); letter-spacing: -.02em; }
body.night .pass-bar { background: #223050; }
body.night .pass-today, body.night .pass-cell { background: #17203a; border-color: #2a3a5e; }
body.night .pass-cell.k-amulet_sr { border-color: #c8992f; }
body.night .pass-cell.k-amulet_ssr { border-color: #c8503f; }
body.night .pass-cell.now { border-color: var(--accent); }
body.night .pass-cell.done .pc-stamp { color: #e0685a; }
.checkin-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.6px solid #d8cdbc; border-radius: 14px; padding: 13px 15px; margin-bottom: 12px; }
.checkin-card .ci-body { flex: 1; }
.checkin-card .dim { font-size: .8rem; margin-top: 2px; }
.reward-btn { margin-top: 12px; border-color: var(--accent); color: var(--accent); }
body.night .deep-chat { border-color: #2a3a5e; }
body.night .checkin-card { background: #17203a; border-color: #2a3a5e; }
body.night .blur-overlay { background: linear-gradient(rgba(14,21,38,.2), #0e1526 62%); }
body.night .unlock-head { color: #eef2fb; }

/* ---------- v18: 전막 연출 (fx) ---------- */
.blk-fx { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0; padding: 10px 6px;
  font-family: var(--fd); font-size: 1.06rem; font-weight: 700; color: var(--ink-soft); text-align: center; letter-spacing: -.02em; }
.blk-fx .fxb-orn { width: 34px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--ink-soft)); }
.blk-fx .fxb-orn:last-child { background: linear-gradient(270deg, transparent, var(--ink-soft)); }
.fx-veil { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; animation: fxVeil 2.8s ease-in-out forwards; }
@keyframes fxVeil { 0% { opacity: 0; } 12% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
.fx-text { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font-family: var(--fd);
  font-size: 1.5rem; font-weight: 700; color: #faf6ef; text-shadow: 0 2px 14px rgba(0,0,0,.55); text-align: center; width: 80%; max-width: 340px;
  opacity: 0; animation: fxText 2.8s ease-in-out forwards; letter-spacing: -.02em; }
@keyframes fxText { 0%,18% { opacity: 0; transform: translate(-50%, -46%); } 34% { opacity: 1; transform: translate(-50%, -50%); } 78% { opacity: 1; } 100% { opacity: 0; } }
/* 먹 번짐 — 어두운 먹을 어두운 화면에 얹으면 아무것도 안 보인다(밤 테마에서 특히, zero).
   한지를 먼저 깔고 그 위에 먹이 번지게 한다. 밝은 바탕이 있어야 먹이 먹으로 읽힌다.
   번짐은 원 하나가 아니라 크기·시각이 다른 몇 방울이 겹쳐야 가장자리가 살아난다. */
.fx-inkwash { background: rgba(246, 240, 228, .62); }
/* ★ scale 로 키우면 blur 도 같이 커져서, 다 퍼졌을 땐 경계가 사라지고 균일한 안개가 된다.
   번짐으로 읽히는 건 '움직이는 가장자리'이므로 blur 는 고정하고 크기를 키운다. */
.fx-inkwash .fxv-ink, .fx-inkwash .fxv-ink::before, .fx-inkwash .fxv-ink::after {
  position: absolute; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(12,9,6,.7) 38%, rgba(18,13,9,.52) 60%, rgba(24,18,12,.22) 80%, transparent 92%);
  filter: blur(7px); }
.fx-inkwash .fxv-ink { left: 50%; top: 50%; width: 34px; height: 34px; animation: fxInk 2.8s cubic-bezier(.34,.5,.5,1) forwards; }
.fx-inkwash .fxv-ink::before { content: ''; left: 32%; top: 40%; width: 26px; height: 26px; animation: fxInk2 2.8s cubic-bezier(.26,.68,.36,1) .22s forwards; }
.fx-inkwash .fxv-ink::after { content: ''; left: 70%; top: 62%; width: 22px; height: 22px; animation: fxInk3 2.8s cubic-bezier(.3,.64,.4,1) .42s forwards; }
@keyframes fxInk  { 0% { width: 34px; height: 34px; } 100% { width: 108vmax; height: 108vmax; } }
@keyframes fxInk2 { 0% { width: 26px; height: 26px; } 100% { width: 74vmax; height: 74vmax; } }
@keyframes fxInk3 { 0% { width: 22px; height: 22px; } 100% { width: 58vmax; height: 58vmax; } }
/* 별밤 — 예전엔 2.2s 무한 반복이라 막이 가장 진한 구간에 별이 꺼져 있었다. 빨리 켜고 계속 켜둔 채로 깜빡인다. */
.fx-stars { background: rgba(8, 12, 28, .55); }
.fx-stars .fxv-star { position: absolute; width: 11px; height: 11px; margin: -5px 0 0 -5px; background: #fff4cf;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 5px rgba(255,226,150,.95)) drop-shadow(0 0 14px rgba(255,200,90,.5));
  transform: scale(var(--s, 1)); opacity: 0; animation: fxStar 2.8s ease-out forwards; }
@keyframes fxStar {
  0% { opacity: 0; transform: scale(calc(var(--s,1) * .2)); }
  14% { opacity: 1; transform: scale(calc(var(--s,1) * 1.25)); }
  30% { opacity: .78; transform: scale(var(--s,1)); }
  50% { opacity: 1; transform: scale(calc(var(--s,1) * 1.12)); }
  70% { opacity: .82; transform: scale(var(--s,1)); }
  86% { opacity: 1; }
  100% { opacity: 0; transform: scale(calc(var(--s,1) * .8)); } }
.fx-petals { background: rgba(30, 14, 20, .22); }
.fx-petals .fxv-petal { position: absolute; top: -6%; width: 13px; height: 9px; border-radius: 60% 40% 60% 40%; background: #eeb6c4; opacity: .9;
  animation: fxPetal 2.6s ease-in forwards; }
.fx-petals .p0{left:8%} .fx-petals .p1{left:22%;animation-delay:.2s} .fx-petals .p2{left:36%;animation-delay:.05s} .fx-petals .p3{left:50%;animation-delay:.3s}
.fx-petals .p4{left:62%;animation-delay:.12s} .fx-petals .p5{left:74%;animation-delay:.38s} .fx-petals .p6{left:86%;animation-delay:.22s} .fx-petals .p7{left:94%;animation-delay:.08s}
@keyframes fxPetal { 0% { transform: translateY(0) rotate(0) translateX(0); } 50% { transform: translateY(48vh) rotate(160deg) translateX(-24px); } 100% { transform: translateY(104vh) rotate(340deg) translateX(14px); } }
.fx-moonrise { background: linear-gradient(rgba(10, 14, 30, .5), rgba(10, 14, 30, .18)); }
.fx-moonrise .fxv-moon { position: absolute; left: 50%; bottom: -20%; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #f4ead0, #e0cf96 68%, #cdb977); box-shadow: 0 0 46px 14px rgba(232, 217, 160, .5);
  transform: translateX(-50%); animation: fxMoon 2.8s ease-out forwards; }
@keyframes fxMoon { 0% { bottom: -22%; } 55% { bottom: 34%; } 100% { bottom: 36%; } }
/* 번개 — 아이콘 한 장이 아니라 (zero) 화면이 흰빛으로 두어 번 터지고, 그 사이 하늘이 선으로 갈라진다.
   본줄기는 stroke-dasharray 로 위에서 아래로 순식간에 그어지고 곁가지가 뒤따라 뻗는다. */
.fx-thunder { background: rgba(6, 8, 16, .55); animation: fxThunder 1.9s steps(1) forwards; }
@keyframes fxThunder {
  0% { background: rgba(6,8,16,.2); }
  3% { background: rgba(255,255,255,.94); }
  7% { background: rgba(6,8,16,.62); }
  11% { background: rgba(255,255,255,.72); }
  15% { background: rgba(6,8,16,.6); }
  34% { background: rgba(255,255,255,.55); }
  38% { background: rgba(6,8,16,.5); }
  75% { background: rgba(6,8,16,.3); }
  100% { background: rgba(6,8,16,0); }
}
.fx-thunder .fxv-bolt { position: absolute; top: 0; height: 78vh; width: 60vw; opacity: 0;
  filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 18px #cfe4ff) drop-shadow(0 0 40px rgba(150,190,255,.75)); }
.fx-thunder .bolt-a { left: 6%; animation: boltShow 1.9s steps(1) forwards; }
.fx-thunder .bolt-b { right: 4%; transform: scaleX(-1); animation: boltShow2 1.9s steps(1) forwards; }
@keyframes boltShow  { 0%,1% { opacity: 0; } 2%,8% { opacity: 1; } 9%,32% { opacity: 0; } 33%,38% { opacity: .85; } 39%,100% { opacity: 0; } }
@keyframes boltShow2 { 0%,9% { opacity: 0; } 10%,16% { opacity: 1; } 17%,100% { opacity: 0; } }
.fx-thunder .fxv-bolt path { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: boltDraw .16s linear forwards; }
.fx-thunder .fxv-bolt .b-main { stroke-width: 3.4; }
.fx-thunder .fxv-bolt .b-br { stroke-width: 2; stroke-dasharray: 420; stroke-dashoffset: 420; }
.fx-thunder .fxv-bolt .b0 { animation-delay: .06s; } .fx-thunder .fxv-bolt .b1 { animation-delay: .09s; }
.fx-thunder .fxv-bolt .b2 { animation-delay: .12s; }
@keyframes boltDraw { to { stroke-dashoffset: 0; } }

/* 비 — 장면이 유지되는 동안 내린다. 낱낱의 빗줄기라 길이·속도·투명도가 제각각이다. */
.rain-veil { position: fixed; inset: 0; z-index: 44; pointer-events: none; overflow: hidden;
  background: linear-gradient(rgba(18,26,44,.28), rgba(18,26,44,.06) 40%, transparent 70%); }
.rain-veil i { position: absolute; top: -12%; display: block; border-radius: 1px;
  background: linear-gradient(rgba(200,222,255,0), rgba(214,232,255,.95));
  transform: rotate(9deg); animation-name: rainDrop; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes rainDrop { from { transform: translate3d(0, -14vh, 0) rotate(9deg); } to { transform: translate3d(-9vh, 112vh, 0) rotate(9deg); } }
@media (prefers-reduced-motion: reduce) { .rain-veil { display: none; } }


/* ---------- v20: 창호지 연출 — 카드 뒤로 하늘빛이 은은하게 새어들게 ---------- */
.today-hero2, .feature-card, .checkin-card, .duty-card, .tile, .join-card, .scen-slide, .charge-bal, .pack, .benefit-box, .duty-full, .reco-card, .pass-today {
  background: var(--hanji-sheer) !important;
  backdrop-filter: blur(9px) saturate(1.04); -webkit-backdrop-filter: blur(9px) saturate(1.04);
}
/* 밤 값은 토큰이 뒤집는다 — 예전엔 같은 목록을 한 벌 더 적어두느라 .duty-card 가 빠져 밤에도 낮 색이었다 */
/* 해·달의 빛무리 강화 — 패널 너머로 존재가 비치게 */
.sky-sun { box-shadow: 0 0 60px 26px rgba(232, 178, 58, .38), 0 0 140px 70px rgba(232, 178, 58, .16); }
.sky-moon { box-shadow: 0 0 54px 22px rgba(232, 217, 160, .30), 0 0 130px 64px rgba(232, 217, 160, .13); }

/* 오늘 한 칸 — 점수 + 당번 부적 */
.today-hero2.has-duty { display: flex; align-items: center; gap: 10px; }
.th2-duty { flex: none; width: 74px; text-align: center; border-left: 1.5px dashed var(--line); padding-left: 10px; cursor: pointer; }
.th2-duty img { width: 44px; display: block; margin: 0 auto 2px; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; }
.th2-duty .duty-tag { display: block; font-size: .6rem; color: var(--accent); font-weight: 700; }
.th2-duty-nm { display: block; font-family: var(--fd); font-size: .72rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em; }
body.night .th2-duty img { background: #17203a; }

/* 단골 유도 카드 */
.join-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1.8px solid var(--accent);
  border-radius: 14px; padding: 12px 14px; margin: 12px 0; cursor: pointer; }
.join-card b { font-family: var(--fd); letter-spacing: -.02em; }
.join-go { flex: none; font-family: var(--fd); font-weight: 700; color: var(--accent); letter-spacing: -.02em; }

/* 사주 입력 동시 등록 */
.joinup { margin: 12px 0; border: 1.5px dashed var(--line); border-radius: 12px; padding: 10px 12px; }
.joinup summary { cursor: pointer; font-size: .92rem; }
.joinup input { margin-top: 8px; }

/* 충전소 */
.charge-bal { display: flex; justify-content: space-between; align-items: center; border: 1.8px solid var(--ink); border-radius: 14px; padding: 12px 16px; margin: 10px 0 14px; }
.charge-bal b { font-family: var(--fd); font-size: 1.4rem; letter-spacing: -.02em; }
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack { position: relative; border: 1.8px solid var(--ink); border-radius: 14px; padding: 16px 10px 12px; text-align: center; cursor: pointer; color: var(--ink); }
.pack b { display: block; font-family: var(--fd); font-size: 1.3rem; letter-spacing: -.02em; }
.pack b i { font-style: normal; color: var(--accent); font-size: 1rem; }
.pack-price { display: block; margin-top: 4px; font-weight: 700; }
.pack-unit { display: block; font-size: .72rem; color: var(--ink-soft); margin-top: 2px; }
.pack.hot { border-color: var(--accent); box-shadow: 0 3px 10px rgba(181, 39, 28, .18); }
.pack-tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #faf6ef;
  font-size: .66rem; font-weight: 700; padding: 1px 9px; border-radius: 8px; white-space: nowrap; }
body.night .pack { color: #dde5f5; }


/* ---------- v21: 홈·오늘·도감 폴리시 ---------- */
/* 상단 배지 3종 동일 사이즈 + 단골=계정 연상(사람 글리프+꺾쇠) */
.bok-badge { display: inline-flex; align-items: center; gap: 4px; height: 30px; box-sizing: border-box; font-size: .9rem; padding: 0 11px; }
.acct-badge { border-color: #2e6e63; color: #2e6e63; cursor: pointer; }
.acct-badge .pg { width: 11px; height: 11px; position: relative; display: inline-block; }
.acct-badge .pg::before { content: ''; position: absolute; left: 50%; top: 0; width: 5px; height: 5px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }
.acct-badge .pg::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 11px; height: 5px; border-radius: 6px 6px 0 0; background: currentColor; transform: translateX(-50%); }
.acct-badge .chev { font-style: normal; font-weight: 700; opacity: .7; margin-left: 1px; }
body.night .acct-badge { border-color: #7fc7b3; color: #7fc7b3; background: #17203a; }

/* 오늘 한 칸 — 여백 압축 + 당번 부적 전신 노출 */
.today-hero2 { padding: 10px 12px !important; }
.today-hero2 .th2-num { line-height: 1.05; }
.th2-duty { width: 84px; padding-left: 12px; }
.th2-duty img { width: 56px; height: 93px; object-fit: contain; background: transparent !important; border: none !important; }

/* 오늘의 운세 상세 — 효험 전문·처방 카드 */
.duty-full, .reco-card { display: flex; gap: 12px; align-items: center; border: 1.8px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 14px 0; cursor: pointer; }
.duty-full img, .reco-card img { width: 52px; height: 87px; object-fit: contain; flex: none; }
.duty-full b, .reco-card b { font-family: var(--fd); display: block; letter-spacing: -.02em; }
.reco-card { cursor: default; border-color: var(--accent); }
.reco-card .reco-dim { filter: grayscale(.5) brightness(.85); opacity: .8; }

/* 도감 등급 필터 줄 */
.dex-grades { margin-top: -4px; }
.dex-grades .gN.on { background: #a99f90; border-color: #a99f90; color: #fff; }
.dex-grades .gR.on { background: #7d8aa0; border-color: #7d8aa0; color: #fff; }
.dex-grades .gSR.on { background: #b8860b; border-color: #b8860b; color: #fff; }
.dex-grades .gSSR.on { background: #8d1a12; border-color: #8d1a12; color: #fff; }

/* ── v21.2 밤 대비 보수 — 하늘이 어두워질 때 인주 빨강 텍스트·비활성 버튼·달에 겹친 글자가 묻히지 않게 */
body.night { --accent-t: #ee8878; } /* 밤 전용 인주 — 네이비 위에서 뜨는 살구빛 주홍 (텍스트·테두리용, 배경엔 쓰지 않는다) */
body.night .fc-live, body.night .join-go, body.night .pack b i,
body.night .dial-num, body.night .flame-grade, body.night .rank-row.top .rank-no,
body.night .dex-progress b, body.night .th2-score b, body.night .dp-master,
body.night .pil-me .pil-label { color: var(--accent-t); }
body.night .live-dot { background: var(--accent-t); }
body.night .ask-chip { color: var(--accent-t); border-color: var(--accent-t); }
body.night .join-card, body.night .reco-card, body.night .pack.hot { border-color: var(--accent-t); }
body.night .pack.hot { box-shadow: 0 3px 10px rgba(238, 136, 120, .14); }
body.night #app { text-shadow: 0 0 3px rgba(11, 17, 32, .85), 0 1px 10px rgba(11, 17, 32, .7); } /* 달빛무리 위를 지나는 글자를 먹 그림자로 받친다 */
body.night .btn[disabled], body.night .forge .btn.accent:disabled { background: #223050; border-color: #3a4c74; color: #8fa0c0; opacity: 1; }

/* ── v21.3 종료 flow 2단 + 심층대화 칩 ── */
.flow-later { display: block; margin: 4px auto 0; background: none; border: none; cursor: pointer;
  font-family: var(--fd); font-size: .95rem; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; padding: 10px 14px; letter-spacing: -.02em; }
.flow-reveal { animation: fadeup .5s; }
.dc-chips { margin-top: 8px; }
.dc-chips.busy .ask-chip { opacity: .45; pointer-events: none; }




/* ══════ v23 — 완자살 문 · 소지 · 휘호 (zero 지시 2026-09-01, 실물 문살 사진 참고) ══════
   ① 문살은 꽃살이 아니라 완자살(卍字살)이다 — 대각선도 꽃도 없다. 직교 살이 서로 겹쳐 짜인 사각.
      살은 선이 아니라 두께 있는 나무이고, 문에는 반드시 문틀 · 살 테두리 · 궁판(아래 판)이 함께 있다.
   ② 문은 사람을 가리는 물건이 아니다 — 가운데는 열린 칸이고 거기 담당의 얼굴이 또렷하게 앉는다.
   ③ 소지는 한 줄로 타지 않는다. 불길이 들쭉날쭉 번지고 그을음이 남는다.
   토큰은 밤(body.night)까지 같이 잡는다 — 색을 미디어/테마 블록 안에서만 정의하지 않는다. */
:root {
  --wband: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2254%22 height%3D%2227%22 viewBox%3D%220 0 54 27%22%3E%3Cpath d%3D%22M0 0H54M0 26.4H54M0.6 0V27M27 0V27M0 18h18M36 18h18M18 0v18M36 0v18%22 fill%3D%22none%22 stroke%3D%22%23a08a63%22 stroke-width%3D%221.2%22 shape-rendering%3D%22crispEdges%22%2F%3E%3C%2Fsvg%3E");   /* 완자살 테두리 한 겹(6u × 3u) — 전통 창살문양 도해 실측 재현 */
  --wband-b: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2254%22 height%3D%2227%22 viewBox%3D%220 0 54 27%22%3E%3Cg transform%3D%22translate(0%2C27) scale(1%2C-1)%22%3E%3Cpath d%3D%22M0 0H54M0 26.4H54M0.6 0V27M27 0V27M0 18h18M36 18h18M18 0v18M36 0v18%22 fill%3D%22none%22 stroke%3D%22%23a08a63%22 stroke-width%3D%221.2%22 shape-rendering%3D%22crispEdges%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");   /* 아래 겹 — 위 겹을 뒤집은 것. 방향이 같으면 문살이 거꾸로 박힌다 */
  --wband-soft: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2254%22 height%3D%2227%22 viewBox%3D%220 0 54 27%22%3E%3Cpath d%3D%22M0 0H54M0 26.45H54M0.55 0V27M27 0V27M0 18h18M36 18h18M18 0v18M36 0v18%22 fill%3D%22none%22 stroke%3D%22rgba(107%2C95%2C86%2C.26)%22 stroke-width%3D%221.1%22 shape-rendering%3D%22crispEdges%22%2F%3E%3C%2Fsvg%3E");
  --wband-soft-b: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2254%22 height%3D%2227%22 viewBox%3D%220 0 54 27%22%3E%3Cg transform%3D%22translate(0%2C27) scale(1%2C-1)%22%3E%3Cpath d%3D%22M0 0H54M0 26.45H54M0.55 0V27M27 0V27M0 18h18M36 18h18M18 0v18M36 0v18%22 fill%3D%22none%22 stroke%3D%22rgba(107%2C95%2C86%2C.26)%22 stroke-width%3D%221.1%22 shape-rendering%3D%22crispEdges%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --wood: #9c8259;           /* 문틀·살 */
  --hanji: #fdfbf5;          /* 창호지 */
  --hanji-sheer: rgba(252, 248, 240, .76);   /* 창호지 반투명 — 홈 카드와 도사 고르는 창이 함께 쓴다 */
  --sal-line: rgba(107,95,86,.22);
  --seal: #b5271c;           /* 인장 주사 */
  --knot: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2222%22 height%3D%2222%22 viewBox%3D%220 0 22 22%22%3E%3Cg fill%3D%22none%22 stroke%3D%22%23b5271c%22 stroke-width%3D%221.15%22 stroke-linecap%3D%22round%22%3E%3Cpath d%3D%22M10.01 8.60Q11.00 1.55 11.99 8.60M11.99 8.60Q17.68 4.32 13.40 10.01M13.40 10.01Q20.45 11.00 13.40 11.99M13.40 11.99Q17.68 17.68 11.99 13.40M11.99 13.40Q11.00 20.45 10.01 13.40M10.01 13.40Q4.32 17.68 8.60 11.99M8.60 11.99Q1.55 11.00 8.60 10.01M8.60 10.01Q4.32 4.32 10.01 8.60%22%2F%3E%3Ccircle cx%3D%2211%22 cy%3D%2211%22 r%3D%222.6%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");   /* 국화매듭(菊花結) — 지난 이야기 묶음의 매듭 */
}
body.night {
  --wband: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2254%22 height%3D%2227%22 viewBox%3D%220 0 54 27%22%3E%3Cpath d%3D%22M0 0H54M0 26.4H54M0.6 0V27M27 0V27M0 18h18M36 18h18M18 0v18M36 0v18%22 fill%3D%22none%22 stroke%3D%22%235d719c%22 stroke-width%3D%221.2%22 shape-rendering%3D%22crispEdges%22%2F%3E%3C%2Fsvg%3E");
  --wband-b: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2254%22 height%3D%2227%22 viewBox%3D%220 0 54 27%22%3E%3Cg transform%3D%22translate(0%2C27) scale(1%2C-1)%22%3E%3Cpath d%3D%22M0 0H54M0 26.4H54M0.6 0V27M27 0V27M0 18h18M36 18h18M18 0v18M36 0v18%22 fill%3D%22none%22 stroke%3D%22%235d719c%22 stroke-width%3D%221.2%22 shape-rendering%3D%22crispEdges%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --wband-soft: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2254%22 height%3D%2227%22 viewBox%3D%220 0 54 27%22%3E%3Cpath d%3D%22M0 0H54M0 26.45H54M0.55 0V27M27 0V27M0 18h18M36 18h18M18 0v18M36 0v18%22 fill%3D%22none%22 stroke%3D%22rgba(150%2C168%2C204%2C.30)%22 stroke-width%3D%221.1%22 shape-rendering%3D%22crispEdges%22%2F%3E%3C%2Fsvg%3E");
  --wband-soft-b: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2254%22 height%3D%2227%22 viewBox%3D%220 0 54 27%22%3E%3Cg transform%3D%22translate(0%2C27) scale(1%2C-1)%22%3E%3Cpath d%3D%22M0 0H54M0 26.45H54M0.55 0V27M27 0V27M0 18h18M36 18h18M18 0v18M36 0v18%22 fill%3D%22none%22 stroke%3D%22rgba(150%2C168%2C204%2C.30)%22 stroke-width%3D%221.1%22 shape-rendering%3D%22crispEdges%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --wood: #5d719c;
  --hanji: #16203a;
  --hanji-sheer: rgba(19, 27, 48, .68);
  --sal-line: rgba(150,168,204,.26);
  --seal: #ee8878;
  --knot: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2222%22 height%3D%2222%22 viewBox%3D%220 0 22 22%22%3E%3Cg fill%3D%22none%22 stroke%3D%22%23ee8878%22 stroke-width%3D%221.15%22 stroke-linecap%3D%22round%22%3E%3Cpath d%3D%22M10.01 8.60Q11.00 1.55 11.99 8.60M11.99 8.60Q17.68 4.32 13.40 10.01M13.40 10.01Q20.45 11.00 13.40 11.99M13.40 11.99Q17.68 17.68 11.99 13.40M11.99 13.40Q11.00 20.45 10.01 13.40M10.01 13.40Q4.32 17.68 8.60 11.99M8.60 11.99Q1.55 11.00 8.60 10.01M8.60 10.01Q4.32 4.32 10.01 8.60%22%2F%3E%3Ccircle cx%3D%2211%22 cy%3D%2211%22 r%3D%222.6%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}

/* 카드 바탕도 문살과 같은 문법으로 — 다만 겹(완자 띠)은 **줄의 바깥면에만** 둔다.
   버튼마다 위아래로 겹을 박으면 난잡해지므로, 이어 놓인 칸들은 한 짝의 문처럼 취급해
   첫 칸의 위와 끝 칸의 아래에만 겹을 두고 맞닿는 면은 세로 실선으로 잇는다 (zero).
   아래 겹은 위 겹을 뒤집은 타일을 쓴다 — 같은 타일을 쓰면 문살 방향이 거꾸로 박힌다.
   ★ body.night 변형을 반드시 같이 쓴다 — 앞쪽 밤 규칙이 background 단축속성으로 이미지를
     통째로 지워서, 낮에만 겹이 보이고 밤엔 세로선만 남는 사고가 났었다 (zero). */
.today-hero2, .feature-card, .scen-slide, .charge-bal, .benefit-box,
body.night .today-hero2, body.night .feature-card, body.night .scen-slide, body.night .charge-bal, body.night .benefit-box {
  background-image: repeating-linear-gradient(90deg, var(--sal-line) 0 1.1px, transparent 1.1px 27px) !important;
  background-repeat: repeat !important;
  background-position: -0.55px 0 !important;
  background-size: auto !important;
}
.sal-top, body.night .sal-top {
  background-image: var(--wband-soft), repeating-linear-gradient(90deg, var(--sal-line) 0 1.1px, transparent 1.1px 27px) !important;
  background-repeat: repeat-x, repeat !important;
  background-position: -0.55px top, -0.55px 0 !important;
  background-size: 54px 27px, auto !important; }
.sal-bot, body.night .sal-bot {
  background-image: var(--wband-soft-b), repeating-linear-gradient(90deg, var(--sal-line) 0 1.1px, transparent 1.1px 27px) !important;
  background-repeat: repeat-x, repeat !important;
  background-position: -0.55px bottom, -0.55px 0 !important;
  background-size: 54px 27px, auto !important; }
/* 홀로 서거나 가로로 늘어선 칸 — 맞닿는 면이 없으니 위아래 둘 다 두른다 */
.sal-top.sal-bot, body.night .sal-top.sal-bot,
.scen-slide, body.night .scen-slide, .charge-bal, body.night .charge-bal, .benefit-box, body.night .benefit-box {
  background-image: var(--wband-soft), var(--wband-soft-b), repeating-linear-gradient(90deg, var(--sal-line) 0 1.1px, transparent 1.1px 27px) !important;
  background-repeat: repeat-x, repeat-x, repeat !important;
  background-position: -0.55px top, -0.55px bottom, -0.55px 0 !important;
  background-size: 54px 27px, 54px 27px, auto !important; }

/* ── 담당 고르기 — 네 짝의 문을 한 줄씩 ──
   참고 사진(오른쪽 문)의 짜임 그대로: 위·아래 테두리에만 완자살 띠를 두르고 가운데는 세로살로 잇는다.
   2열로 접으면 담당 소개가 잘려 나가므로 세로 4줄로 편다 (zero). */
.hwa-gate { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.pick2 { position: relative; display: block; width: 100%; font: inherit; color: inherit; text-align: left;
  cursor: pointer; border: 1px solid var(--wood); border-radius: 4px;
  padding: 0; overflow: hidden; transition: border-color .16s, transform .16s;
  background-color: var(--hanji-sheer);  /* 홈 카드와 같은 창호지 — 뒤로 하늘빛이 새어든다 (zero) */
  backdrop-filter: blur(9px) saturate(1.04); -webkit-backdrop-filter: blur(9px) saturate(1.04);
  background-image: repeating-linear-gradient(90deg, var(--sal-line) 0 1.1px, transparent 1.1px 27px);
  background-position: -0.55px 0; }
/* 겹은 한 마디의 반(3u=27px). 네 칸을 한 짝의 문으로 보아 **줄의 바깥면에만** 두고,
   맞닿는 면은 세로 실선으로만 잇는다 — 칸마다 위아래로 박으면 난잡해진다 (zero). */
.pick2::before, .pick2::after { content: ''; display: block; height: 13px; }
.hwa-gate > .pick2:first-child::before { height: 27px;
  background-image: var(--wband-soft); background-repeat: repeat-x;
  background-size: 54px 27px; background-position: -0.55px top; }
.hwa-gate > .pick2:last-child::after { height: 27px;
  background-image: var(--wband-soft-b); background-repeat: repeat-x;
  background-size: 54px 27px; background-position: -0.55px bottom; }
.pick2:active { transform: scale(.99); }
.pick2.on { border-color: var(--seal); }
.pick2 .p2-mid { display: flex; align-items: center; gap: 13px; padding: 12px 14px; position: relative;
  background: none; }
.pick2 .p2-face, .pick2 .p2-body { position: relative; z-index: 1; }
.pick2 .p2-face { width: 62px; height: 62px; flex: none; object-fit: cover; object-position: center 18%;
  border-radius: 50%; display: block; border: 1px solid var(--line); background: var(--paper); }
.pick2 .p2-body { flex: 1; min-width: 0; }
.pick2 .p2-voice { font-family: var(--fd); font-size: 1rem; color: var(--seal); line-height: 1.3; letter-spacing: -.02em; }
.pick2 b { display: block; font-family: var(--fd); font-size: 1.24rem; line-height: 1.25; margin-top: 1px; letter-spacing: -.02em; }
.pick2 .p2-sub { font-size: .8rem; color: var(--ink-soft); }
.pick2 .p2-who { font-style: normal; font-size: .74rem; color: var(--ink-soft); display: block; margin-top: 2px; }
.pick2 .p2-who u { text-decoration: none; color: var(--seal); font-weight: 700; cursor: pointer; }
.pick2 .p2-again { position: absolute; top: 32px; right: 10px; z-index: 2; font-style: normal; font-size: .64rem;
  color: var(--ink-soft); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; line-height: 1.6;
  background: var(--hanji); }
.pick2 .p2-again:active { color: var(--seal); border-color: var(--seal); }

/* ── 소지(燒紙) — 부적 종이에 적고 태워 올린다 ──
   가로로 길고 세로로 짧은 종이(zero). 글씨에 흐림 효과를 쓰지 않는다 — 읽으라고 쓴 글이다. */
.soji-wrap { margin-top: 16px; display: flex; flex-direction: column; align-items: center; }
/* 밤 모드의 전역 text-shadow(먹 그림자)가 종이 위 글씨까지 덮어 흐릿했다 — 종이 안에서는 끈다 (zero) */
.soji, .soji * { text-shadow: none !important; }
.soji { position: relative; width: 100%; max-width: 330px; aspect-ratio: 5 / 3; border-radius: 3px;
  background: #edc95a; box-shadow: 0 4px 16px rgba(43,35,32,.18); overflow: hidden;
  padding: 16px 20px; display: flex; flex-direction: column; }
body.night .soji { background: #d9b23c; }
.soji::before { content: ''; position: absolute; inset: 6px; border: 1.4px solid rgba(140,32,22,.75); border-radius: 2px; pointer-events: none; }
.soji-head { font-family: var(--fd); color: #8c2016; text-align: center;
  font-size: .8rem; letter-spacing: .38em; text-indent: .38em; opacity: .75; }
.soji-lines { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; overflow: hidden; }
.soji-line { font-family: var(--fd); font-size: 1.08rem; color: #6e150e; line-height: 1.35;
  text-align: center; animation: sojiInk .34s ease-out both; letter-spacing: -.02em; }
.soji-line.free { font-size: .92rem; opacity: .9; }
@keyframes sojiInk { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.soji-empty { font-family: var(--fd); color: rgba(110,21,14,.55); font-size: .95rem; text-align: center; letter-spacing: -.02em; }
.soji-seal { position: absolute; right: 12px; bottom: 10px; width: 24px; height: 24px; border-radius: 2px;
  border: 1.4px solid #8c2016; color: #8c2016; font-family: var(--fd); font-size: .82rem;
  display: flex; align-items: center; justify-content: center; opacity: .8; letter-spacing: -.02em; }
/* 낱말과 한 줄 — 둔탁한 상자 대신 얇은 선으로 */
.word-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.word { font-family: var(--fd); font-size: .94rem; color: var(--ink-soft);
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 12px;
  cursor: pointer; user-select: none; transition: color .14s, border-color .14s; letter-spacing: -.02em; }
.word.on { border-color: var(--seal); color: var(--seal); background: transparent; }
.soji-input { width: 100%; max-width: 330px; margin-top: 16px; padding: 13px 4px !important;
  border: none !important; border-bottom: 1.4px solid var(--line) !important; border-radius: 0 !important;
  background: transparent !important; text-align: center; font-size: 1.06rem; line-height: 1.5; }
.soji-input:focus { outline: none; border-bottom-color: var(--seal) !important; }

/* 태우기 — 연소 경계를 캔버스에 매 프레임 다시 그린다 (burnPaper).
   예전엔 물결 마스크 한 장을 위로 밀었는데, 모양이 고정이라 옆으로 흘려도 '한 판이 밀려 올라간다'로 보였다 (zero).
   지금은 그을음 면·갈변 띠·발광 심지·불똥이 전부 같은 경계 함수에서 나와 함께 일렁인다. */
.soji .burn-cv { display: none; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.soji.burning { animation: sojiShake .42s ease-in-out infinite; }
@keyframes sojiShake { 0%,100% { transform: rotate(-.5deg) translateY(0); } 50% { transform: rotate(.5deg) translateY(-1px); } }

.ember { position: fixed; width: 3.5px; height: 3.5px; border-radius: 50%; background: #fff3d6; pointer-events: none;
  box-shadow: 0 0 6px 2px rgba(255,190,90,.95), 0 0 16px 5px rgba(255,120,20,.7), 0 0 34px 12px rgba(214,58,10,.4);
  z-index: 60; animation: emberUp var(--dur,2.4s) ease-out forwards; }
@keyframes emberUp { 0% { opacity: 1; transform: translate(0,0) scale(1); }
  55% { opacity: .95; transform: translate(calc(var(--dx,0px) * .55), -120px) scale(.8); }
  100% { opacity: 0; transform: translate(var(--dx,0px), -250px) scale(.2); } }

/* ── 휘호 — 도사가 그 자리에서 그린다. 화면엔 사람과 종이와 한 줄만 둔다. ── */
.draw-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 18px 0 8px; }
/* 무대는 사진 한 장 — 도사가 서안 앞에서 부적을 쓰는 장면(zero 생성). 떠다니는 붓 커서는 걷었다. */
/* 사진 옆에 종이 — 도사가 쓰는 장면과 지금 앉는 획이 나란히 보여야 한 장면으로 읽힌다 (zero) */
.draw-row { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 360px; margin: 0 auto; }
.draw-scene { position: relative; flex: 1 1 58%; min-width: 0; border-radius: 8px; overflow: hidden;
  box-shadow: 0 6px 22px rgba(43,35,32,.22); }
.draw-photo { width: 100%; display: block; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 32%;
  transition: transform 1.2s ease-out, filter .6s; }
.draw-scene::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 78%, rgba(255,168,60,.24), transparent 62%); opacity: 0; transition: opacity .6s; }
.draw-photo.working { animation: drawBreath 4.6s ease-in-out infinite; }
.draw-scene:has(.working)::after { opacity: 1; }
@keyframes drawBreath { 0%,100% { transform: scale(1.02); } 50% { transform: scale(1.055); } }
.draw-paper { position: relative; flex: 0 0 38%; max-width: 132px; z-index: 2; transition: filter .18s; }
.draw-paper.inked { filter: drop-shadow(0 0 8px rgba(255,176,72,.6)) drop-shadow(0 0 18px rgba(214,58,10,.26)); } /* 먹이 앉는 신호일 뿐 — 불붙은 것처럼 보이면 과하다 */
.draw-canvas { width: 100%; }
.draw-paper svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 4px 14px rgba(43,35,32,.28)); }
.draw-cap { font-family: var(--fd); font-size: 1.02rem; color: var(--ink-soft); text-align: center; min-height: 1.4em; letter-spacing: -.02em; }
.draw-glow { position: absolute; left: 50%; top: 46%; width: 190px; height: 190px; margin: -95px 0 0 -95px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,178,58,.34), transparent 68%); opacity: 0; pointer-events: none; }
.draw-glow.on { animation: drawGlow 1.1s ease-out forwards; }
@keyframes drawGlow { 0% { opacity: 0; transform: scale(.6); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5); } }
.draw-fine { font-size: .72rem; color: var(--ink-soft); text-align: center; margin-top: 18px; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .soji.burning, .draw-photo.working { animation: none; }
}

/* ── 도감 — 좌우로 넘기기 ── */
.dex-overlay { display: flex; align-items: center; justify-content: center; }
.dex-detail { position: relative; margin: 0 auto; }
/* ‹ › 는 카드 위에 겹치지 않는다 — 아래 한 줄에 위치 표시와 나란히 (모바일에서 카드 폭을 안 먹는다) */
.dex-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px;
  border-top: 1.4px solid var(--line); padding-top: 10px; }
.dex-nav { width: 40px; height: 40px; border-radius: 50%; flex: none;
  border: 1.8px solid var(--line); background: var(--hanji); color: var(--ink); font-size: 1.15rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dex-nav[disabled] { opacity: .3; cursor: default; }
.dex-pos { font-size: .76rem; color: var(--ink-soft); min-width: 96px; text-align: center; }
.dex-detail.slide-l { animation: dexSlideL .26s ease-out; }
.dex-detail.slide-r { animation: dexSlideR .26s ease-out; }
@keyframes dexSlideL { from { opacity: .2; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes dexSlideR { from { opacity: .2; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.dex-tab.on::after { content: '×'; margin-left: 5px; opacity: .75; font-weight: 700; }
body.night .dex-story, body.night .dex-detail .dim, body.night .dex-detail p { color: #c3cee4; } /* 밤에 부적 설명이 묻히던 것 */

/* ── 지난 이야기 ──
   한 도사의 화면 안이라 인장도 고민 태그도 되풀이다(zero). 네모 상자를 걷어내고,
   왼쪽에 붉은 실 한 오라기를 세우고 줄마다 국화매듭을 물린다 — 실과 매듭은 같은 축에 정렬한다. */
.sesslist { margin-top: 18px; }
.sesslist-head { font-family: var(--fd); font-size: .96rem; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px; margin-bottom: 2px; letter-spacing: -.02em; }
.sesslist-head::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sesslist-body { position: relative; padding-left: 30px; }
.sesslist-body::before { content: ''; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 1px;
  background: var(--seal); opacity: .45; }
/* 줄은 이제 '열기'와 '지우기' 두 버튼을 담는 그릇이다 — 버튼 안에 버튼을 넣을 수 없다 */
.sesslist-row { position: relative; display: flex; align-items: center; width: 100%;
  border-bottom: 1px solid var(--line); transition: opacity .24s, max-height .24s; max-height: 90px; }
.sesslist-row .sl-open { flex: 1; min-width: 0; display: block; text-align: left; font: inherit; color: inherit;
  background: none; border: none; border-radius: 0; padding: 13px 2px; cursor: pointer; }
.sesslist-row .sl-del { flex: none; width: 30px; height: 30px; padding: 0; border: none; background: none;
  color: var(--ink-soft); opacity: .5; cursor: pointer; border-radius: 50%; transition: opacity .14s, color .14s; }
.sesslist-row .sl-del svg { width: 14px; height: 14px; display: block; margin: 0 auto; }
.sesslist-row .sl-del:active { opacity: 1; color: var(--seal); }
.sesslist-row .sl-confirm { display: none; align-items: center; gap: 8px; flex: 1; padding: 13px 2px; font-size: .84rem; }
.sesslist-row .sl-confirm span { flex: 1; color: var(--ink-soft); }
.sesslist-row .sl-confirm button { font: inherit; font-size: .84rem; border: 1px solid var(--line); background: none;
  color: var(--ink-soft); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.sesslist-row .sl-confirm .sl-yes { border-color: var(--seal); color: var(--seal); }
.sesslist-row.asking .sl-open, .sesslist-row.asking .sl-del { display: none; }
.sesslist-row.asking .sl-confirm { display: flex; }
.sesslist-row.gone { opacity: 0; max-height: 0; overflow: hidden; }
.sesslist-row:last-child { border-bottom: none; }
.sesslist-row .sl-knot { position: absolute; left: -19px; top: 50%; width: 20px; height: 20px;
  margin: -10px 0 0 -10px; background-image: var(--knot); background-size: contain; background-repeat: no-repeat;
  opacity: .78; transition: opacity .14s, transform .14s; }
.sesslist-row .sl-open:active .sl-knot, .sesslist-row:hover .sl-knot { opacity: 1; transform: rotate(22.5deg); }
.sesslist-row .sl-t { font-size: .9rem; line-height: 1.4; }
.sesslist-row .sl-d { font-size: .72rem; color: var(--ink-soft); margin-top: 1px; }
.sesslist-empty { font-size: .82rem; color: var(--ink-soft); }

/* ── 도사 사연 팝업 — 담당 소개 화면(.profile-card)과 같은 얼굴로 (zero) ── */
.dosa-modal { text-align: center; }
.dosa-modal .dm-head { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dosa-modal .dm-face { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 18%;
  border: 2px solid var(--ink); background: var(--paper); display: block; }
.dosa-modal .dm-name { font-family: var(--fd); font-size: 1.42rem; margin-top: 10px; line-height: 1.2; letter-spacing: -.02em; }
.dosa-modal .dm-name span { font-size: 1.05rem; color: var(--ink-soft); }
.dosa-modal .dm-title { font-size: .82rem; color: var(--ink-soft); }
.dosa-modal .profile-card { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--hanji); }
.dosa-modal .profile-card > div { margin-bottom: 6px; }
.dosa-modal .profile-card > div:last-child { margin-bottom: 0; }

/* 프로필 모달은 도감 상세 껍데기를 빌려 쓴다 — 거기 걸린 부적 크기 규칙이 초상까지 늘려 타원이 됐다 (zero) */
.dex-detail .reading-head img { width: 44px !important; height: 44px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }

/* 결과·대화방 꼬리 링크 — 버튼 더미 대신 한 줄 (zero: 온갖 버튼으로 꽉 참) */
.post-links { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.post-links button { background: none; border: none; cursor: pointer; padding: 6px 2px; color: var(--ink-soft);
  font: inherit; font-size: .84rem; text-decoration: underline; text-underline-offset: 3px; }
.post-links i { color: var(--line); font-style: normal; }
/* 이미 받은 부적 — 휘호 블록 대신 한 줄 */
.done-amulet { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--hanji); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-top: 16px; cursor: pointer; }
.done-amulet img { width: 40px; height: 67px; object-fit: contain; flex: none; }
.done-amulet span { flex: 1; min-width: 0; }
.done-amulet b { display: block; font-family: var(--fd); font-size: 1.02rem; letter-spacing: -.02em; }
.done-amulet i { display: block; font-style: normal; font-size: .8rem; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.done-amulet em { flex: none; font-style: normal; color: var(--seal); font-weight: 700; font-size: .86rem; }

/* 도감 격자 — 1fr 의 최소값이 auto 라 긴 부적 이름이 칸을 밀어내 마지막 장이 화면 밖으로 나갔다 (zero: 오른쪽에 붙어 보임).
   minmax(0,1fr) 로 칸이 줄어들 수 있게 하고, 칸 수 자체를 화면 폭에서 뽑아 비율에 맞춘다. */
.dex-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); justify-content: center; }
.dex-cell { min-width: 0; }
.dex-cell .dex-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-strip .mini-card { flex: none; }

/* ══════ v26 — 줄바꿈 안정화 · 소지 가로형 · 불선(火線) 연출 (zero 지시) ══════ */

/* 한국어 줄바꿈: 어절 중간에서 끊지 않는다(keep-all). 끊을 수 없는 긴 토큰만 예외로 흘리고,
   마지막 줄에 몇 글자만 남는 고아 줄은 pretty/balance 로 막는다.
   ★ 뿌리(body)에 건다. 세 성질 모두 상속되므로 자손을 열거할 필요가 없고, 무엇보다
     화면 컨테이너를 선택자에 적어두면 그 밖에 새로 만든 표면이 조용히 규칙 밖으로 샌다 —
     실제로 #app 안에만 걸려 있어서 형제인 #globalModal(도사 사연·도감 상세·부적 무대·수령 카드)이
     통째로 빠졌고, 그 안에서만 어절이 중간에서 끊겼다 (zero 보고).
     폼 컨트롤은 UA 기본값이 상속을 가로막는 브라우저가 있어 한 줄로 함께 못박는다. */
body, input, select, textarea, button {
  word-break: keep-all; overflow-wrap: break-word; text-wrap: pretty;
}
h1, h2, h3, .disp, .btn, .chip, .word, .pick2 b, .grade-banner,
.alley-card b, .sec-head b, .col-strip-head b, .dex-nm, .c-name, .soji-line {
  text-wrap: balance;
}
/* 숫자·영문 식별자는 끊겨도 되는 곳 (시리얼·코드) */
.c-serial, .code-box, .dex-own { word-break: break-all; }

/* ── v21.4 황혼 밴드 — 노을·여명 중간톤 하늘 위에 직접 얹힌 연한 글씨가 묻히지 않게 */
body.twilight { --ink-soft: #483e35; }
body.twilight .sec-head .dim, body.twilight .col-strip-head .dim, body.twilight .trust,
body.twilight .footer-links a, body.twilight .brush-note, body.twilight .blk-narr,
body.twilight .flow-later { text-shadow: 0 1px 6px rgba(250, 244, 232, .55); }

/* ── v22.2 오늘의 운세 상세 서술 ── */
.today-story { background: rgba(252, 248, 240, .76); border: 1.6px solid #d8cdbc; border-radius: 14px; padding: 13px 15px; margin-top: 10px; }
.today-story p { font-size: .93rem; line-height: 1.62; color: var(--ink); margin: 0 0 9px; }
.today-story p:last-child { margin-bottom: 0; }
body.night .today-story { background: rgba(19, 27, 48, .68); border-color: #2a3a5e; }

/* ---- 10-20 노션 피드백 반영 ---- */
/* 태어난 시간 직접 입력 (YSH 9월 피드백) */
.time-row { align-items: center; }
.time-row input { flex: 1 1 0; min-width: 0; }
.time-row input:disabled { opacity: .35; }
.time-sep { color: var(--ink-soft); font-size: .95rem; flex: 0 0 auto; }
.time-row .time-unk { flex: 0 0 auto; margin: 0; padding: 9px 14px; }
/* 도사 소개 — 얼굴 탭 안내 말풍선 */
.tap-bubble { position: relative; background: #fff; border: 1.6px solid var(--ink); border-radius: 14px; padding: 7px 13px; font-family: var(--fd); font-size: .9rem; letter-spacing: -.02em; animation: fadeup .5s .35s both; }
.tap-bubble::before { content: ''; position: absolute; top: -7px; left: 50%; width: 11px; height: 11px; background: #fff; border-left: 1.6px solid var(--ink); border-top: 1.6px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
body.night .tap-bubble, body.night .tap-bubble::before { background: #17203a; border-color: #3a4c74; color: #dde5f5; }
/* 뽑기 결과 버튼 — 자랑하기·간직하기·도감을 돌아가기와 같은 크기로 */
.pull-acts { width: 340px; max-width: calc(100vw - 40px); margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.pull-acts .btn { width: 100%; height: 48px; padding: 0 6px; font-size: 1.02rem; line-height: 1.2; box-sizing: border-box; }
.pull-acts-row { display: flex; gap: 8px; }
.pull-acts-row .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; }
/* 연애 상태 — 공식 퍼널 */
.rel-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 6px; }
.rel-lab { font-size: .82rem; color: var(--ink-soft); margin-right: 2px; }
.rel-row .chip { margin: 0; padding: 7px 12px; font-size: .92rem; }
.rel-row .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
body.night .rel-row .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; } /* body.night .chip.on 보다 특이도 우선 */
/* 카카오톡 인앱 브라우저 안내 */
#iabNote { position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 9000; background: #2b2320; color: #faf6ef; border-radius: 12px; padding: 12px 14px; font-size: .9rem; line-height: 1.45; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
#iabNote b { color: #ffd27a; }
