/* =====================================================================
   구운점 · Mobile-First Editorial PWA Stylesheet
   Target: 28~42세 여성 · 럭셔리 모던 에디토리얼 사주 부티크 감성
   ===================================================================== */

:root {
  --bg: #faf7f4;
  --bg-deep: #f2ebe4;
  --surface: #ffffff;
  --surface-soft: #fcfaf7;
  --ink: #1e1922;
  --ink-soft: #4d4352;
  --muted: #8b7f90;
  --border: rgba(30, 25, 34, 0.08);
  --border-strong: rgba(30, 25, 34, 0.14);

  --plum: #211827;
  --plum-soft: #31243a;
  --rose: #963b58;
  --rose-dark: #7a2d46;
  --rose-soft: #f9edf1;
  --gold: #c69f63;
  --gold-light: #efe0c4;
  --gold-deep: #9c743a;

  /* 오행 컬러 팔레트 */
  --el-wood: #2f7d60;
  --el-wood-bg: #e8f5ef;
  --el-fire: #c84b59;
  --el-fire-bg: #fcecef;
  --el-earth: #b97d2c;
  --el-earth-bg: #fbf2e1;
  --el-metal: #667085;
  --el-metal-bg: #f0f2f6;
  --el-water: #345496;
  --el-water-bg: #eaf0fb;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 16px rgba(30, 25, 34, 0.05);
  --shadow-md: 0 12px 32px rgba(30, 25, 34, 0.09);
  --shadow-lg: 0 20px 50px rgba(20, 14, 26, 0.22);

  --font-sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-serif: "Gowun Batang", "Noto Serif KR", Georgia, serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: radial-gradient(circle at 50% 0%, #f3e9e2 0%, #e9e2dc 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button, input, select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ---------- Mobile-First App Shell ---------- */
.app-shell {
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 60px rgba(30, 25, 34, 0.1);
  overflow-x: clip;
}

/* ---------- PWA 홈 화면 추가 유도 배너 ---------- */
.pwa-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #24192b 0%, #3a2335 100%);
  color: #fff;
  font-size: 12px;
}

.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pwa-banner-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(239, 224, 196, 0.35);
  flex-shrink: 0;
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pwa-banner-text strong {
  font-size: 12.5px;
  font-weight: 700;
  color: #fdf6ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-banner-text span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pwa-btn-add {
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #e7c68c, #c69f63);
  color: #1e1922;
  font-size: 12px;
  font-weight: 700;
}

.pwa-btn-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  display: grid;
  place-items: center;
}

/* ---------- Top App Bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(250, 247, 244, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
}

.brand-ko {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-hanja {
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--gold-deep);
  letter-spacing: 0.12em;
}

.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.94);
}

.badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 2px #fff;
}

.pill-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.pill-btn.logged-in {
  background: var(--plum);
  color: #f7ebda;
  border-color: transparent;
}

/* ---------- Views ---------- */
.view {
  animation: fadeUp 0.28s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   VIEW 1: HOME (AI 도사 4인방 2x2 그리드 — 첫 화면 한눈에 노출)
   ===================================================================== */
#view-home {
  padding: 14px 16px 36px;
}

.home-hero {
  margin-bottom: 14px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose);
}

.home-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.home-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.home-sub b {
  color: var(--rose);
  font-weight: 700;
}

/* 2x2 AI 도사 카드 그리드 */
.masters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin-bottom: 18px;
}

.master-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(30, 25, 34, 0.1);
  background: var(--plum);
  box-shadow: var(--shadow-md);
  padding: 0;
  text-align: left;
  width: 100%;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.master-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(30, 25, 34, 0.18);
}

.master-card:active {
  transform: scale(0.98);
}

.master-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.45s ease;
}

.master-card:hover .master-card-img {
  transform: scale(1.04);
}

.master-card-top {
  position: absolute;
  top: 9px;
  left: 9px;
  right: 9px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.card-discount-pill {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(24, 17, 29, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(239, 224, 196, 0.4);
  color: #f3d7a0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.card-tag-pill {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(150, 59, 88, 0.88);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.master-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(16, 11, 20, 0.96) 0%,
    rgba(18, 12, 23, 0.76) 38%,
    rgba(18, 12, 23, 0.18) 64%,
    rgba(18, 12, 23, 0.0) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 13px 12px 12px;
  color: #fff;
}

.master-card-keyword {
  font-size: 11px;
  font-weight: 600;
  color: #ebd09e;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.master-card-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  margin: 0 0 7px;
  letter-spacing: -0.02em;
}

.master-card-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.master-card-orig {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.52);
  text-decoration: line-through;
}

.master-card-sale {
  font-size: 14.5px;
  font-weight: 800;
  color: #fff6e8;
  letter-spacing: -0.02em;
}

/* 신뢰 스트립 */
.trust-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.trust-item {
  flex: 1;
  text-align: center;
}

.trust-num {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.trust-label {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}

.trust-divider {
  width: 1px;
  height: 26px;
  background: var(--border);
}

/* 회원 혜택(추천인/쿠폰) 배너 */
.promo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #251a2d 0%, #442338 100%);
  color: #fff;
  margin-bottom: 14px;
}

.promo-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ebd09e;
  margin-bottom: 3px;
}

.promo-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.promo-copy p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
}

.promo-btn {
  flex-shrink: 0;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(239, 224, 196, 0.45);
  background: rgba(255, 255, 255, 0.1);
  color: #fdf4e4;
  font-size: 12px;
  font-weight: 700;
}

/* 기존 13종 간편 풀이 드로어 */
.classic-drawer {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
}

.classic-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
}

.classic-summary::-webkit-details-marker {
  display: none;
}

.classic-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
}

.classic-summary strong {
  font-size: 13.5px;
  color: var(--ink);
}

.classic-chevron {
  font-size: 16px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.classic-drawer[open] .classic-chevron {
  transform: rotate(180deg);
}

.classic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 14px 14px;
}

.classic-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
}

.classic-chip-ico {
  font-size: 17px;
}

/* 푸터 */
.app-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-notice {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.footer-biz {
  font-size: 10.5px;
  line-height: 1.85;
  color: var(--muted);
}

/* =====================================================================
   VIEW 2: 도사 상세 상담 입력 퍼널 (3:4 풀사이즈 히어로 + 폼)
   ===================================================================== */
.detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--plum);
  overflow: hidden;
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(19, 13, 24, 0.96) 0%,
    rgba(19, 13, 24, 0.72) 38%,
    rgba(19, 13, 24, 0.14) 68%,
    rgba(19, 13, 24, 0.04) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 20px 44px;
  color: #fff;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.badge-discount {
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e7c68c, #c69f63);
  color: #1e1922;
  font-size: 11px;
  font-weight: 800;
}

.badge-free-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.detail-keyword {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #f0d5a4;
}

.detail-name {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.detail-quote {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.5;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-original {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: line-through;
}

.price-sale {
  font-size: 22px;
  font-weight: 800;
  color: #fff6e6;
}

.price-note {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.68);
}

/* 입력 시트 */
.consult-sheet {
  position: relative;
  z-index: 2;
  margin-top: -24px;
  border-radius: 26px 26px 0 0;
  background: var(--bg);
  padding: 24px 18px 40px;
}

.sheet-header {
  margin-bottom: 20px;
}

.sheet-step {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--rose);
  margin-bottom: 4px;
}

.sheet-header h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.field-group {
  margin-bottom: 14px;
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
}

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.label-sub {
  font-weight: 500;
  color: var(--muted);
  font-size: 11.5px;
}

.label-req {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose);
  font-size: 10.5px;
  font-weight: 700;
}

.field-input, .field-select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input:focus, .field-select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(150, 59, 88, 0.12);
}

.gender-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  height: 48px;
  padding: 4px;
  border-radius: 13px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
}

.seg-btn {
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.seg-btn.active {
  background: var(--plum);
  color: #fff6ea;
}

/* 관상가 묵현: 손금 사진 업로드 박스 */
.upload-dropzone {
  border: 1.5px dashed rgba(150, 59, 88, 0.45);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.upload-dropzone:hover {
  background: var(--rose-soft);
  border-color: var(--rose);
}

.upload-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.upload-placeholder strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}

.upload-placeholder span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
}

.upload-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-preview-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-sm);
}

.upload-change-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--plum);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
}

.privacy-mini {
  margin: 6px 2px 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* 7장 목차 미리보기 */
.toc-preview {
  margin: 18px 0 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.toc-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--el-wood-bg);
  color: var(--el-wood);
  font-size: 10.5px;
  font-weight: 700;
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.toc-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.toc-num {
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  padding: 2px 0;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--bg-deep);
  color: var(--ink-soft);
}

.toc-list li.is-free .toc-num {
  background: var(--rose-soft);
  color: var(--rose);
}

.toc-list li.is-free {
  color: var(--ink);
  font-weight: 600;
}

.toc-lock {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.form-error {
  margin-bottom: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fdecee;
  border: 1px solid #f4bcc4;
  color: #b42336;
  font-size: 13px;
  font-weight: 600;
}

.primary-cta {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--rose) 0%, #6d2642 100%);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(150, 59, 88, 0.3);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.primary-cta:active {
  transform: scale(0.985);
}

.primary-cta:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-footnote {
  text-align: center;
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

/* =====================================================================
   VIEW 3: 결과 & 웹툰 미리보기식 블러 페이월
   ===================================================================== */
#view-result {
  padding: 14px 16px 110px;
}

.result-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #221829 0%, #3d2135 100%);
  color: #fff;
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
}

.result-master-thumb {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 15%;
  border: 1.5px solid rgba(239, 224, 196, 0.5);
  flex-shrink: 0;
}

.result-banner-info {
  min-width: 0;
  flex: 1;
}

.result-banner-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: #f0d5a4;
  margin-bottom: 2px;
}

.result-banner-info h2 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.3;
}

.result-banner-meta {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
}

/* 공용 리포트 카드 */
.report-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.card-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--rose);
  margin-bottom: 6px;
}

.card-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 18.5px;
  line-height: 1.35;
  color: var(--ink);
}

/* 만세력 사주 원국표 (4 Pillars Grid) */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.pillar-col {
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 10px 6px;
  text-align: center;
}

.pillar-col.is-day {
  border-color: rgba(150, 59, 88, 0.4);
  background: #fff9fb;
  box-shadow: 0 4px 12px rgba(150, 59, 88, 0.08);
}

.pillar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.pillar-col.is-day .pillar-label {
  color: var(--rose);
}

.pillar-glyph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 54px;
  border-radius: 11px;
  margin-bottom: 6px;
}

.pillar-glyph:last-child {
  margin-bottom: 0;
}

.glyph-hanja {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
}

.glyph-ko {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  margin-top: 2px;
}

.el-목 { background: var(--el-wood-bg); color: var(--el-wood); }
.el-화 { background: var(--el-fire-bg); color: var(--el-fire); }
.el-토 { background: var(--el-earth-bg); color: var(--el-earth); }
.el-금 { background: var(--el-metal-bg); color: var(--el-metal); }
.el-수 { background: var(--el-water-bg); color: var(--el-water); }
.el-none { background: #f2f0ee; color: #9c959f; }

/* 오행 밸런스 시각화 */
.oheng-box {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.oheng-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 700;
}

.oheng-summary-badges {
  display: flex;
  gap: 5px;
}

.mini-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
}

.oheng-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.oheng-row {
  display: grid;
  grid-template-columns: 44px 1fr 34px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.oheng-name {
  font-weight: 700;
}

.oheng-track {
  height: 9px;
  border-radius: 999px;
  background: #f1ece6;
  overflow: hidden;
}

.oheng-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fill-목 { background: var(--el-wood); }
.fill-화 { background: var(--el-fire); }
.fill-토 { background: var(--el-earth); }
.fill-금 { background: var(--el-metal); }
.fill-수 { background: var(--el-water); }

.oheng-count {
  text-align: right;
  font-weight: 700;
  color: var(--ink-soft);
}

/* 제 1장 무료 공개 카드 */
.free-chapter-card {
  border: 1.5px solid rgba(198, 159, 99, 0.38);
  background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
}

.chapter-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.chapter-num-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--plum);
  color: #f3d7a0;
  font-size: 11px;
  font-weight: 700;
}

.chapter-free-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--el-wood-bg);
  color: var(--el-wood);
  font-size: 11px;
  font-weight: 700;
}

.chapter-subtitle {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rose);
}

.chapter-body {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--ink);
  white-space: pre-line;
}

.keypoint-box {
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--rose-soft);
  border-left: 3px solid var(--rose);
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 12px;
}

.keypoint-box strong {
  display: block;
  font-size: 11px;
  color: var(--rose);
  margin-bottom: 3px;
}

.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keyword-chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

/* 로또 번호 공 */
.lotto-wrap {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.lotto-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.lotto-row:last-child {
  margin-bottom: 0;
}

.lotto-label {
  font-size: 11px;
  color: var(--muted);
  width: 38px;
  font-weight: 600;
}

.lotto-ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2b1d33, #4c273e);
  color: #f6dfad;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* =====================================================================
   웹툰 미리보기식 블러(Blur) & 자물쇠 페이월 (70% 유료 구간: 2장~7장)
   ===================================================================== */
.paywall-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--rose);
}

.paywall-divider::before,
.paywall-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(150, 59, 88, 0.35), transparent);
}

.locked-chapter-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(30, 25, 34, 0.1);
}

.locked-chapter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(33, 24, 39, 0.08);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.locked-teaser {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

.blur-preview-zone {
  position: relative;
  border-radius: 14px;
  padding: 14px 12px;
  background: #faf6f2;
  overflow: hidden;
}

.blurred-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
  filter: blur(6.5px);
  -webkit-filter: blur(6.5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.72;
}

.blur-lock-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(250, 246, 242, 0.25) 0%,
    rgba(250, 246, 242, 0.82) 55%,
    rgba(250, 246, 242, 0.96) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
}

.lock-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--plum);
  color: #f3d7a0;
  display: grid;
  place-items: center;
  font-size: 16px;
  margin-bottom: 6px;
  box-shadow: 0 6px 16px rgba(33, 24, 39, 0.24);
}

.blur-lock-overlay strong {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 2px;
}

.blur-lock-overlay span {
  font-size: 11.5px;
  color: var(--muted);
}

/* 대형 언락 CTA 카드 */
.unlock-hero-card {
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  background: linear-gradient(155deg, #211629 0%, #3f1f34 55%, #24182b 100%);
  color: #fff;
  text-align: center;
  margin: 16px 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(239, 224, 196, 0.25);
}

.unlock-pill {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(239, 224, 196, 0.16);
  color: #f3d7a0;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}

.unlock-hero-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.35;
}

.unlock-hero-card p {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.unlock-price-box {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.unlock-price-orig {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.48);
  text-decoration: line-through;
}

.unlock-price-sale {
  font-size: 24px;
  font-weight: 800;
  color: #fce5b8;
}

.unlock-gold-btn {
  width: 100%;
  height: 52px;
  border-radius: 15px;
  border: none;
  background: linear-gradient(135deg, #f1d6a2 0%, #c69f63 100%);
  color: #1e1922;
  font-size: 15.5px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(198, 159, 99, 0.35);
}

/* 행운 아이템 그리드 (유료 공개 시) */
.lucky-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.lucky-cell {
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.lucky-cell span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.lucky-cell strong {
  font-size: 14px;
  color: var(--ink);
}

/* 하단 플로팅 결제 유도 바 */
.sticky-paywall-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -10px 28px rgba(30, 25, 34, 0.1);
}

.sticky-tag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.sticky-prices {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.sticky-orig {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}

.sticky-sale {
  font-size: 17px;
  font-weight: 800;
  color: var(--rose);
}

.sticky-cta-btn {
  flex: 1;
  max-width: 220px;
  height: 46px;
  border: none;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--rose) 0%, #6d2642 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(150, 59, 88, 0.28);
}

/* 보조 버튼 */
.secondary-btn {
  width: 100%;
  height: 46px;
  border-radius: 13px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

/* =====================================================================
   로딩 오버레이
   ===================================================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 14, 26, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.loading-card {
  width: 100%;
  max-width: 310px;
  padding: 28px 22px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.loading-avatar-ring {
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
}

.loading-avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
}

.loading-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.loading-sub {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.loading-dots {
  display: inline-flex;
  gap: 6px;
}

.loading-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  animation: pulseDot 1.1s infinite ease-in-out;
}

.loading-dots span:nth-child(2) { animation-delay: 0.18s; }
.loading-dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes pulseDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
  40% { transform: scale(1.1); opacity: 1; }
}

/* =====================================================================
   모달 & 바텀시트 (업셀링 결제 / 로그인 / 마이페이지 / 알림 / 쿠폰 / 추천인)
   ===================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 12, 23, 0.62);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@media (min-width: 520px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  width: 100%;
  max-width: 440px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 520px) {
  .modal-sheet {
    border-radius: 24px;
    padding: 24px 22px;
  }
}

@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #ded7d0;
  margin: 0 auto 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-size: 15px;
  display: grid;
  place-items: center;
}

/* 업셀링 체크아웃 모달 */
.checkout-product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 15px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.checkout-product img {
  width: 48px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center 15%;
}

.checkout-product-info {
  flex: 1;
}

.checkout-product-info strong {
  display: block;
  font-size: 14.5px;
}

.checkout-product-info span {
  font-size: 12px;
  color: var(--muted);
}

.checkout-product-price {
  text-align: right;
}

.checkout-product-price del {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.checkout-product-price strong {
  font-size: 15px;
  color: var(--rose);
}

/* 업셀링 카드 (+10,000원 2인 궁합 & 주간 로또번호 알림톡 3개월 패스) */
.upsell-card {
  display: block;
  position: relative;
  padding: 15px 14px;
  border-radius: 16px;
  border: 2px solid var(--border-strong);
  background: var(--surface-soft);
  cursor: pointer;
  margin-bottom: 14px;
  transition: all 0.18s ease;
}

.upsell-card.selected {
  border-color: var(--rose);
  background: linear-gradient(135deg, #fff8fa 0%, #fdf4e7 100%);
  box-shadow: 0 8px 20px rgba(150, 59, 88, 0.12);
}

.upsell-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.upsell-check {
  width: 20px;
  height: 20px;
  accent-color: var(--rose);
  margin-top: 2px;
  flex-shrink: 0;
}

.upsell-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  margin-bottom: 5px;
}

.upsell-title {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.38;
  margin-bottom: 6px;
}

.upsell-perks {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.checkout-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--plum);
  color: #fff;
  margin-bottom: 12px;
}

.checkout-total-row span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.checkout-total-row strong {
  font-size: 19px;
  font-weight: 800;
  color: #f6dfad;
}

/* 소셜 로그인 버튼 */
.social-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.social-btn {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0;
}

.divider-text::before, .divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* 마이페이지 탭 */
.tab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-deep);
  margin-bottom: 14px;
}

.tab-btn {
  height: 36px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.info-box {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  font-size: 13px;
}

.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.inline-form .field-input {
  height: 42px;
  font-size: 13.5px;
}

.inline-form button {
  flex-shrink: 0;
  padding: 0 16px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: var(--plum);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.notif-item {
  padding: 12px;
  border-radius: 13px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: var(--surface);
}

.notif-item.unread {
  border-color: rgba(150, 59, 88, 0.35);
  background: #fff9fb;
}

.notif-item strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.notif-item p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.notif-item time {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

.tier-option-btn {
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.tier-option-btn:hover {
  border-color: var(--rose);
  background: #fff9fb;
}

.msg-ok {
  color: var(--el-wood);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 6px;
}

.msg-err {
  color: #b42336;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 6px;
}

/* =====================================================================
   1:1 신당 대면 상담실 · 도사 영상(3:4 크롭) · 말풍선 · 붉은 부적 봉인 · 시크릿 카드 · 3턴 문답
   ===================================================================== */

/* 9:16 원본 영상의 위아래 여백 및 우측 하단 워터마크 자동 크롭 컨테이너 */
.video-hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #17101c;
}

.master-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.06);
  display: block;
}

.video-live-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(18, 12, 23, 0.68);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(239, 224, 196, 0.28);
  color: #f9ead0;
  font-size: 11px;
  font-weight: 700;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff6b7a;
  box-shadow: 0 0 0 0 rgba(255, 107, 122, 0.7);
  animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 122, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(255, 107, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 122, 0); }
}

/* ---------- 점괘 분석 Action 영상 오버레이 ---------- */
.ritual-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(14, 9, 18, 0.88);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.ritual-card {
  width: 100%;
  max-width: 390px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(239, 224, 196, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.ritual-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(16, 10, 21, 0.96) 0%,
    rgba(16, 10, 21, 0.58) 38%,
    rgba(16, 10, 21, 0.08) 72%,
    rgba(16, 10, 21, 0.2) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 20px;
  color: #fff;
  text-align: center;
}

.ritual-badge {
  align-self: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(182, 42, 62, 0.88);
  border: 1px solid rgba(255, 214, 170, 0.45);
  color: #fff5e5;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}

.ritual-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.ritual-sub {
  margin: 0 0 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.74);
}

.ritual-progress-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.ritual-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e7c68c, #d4536f);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* ---------- 1:1 신당 상담실 뷰 ---------- */
.shrine-view {
  padding: 0 0 116px !important;
  background: linear-gradient(180deg, #1b1322 0%, #24192b 240px, var(--bg) 420px);
}

.shrine-video-stage {
  border-radius: 0 0 26px 26px;
  box-shadow: 0 14px 36px rgba(18, 11, 24, 0.35);
}

.shrine-top-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shrine-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(18, 12, 23, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(239, 224, 196, 0.3);
  color: #fcebd2;
  font-size: 11px;
  font-weight: 700;
}

.shrine-chart-toggle {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(239, 224, 196, 0.42);
  background: rgba(28, 19, 36, 0.78);
  backdrop-filter: blur(10px);
  color: #f7e3be;
  font-size: 11px;
  font-weight: 700;
}

.shrine-video-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 46px 18px 18px;
  background: linear-gradient(
    to top,
    rgba(16, 10, 21, 0.96) 0%,
    rgba(16, 10, 21, 0.65) 55%,
    rgba(16, 10, 21, 0) 100%
  );
  color: #fff;
}

.shrine-master-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #f0d5a4;
  margin-bottom: 4px;
}

.shrine-headline {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.34;
  color: #fff;
}

/* 접이식 정밀 만세력 + 신살 + 대운 + 세운 패널 */
.shrine-manseryeok-drawer {
  padding: 14px 16px 0;
  animation: fadeUp 0.25s ease;
}

.saju-ext-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.saju-ext-box {
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 11.5px;
}

.saju-ext-box strong {
  display: block;
  font-size: 11px;
  color: var(--rose);
  margin-bottom: 3px;
}

.sinsal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.sinsal-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f5ebf0;
  color: var(--rose-dark);
  font-size: 11px;
  font-weight: 700;
}

/* ---------- 1:1 대화 말풍선 영역 ---------- */
.shrine-stage-body {
  padding: 16px 16px 6px;
}

.shrine-chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  animation: bubblePop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-row.is-user {
  justify-content: flex-end;
}

@keyframes bubblePop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 1.5px solid var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.chat-bubble-wrap {
  max-width: 84%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-speaker {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  padding-left: 4px;
}

.chat-bubble {
  padding: 13px 15px;
  border-radius: 4px 18px 18px 18px;
  background: var(--surface);
  border: 1px solid rgba(30, 25, 34, 0.08);
  box-shadow: 0 6px 18px rgba(30, 25, 34, 0.06);
  font-size: 14.2px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-line;
}

.chat-bubble.mood-cliffhanger {
  background: linear-gradient(150deg, #fff9f6 0%, #fdeef1 100%);
  border: 1.5px solid rgba(158, 36, 59, 0.38);
}

.chat-bubble.mood-sharp {
  border-left: 3px solid var(--rose);
}

.chat-row.is-user .chat-bubble {
  border-radius: 18px 4px 18px 18px;
  background: linear-gradient(135deg, var(--plum) 0%, #3d2135 100%);
  color: #fff6ea;
  border: none;
  font-weight: 600;
}

/* 진행 컨트롤 (다음 말씀 듣기 & 반응 선택지 2개) */
.shrine-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.next-speech-btn {
  width: 100%;
  height: 48px;
  border-radius: 15px;
  border: none;
  background: linear-gradient(135deg, var(--plum) 0%, #3c2136 100%);
  color: #f8e5c2;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(33, 24, 39, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.reaction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.reaction-btn {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(150, 59, 88, 0.35);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: all 0.16s ease;
}

.reaction-btn.primary-choice {
  background: linear-gradient(135deg, #fff5f8 0%, #fce8ef 100%);
  border-color: var(--rose);
  color: var(--rose-dark);
}

.reaction-btn:active {
  transform: scale(0.97);
}

/* ---------- 붉은 부적 / 복채함 봉인 UI ---------- */
.crimson-seal-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 24px 18px 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(196, 43, 62, 0.38) 0%, transparent 62%),
    linear-gradient(160deg, #241019 0%, #3e111f 50%, #1d0e16 100%);
  border: 1.5px solid rgba(235, 192, 126, 0.45);
  box-shadow: 0 18px 42px rgba(56, 10, 22, 0.36);
  color: #fff;
  text-align: center;
  margin-top: 8px;
  animation: sealRise 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sealRise {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.talisman-stamp {
  width: 68px;
  height: 88px;
  margin: 0 auto 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #d8363b 0%, #9b1620 100%);
  border: 2px solid #f4d398;
  box-shadow: 0 8px 24px rgba(190, 25, 42, 0.55), inset 0 0 12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fce7bd;
  font-family: var(--font-serif);
}

.talisman-hanja {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.talisman-sub {
  font-size: 10px;
  letter-spacing: 0.16em;
  margin-top: 5px;
  opacity: 0.9;
}

.seal-kicker {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(244, 211, 152, 0.16);
  color: #f6d89f;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.crimson-seal-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.35;
  color: #fff8eb;
}

.crimson-seal-card p {
  margin: 0 0 14px;
  font-size: 13px;
  color: rgba(255, 240, 232, 0.82);
  line-height: 1.58;
}

.seal-topics-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.seal-topic-chip {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(244, 211, 152, 0.25);
  color: #f9e4be;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- 결제 해제 후: 주제별 탭 ---------- */
.topic-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.topic-tabs::-webkit-scrollbar {
  display: none;
}

.topic-tab-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.topic-tab-btn.active {
  background: var(--plum);
  color: #f6dfad;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(33, 24, 39, 0.18);
}

/* ---------- 12개월 월별 길흉 그래프 ---------- */
.monthly-chart-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  align-items: end;
  height: 132px;
  padding: 12px 4px 6px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.month-bar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
}

.month-bar-fill {
  width: 100%;
  max-width: 18px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #c69f63, #8f6c3a);
  transition: all 0.2s ease;
}

.month-bar-btn.high .month-bar-fill {
  background: linear-gradient(180deg, #c84b59, #8d2a44);
}

.month-bar-btn.low .month-bar-fill {
  background: linear-gradient(180deg, #98a2b3, #667085);
}

.month-bar-btn.selected .month-bar-fill {
  box-shadow: 0 0 0 2px var(--plum);
  transform: scaleX(1.12);
}

.month-bar-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.month-bar-btn.selected .month-bar-label {
  color: var(--rose);
}

.month-detail-box {
  padding: 12px 14px;
  border-radius: 13px;
  background: #fff9fb;
  border: 1px solid rgba(150, 59, 88, 0.22);
  font-size: 13px;
}

/* ---------- 터치해서 뒤집는 3D 시크릿 카드 ---------- */
.secret-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  perspective: 1000px;
}

.flip-card {
  position: relative;
  height: 184px;
  border: none;
  padding: 0;
  background: transparent;
  perspective: 1000px;
  text-align: center;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.flip-front {
  background: linear-gradient(155deg, #271525 0%, #4b1d33 100%);
  border: 1.5px solid rgba(235, 198, 134, 0.55);
  color: #fce7bd;
  box-shadow: 0 10px 22px rgba(33, 24, 39, 0.2);
}

.flip-front-icon {
  font-size: 28px;
}

.flip-front strong {
  font-family: var(--font-serif);
  font-size: 12.5px;
  line-height: 1.3;
}

.flip-front span {
  font-size: 10px;
  color: rgba(252, 231, 189, 0.72);
}

.flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #fffdf8 0%, #f9efe0 100%);
  border: 1.5px solid var(--gold);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  justify-content: space-between;
  padding: 12px 9px;
}

.flip-back-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--rose);
  line-height: 1.25;
}

.flip-back-value {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.flip-back-desc {
  font-size: 10px;
  color: var(--ink-soft);
  line-height: 1.35;
}

/* ---------- 상담 마무리 3턴 1:1 질문 채팅창 ---------- */
.followup-card {
  border: 1.5px solid rgba(150, 59, 88, 0.25);
  background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
}

.followup-turns-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose);
  font-size: 11px;
  font-weight: 700;
}

.followup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.followup-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
}

.followup-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.followup-form .field-input {
  height: 44px;
  font-size: 13.5px;
}

.followup-send-btn {
  flex-shrink: 0;
  padding: 0 16px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--rose) 0%, #6d2642 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.followup-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shrine-footer-cards {
  padding: 0 16px;
}

/* =====================================================================
   v4 개편: 고화질 포트레이트 숨쉬기 줌 + 신당 빛/연기 + 1회 재생 크로스페이드
           + 한 화면(100dvh) 컷 전환 & 좌우 스와이프 점괘 카드 덱
   ===================================================================== */

/* 신당 대면 모드일 때 바디/앱셸 스크롤 완전 잠금 (100dvh 앱 경험) */
body.shrine-locked {
  overflow: hidden;
  height: 100dvh;
}

body.shrine-locked .app-shell {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

/* 고화질 JPG 포트레이트 + 1회 재생 Video 컨테이너 */
.portrait-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #140e19;
}

.portrait-breathing {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  will-change: transform;
  animation: portraitBreathe 10s ease-in-out infinite alternate;
}

@keyframes portraitBreathe {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.03); }
}

/* 1회 재생 영상 레이어 (기본 opacity:0 -> 재생 중 opacity:1 -> 종료 시 부드럽게 JPG로 크로스페이드) */
.oneshot-video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}

.oneshot-video.is-playing {
  opacity: 1;
}

/* 은은한 신당 촛불 빛 + 피어오르는 향 연기 분위기 */
.shrine-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.candle-glow {
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: 130%;
  height: 55%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(244, 186, 114, 0.24) 0%,
    rgba(196, 88, 96, 0.1) 45%,
    transparent 74%
  );
  animation: candleFlicker 6.5s ease-in-out infinite alternate;
}

@keyframes candleFlicker {
  0% { opacity: 0.55; transform: translateX(-50%) scale(0.98); }
  50% { opacity: 0.88; transform: translateX(-49%) scale(1.03); }
  100% { opacity: 0.65; transform: translateX(-51%) scale(1.0); }
}

.incense-mist {
  position: absolute;
  bottom: 0;
  width: 65%;
  height: 70%;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.16;
}

.incense-mist.mist-a {
  left: -15%;
  background: radial-gradient(circle, rgba(255, 240, 224, 0.55), transparent 68%);
  animation: mistDriftA 13s ease-in-out infinite alternate;
}

.incense-mist.mist-b {
  right: -18%;
  background: radial-gradient(circle, rgba(235, 200, 165, 0.45), transparent 68%);
  animation: mistDriftB 15s ease-in-out infinite alternate;
}

@keyframes mistDriftA {
  0% { transform: translate(0, 12%) scale(1); opacity: 0.11; }
  100% { transform: translate(14%, -14%) scale(1.12); opacity: 0.22; }
}

@keyframes mistDriftB {
  0% { transform: translate(0, 10%) scale(1.05); opacity: 0.1; }
  100% { transform: translate(-12%, -16%) scale(1.16); opacity: 0.2; }
}

/* =====================================================================
   VIEW 3: 한 화면(100dvh) 1:1 신당 대면 앱 뷰포트
   ===================================================================== */
.shrine-viewport {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #16101b;
  animation: fadeIn 0.25s ease;
}

/* 상단 고정 도사 스테이지 */
.shrine-top-stage {
  position: relative;
  flex: 0 0 43dvh;
  min-height: 240px;
  max-height: 46dvh;
  width: 100%;
  overflow: hidden;
  background: #140e19;
}

.shrine-hud {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hud-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(18, 12, 23, 0.62);
  backdrop-filter: blur(10px);
  color: #fff;
  display: grid;
  place-items: center;
}

.hud-center-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(18, 12, 23, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(239, 224, 196, 0.28);
  color: #fdf2df;
  font-size: 12px;
  font-weight: 700;
}

.hud-sep {
  opacity: 0.45;
}

.hud-pill-btn {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(239, 224, 196, 0.42);
  background: rgba(31, 20, 39, 0.76);
  backdrop-filter: blur(10px);
  color: #f8e2b9;
  font-size: 11.5px;
  font-weight: 700;
}

.shrine-stage-vignette {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 40px 16px 14px;
  background: linear-gradient(
    to top,
    rgba(22, 16, 27, 1) 0%,
    rgba(22, 16, 27, 0.62) 55%,
    rgba(22, 16, 27, 0) 100%
  );
}

.shrine-stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shrine-mode-chip {
  font-size: 11px;
  font-weight: 700;
  color: #ebd09e;
  letter-spacing: 0.02em;
}

.shrine-share-mini {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 600;
}

/* 하단 고정: 대화 카드 & 스와이프 덱 컨테이너 */
.shrine-bottom-deck {
  position: relative;
  z-index: 6;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: -10px;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -14px 36px rgba(10, 6, 14, 0.45);
  overflow: hidden;
}

/* ---------- [A] 무료 맛보기 컷 전환 스테이지 ---------- */
.cut-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.cut-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cut-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cut-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(30, 25, 34, 0.16);
  transition: all 0.25s ease;
}

.cut-dot.active {
  width: 22px;
  background: var(--rose);
}

.cut-dot.done {
  background: var(--gold);
}

.cut-counter {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

.cut-viewport {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  padding: 2px 0;
}

.cut-card {
  border-radius: 20px;
  padding: 18px 17px;
  background: var(--surface);
  border: 1px solid rgba(30, 25, 34, 0.08);
  box-shadow: 0 10px 26px rgba(30, 25, 34, 0.07);
  animation: cutFadeIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cutFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cut-card.mood-cliffhanger {
  background: linear-gradient(155deg, #27101a 0%, #441323 55%, #1f0e17 100%);
  border: 1.5px solid rgba(235, 192, 126, 0.5);
  color: #fff8eb;
  box-shadow: 0 16px 34px rgba(56, 10, 22, 0.32);
}

.cut-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.cut-card-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 1.5px solid var(--gold);
}

.cut-card-speaker {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--rose);
}

.cut-card.mood-cliffhanger .cut-card-speaker {
  color: #f6d89f;
}

.cut-card-tag {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
}

.cut-card.mood-cliffhanger .cut-card-tag {
  background: rgba(216, 54, 59, 0.38);
  border: 1px solid rgba(244, 211, 152, 0.4);
  color: #fce7bd;
}

.cut-card-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.72;
  color: var(--ink);
  white-space: pre-line;
}

.cut-card.mood-cliffhanger .cut-card-text {
  color: #fff6ea;
}

.cut-user-echo {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--plum);
  color: #f6dfad;
  font-size: 11.5px;
  font-weight: 700;
}

.cut-seal-inline {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 211, 152, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cut-seal-badge {
  width: 40px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(180deg, #d8363b 0%, #9b1620 100%);
  border: 1.5px solid #f4d398;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: #fce7bd;
  flex-shrink: 0;
}

.cut-seal-copy {
  text-align: left;
  font-size: 12px;
  color: rgba(255, 240, 232, 0.86);
  line-height: 1.45;
}

.cut-seal-copy strong {
  display: block;
  font-size: 13px;
  color: #fce7bd;
  margin-bottom: 2px;
}

.cut-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- [B] 결제 완료 후: 좌우 스와이프 점괘 카드 덱 ---------- */
.deck-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deck-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.deck-tabs::-webkit-scrollbar {
  display: none;
}

.deck-swipe-viewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
  position: relative;
}

.deck-swipe-track {
  display: flex;
  height: 100%;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.deck-swipe-track.is-dragging {
  transition: none;
}

.deck-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  padding: 2px 2px;
  display: flex;
  flex-direction: column;
}

.deck-slide-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 15px 15px 13px;
  overflow-y: auto;
}

.deck-cut-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 6px 0 10px;
  animation: cutFadeIn 0.3s ease;
}

.deck-cut-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.deck-step-btn {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--plum) 0%, #3d2136 100%);
  color: #f7e2bc;
  font-size: 13px;
  font-weight: 700;
}

.deck-step-btn.subtle {
  flex: 0 0 auto;
  padding: 0 12px;
  background: var(--bg-deep);
  color: var(--ink-soft);
}

.deck-footer-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.deck-nav-btn {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
}

.deck-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.deck-swipe-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

/* 덱 안의 3턴 마무리 채팅 슬라이드 */
.deck-followup-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 8px;
  padding-right: 2px;
}

.deck-followup-log .chat-bubble {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.58;
}

.deck-followup-log .chat-avatar {
  width: 30px;
  height: 30px;
}

/* =====================================================================
   v5 개편: 도사별 고퀄리티 의식(Ritual) 비네팅·기운 파동 + 0.6초 빛 번짐 전환
   ===================================================================== */

.ritual-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(12, 8, 16, 0.04) 28%,
    rgba(12, 7, 18, 0.52) 68%,
    rgba(8, 4, 12, 0.88) 100%
  );
}

.ritual-energy-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.ritual-overlay-gradient {
  z-index: 5 !important;
}

.ritual-wave {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  animation: energyRipple 3.2s cubic-bezier(0.16, 0.84, 0.44, 1) infinite;
}

.ritual-wave.wave-2 { animation-delay: 1.05s; }
.ritual-wave.wave-3 { animation-delay: 2.1s; }

@keyframes energyRipple {
  0% { transform: translate(-50%, -50%) scale(0.55); opacity: 0; }
  22% { opacity: 0.68; }
  100% { transform: translate(-50%, -50%) scale(2.85); opacity: 0; }
}

/* ① 연홍선녀: 은은한 도화빛 파동 효과 */
.ritual-card[data-master="yeonhong"] .ritual-wave {
  border: 1.5px solid rgba(255, 168, 196, 0.72);
  box-shadow: 0 0 28px rgba(235, 92, 134, 0.48), inset 0 0 22px rgba(255, 184, 206, 0.25);
}
.ritual-card[data-master="yeonhong"] .ritual-energy-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 44%, rgba(236, 98, 136, 0.22), transparent 64%);
  animation: auraBreath 2.6s ease-in-out infinite alternate;
}

/* ② 청담 백발도사: 금빛 엽전/기운 파동 효과 */
.ritual-card[data-master="baekbal"] .ritual-wave {
  border: 2px solid rgba(247, 212, 136, 0.78);
  box-shadow: 0 0 30px rgba(212, 162, 72, 0.52), inset 0 0 20px rgba(255, 228, 162, 0.24);
}
.ritual-card[data-master="baekbal"] .ritual-energy-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 44%, rgba(226, 178, 86, 0.24), transparent 65%);
  animation: auraBreath 2.4s ease-in-out infinite alternate;
}

/* ③ 칠성할매: 은은한 촛불 빛무리 효과 */
.ritual-card[data-master="chilseong"] .ritual-wave {
  border: 1.5px solid rgba(255, 212, 148, 0.65);
  background: radial-gradient(circle, rgba(255, 194, 114, 0.2), transparent 66%);
  box-shadow: 0 0 36px rgba(242, 164, 78, 0.42);
}
.ritual-card[data-master="chilseong"] .ritual-energy-layer::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 240px;
  height: 240px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 120, 0.34) 0%, rgba(224, 128, 66, 0.12) 48%, transparent 74%);
  animation: candleHaloPulse 2.2s ease-in-out infinite alternate;
}

@keyframes candleHaloPulse {
  0% { opacity: 0.48; transform: translateX(-50%) scale(0.92); }
  100% { opacity: 0.92; transform: translateX(-50%) scale(1.12); }
}

/* ④ 관상가 묵현: 먹선/금빛 스캔 기운 효과 */
.ritual-card[data-master="mukhyun"] .ritual-wave {
  border: 1px solid rgba(228, 198, 140, 0.55);
  box-shadow: 0 0 24px rgba(18, 14, 24, 0.6), inset 0 0 18px rgba(235, 202, 138, 0.22);
}
.ritual-scan-beam {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(238, 204, 132, 0.95) 50%, transparent 100%);
  box-shadow: 0 0 22px 4px rgba(232, 194, 116, 0.65), 0 8px 24px rgba(12, 10, 16, 0.6);
  animation: mukhyunScan 2.6s ease-in-out infinite;
}
.ritual-card[data-master="mukhyun"] .ritual-scan-beam {
  display: block;
}

@keyframes mukhyunScan {
  0% { top: 14%; opacity: 0; }
  15% { opacity: 0.95; }
  85% { opacity: 0.95; }
  100% { top: 82%; opacity: 0; }
}

@keyframes auraBreath {
  0% { opacity: 0.45; }
  100% { opacity: 0.95; }
}

/* 타자기 + 페이드 의식 자막 */
.ritual-typewriter {
  min-height: 50px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.72);
  letter-spacing: -0.01em;
}

.ritual-typewriter::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -2px;
  background: #f5d89e;
  animation: caretBlink 0.75s step-end infinite;
}

.ritual-typewriter.done::after {
  display: none;
}

@keyframes caretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 0.6초 신당 빛 번짐(Flash/Glow) 전환 레이어 & 무게감 있는 첫 공수 등장 */
.shrine-reveal-flash {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at 50% 42%,
    rgba(255, 246, 224, 0.92) 0%,
    rgba(240, 206, 146, 0.58) 38%,
    rgba(30, 18, 34, 0.25) 100%
  );
}

.shrine-reveal-flash.is-flashing {
  animation: shrineGlowFlash 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes shrineGlowFlash {
  0% { opacity: 0.88; transform: scale(1.04); }
  45% { opacity: 0.42; transform: scale(1.01); }
  100% { opacity: 0; transform: scale(1); }
}

.cut-card.is-weighted-reveal {
  animation: weightedReveal 0.68s cubic-bezier(0.18, 0.89, 0.32, 1.06);
}

@keyframes weightedReveal {
  0% { opacity: 0; transform: translateY(18px) scale(0.965); filter: brightness(1.08); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
}
