/* ==========================================================================
   Reusable UI Components Stylesheet (Saju Pillars, Reading, Chat, Modals, Bottom Bar)
   ========================================================================== */

/* ==========================================================================
   1. Saju Pillars Grid (사주팔자 만세력 표)
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 20px 0;
  text-align: center;
}

.pillar-col {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 6px;
}

.pillar-header {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.hanja-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hanja-item {
  padding: 10px 4px;
  border-radius: 8px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hanja-sub {
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: normal;
  margin-top: 2px;
}

/* Five Elements Badges */
.elem-wood { background-color: var(--wood-bg); color: var(--wood-color); border: 1px solid var(--wood-border); }
.elem-fire { background-color: var(--fire-bg); color: var(--fire-color); border: 1px solid var(--fire-border); }
.elem-earth { background-color: var(--earth-bg); color: var(--earth-color); border: 1px solid var(--earth-border); }
.elem-metal { background-color: var(--metal-bg); color: var(--metal-color); border: 1px solid var(--metal-border); }
.elem-water { background-color: var(--water-bg); color: var(--water-color); border: 1px solid var(--water-border); }

/* Five Elements Bar (오행 통계 바) */
.elements-stat {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  background: var(--bg-primary);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.card-elements-wrap .elements-stat {
  margin: 10px 0 0;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-item {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
}

.stat-bar-container {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  margin-top: 4px;
  overflow: hidden;
}

.stat-bar {
  height: 100%;
}

/* ==========================================================================
   1-1. Prominent Shinsals & Auspicious Stars (핵심 신살 & 길신 카드/태그)
   ========================================================================== */
.shinsal-section {
  margin: 24px 0 16px;
  padding: 0;
  background: transparent;
  border: none;
}

.shinsal-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.shinsal-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.shinsal-section-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Shinsal Card Grid Layout */
.shinsal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

@media (max-width: 480px) {
  .shinsal-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.shinsal-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid #ede3d7;
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.shinsal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.shinsal-card:active {
  transform: translateY(0);
}

.shinsal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.shinsal-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: -0.2px;
}

.shinsal-card-arrow {
  color: #a49487;
  opacity: 0.6;
  transition: transform 0.15s ease, opacity 0.15s ease;
  display: flex;
  align-items: center;
}

.shinsal-card:hover .shinsal-card-arrow {
  transform: translateX(2px);
  opacity: 1;
}

.shinsal-card-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.shinsal-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.shinsal-card-hanja {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: #7f6e62;
  opacity: 0.85;
}

.shinsal-card-loc {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category Card Variants: 신살 카테고리는 골드 한 톤으로 통일, 구분은 배지 라벨로 한다 */
.card-cat-good,
.card-cat-charm,
.card-cat-power,
.card-cat-special {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-primary) 100%);
  border-color: var(--border-color);
}
.card-cat-good:hover,
.card-cat-charm:hover,
.card-cat-power:hover,
.card-cat-special:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 6px 16px rgba(197, 155, 39, 0.14);
}
.card-cat-good .shinsal-card-badge,
.card-cat-charm .shinsal-card-badge,
.card-cat-power .shinsal-card-badge,
.card-cat-special .shinsal-card-badge {
  background: var(--accent-gold-soft);
  color: var(--accent-gold-dark);
}
.card-cat-good .shinsal-card-name,
.card-cat-charm .shinsal-card-name,
.card-cat-power .shinsal-card-name,
.card-cat-special .shinsal-card-name {
  color: var(--text-main);
}
/* Gunghap Compact Card */
.card-compact {
  padding: 10px 11px;
}
.card-compact .shinsal-card-name {
  font-size: 0.96rem;
}
.gunghap-shinsal-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* Chip Fallback for legacy */
.shinsal-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.shinsal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: #ffffff;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.shinsal-chip:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.09);
}
.shinsal-chip-cat {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.shinsal-chip-name {
  font-weight: 700;
}
.shinsal-chip-hanja {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  opacity: 0.75;
}
.chip-cat-good { background: var(--bg-primary); border-color: #f3dfba; color: #8a6414; }
.chip-cat-charm { background: var(--plum-bg); border-color: var(--plum-border); color: var(--accent-plum); }
.chip-cat-power { background: #f4f6fb; border-color: #d4dceb; color: #243f6c; }
.chip-cat-special { background: #f3f9f7; border-color: #cbe9de; color: #1b6851; }
.shinsal-chip-cat { background: var(--accent-gold-soft); color: var(--accent-gold-dark); }
.shinsal-chip.chip-sm { padding: 4px 10px; font-size: 0.78rem; border-radius: 16px; }

/* ==========================================================================
   1-2. Element Diagnosis, Prescriptions & Ten Gods Balance (오행 처방 & 십신)
   ========================================================================== */
.element-analysis-wrap {
  margin-top: 24px;
}

.element-analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.element-analysis-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.element-analysis-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Diagnosis Banner */
.element-diag-banner {
  background: linear-gradient(135deg, #fdfbf7 0%, var(--bg-primary) 100%);
  border: 1.5px solid #ece2d5;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0 16px;
}

.element-diag-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.diag-tag-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
}

.diag-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.badge-over {
  background: var(--fire-bg);
  color: var(--accent-crimson);
  border: 1px solid var(--fire-border);
}

.badge-lack {
  background: var(--water-bg);
  color: var(--accent-navy);
  border: 1px solid var(--water-border);
}

.badge-balanced {
  background: var(--success-bg);
  color: var(--accent-success-dark);
  border: 1px solid var(--success-border);
}

.diag-val {
  color: var(--text-main);
  font-weight: 700;
}

.diag-summary-text {
  font-size: 0.86rem;
  color: #5a4b41;
  margin: 0;
  line-height: 1.55;
  word-break: keep-all;
}

/* Prescription 4 Cards Grid */
.prescription-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 480px) {
  .prescription-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.prescript-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 15px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid #eee5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.prescript-card:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.06);
}

.prescript-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-primary);
  border: 1px solid #ebd9c8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent-gold-dark);
}

.prescript-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.prescript-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.2px;
}

.prescript-value {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  word-break: keep-all;
}

.prescript-sub {
  font-size: 0.76rem;
  color: #a09287;
  line-height: 1.35;
}

/* Ten Gods (십신) 5대 에너지 분포 */
.tengod-section {
  background: #ffffff;
  border: 1.5px solid #ebd9c8;
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 18px;
}

.tengod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.tengod-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.tengod-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.tengod-dominant-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fdf5e6;
  border: 1px solid #f6d89b;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.82rem;
  color: #8a6414;
}

.tengod-dominant-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: #f7d070;
  color: #3b2800;
  padding: 2px 6px;
  border-radius: 10px;
}

.tengod-bar-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.tengod-stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tengod-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
}

.tengod-track {
  height: 8px;
  background: #f2ece4;
  border-radius: 4px;
  overflow: hidden;
}

.tengod-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
  transition: width 0.3s ease;
}

.tengod-desc-box {
  background: var(--bg-primary);
  border-left: 3.5px solid var(--accent-gold);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
}

.tengod-desc-lead {
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.tengod-lead-tag {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-gold-dark);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 8px;
  display: inline-block;
}

.tengod-desc-text {
  font-size: 0.84rem;
  color: #665b53;
  line-height: 1.55;
  margin: 0;
  word-break: keep-all;
}

/* ==========================================================================
   2. Reading Section & Feature Card Grid (4단 총평 상세 카드)
   ========================================================================== */
.reading-block {
  margin: 8px 0 28px;
}

.reading-kicker {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b08968;
  margin-bottom: 8px;
}

.reading-head {
  text-align: center;
  margin-bottom: 18px;
}

.reading-head h3 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: #2b2520;
  line-height: 1.35;
  word-break: keep-all;
}

.reading-note {
  margin-top: 8px;
  font-size: 0.92rem;
  color: #8a8178;
  word-break: keep-all;
}

.detail-card-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.feature-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cfc4b2;
}

.feature-card.alert-card {
  border-color: #e5c378;
  background: linear-gradient(180deg, #fffcf5 0%, #ffffff 100%);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon.bg-wood-soft {
  background: var(--success-bg);
  color: var(--accent-success);
}

.feature-icon.bg-accent-soft {
  background: #fdf5df;
  color: var(--accent-gold-dark);
}

.feature-icon.bg-earth-soft {
  background: #fff8e1;
  color: #b78103;
}

.feature-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.feature-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: #8a8178;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.feature-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #2b2520;
  line-height: 1.45;
  margin-bottom: 10px;
}

.feature-content {
  font-size: 0.94rem;
  line-height: 1.75;
  color: #4a423a;
}

.feature-content p {
  margin-bottom: 8px;
}

.feature-content p:last-child {
  margin-bottom: 0;
}

.feature-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-content li {
  position: relative;
  padding-left: 18px;
  line-height: 1.65;
}

.feature-content li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-gold);
}

.feature-content strong {
  color: #2b2520;
  font-weight: 700;
}

/* ==========================================================================
   3. Chat & Q&A System (심층 질의응답)
   ========================================================================== */
.chat-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.theme-chat-card {
  border-left: 4px solid var(--accent-gold);
  background: #ffffff;
}

.theme-chat-icon {
  background: var(--earth-bg);
  color: var(--accent-gold-dark);
}

.theme-card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-chat-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.theme-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-theme-delete {
  background: transparent;
  border: none;
  color: #b08968;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-theme-delete:hover {
  color: var(--accent-crimson);
  background: #fdf0ed;
}

.theme-chat-title {
  color: #2b2520;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.theme-q-badge {
  background: var(--accent-gold);
  color: #ffffff;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  margin-right: 6px;
  vertical-align: middle;
}

.chat-type-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.badge-verdict { background: #fee2e2; color: #991b1b; }
.badge-choice { background: #e0e7ff; color: #3730a3; }
.badge-analysis { background: #fef3c7; color: #92400e; }
.badge-default { background: #f3f4f6; color: #374151; }

/* Realtime Chat Loading Block & Shimmer */
.loading-block-card {
  opacity: 0.95;
  transition: all 0.3s ease;
}

.loading-skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.skeleton-line {
  height: 12px;
  background: #f0e9dc;
  border-radius: 6px;
  width: 100%;
}

.skeleton-line.short {
  width: 60%;
}

.shimmer {
  background: linear-gradient(90deg, #f0e9dc 25%, #fdfbf7 50%, #f0e9dc 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b9770e;
  display: inline-block;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* Chat Empty Guide Card */
.chat-empty-card {
  background: #ffffff;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  margin-top: 12px;
}

.chat-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--earth-bg);
  border: 1px solid #ecdca0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* ==========================================================================
   4. Modals (토큰 현황, 카카오페이 충전 모달, 공유 모달)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(24, 20, 18, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  box-sizing: border-box;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  transform: translateZ(0);
  will-change: transform, opacity;
  animation: modalIn 0.18s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.97) translateZ(0); }
  to { opacity: 1; transform: scale(1) translateZ(0); }
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 6px;
  text-align: center;
  color: var(--text-main);
}

.share-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: #f1f2f6;
  color: #747d8c;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.share-status-pill.active {
  background: var(--success-bg);
  color: var(--accent-success);
}

.share-status-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a4b0be;
}

.share-status-pill.active .pill-dot {
  background: #2ed573;
  box-shadow: 0 0 6px rgba(46, 213, 115, 0.6);
}

.pay-refund-gate {
  margin-top: 16px;
}

.pay-refund-note,
.pay-consent-notice,
.pay-consent {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.pay-consent-notice {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #718096;
}

.pay-refund-note a,
.pay-consent-notice a {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.pay-consent-notice a:hover {
  color: var(--accent-gold-dark);
}

.pay-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  color: var(--text-main);
}

.pay-consent input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.pay-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.token-modal-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(212, 160, 23, 0.12);
  border-radius: 50%;
  margin: 0 auto;
}

.token-display-box {
  background: #faf6f0;
  border: 1px solid #ebd9c8;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin: 16px 0;
}

.token-display-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.token-display-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-gold-dark);
  font-family: 'Cinzel', serif;
  margin: 4px 0;
}

.token-display-sub {
  font-size: 0.78rem;
  color: var(--accent-gold-dark);
}

.token-guide-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.token-guide-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-main);
}

.token-guide-item svg {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.price-option {
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  background: #fff;
}

.price-option:hover {
  border-color: var(--accent-gold);
  background-color: #fdfcf9;
}

.price-option.selected {
  border-color: var(--accent-gold);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 1px var(--accent-gold);
}

/* Shinsal Detail Modal */
.shinsal-modal-content {
  max-width: 440px;
  padding: 26px 22px;
  border-radius: 18px;
}

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

.shinsal-modal-cat {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: #faeac7;
  color: #7a550c;
  display: inline-block;
}

.shinsal-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.shinsal-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

.shinsal-modal-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.shinsal-modal-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  font-family: var(--font-serif);
}

.shinsal-modal-hanja {
  font-size: 1.05rem;
  color: #7f6e62;
  font-family: var(--font-serif);
}

.shinsal-modal-loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #5a4b41;
  background: #f6efe9;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-weight: 600;
}

.shinsal-modal-body {
  background: #faf7f4;
  border: 1px solid #ebd9c8;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.shinsal-modal-subtitle {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  margin-bottom: 8px;
}

.shinsal-modal-desc {
  font-size: 0.92rem;
  color: #333333;
  line-height: 1.65;
  margin: 0;
  word-break: keep-all;
}

.shinsal-modal-actions {
  display: flex;
}

/* ==========================================================================
   5. Fixed Bottom Chat Bar (하단 고정 질문 바)
   ========================================================================== */
.fixed-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: rgba(253, 251, 247, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(43, 37, 32, 0.08);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 12px;
  box-sizing: border-box;
}

.fixed-bottom-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.fixed-bottom-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.fixed-bottom-form {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 22px;
  padding: 4px 6px 4px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, border-radius 0.2s;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.fixed-bottom-form:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(197, 155, 39, 0.15);
}

.fixed-bottom-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px !important;
  font-family: inherit;
  color: var(--text-main);
  min-height: 36px;
  max-height: 120px;
  height: 36px;
  line-height: 1.5;
  padding: 7px 0;
  resize: none;
  overflow-y: hidden;
  word-break: break-all;
  box-sizing: border-box;
}

.fixed-bottom-input::placeholder {
  color: #9c948b;
  font-size: 13px;
}

.btn-chat-send {
  height: 36px;
  background: var(--accent-gold);
  color: #ffffff;
  border: none;
  border-radius: 18px;
  padding: 0 16px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.15s;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.btn-chat-send:hover {
  background-color: var(--accent-gold-dark);
}

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

.btn-chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.yeopjeon-icon {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.token-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-primary);
  border: 1.5px solid var(--accent-gold);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-main);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.token-pill-btn:hover {
  background: #fbf5e6;
  box-shadow: 0 2px 6px rgba(197, 155, 39, 0.18);
}

.token-pill-btn .yeopjeon-icon {
  color: var(--accent-gold);
}

.token-pill-text strong,
#token-pill-count {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  letter-spacing: 0.2px;
  line-height: 1;
}

.token-pill-plus {
  background: var(--accent-gold);
  color: #2b2520;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 2px;
  display: inline-block;
  line-height: 1.4;
}

.fixed-bottom-spacer {
  height: 120px;
}

/* Chat Status Bar (Sticky progress right above bottom input) */
.chat-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff8e7;
  border: 1px solid #f6d88e;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: #8c6200;
  font-weight: 600;
  animation: fadeIn 0.25s ease;
  box-shadow: 0 2px 8px rgba(140, 98, 0, 0.08);
  box-sizing: border-box;
}

/* ==========================================================================
   6. Mobile Responsive Rules for Components (< 600px & < 560px)
   ========================================================================== */
@media (max-width: 560px) {
  .fixed-bottom-bar {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px;
  }
  
  .fixed-bottom-inner {
    gap: 6px;
  }
  
  .token-pill-btn {
    padding: 7px 10px;
    font-size: 0.8rem;
  }
  
  .token-pill-plus {
    display: none;
  }
  
  .btn-chat-send span.btn-text,
  .btn-chat-send span:not(.spinner) {
    display: none;
  }
  
  .btn-chat-send {
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    justify-content: center;
  }

  .btn-chat-send .spinner,
  .btn-chat-send span.spinner,
  .btn-chat-send svg {
    display: inline-block !important;
  }
  
  .fixed-bottom-input {
    font-size: 16px !important;
  }
}

@media (max-width: 600px) {
  .pillars-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
    margin: 14px 0 !important;
  }

  .pillar-col {
    padding: 8px 2px !important;
    border-radius: 8px;
  }

  .pillar-header {
    font-size: 0.72rem !important;
    padding-bottom: 2px !important;
    margin-bottom: 4px !important;
  }

  .hanja-box {
    gap: 6px;
  }

  .hanja-item {
    padding: 6px 2px !important;
    font-size: 1.22rem !important;
    border-radius: 6px;
  }

  .hanja-sub {
    font-size: 0.62rem !important;
    margin-top: 1px;
  }

  .elements-stat {
    padding: 8px 4px;
    gap: 4px;
  }

  .stat-item {
    font-size: 0.72rem;
  }

  .stat-bar-container {
    height: 5px;
    margin-top: 3px;
  }

  .reading-kicker {
    font-size: 0.76rem;
  }

  .reading-head h3 {
    font-size: 1.25rem !important;
    line-height: 1.4;
  }

  .reading-note {
    font-size: 0.82rem;
  }

  .feature-card,
  .feature-card.alert-card {
    grid-template-columns: 36px 1fr !important;
    padding: 14px 12px !important;
    gap: 10px;
  }

  .feature-icon {
    width: 36px !important;
    height: 36px !important;
  }

  .feature-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .feature-tag {
    font-size: 0.7rem;
    padding: 2px 7px;
  }

  .feature-title {
    font-size: 1.05rem !important;
    line-height: 1.4;
  }

  .feature-content p,
  .feature-content li {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .chat-empty-card {
    padding: 20px 14px;
  }
}

/* ==========================================================================
   6. Dedicated Share Page & Viral CTA Components
   ========================================================================== */
.share-page-container {
  padding-bottom: 90px;
}

.share-hero-banner {
  text-align: center;
  padding: 24px 20px 20px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--plum-bg) 100%);
  border: 1.5px solid var(--plum-border);
  border-radius: 16px;
  margin-bottom: 18px;
}

.share-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-plum);
  background: var(--plum-bg);
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.share-hero-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.share-hero-title strong {
  color: var(--accent-plum);
}

.share-hero-sub {
  font-size: 0.88rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.share-viral-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: linear-gradient(135deg, var(--plum-bg) 0%, var(--plum-bg) 100%);
  border: 1.5px solid var(--plum-border);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(122, 74, 107, 0.08);
}

.share-viral-content {
  flex: 1;
}

.share-viral-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-plum);
  background: var(--plum-border);
  padding: 2px 9px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.share-viral-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.share-viral-desc {
  font-size: 0.85rem;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

.btn-gunghap-viral {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--accent-plum) 0%, var(--accent-plum-dark) 100%);
  color: #fff !important;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(122, 74, 107, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-gunghap-viral:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(122, 74, 107, 0.4);
}

.share-welcome-card {
  padding: 24px 22px;
  background: var(--bg-primary);
  border: 1.5px solid #ebd9a8;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.08);
}

.share-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  background: #fdf5e0;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.share-welcome-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 14px 0;
  line-height: 1.4;
}

.share-welcome-title strong {
  color: var(--accent-gold-dark);
}

.share-welcome-benefits {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 0 16px 0 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-welcome-benefits li {
  list-style: none !important;
  list-style-type: none !important;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  color: #444;
  line-height: 1.5;
}

.share-welcome-benefits li svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.btn-welcome-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: linear-gradient(135deg, #2b2520 0%, #1a1614 100%);
  color: #f7d070 !important;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid #4a3e36;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-welcome-cta:hover {
  transform: translateY(-2px);
  background: #1a1614;
}

.share-bottom-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 16px;
  z-index: 99;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.share-bottom-sticky-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

.share-btn-gunghap {
  flex: 1.4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  font-size: 0.94rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-plum) 0%, var(--accent-plum-dark) 100%);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(122, 74, 107, 0.25);
}

.share-btn-free {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  background: #2b2520;
  color: #f7d070 !important;
  border: 1px solid #4a3e36;
  border-radius: 10px;
  text-decoration: none;
}

@media (max-width: 640px) {
  .share-viral-card {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .btn-gunghap-viral {
    justify-content: center;
    width: 100%;
  }
  .share-hero-title {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   글로벌 토스트 알림 UI (Toast Notification System)
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  max-width: 90vw;
  width: 480px;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 18px;
  background: rgba(33, 29, 25, 0.96);
  color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), 0 4px 10px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  line-height: 1.5;
  width: 100%;
  box-sizing: border-box;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.toast-item.toast-hiding {
  opacity: 0;
  transform: translateY(-12px);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-icon {
  flex-shrink: 0;
  margin-top: 2px;
  width: 20px;
  height: 20px;
}

.toast-item.toast-error {
  border-left: 4px solid #ff4757;
}
.toast-item.toast-error .toast-icon {
  color: #ff6b81;
}

.toast-item.toast-success {
  border-left: 4px solid #2ed573;
}
.toast-item.toast-success .toast-icon {
  color: #2ed573;
}

.toast-item.toast-warning {
  border-left: 4px solid #ffa502;
}
.toast-item.toast-warning .toast-icon {
  color: #eccc68;
}

.toast-item.toast-info {
  border-left: 4px solid var(--accent-gold);
}
.toast-item.toast-info .toast-icon {
  color: var(--accent-gold);
}

.toast-body {
  flex: 1;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.toast-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  margin: -2px -4px 0 0;
  transition: color 0.15s ease;
}

.toast-close-btn:hover {
  color: #ffffff;
}

@media (max-width: 640px) {
  .toast-container {
    top: 16px;
    width: 92vw;
  }
  .toast-item {
    font-size: 0.86rem;
    padding: 12px 14px;
  }
}

/* ==========================================================================
   5. 사주 기운의 강약 (신강 / 신약 / 중화)
   ========================================================================== */
.energy-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #f0e6dc;
}

.energy-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.energy-title {
  margin: 0 0 2px 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.energy-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.energy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-primary);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #ebd9c8;
  font-size: 0.82rem;
  color: #3d322c;
}

.energy-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
}

.badge-strong {
  background: var(--accent-gold-soft);
  color: var(--accent-gold-dark);
  border: 1px solid var(--border-color);
}

.badge-balanced {
  background: var(--success-bg);
  color: var(--accent-success-dark);
  border: 1px solid var(--success-border);
}

.badge-weak {
  background: var(--water-bg);
  color: var(--accent-navy);
  border: 1px solid var(--water-border);
}

.energy-card-body {
  background: #ffffff;
  border: 1px solid #ebd9c8;
  border-radius: 10px;
  padding: 14px 16px;
}

.energy-stat-row {
  margin-bottom: 14px;
}

.energy-label-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.energy-lead-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b5a4e;
}

.energy-pct-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
}

.energy-bar-wrap {
  background: #f2ece4;
  height: 9px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.energy-bar-fill {
  background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
  height: 100%;
  border-radius: 5px;
  transition: width 0.4s ease;
}

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

.energy-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f8f6f3;
  color: #a0958c;
  border: 1px solid #e5e0d8;
}

.energy-chip.chip-active {
  background: #fef9f0;
  color: var(--accent-gold-dark);
  border-color: #eed7be;
  font-weight: 600;
}

.energy-chip svg {
  stroke: currentColor;
}

.energy-desc-box {
  border-top: 1px dashed #ebd9c8;
  padding-top: 12px;
}

.energy-desc-text {
  font-size: 0.86rem;
  color: #443a34;
  line-height: 1.6;
  margin: 0 0 10px 0;
}

.energy-prescription {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-primary);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ebd9c8;
}

.energy-rx-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--accent-gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.energy-rx-content {
  flex: 1;
}

.energy-rx-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  margin-bottom: 2px;
}

.energy-rx-text {
  font-size: 0.83rem;
  color: #4c3f36;
  line-height: 1.5;
}

/* ==========================================================================
   6. 10년 주기 대운(大運) 흐름 타임라인
   ========================================================================== */
.daeun-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #f0e6dc;
}

.daeun-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.daeun-title {
  margin: 0 0 2px 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.daeun-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.daeun-chip {
  font-size: 0.75rem;
  background: var(--bg-primary);
  color: #6b5a4e;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #ebd9c8;
}

.daeun-chip-age {
  background: var(--accent-gold-dark);
  color: #ffffff;
  border-color: var(--accent-gold-dark);
}

.daeun-scroll-container {
  overflow-x: auto;
  padding: 12px 2px 14px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.daeun-cards-track {
  display: flex;
  gap: 8px;
  min-width: max-content;
}

.daeun-pillar-card {
  position: relative;
  width: 76px;
  background: #ffffff;
  border: 1px solid #ebd9c8;
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  font-family: inherit;
  line-height: normal;
  display: block;
}

.daeun-pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.daeun-pillar-card.is-current {
  border: 2px solid var(--accent-gold-dark);
  background: #fffdf9;
  box-shadow: 0 4px 14px rgba(212, 160, 23, 0.22);
}

.daeun-pillar-card.is-selected {
  border: 2px solid var(--accent-gold-dark);
  background: #fffcf4;
  box-shadow: 0 4px 14px rgba(212, 160, 23, 0.25);
  transform: translateY(-2px);
}

.daeun-current-badge {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold-dark);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.daeun-age-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: #7a6b61;
  margin-bottom: 3px;
  margin-top: 2px;
}

.daeun-pillar-card.is-current .daeun-age-badge,
.daeun-pillar-card.is-selected .daeun-age-badge {
  color: var(--accent-gold-dark);
  font-weight: 800;
}

.daeun-card-theme {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  background: #fdf6ec;
  border: 1px solid #f9dfbe;
  border-radius: 4px;
  padding: 1px 2px;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.daeun-chars-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.daeun-char-item {
  padding: 5px 2px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.daeun-tengod {
  display: block;
  font-size: 0.68rem;
  color: #6b5a4e;
  margin-bottom: 1px;
}

.daeun-hanja {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
  font-family: serif, 'Batang', 'Song Myung', sans-serif;
}

.daeun-kr {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* 대운 인터랙티브 스토리보드 */
.daeun-storyboard {
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid #ebd9c8;
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.daeun-story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
  flex-wrap: wrap;
}

.daeun-story-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.daeun-story-age {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  background: #fbf7f0;
  border: 1px solid #eed7be;
  padding: 2px 8px;
  border-radius: 12px;
}

.daeun-story-title {
  font-size: 0.98rem;
  color: #2c2523;
  font-weight: 700;
}

.daeun-story-theme-badge {
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--accent-gold-dark);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: -0.2px;
}

.daeun-story-keywords-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.84rem;
}

.daeun-keywords-lead {
  font-size: 0.76rem;
  font-weight: 700;
  color: #8c7e75;
  background: #f4efe9;
  padding: 2px 6px;
  border-radius: 4px;
}

.daeun-story-keywords {
  font-weight: 600;
  color: #4a3e35;
}

.daeun-story-desc {
  font-size: 0.88rem;
  color: #3d322c;
  line-height: 1.65;
  margin: 0 0 14px 0;
  word-break: keep-all;
}

.daeun-story-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fbf7f0;
  border: 1px solid #ebd9c8;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.daeun-tip-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent-gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.daeun-tip-body {
  flex: 1;
}

.daeun-tip-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  margin-bottom: 2px;
}

.daeun-tip-text {
  font-size: 0.83rem;
  color: #4c3f36;
  line-height: 1.5;
  word-break: keep-all;
}

.daeun-story-wiki-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed #ebd9c8;
  flex-wrap: wrap;
}

.daeun-wiki-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fdfaf6;
  border: 1px solid #eed7be;
  color: var(--accent-gold-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: default;
}

.daeun-wiki-subtag {
  font-size: 0.68rem;
  background: #f6e3cf;
  color: #7c440a;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 700;
}

.daeun-select-guide-hint {
  font-size: 0.78rem;
  color: #8c7e75;
}

.daeun-footer-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.4;
}

/* ==========================================================================
   Onboarding Splash Screen (100dvh Clean Minimalist Center Layout)
   ========================================================================== */
body.is-splash .container {
  padding-top: 10px;
  padding-bottom: 16px;
  min-height: calc(100dvh - 80px);
  display: flex;
  flex-direction: column;
}

body.is-splash .site-footer {
  padding: 12px 16px 18px;
  background: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.onboarding-splash-screen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

.review-top-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 4px 0 16px;
}

.review-top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  transition: all 0.2s ease;
}

.review-top-link:hover {
  border-color: var(--accent-gold);
  color: var(--text-main);
}

.review-badge {
  background: #fee500;
  color: #191919;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.onboarding-splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  width: 100%;
  padding: 24px 0 32px;
}

.onboarding-splash-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.4px;
  margin: 0 0 28px 0;
  font-family: var(--font-serif);
}

.onboarding-btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
}

.onboarding-btn-primary {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(197, 155, 39, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.onboarding-btn-kakao {
  background: #fee500;
  color: #191919 !important;
  font-weight: 700;
  font-size: 1.02rem;
  padding: 15px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: none;
  width: 100%;
}
