/* ── 사주 운세 v2 스타일 ─────────────────────────────────────── */

/* ── 조선일보명조 (ChosunGs) ──────────────────────────────────── */
@font-face {
  font-family: 'ChosunGs';
  src: url('/static/fonts/ChosunGs.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Source Han Serif K (본명조) ─────────────────────────────── */
@font-face {
  font-family: 'Source Han Serif K';
  src: url('/static/fonts/SourceHanSerifK-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Han Serif K';
  src: url('/static/fonts/SourceHanSerifK-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --pink:   #f472b6;
  --blue:   #60a5fa;
  --indigo: #818cf8;
  --green:  #34d399;
  --amber:  #fbbf24;
  --red:    #f87171;
  --bg:     #0f0f1a;
  --surface: #1a1a2e;
  --surface2: #16213e;
  --border:  #2a2a4a;
  --text:    #e2e8f0;
  --text-muted: #94a3b8;
  --radius:  12px;
  --radius-sm: 6px;
  --shadow:  0 4px 24px rgba(0,0,0,0.4);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'ChosunGs', 'Source Han Serif K', 'AppleMyungjo', 'Noto Serif KR', serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
}

/* ── 인덱스 페이지 ─────────────────────────────────────────────── */
.index-page { display: flex; flex-direction: column; align-items: center; }

.index-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero-icon {
  font-size: 3rem;
  color: var(--pink);
  margin-bottom: 0.5rem;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.hero-title { font-size: 2rem; font-weight: 700; letter-spacing: 0.05em; }
.hero-sub { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.9rem; }

.index-form-wrap {
  width: 100%;
  max-width: 480px;
  padding: 0 1rem 6rem;
}

.error-banner {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: var(--red);
  font-size: 0.9rem;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.form-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.field input, .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus {
  border-color: var(--pink);
}
.field select option { background: var(--surface); }

.radio-group { display: flex; gap: 1rem; }
.radio-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.radio-btn input { width: auto; accent-color: var(--pink); }
.radio-btn small { font-size: 0.72rem; color: var(--text-muted); }

.field-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.1rem;
}
.badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: var(--border);
  border-radius: 99px;
  color: var(--text-muted);
  font-weight: 400;
}

.btn-primary {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--pink), var(--indigo));
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 0.5rem;
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.submit-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.submit-row .btn-primary {
  flex: 1.6;
  margin-top: 0;
}
.btn-compare {
  flex: 1;
  padding: 0.85rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-compare:hover { opacity: 0.85; background: rgba(255,255,255,0.11); }
.btn-compare:active { transform: scale(0.98); }
.btn-compare:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── 로딩 오버레이 ───────────────────────────────────────────────────── */
#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(15,15,26,0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#loadingOverlay[hidden] { display: none; }

.loading-box {
  text-align: center;
  padding: 2.5rem 2rem;
}

.loading-spinner {
  width: 56px;
  height: 56px;
  border: 3px solid var(--border);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.loading-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: opacity 0.4s;
}

.index-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 2rem 1rem;
  line-height: 1.6;
}

/* ── 스트리밍 프로그레스 바 ──────────────────────────────────── */
.stream-progress {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}
.stream-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--indigo));
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* ── 리딩 페이지 ──────────────────────────────────────────────── */
.reading-page { padding-bottom: 80px; }

.reading-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,26,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
}
.back-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}
.back-btn:hover { color: var(--text); }
.header-pillars {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--pink);
  text-align: center;
}
.cached-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: var(--border);
  border-radius: 99px;
  color: var(--text-muted);
}

.reading-body { max-width: 680px; margin: 0 auto; padding: 0 0.75rem; }

/* ── 만세력 표 ────────────────────────────────────────────────── */
.manse-section { padding: 1.25rem 0; }

.manse-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.manse-table {
  width: 100%;
  min-width: 340px;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.manse-table th {
  background: var(--surface2);
  padding: 0.5rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.manse-table td {
  padding: 0.6rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(42,42,74,0.5);
  vertical-align: middle;
}
.manse-table .row-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.manse-table .day-pillar {
  background: rgba(244,114,182,0.06);
  border-left: 2px solid var(--pink);
}

.stem-hanja { font-size: 1.25rem; display: block; font-weight: 700; }
.stem-hangul { font-size: 0.75rem; color: var(--text-muted); display: block; }

.elem-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  margin-top: 0.2rem;
}
.elem-tag.wood  { background: rgba(52,211,153,0.15); color: var(--green); }
.elem-tag.fire  { background: rgba(248,113,113,0.15); color: var(--red); }
.elem-tag.earth { background: rgba(251,191,36,0.15); color: var(--amber); }
.elem-tag.metal { background: rgba(148,163,184,0.15); color: #94a3b8; }
.elem-tag.water { background: rgba(96,165,250,0.15); color: var(--blue); }

.tengod { font-size: 0.8rem; color: var(--indigo); }
.day-master-mark { color: var(--pink); font-weight: 700; }
.twelve-state { font-size: 0.75rem; color: var(--text-muted); }

.hidden-stem { font-size: 0.7rem; display: inline-block; margin: 1px; }
.hidden-stem.정기 { color: var(--text); }
.hidden-stem.중기 { color: var(--text-muted); }
.hidden-stem.여기 { color: rgba(148,163,184,0.5); }

/* 오행 바 */
.five-elem-bars { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.elem-bar-row { display: flex; align-items: center; gap: 0.5rem; }
.elem-label {
  width: 3.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: right;
}
.elem-label.wood  { color: var(--green); }
.elem-label.fire  { color: var(--red); }
.elem-label.earth { color: var(--amber); }
.elem-label.metal { color: #94a3b8; }
.elem-label.water { color: var(--blue); }

.elem-bar-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.elem-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s ease;
}
.elem-bar-fill.wood  { background: var(--green); }
.elem-bar-fill.fire  { background: var(--red); }
.elem-bar-fill.earth { background: var(--amber); }
.elem-bar-fill.metal { background: #94a3b8; }
.elem-bar-fill.water { background: var(--blue); }

.elem-pct { font-size: 0.72rem; color: var(--text-muted); width: 2.5rem; }

/* 요약 태그 */
.summary-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tag.warn { border-color: var(--amber); color: var(--amber); }
.tag.mbti { border-color: var(--indigo); color: var(--indigo); }

/* ── 아코디언 ────────────────────────────────────────────────── */
.accordion-section { margin: 0.5rem 0 1.5rem; }

.accordion-item {
  border-left: 3px solid var(--pink);
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s;
}
.accordion-item.open { border-color: var(--blue); }
.accordion-item.mbti-item { border-left-color: var(--indigo); }
.accordion-item.mbti-item.open { border-color: var(--indigo); }

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.95rem;
  font-family: inherit;
  transition: background 0.15s;
}
.accordion-header:hover { background: rgba(255,255,255,0.04); }
.accordion-header[aria-expanded="true"] { background: rgba(96,165,250,0.06); }

.acc-icon { font-size: 1.1rem; flex-shrink: 0; }
.acc-title { flex: 1; font-weight: 600; letter-spacing: 0.01em; }
.acc-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.accordion-header[aria-expanded="true"] .acc-arrow { transform: rotate(90deg); }

.accordion-body {
  padding: 0 1rem 1rem;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.acc-body-inner {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text);
  padding-top: 0.25rem;
}

.section-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.75rem; }
.sec-tag {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  background: var(--border);
  color: var(--text-muted);
}

/* ── 신살 배지 ────────────────────────────────────────────────── */
.sinsal-badges { padding: 1rem 0; }
.sinsal-badge-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.badge-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sinsal-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(244,114,182,0.12);
  border: 1px solid rgba(244,114,182,0.3);
  color: var(--pink);
}

/* ── 신살 · 귀인 카드 (상세 페이지용) ────────────────────────── */
.sinsal-card {
  background: rgba(30,30,55,0.7);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  transition: border-color 0.2s;
}
.sinsal-card:hover {
  border-color: rgba(251,191,36,0.45);
}
.sinsal-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 0.3rem;
}
.sinsal-card-desc {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 0.35rem;
}
.sinsal-card-tip {
  font-size: 0.72rem;
  color: rgba(52,211,153,0.85);
  line-height: 1.5;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── 신살 인라인 (만세력 영역 통합) ─────────────────────────── */
.sinsal-inline {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.sinsal-inline-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.sinsal-inline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}
.sinsal-inline-chip {
  font-size: 0.68rem;
  padding: 0.12rem 0.45rem;
  border-radius: 99px;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.25);
  color: var(--amber);
  white-space: nowrap;
}
.sinsal-inline-cta {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--amber);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.sinsal-inline-cta:hover { opacity: 1; text-decoration: underline; }

/* ── 신살 상세 페이지 그리드 ────────────────────────────────── */
.sinsal-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* ── 대운 타임라인 ────────────────────────────────────────────── */
.daeun-timeline { padding: 1rem 0 2rem; }
.timeline-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.timeline-scroll {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.timeline-node {
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  text-align: center;
  min-width: 80px;
}
.timeline-node.current {
  border-color: var(--pink);
  background: rgba(244,114,182,0.08);
}
.tl-hanja { font-size: 1.1rem; font-weight: 700; }
.tl-hangul { font-size: 0.7rem; color: var(--text-muted); }
.tl-age { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.2rem; }
.tl-now { font-size: 0.65rem; color: var(--pink); margin-top: 0.2rem; }

/* ── CTA 바 ──────────────────────────────────────────────────── */
.cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15,15,26,0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  z-index: 200;
}
.cta-share, .cta-new {
  flex: 1;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.cta-share {
  background: linear-gradient(135deg, var(--pink), var(--indigo));
  border: none;
  color: #fff;
}
.cta-new {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}
.cta-share.full { flex: 1; }
.cta-share:hover { opacity: 0.9; }
.cta-new:hover { border-color: var(--text-muted); }

/* ── Floating 버튼 ───────────────────────────────────────────── */
.floating-btns {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 150;
}
.float-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.float-btn:hover { background: var(--surface); color: var(--text); }

/* ── 토스트 ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  z-index: 300;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── 섹션 body (스트리밍 렌더링용) ──────────────────────────── */
.section-body {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--text);
  padding-top: 0.25rem;
}
.section-body p { margin-bottom: 0.75rem; }
.section-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--indigo);
  margin: 1rem 0 0.4rem;
}

/* ── 근거 칩 (basis chips) ───────────────────────────────────── */
.basis-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.6rem 0 0.25rem;
}
.basis-chip {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  background: rgba(129,140,248,0.12);
  border: 1px solid rgba(129,140,248,0.25);
  color: var(--indigo);
  white-space: nowrap;
}

/* ── 1줄 요약 ─────────────────────────────────────────────────── */
.one-line-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.2rem 0 0 1.7rem;
  line-height: 1.4;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 스트리밍 fixed-cta ─────────────────────────────────────── */
.fixed-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15,15,26,0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  z-index: 200;
}
.btn-share {
  flex: 1;
  padding: 0.65rem;
  background: linear-gradient(135deg, var(--pink), var(--indigo));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-new {
  flex: 1;
  padding: 0.65rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-share:hover { opacity: 0.9; }
.btn-new:hover { border-color: var(--text-muted); }

/* .float-btns (스트리밍 페이지 = .floating-btns 동일) */
.float-btns {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 150;
}

/* ── 공통 네비게이션 ──────────────────────────────────────────── */
.global-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15,15,26,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 250;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--pink); }
.nav-icon { font-size: 1.2rem; }
.nav-label { font-weight: 500; }

/* reading-page: CTA 바 위치 조정 (nav 위에) */
.reading-page .cta-bar { bottom: calc(3.2rem + env(safe-area-inset-bottom, 0px)); }
.reading-page .floating-btns { bottom: calc(8rem + env(safe-area-inset-bottom, 0px)); }
.reading-page { padding-bottom: 140px; }

/* ── 맛보기 블러 ─────────────────────────────────────────────── */
.accordion-item.locked { opacity: 0.85; }
.accordion-item.locked .locked-header { cursor: pointer; }
.lock-icon { font-size: 0.85rem; flex-shrink: 0; opacity: 0.5; }

.blurred-content {
  position: relative;
  overflow: hidden;
  min-height: 120px;
}
.blur-text {
  filter: blur(6px);
  -webkit-filter: blur(6px);
  user-select: none;
  pointer-events: none;
  max-height: 150px;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text);
}
.blur-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    rgba(26,26,46,0) 0%,
    rgba(26,26,46,0.7) 40%,
    rgba(26,26,46,0.95) 100%
  );
}
.unlock-cta-btn {
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, var(--pink), var(--indigo));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.unlock-cta-btn:hover { opacity: 0.9; }
.unlock-cta-btn:active { transform: scale(0.97); }

/* 맛보기 CTA 배너 */
.preview-cta-section { padding: 0.5rem 0 1.5rem; }
.preview-cta-card {
  background: linear-gradient(135deg, rgba(244,114,182,0.1), rgba(129,140,248,0.1));
  border: 1px solid rgba(244,114,182,0.25);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.preview-cta-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.preview-cta-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.preview-cta-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--pink), var(--indigo));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.preview-cta-btn:hover { opacity: 0.9; }
.preview-cta-btn:active { transform: scale(0.97); }

/* ── 로그인 모달 ─────────────────────────────────────────────── */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,12,40,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
}
.login-modal-overlay[hidden] { display: none; }

.login-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  max-width: 380px;
  width: 100%;
  position: relative;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.login-modal-close:hover { color: var(--text); }

.login-modal-header { text-align: center; margin-bottom: 1.5rem; }
.login-modal-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.login-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.login-modal-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.login-modal-buttons { display: flex; flex-direction: column; gap: 0.6rem; }

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  font-family: inherit;
}
.login-btn:hover { opacity: 0.9; }
.login-btn:active { transform: scale(0.98); }
.login-btn-icon { display: flex; align-items: center; }

.login-btn.kakao {
  background: #FEE500;
  color: #191919;
}
.login-btn.naver {
  background: #03C75A;
  color: #fff;
}
.login-btn.google {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
}

/* ── 서브 페이지 공통 ────────────────────────────────────────── */
.subpage {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-family: 'ChosunGs', 'Source Han Serif K', 'AppleMyungjo', 'Noto Serif KR', serif;
  padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
}

.subpage-content {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.subpage-hero { text-align: center; margin-bottom: 1.5rem; }
.subpage-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.subpage-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.subpage-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.subpage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  text-align: center;
}

.coming-soon-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  background: rgba(244,114,182,0.15);
  border: 1px solid rgba(244,114,182,0.3);
  color: var(--pink);
  margin-bottom: 1rem;
}
.coming-soon-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.coming-soon-features {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text);
}
.feature-icon { font-size: 1.1rem; flex-shrink: 0; }

.subpage-cta-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--pink), var(--indigo));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.subpage-cta-btn:hover { opacity: 0.9; }

/* ── 결제 페이지 ─────────────────────────────────────────────── */
.payment-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.payment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  transition: border-color 0.2s;
}
.payment-card.featured {
  border-color: var(--pink);
  background: linear-gradient(180deg, rgba(244,114,182,0.06), var(--surface));
}

.payment-card-badge {
  position: absolute;
  top: -0.5rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  background: var(--pink);
  color: #fff;
  border-radius: 99px;
}

.payment-card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.payment-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.payment-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.payment-card-price { margin-bottom: 1rem; }
.price-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.price-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.15rem;
}

.payment-btn {
  width: 100%;
  padding: 0.7rem;
  background: linear-gradient(135deg, var(--pink), var(--indigo));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}
.payment-btn:hover { opacity: 0.9; }

.payment-back {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.5rem;
}
.payment-back:hover { color: var(--text); }

/* ── 반응형 ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .manse-table { font-size: 0.78rem; }
  .stem-hanja { font-size: 1.05rem; }
  .accordion-header { font-size: 0.9rem; padding: 0.75rem 0.75rem; }
  .login-modal { padding: 1.5rem 1.25rem; }
}
@media (min-width: 640px) {
  .reading-body { padding: 0 1.5rem; }
  .index-form-wrap { padding: 0 1.5rem 6rem; }
  .payment-cards { flex-direction: row; }
  .payment-card { flex: 1; }
}
