/**
 * 모바일 전용 스타일 (PC 코드 수정 없음)
 * - 세로 레이아웃
 * - 큰 터치 버튼 (최소 44px)
 */

/* 수정구슬/로딩 비주얼 완전 제거 (모바일에서 반드시 적용) */
.m-mobile .crystal-wrap,
.m-mobile .crystal-ball,
.m-mobile .crystal-glow,
.m-mobile .crystal-inner,
.m-mobile .loading-visual-wrap,
.m-mobile .chart-waiting-msg .crystal-wrap,
.m-mobile .chart-waiting-msg .crystal-ball,
.m-mobile .chart-waiting-msg .crystal-glow,
.m-mobile .chart-waiting-msg .crystal-inner,
.m-mobile .loading-visual-wrap .crystal-ball {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  pointer-events: none !important;
}

/* 미결제 시 블러 영역 안에서만 보이게 (블러 밖으로 내용 노출 방지) */
.m-mobile #result-desc:not(.result-desc--unlocked) .blur-preview {
  overflow: hidden !important;
}
.m-mobile #result-desc:not(.result-desc--unlocked) .blur-content-light {
  background: rgba(15, 15, 20, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  filter: blur(6px) !important;
  -webkit-filter: blur(6px) !important;
  opacity: 0.92 !important;
}
/* 결제 후에는 전체 노출 */
.m-mobile #result-desc.result-desc--unlocked .blur-preview,
.m-mobile #result-desc.result-desc--unlocked .blur-content-light {
  overflow: visible !important;
  max-height: none !important;
}

.m-mobile main.main {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  padding: 0 1rem 2rem;
  box-sizing: border-box;
}

.m-mobile .search-section,
.m-mobile .chart-section,
.m-mobile .result-section {
  width: 100%;
  box-sizing: border-box;
}

.m-mobile .birthdate-input,
.m-mobile .btn-search {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.m-mobile .btn-search {
  min-height: 52px;
  padding: 14px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.m-mobile .result-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.m-mobile #result-desc {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* 브릿지 3장 카드: 메인 헤더(태양·달) 한 줄 — 중복 result-name은 비움 */
.m-mobile #result-card #result-name:empty {
  display: none;
  margin: 0;
  padding: 0;
  height: 0;
  min-height: 0;
}

.m-mobile #result-card .result-sign {
  font-size: clamp(0.82rem, 3.4vw, 1.15rem);
  line-height: 1.3;
  margin-bottom: 0.4rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  box-sizing: border-box;
}

.m-mobile .header .title-text {
  font-size: 1.1rem;
}

.m-mobile .series-promo,
.m-mobile .reviews-section {
  display: none;
}

.m-mobile .payment-button,
.m-mobile .btn-premium,
.m-mobile .paywall-btn-primary,
.m-mobile .btn-download-result,
.m-mobile .download-btn,
.m-mobile .btn-payment-retry {
  min-height: 48px; /* 44px 이상 */
  padding: 12px 20px;
  font-size: 1rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 모바일용 저장(핑크)·PC용 저장(노랑) 삭제, 다운로드 버튼만 노출 (PC와 동일) */
.m-mobile #result-desc .download-section,
.m-mobile #result-desc .download-buttons,
.m-mobile #result-desc .download-btn.mobile,
.m-mobile #result-desc .download-btn:not(.btn-save-destiny) {
  display: none !important;
}
.m-mobile #result-actions {
  display: flex !important;
  visibility: visible !important;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  margin-top: 1rem;
}
.m-mobile #result-actions.hidden {
  display: none !important;
  visibility: hidden !important;
}
.m-mobile .gem-footer-notice #result-actions {
  max-width: min(360px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.m-mobile #result-actions .btn-download-result {
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  background: var(--accent, #c94b78);
  color: #fff;
}

.m-mobile #result-actions .btn-download-result--image {
  background: transparent !important;
  padding: 0 !important;
  min-height: 0 !important;
  color: transparent;
  font-size: 0;
  line-height: 0;
}
.m-mobile #result-actions .btn-download-result--image img {
  width: 100%;
  max-width: min(300px, 100%);
  height: auto;
  margin: 0 auto;
  display: block;
}

/* 푸터 위 영혼의 세 가지 보석 이미지 버튼: 전역 button min-height 미적용 */
.m-mobile .gem-footer-notice .btn-gem-three-jewels {
  min-height: 0;
  width: 100%;
  max-width: min(360px, 100%);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.m-mobile button,
.m-mobile input[type="text"],
.m-mobile input[type="number"] {
  min-height: 44px;
}

.m-mobile .gender-option,
.m-mobile .btn-am-pm,
.m-mobile .btn-time-unknown {
  min-height: 44px;
  padding: 10px 16px;
  touch-action: manipulation;
}

.m-mobile select.birthdate-input {
  min-height: 48px;
  font-size: 1rem;
}

.m-mobile .time-input {
  min-height: 44px;
  font-size: 1rem;
}

/* 푸터: footer/footer.css */

/* ===== 모바일: 결과 텍스트 전체 노출 (짤림 방지) ===== */
body.m-mobile,
body.m-mobile .container,
body.m-mobile main,
body.m-mobile .main {
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}
.m-mobile .result-section,
.m-mobile .result-card,
.m-mobile #result-desc,
.m-mobile #result-desc .paywall-wrapper,
.m-mobile #result-desc .paywall-wrapper .paywall-blurred-inner,
.m-mobile #result-desc .blur-preview,
.m-mobile #result-desc .blur-content-light,
.m-mobile #result-desc .free-content,
.m-mobile #result-desc .paywall-content,
.m-mobile #result-desc .teaser-text-section,
.m-mobile #result-desc .payment-section,
.m-mobile #result-desc .download-section {
  max-height: none !important;
  overflow: visible !important;
  min-height: 0;
}
.m-mobile .result-card,
.m-mobile #result-desc {
  overflow: visible !important;
}

/* 한글 줄바꿈: 음절·단어 단위 우선 (컴포넌트별 규칙이 있으면 그쪽이 우선) */
body.m-mobile {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 모바일 결과 영역 짤림 방지 (결제 후 전체 리딩 노출) */
.m-mobile .result-section,
.m-mobile .result-section *,
.m-mobile #result-desc .paywall-blur,
.m-mobile #result-desc .paywall-gate {
  max-height: none !important;
  overflow: visible !important;
}

/* ===== PC 반응형 (768px 이상) ===== */
@media (min-width: 768px) {
  html {
    background: #0f0a0a;
    display: flex;
    justify-content: center;
  }
  body {
    width: 100%;
    max-width: 780px;
  }
}
