/* 풍수마스터 커스텀 스타일 */

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  scroll-behavior: smooth;
}

/* 한국어 줄바꿈 */
.font-serif, h1, h2, h3, h4 {
  word-break: keep-all;
}

/* 부드러운 전환 효과 */
button, a {
  transition: all 0.2s ease;
}

/* 진단 결과 카드 애니메이션 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#diagnosis-result, #ai-result, #fortune-result {
  animation: fadeInUp 0.5s ease-out;
}

/* 폼 입력 필드 포커스 스타일 */
input:focus, select:focus, textarea:focus {
  border-color: #8B0000;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #FAF7F0;
}
::-webkit-scrollbar-thumb {
  background: #8B0000;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6B0000;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
  h1 {
    line-height: 1.3;
  }
}

/* ===== 풍수 감정평가서 인쇄 스타일 ===== */
.report-body {
  font-family: 'Noto Serif KR', serif;
  color: #1a1a1a;
}

.report-section {
  margin-bottom: 1.8rem;
  page-break-inside: avoid;
}

.report-title {
  font-family: 'Noto Serif KR', serif;
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  border-top: 3px double #8B0000;
  border-bottom: 3px double #8B0000;
  padding: 1.2rem 0;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3em;
}

.report-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 2rem;
}

.report-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.report-info-table th,
.report-info-table td {
  border: 1px solid #999;
  padding: 8px 12px;
  text-align: left;
}

.report-info-table th {
  background: #FAF7F0;
  font-weight: 700;
  width: 25%;
  color: #8B0000;
}

.report-grade-box {
  text-align: center;
  border: 2px solid #8B0000;
  padding: 1.2rem;
  margin: 1.5rem 0;
  background: #FAF7F0;
}

.report-grade-box .grade-letter {
  font-size: 3rem;
  font-weight: 900;
  color: #8B0000;
  font-family: 'Noto Serif KR', serif;
}

.report-grade-box .grade-label {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 0.5rem;
  letter-spacing: 0.2em;
}

.report-grade-box .grade-score {
  font-size: 1.1rem;
  color: #555;
  margin-top: 0.4rem;
}

.report-category-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.report-category-table th,
.report-category-table td {
  border: 1px solid #999;
  padding: 6px 10px;
}

.report-category-table th {
  background: #1a1a1a;
  color: white;
  text-align: center;
}

.report-category-table td.score-cell {
  text-align: center;
  font-weight: 700;
}

.report-category-table .total-row {
  background: #FAF7F0;
  font-weight: 700;
}

.report-section-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.15rem;
  font-weight: 700;
  border-left: 5px solid #8B0000;
  padding-left: 10px;
  margin-bottom: 0.8rem;
  margin-top: 1.5rem;
}

.report-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.report-detail-table th,
.report-detail-table td {
  border: 1px solid #999;
  padding: 5px 8px;
}

.report-detail-table th {
  background: #FAF7F0;
  text-align: center;
}

.report-conclusion {
  background: #FAF7F0;
  border: 1px solid #D4AF37;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  line-height: 1.8;
  font-size: 0.95rem;
}

.report-signature {
  margin-top: 3rem;
  text-align: right;
  font-size: 0.95rem;
  line-height: 2;
}

.report-signature .date {
  font-weight: 700;
}

.report-signature .seal {
  display: inline-block;
  width: 60px;
  height: 60px;
  border: 2px solid #8B0000;
  border-radius: 50%;
  margin-left: 10px;
  color: #8B0000;
  text-align: center;
  line-height: 56px;
  font-family: 'Noto Serif KR', serif;
  font-weight: 900;
  font-size: 0.8rem;
  vertical-align: middle;
}

.report-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ccc;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.7;
}

/* ===== 인쇄 전용 스타일 (PDF 저장 시 적용) ===== */
@media print {
  @page {
    size: A4;
    margin: 15mm 12mm;
  }

  /* 인쇄 시 숨길 요소 */
  .no-print,
  header,
  footer,
  nav,
  button {
    display: none !important;
  }

  /* 모든 배경색 인쇄 강제 */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body {
    background: white !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  .report-body {
    max-width: 100%;
    padding: 0 !important;
    margin: 0 !important;
  }

  .report-section {
    page-break-inside: avoid;
  }

  .report-title {
    font-size: 22pt;
    margin-bottom: 1rem;
  }

  .report-section-title {
    font-size: 13pt;
    page-break-after: avoid;
  }

  .report-grade-box {
    page-break-inside: avoid;
  }

  table {
    page-break-inside: auto;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  thead {
    display: table-header-group;
  }

  /* 페이지 강제 분할 */
  .page-break {
    page-break-before: always;
  }
}
