/**
 * m/index.html — 차트 + 리딩 결과 (#result-section, #result-desc)
 * 표시/숨김: .result-section.hidden
 */

:root {
  --color-gold-primary: #d4af37;
  --color-gold-dark: #9d8a3c;
  --color-silver-light: #f0f0f0;
  --color-silver: #e8e8e8;
  --color-silver-dark: #b0b0b0;
  --color-black-primary: #0d0d0d;
  --color-primary: #d4af37;
  --color-secondary: #c0a52f;
  --color-dark: #1a1a1a;
  --color-darker: #0f0f0f;
  --color-text: #2a2a2a;
  --color-bg: #0d0d0d;
}

/* ===== RESULT SECTION 래퍼 (STEP6) ===== */
body.m-mobile #result-section:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  padding: 24px 20px 48px;
  position: relative;
  z-index: 10;
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(13, 13, 13, 0.95) 0%, rgba(26, 26, 26, 0.98) 100%);
}

body.m-mobile .result-header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInDown 0.8s ease-out;
}

body.m-mobile .result-header__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 7vw, 56px);
  font-style: italic;
  color: var(--color-gold-primary, #d4af37);
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.7);
  margin-bottom: 15px;
  letter-spacing: 3px;
}

body.m-mobile .result-header__subtitle {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  color: var(--color-silver-light, #f0f0f0);
  font-weight: 300;
  letter-spacing: 1px;
}

body.m-mobile .result-container {
  max-width: 800px;
  width: 100%;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

body.m-mobile .m-chart .section-title,
body.m-mobile .m-result .section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  color: var(--color-silver, #e8e8e8);
}

body.m-mobile .m-chart .chart-desc {
  font-family: 'Noto Serif KR', serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: break-word;
}

body.m-mobile .m-chart {
  width: 100%;
  max-width: 100%;
}

body.m-mobile .m-result {
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* app.js renderResultReadingHtml() 가 붙이는 본문 루트 */
body.m-mobile #result-desc.m-result__reading {
  font-family: 'Gowun Batang', 'Nanum Myeongjo', 'Noto Serif KR', serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.52;
  color: #f5ecd8;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

body.m-mobile #result-desc.m-result__reading .free-content,
body.m-mobile #result-desc.m-result__reading .result-reading-paid-full {
  margin-bottom: 1rem;
}

body.m-mobile #result-desc.m-result__reading .payment-section {
  margin: 1.25rem 0;
}

body.m-mobile #result-desc.m-result__reading .teaser-text-section {
  text-align: center;
  padding: 0.75rem 0;
}

/* 유료 리딩 구조 (buildPaidReadingStructuredHtml) */
body.m-mobile #result-desc.m-result__reading .m-result__paid {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(30, 30, 30, 0.9) 100%);
  border: 2px solid var(--color-gold-primary, #d4af37);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
  animation: fadeInUp 0.8s ease-out;
}

body.m-mobile #result-desc.m-result__reading .reading-section {
  margin-bottom: 32px;
  padding-bottom: 0;
  border-bottom: none;
}

body.m-mobile #result-desc.m-result__reading .reading-section:not(:first-of-type)::before {
  content: '';
  display: block;
  height: 1px;
  margin: 16px auto !important;
  padding: 0;
  background: none;
  opacity: 0.88;
  pointer-events: none;
}

body.m-mobile #result-desc.m-result__reading .reading-section:last-child {
  margin-bottom: 0;
}

body.m-mobile #result-desc.m-result__reading .reading-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-style: italic;
  color: var(--color-gold-primary, #d4af37);
  margin-bottom: 16px;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

body.m-mobile #result-desc.m-result__reading .reading-section__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-style: italic;
  color: var(--color-gold-primary, #d4af37);
  margin-bottom: 15px;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

body.m-mobile #result-desc.m-result__reading .reading-section__content {
  font-size: 15px;
  color: #f0e8d8;
  line-height: 1.52;
  letter-spacing: 0.04em;
}

/* 같은 문단(줄바꿈)은 좁은 행간, 문단 사이 16px */
body.m-mobile #result-desc.m-result__reading p {
  line-height: 1.52;
  margin: 0 0 16px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

body.m-mobile #result-desc.m-result__reading p:last-child {
  margin-bottom: 0;
}

body.m-mobile #result-desc.m-result__reading li {
  line-height: 1.52;
  margin-bottom: 0.65em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

body.m-mobile #result-desc.m-result__reading .witch-message {
  font-style: italic;
  background: rgba(212, 175, 55, 0.04);
  padding: 1.35rem 1rem;
  border: none;
  border-radius: 4px;
  box-shadow: none;
  color: #f5ecd8;
}

/* ============================================
   무료 경로: 네이탈 3장 카드 스타일 (마자샘 톤)
   ============================================ */

body.m-mobile #result-desc.m-result__reading .m-result__free {
  padding: 40px 20px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  background-color: #0d0d0d;
  background-image: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(176, 176, 176, 0.02) 0%, transparent 50%),
    linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 25%, #0f0f0f 50%, #1a1a1a 75%, #0d0d0d 100%);
}

body.m-mobile #result-desc.m-result__reading .m-result__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.35rem, 5.5vw, 2rem);
  font-weight: 700;
  font-style: italic;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 0 4px;
  letter-spacing: 0.06em;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3), 0 0 20px rgba(212, 175, 55, 0.2), 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

body.m-mobile #result-desc.m-result__reading .natal-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 48px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
}

@media (min-width: 768px) {
  body.m-mobile #result-desc.m-result__reading .natal-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

body.m-mobile #result-desc.m-result__reading .natal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(30, 30, 30, 0.95) 100%);
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  padding: 12px;
  width: 100%;
  max-width: min(100%, 320px);
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15), inset 0 1px 0 rgba(212, 175, 55, 0.1);
  text-align: center;
}

body.m-mobile #result-desc.m-result__reading .natal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}

body.m-mobile #result-desc.m-result__reading .natal-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3), 0 8px 24px rgba(212, 175, 55, 0.15),
    inset 0 1px 0 rgba(212, 175, 55, 0.2);
  transform: translateY(-8px);
  background: linear-gradient(135deg, rgba(26, 26, 26, 1) 0%, rgba(30, 30, 30, 1) 100%);
}

body.m-mobile #result-desc.m-result__reading .card-image-wrapper {
  width: 100%;
  max-width: min(48vw, 140px);
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 2 / 3;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(232, 232, 232, 0.2);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 1px 0 rgba(232, 232, 232, 0.1), 0 0 15px rgba(212, 175, 55, 0.1);
}

body.m-mobile #result-desc.m-result__reading .card-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

body.m-mobile #result-desc.m-result__reading .natal-card:hover .card-image {
  transform: scale(1.02);
}

body.m-mobile #result-desc.m-result__reading .card-info {
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

body.m-mobile #result-desc.m-result__reading .card-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-silver);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* 행성 헤더: 이모지만 사용(LLM·구버전에서 넣은 보석 썸네일은 숨김) */
body.m-mobile #result-desc.m-result__reading .card-title > img {
  display: none !important;
}

body.m-mobile #result-desc.m-result__reading .card-symbol {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
  animation: majaSymbolGlow 2s ease-in-out infinite;
}

@keyframes majaSymbolGlow {
  0%,
  100% {
    opacity: 0.8;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.3));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.6));
  }
}

body.m-mobile #result-desc.m-result__reading .card-zodiac {
  font-size: 18px;
  font-weight: 700;
}

body.m-mobile #result-desc.m-result__reading .card-stone {
  font-family: 'Noto Serif KR', serif;
  font-size: 15px;
  color: var(--color-primary);
  margin: 0 auto 16px;
  width: 100%;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

body.m-mobile #result-desc.m-result__reading .natal-card[data-stone*='앰버'] .card-stone,
body.m-mobile #result-desc.m-result__reading .natal-card[data-stone*='앰버'] .card-info {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

body.m-mobile #result-desc.m-result__reading .card-question {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  color: var(--color-silver);
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.m-mobile #result-desc.m-result__reading .card-copy-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-primary, #d4af37);
  margin: 14px 0 6px;
  opacity: 0.95;
}

body.m-mobile #result-desc.m-result__reading .card-copy-body {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(230, 225, 215, 0.92);
  margin: 0 0 8px;
}

body.m-mobile #result-desc.m-result__reading .card-quote-block {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 3px solid rgba(212, 175, 55, 0.45);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 8px 8px 0;
}

body.m-mobile #result-desc.m-result__reading .card-quote-text {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
  color: var(--color-silver);
  margin: 0 0 8px;
}

body.m-mobile #result-desc.m-result__reading .card-quote-author {
  font-size: 13px;
  color: rgba(212, 175, 55, 0.85);
  font-style: normal;
}

body.m-mobile #result-desc.m-result__reading .m-result__cta {
  position: relative;
  text-align: center;
  margin-top: max(48px, 2.5rem);
  padding: 50px 30px;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(30, 30, 30, 0.8) 100%);
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15), inset 0 1px 0 rgba(212, 175, 55, 0.1);
}

body.m-mobile #result-desc.m-result__reading .free-path-cta {
  text-align: center;
  padding: 40px 30px;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.6) 0%, rgba(30, 30, 30, 0.8) 100%);
  border: 2px solid var(--color-gold-primary, #d4af37);
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
  animation: fadeInUp 1s ease-out;
}

body.m-mobile #result-desc.m-result__reading .m-result__cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
  pointer-events: none;
}

body.m-mobile #result-desc.m-result__reading .cta-text,
body.m-mobile #result-desc.m-result__reading .free-path-cta__text {
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  color: var(--color-silver);
  margin-bottom: 25px;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.m-mobile #result-desc.m-result__reading .free-path-cta__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-style: italic;
  color: var(--color-gold-primary, #d4af37);
  margin-bottom: 15px;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

body.m-mobile #result-desc.m-result__reading .cta-button,
body.m-mobile #result-desc.m-result__reading .payment-btn {
  font-family: var(--font-button, 'Pretendard', 'Noto Sans KR', sans-serif);
  font-size: 22px;
  font-weight: 600;
  font-style: normal;
  padding: 20px 50px;
  border: 2px solid var(--color-primary);
  border-radius: 50px;
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

body.m-mobile #result-desc.m-result__reading .payment-btn {
  background: linear-gradient(135deg, var(--color-gold-primary, #d4af37) 0%, #9d8a3c 100%);
  color: var(--color-black-primary, #0d0d0d);
  border-color: var(--color-gold-primary, #d4af37);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.6);
  text-transform: none;
}

body.m-mobile #result-desc.m-result__reading .cta-button:hover {
  background-color: var(--color-primary);
  color: var(--color-dark);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), 0 0 50px rgba(212, 175, 55, 0.3),
    inset 0 1px 0 rgba(232, 232, 232, 0.2);
  transform: translateY(-4px);
}

body.m-mobile #result-desc.m-result__reading .payment-btn:hover {
  color: var(--color-black-primary, #0d0d0d);
  box-shadow:
    0 0 40px rgba(212, 175, 55, 0.8),
    0 8px 25px rgba(0, 0, 0, 0.5);
  transform: translateY(-3px) scale(1.05);
  background: linear-gradient(135deg, var(--color-silver-light, #f0f0f0) 0%, var(--color-gold-primary, #d4af37) 100%);
}

body.m-mobile #result-desc.m-result__reading .cta-button:active {
  transform: translateY(-2px);
}

body.m-mobile #result-desc.m-result__reading .cta-button .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 24px;
}

body.m-mobile #result-desc.m-result__reading .cta-button:hover .arrow {
  transform: translateX(8px);
}

/* ===== LOADING OVERLAY (JS가 display:flex 로 표시) ===== */
body.m-mobile #loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

body.m-mobile #loading-overlay .loading-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* 명언: style.css의 어두운 박스 배경 제거 (글만 슬라이드) */
body.m-mobile #loading-overlay .loading-quote {
  background: transparent !important;
  padding-left: 16px;
  padding-right: 16px;
  min-height: 0;
}

body.m-mobile .card-shuffle-area {
  position: relative;
  width: 300px;
  height: 450px;
}

/* 유료 LLM 대기: 36장 깔린 뒤 하단 안내 (loading-overlay 자식) */
body.m-mobile #loading-overlay .paid-reading-wait-msg {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 260;
  max-width: min(92vw, 360px);
  padding: 12px 18px;
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 3.8vw, 18px);
  font-style: italic;
  line-height: 1.45;
  text-align: center;
  color: var(--color-gold-primary, #d4af37);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.85), 0 0 20px rgba(212, 175, 55, 0.25);
  pointer-events: none;
}

/* ===== SELECTION INFO ===== */
body.m-mobile #selection-info {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(30, 30, 30, 0.95) 100%);
  border: 2px solid var(--color-gold-primary, #d4af37);
  border-radius: 12px;
  padding: 20px 40px;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
  text-align: center;
  animation: slideUp 0.5s ease-out;
}

body.m-mobile #selection-info.complete {
  animation: pulse 0.6s ease-in-out;
}

body.m-mobile .selection-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  color: var(--color-gold-primary, #d4af37);
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
  letter-spacing: 2px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  body.m-mobile #result-desc.m-result__reading .m-result__paid {
    padding: 30px 25px;
  }

  body.m-mobile #result-desc.m-result__reading .reading-section h3,
  body.m-mobile #result-desc.m-result__reading .reading-section__title {
    font-size: 20px;
  }

  body.m-mobile #selection-info {
    bottom: 20px;
    padding: 15px 30px;
  }

  body.m-mobile .selection-text {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  body.m-mobile #result-section:not(.hidden) {
    padding: 16px 20px 32px;
  }

  body.m-mobile .result-header__title {
    font-size: 28px;
  }

  body.m-mobile #result-desc.m-result__reading .m-result__title {
    font-size: 24px;
    letter-spacing: 1px;
  }

  body.m-mobile #result-desc.m-result__reading .natal-cards {
    gap: 16px;
  }

  body.m-mobile #result-desc.m-result__reading .natal-card {
    padding: 10px;
    max-width: 100%;
  }

  body.m-mobile #result-desc.m-result__reading .card-image-wrapper {
    max-width: min(50vw, 130px);
    margin-bottom: 16px;
  }

  body.m-mobile #result-desc.m-result__reading .card-title {
    font-size: 15px;
  }

  body.m-mobile #result-desc.m-result__reading .card-question {
    font-size: 13px;
  }

  body.m-mobile #result-desc.m-result__reading .cta-button,
  body.m-mobile #result-desc.m-result__reading .payment-btn {
    font-size: 18px;
    padding: 16px 35px;
    width: 100%;
    justify-content: center;
  }

  body.m-mobile #result-desc.m-result__reading .m-result__paid {
    padding: 20px 15px;
  }

  body.m-mobile #result-desc.m-result__reading .reading-section h3,
  body.m-mobile #result-desc.m-result__reading .reading-section__title {
    font-size: 18px;
  }

  body.m-mobile #result-desc.m-result__reading .reading-section__content {
    font-size: 14px;
  }
}

/* ===== 브릿지 무료 본문: 마크다운 제목 사이 장미 ===== */
body.m-mobile #result-desc.m-result__reading .free-content h2:not(:first-of-type)::before {
  content: '';
  display: block;
  height: 1px;
  margin: 16px auto;
  padding: 0;
  background: none;
  opacity: 0.85;
  pointer-events: none;
}

/* 유료 훅: 무료 결과에서만 표시 — 인라인 결제 블록은 숨김 */
body.m-mobile #paid-hook-section {
  display: none;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  margin: 2.5rem auto 0;
  padding: 0 16px 1rem;
  text-align: center;
  box-sizing: border-box;
  font-family: 'Gowun Batang', 'Nanum Myeongjo', 'Noto Serif KR', serif;
}

body.m-mobile #result-section:not(.hidden) #result-desc:has(.m-result__free) ~ #paid-hook-section,
body.m-mobile
  #result-section:not(.hidden)
  #result-desc:has(.free-content:not(.result-reading-paid-full))
  ~ #paid-hook-section {
  display: flex;
}

body.m-mobile #result-desc:has(.m-result__free) .m-result__cta {
  display: none !important;
}

body.m-mobile #result-desc:has(.free-content:not(.result-reading-paid-full)) .payment-section {
  display: none !important;
}

body.m-mobile #paid-hook-section img.gem-divider {
  display: block;
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  margin: 16px auto !important;
  object-fit: contain;
}

body.m-mobile #paid-hook-section .hook-guide-text {
  margin-bottom: 1.5rem;
  padding-top: clamp(2.5rem, 10vw, 5.5rem);
  word-break: keep-all;
  overflow-wrap: break-word;
}

body.m-mobile #paid-hook-section .hook-line {
  margin: 0 0 16px;
  font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  line-height: 1.36;
  letter-spacing: 0.06em;
  color: #faf6ef;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 제목은 입력 상자 밖(인적사항과 분리된 블록) */
body.m-mobile #paid-hook-section .hook-story-title {
  margin: 0 0 0.9rem;
  padding: 0;
  font-family: 'Gowun Batang', 'Nanum Myeongjo', 'Noto Serif KR', serif;
  font-size: clamp(1.05rem, 3.5vw, 1.22rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.45;
  color: #f4e8c8;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

body.m-mobile #paid-hook-section .hook-story-title--above-input {
  width: 100%;
  max-width: 100%;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

/* 상담 본문: 버튼과 동일 너비·긴 LLM용 텍스트 영역 */
body.m-mobile #paid-hook-section .worry-input-wrap {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1.35rem;
  padding: 4px;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(232, 213, 168, 0.55) 0%,
    rgba(212, 175, 55, 0.35) 35%,
    rgba(160, 120, 55, 0.4) 65%,
    rgba(212, 175, 55, 0.45) 100%
  );
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(212, 175, 55, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.m-mobile #paid-hook-section .antique-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 4.25rem;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(180deg, #1c1810 0%, #0e0b08 55%, #12100e 100%);
  border: none;
  border-radius: 14px;
  color: #fff9f0;
  font-family: 'Noto Sans KR', 'Gowun Batang', 'Nanum Myeongjo', sans-serif;
  font-size: clamp(0.98rem, 3.2vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: left;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: break-word;
  box-shadow:
    inset 0 0 0 1px rgba(212, 175, 55, 0.25),
    inset 0 2px 24px rgba(212, 175, 55, 0.08);
  transition:
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

body.m-mobile #paid-hook-section .antique-input:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(232, 213, 168, 0.85),
    inset 0 2px 32px rgba(212, 175, 55, 0.14),
    0 0 0 3px rgba(212, 175, 55, 0.2);
}

body.m-mobile #paid-hook-section .antique-input::placeholder {
  color: rgba(245, 236, 216, 0.55);
  font-weight: 400;
}

body.m-mobile #paid-hook-section .antique-gold-btn {
  width: 100%;
  max-width: 100%;
  padding: 14px 18px;
  background: #14110e;
  border: 2px solid rgba(212, 175, 55, 0.65);
  border-radius: 10px;
  color: #f5ecd8;
  font-family: 'Noto Sans KR', 'Gowun Batang', 'Nanum Myeongjo', sans-serif;
  font-size: clamp(0.88rem, 2.85vw, 0.98rem);
  letter-spacing: 0.04em;
  line-height: 1.45;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.12);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  font-variant-numeric: tabular-nums;
}

body.m-mobile #paid-hook-section .antique-gold-btn:active,
body.m-mobile #paid-hook-section .antique-gold-btn:hover {
  border-color: rgba(232, 213, 168, 0.85);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.22);
}

/* V2 무료→유료 브릿지 (상담창 위) */
.v2-bridge-hook {
  text-align: center;
  padding: 40px 20px 24px;
  margin-top: 48px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}
.v2-bridge-divider {
  margin-bottom: 24px;
}
.v2-bridge-gem {
  width: 40px;
  height: 40px;
  animation:
    glowPulse 2.5s ease-in-out infinite,
    gemFloat 6s ease-in-out infinite;
}
.v2-bridge-title {
  color: #d4af37;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}
.v2-bridge-line {
  color: #ccc;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.v2-bridge-line strong {
  color: #d4af37;
}
.v2-bridge-highlight {
  color: #d4af37;
  font-size: 14px;
  letter-spacing: 1px;
  margin-top: 24px;
  margin-bottom: 8px;
  opacity: 0.85;
}

/* #v2-counseling-section — 상담 입력 (paid-hook, 파이프라인: #user-worry-input) */
#v2-counseling-section textarea#user-worry-input,
textarea#user-worry-input {
  display: block !important;
  box-sizing: border-box;
  width: 100%;
  min-height: 120px;
  max-height: 240px;
  font-size: 16px;
  padding: 16px 14px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 12px;
  background: rgba(15,10,10,0.85);
  color: #f5ecd8;
  resize: vertical;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-appearance: none;
  font-family: 'Gowun Batang', 'Noto Serif KR', serif;
}

#v2-counseling-section {
  width: 100% !important;
  max-width: 100% !important;
  padding: 24px 16px !important;
  box-sizing: border-box !important;
}

#v2-counseling-section .form-label,
#v2-counseling-section label {
  display: block;
  text-align: center;
  color: #d4af37;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Noto Serif KR', 'Batang', serif;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

#v2-counseling-section textarea:focus,
#v2-counseling-section .v2-counseling-textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

#v2-counseling-section textarea::placeholder {
  color: rgba(212, 175, 55, 0.4);
  font-family: 'Noto Serif KR', 'Batang', serif;
  font-size: 14px;
  text-align: center;
}

#v2-counseling-section .v2-counseling-counter {
  text-align: right;
  color: rgba(212, 175, 55, 0.5);
  font-size: 12px;
  margin-top: 8px;
  font-family: 'Noto Serif KR', 'Batang', serif;
}

.v2-pay-button {
  display: block;
  width: 100%;
  max-width: min(340px, calc(100vw - 48px));
  margin: 0.75rem auto 0;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a0a2e;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  border: none;
  border-radius: 30px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.35);
  cursor: pointer;
  font-family: 'Noto Sans KR', 'Gowun Batang', 'Nanum Myeongjo', sans-serif;
  transition:
    box-shadow 0.2s ease,
    transform 0.15s ease;
}
.v2-pay-button:hover:not(:disabled) {
  box-shadow: 0 0 28px rgba(255, 215, 0, 0.55);
}
.v2-pay-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

/* 결제 유도 영혼의 보석 (m/index.html 에서 제거됨 — 레거시 스타일 유지) */
.gemstone-cta {
  text-align: center;
  margin: 0.5rem auto 1.5rem;
  padding: 0 1rem;
  max-width: 360px;
}
.gemstone-cta-desc {
  color: #e8d5a8;
  font-size: 1.05em;
  margin-bottom: 0.8rem;
}
.gemstone-cta-item {
  color: #f5ecd8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0.3rem 0;
}
.gemstone-cta-item strong {
  color: #FFD700;
}

#btn-paid-reading {
  display: block;
  width: 85%;
  max-width: 340px;
  margin: 2rem auto 1rem;
  padding: 16px 24px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a0a2e;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border: none;
  border-radius: 30px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  cursor: pointer;
  animation: btnGlow 2s ease-in-out infinite alternate;
}
@keyframes btnGlow {
  from { box-shadow: 0 0 15px rgba(255, 215, 0, 0.3); }
  to { box-shadow: 0 0 30px rgba(255, 215, 0, 0.7); }
}
/* 모바일 CTA 가운데 정렬 강제 */
body.m-mobile #paid-hook-section .gemstone-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: min(340px, 100%);
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
  text-align: center;
}
body.m-mobile #paid-hook-section .gemstone-cta-item {
  text-align: center;
}
/* style.css .payment-button min-width:280px 때문에 좁은 화면에서 오른쪽으로 삐져나감 → 해제 */
body.m-mobile #paid-hook-section #btn-paid-reading {
  min-width: 0;
  width: 100%;
  max-width: min(320px, calc(100vw - 48px));
  margin: 1.5rem auto 1rem;
  box-sizing: border-box;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ── 결과 화면: 보석 썸네일·브릿지 제목·간격 (마녀의 리뷰) ── */
body.m-mobile #result-desc.m-result__reading img[src*='/images/jems/']:not(.inline-gem) {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  box-sizing: border-box;
  object-fit: contain;
}

body.m-mobile #result-desc.m-result__reading h2.section-title img,
body.m-mobile #result-desc.m-result__reading h3.section-title img {
  display: none !important;
}

body.m-mobile #result-desc.m-result__reading .free-content h2.section-title,
body.m-mobile #result-desc.m-result__reading .free-content h3.section-title,
body.m-mobile #result-desc.m-result__reading .result-reading-paid-full h2.section-title,
body.m-mobile #result-desc.m-result__reading .result-reading-paid-full h3.section-title {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px !important;
  margin-bottom: 16px !important;
  padding: 16px 0 !important;
}

body.m-mobile #result-desc.m-result__reading .reading-star-body p + p {
  margin-top: 16px;
}

body.m-mobile #result-desc.m-result__reading .free-content > p,
body.m-mobile #result-desc.m-result__reading .result-reading-paid-full > p {
  margin-bottom: 16px !important;
}

/* ── 인라인 보석·카드 워터마크·문단 구분 (우선 적용) ── */

/* 1. 문단 첫 글자 옆 인라인 보석 아이콘 */
body.m-mobile #result-desc.m-result__reading .inline-gem {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 6px;
  display: inline-block;
  opacity: 0.85;
  filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.4));
  flex-shrink: 0;
}

body.m-mobile #result-desc.m-result__reading .reading-section p:first-of-type .inline-gem,
body.m-mobile #result-desc.m-result__reading .free-content p:first-of-type .inline-gem {
  width: 24px;
  height: 24px;
}

/* 2. 카드 배경 보석 워터마크 */
body.m-mobile #result-desc.m-result__reading .natal-card {
  position: relative;
  overflow: hidden;
}

body.m-mobile #result-desc.m-result__reading .natal-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background-image: var(--gem-watermark);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

body.m-mobile #result-desc.m-result__reading .natal-card > * {
  position: relative;
  z-index: 1;
}

body.m-mobile #result-desc.m-result__reading .natal-card--sun::after {
  opacity: 0.1;
  filter: sepia(0.3) saturate(1.5) hue-rotate(10deg);
}

body.m-mobile #result-desc.m-result__reading .natal-card--moon::after {
  opacity: 0.08;
  filter: sepia(0.2) saturate(1.2) hue-rotate(180deg);
}

body.m-mobile #result-desc.m-result__reading .natal-card--saturn::after {
  opacity: 0.08;
  filter: sepia(0.2) saturate(1) hue-rotate(240deg);
}

/* 3. 문단 사이 보석 구분 장식 */
body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px auto;
  padding: 0;
  max-width: 200px;
}

body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider img {
  width: 16px;
  height: 16px;
  opacity: 0.5;
  filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.3));
}

body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider img:nth-child(2) {
  width: 22px;
  height: 22px;
  opacity: 0.7;
}

body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider::before,
body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to var(--line-dir, right),
    transparent,
    rgba(255, 215, 0, 0.25),
    transparent
  );
}

body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider::before {
  --line-dir: right;
}

body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider::after {
  --line-dir: left;
}

/* 4. 유료 훅 섹션 */
body.m-mobile #paid-hook-section .gem-paragraph-divider {
  margin: 20px auto;
}

body.m-mobile #paid-hook-section .gem-paragraph-divider img {
  opacity: 0.4;
}

/* 5. 반응형 미세 조정 */
@media (max-width: 380px) {
  body.m-mobile #result-desc.m-result__reading .inline-gem {
    width: 18px;
    height: 18px;
  }

  body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider {
    max-width: 160px;
    margin: 20px auto;
  }

  body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider img {
    width: 14px;
    height: 14px;
  }

  body.m-mobile #result-desc.m-result__reading .gem-paragraph-divider img:nth-child(2) {
    width: 18px;
    height: 18px;
  }

  body.m-mobile #result-desc.m-result__reading .natal-card::after {
    width: 90px;
    height: 90px;
  }
}

/* V2 주관식 상담 — 결제 버튼만 모바일 폭 보정 (#v2-counseling-section 스타일은 상단 공통 블록) */
body.m-mobile #paid-hook-section #v2-pay-btn.v2-pay-button {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0.5rem;
}
body.m-mobile #paid-hook-section #v2-pay-btn.v2-pay-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
body.m-mobile #result-desc .v2-counseling-question {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
}
body.m-mobile #result-desc .v2-counseling-question .question-label {
  font-size: 0.85rem;
  color: #d4af37;
  margin: 0 0 0.5rem;
}
body.m-mobile #result-desc .v2-counseling-question .question-text {
  margin: 0;
  line-height: 1.55;
  color: #f5ecd8;
  white-space: pre-wrap;
  word-break: keep-all;
}

/* 결과 섹션 제목 가운데 정렬 */
body.m-mobile #result-desc .reading-section h2,
body.m-mobile #result-desc .reading-section h3,
body.m-mobile #result-desc h2.section-title,
body.m-mobile #result-desc h3.section-title,
body.m-mobile #result-desc .m-result__reading h2,
body.m-mobile #result-desc .m-result__reading h3 {
  text-align: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}
body.m-mobile #result-desc h2 img,
body.m-mobile #result-desc h3 img {
  display: none !important;
}

/*
 * 충돌 원인(참고):
 * - css/style.css: #result-desc .free-content { text-align: left } — 본문은 좌측, 제목만 중앙이어야 함.
 * - css/style.css: #result-desc h2.section-title { text-align: center; display: block }
 * - m/css/result.css: body.m-mobile #result-desc.m-result__reading .free-content h2.section-title
 *   { display: flex; justify-content: center; padding: 16px 0 } — flex 자식·gap으로 제목이 시각적으로 밀릴 수 있음.
 * 아래 #result-section … 규칙은 ID 2개로 위보다 우선 적용.
 */
#result-section #result-desc h2,
#result-section #result-desc h3,
#result-section #result-desc .m-result__reading h2,
#result-section #result-desc .m-result__reading h3,
body.m-mobile #result-section #result-desc h2,
body.m-mobile #result-section #result-desc h3 {
  text-align: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
  width: 100% !important;
}
#result-section #result-desc h2 > *,
#result-section #result-desc h3 > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ===== 모바일: 결과 영역 너비 제한 해제 ===== */
body.m-mobile #result-section {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box !important;
}
body.m-mobile #paid-hook-section {
  max-width: 100% !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}
body.m-mobile .result-card {
  max-width: 100% !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box !important;
}
