@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,800;1,600&display=swap');

:root {
  /* HSL Color System */
  --hue-primary: 145; /* Sage Green */
  --hue-secondary: 12; /* Deep Coral */
  
  --primary: hsl(var(--hue-primary), 25%, 32%);
  --primary-light: hsl(var(--hue-primary), 30%, 96%);
  --primary-dark: hsl(var(--hue-primary), 30%, 18%);
  
  --secondary: hsl(var(--hue-secondary), 76%, 61%);
  --secondary-light: hsl(var(--hue-secondary), 80%, 96%);
  --secondary-dark: hsl(var(--hue-secondary), 80%, 45%);
  
  --bg: hsl(30, 35%, 97%); /* Warm Oatmeal Light Sand */
  --text: hsl(200, 20%, 12%); /* Deep Charcoal (slightly darkened for higher contrast) */
  --text-muted: hsl(200, 10%, 36%); /* Darkened for better contrast and legibility */
  
  --white: #ffffff;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  
  /* Glassmorphism & Shadow */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(61, 103, 82, 0.08);
  --shadow-lg: 0 20px 50px rgba(61, 103, 82, 0.12);
  
  /* Typography & Readability (4050 Middle-aged Optimized) */
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-size-base: 18px; /* Bumped base size slightly for extra high legibility */
  --line-height-base: 1.8; /* Opened up line height slightly for comfortable reading */
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius: 16px;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  background-color: var(--bg);
  color: var(--text);
  word-break: keep-all;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography elements */
h1, h2, h3, h4 {
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

h2.underlined::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60%;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), transparent);
  border-radius: 2px;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
  font-weight: 400;
}

/* Premium body bold highlights for high visibility */
p strong, li strong, td strong, .step-description strong, .timeline-card strong {
  font-weight: 800;
  color: var(--primary-dark);
  background: linear-gradient(180deg, transparent 45%, hsla(var(--hue-secondary), 85%, 65%, 0.32) 45%);
  padding: 2px 6px;
  margin: 0 -2px;
  border-radius: 6px;
  display: inline;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary);
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation Bar (Glassmorphic Top-Bar) */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 248, 245, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(61, 103, 82, 0.1);
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background-color: var(--secondary);
  border-radius: 50%;
  display: inline-block;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 700;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, #FAF8F5 100%);
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* Interactive Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: hsl(var(--hue-primary), 25%, 26%);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(61, 103, 82, 0.2);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: hsl(var(--hue-secondary), 76%, 53%);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(232, 98, 67, 0.2);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.btn:disabled {
  background-color: var(--text-muted);
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Premium Card Components */
.card {
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius);
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Diagnostic Step Form */
.step-container {
  max-width: 680px;
  margin: 0 auto;
}

.progress-bar-wrapper {
  background: rgba(0, 0, 0, 0.05);
  height: 8px;
  border-radius: 4px;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.4s ease-out;
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.step-number {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary);
}

.step-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.option-card {
  background: var(--white);
  border: 2px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
  font-size: 1.1rem;
  transition: var(--transition);
}

.option-card:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.option-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
  box-shadow: 0 4px 10px rgba(61, 103, 82, 0.1);
}

.option-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  position: relative;
  flex-shrink: 0;
  transition: var(--transition);
}

.option-card.selected .option-circle {
  border-color: var(--primary);
  background-color: var(--primary);
}

.option-card.selected .option-circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: var(--white);
  border-radius: 50%;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* Diagnostic Results Page */
.results-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.results-score-box {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto 2rem;
  box-shadow: var(--shadow-lg);
}

.score-num {
  font-size: 4rem;
  font-weight: 800;
  font-family: var(--font-serif);
  line-height: 1;
  color: var(--secondary-light);
}

.score-label {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

.score-judgment {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 1rem;
  text-align: center;
}

/* Multi-dimensional Report Charts */
.report-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 3rem 0;
}

@media(min-width: 768px) {
  .report-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.chart-card {
  padding: 2rem;
}

.chart-bar-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bar-info {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.95rem;
}

.bar-track {
  background-color: rgba(0, 0, 0, 0.05);
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 1s ease-out;
}

.bar-fill.vaso { background: linear-gradient(90deg, #ff7e5f, var(--secondary)); }
.bar-fill.psycho { background: linear-gradient(90deg, #4facfe, #00f2fe); }
.bar-fill.body { background: linear-gradient(90deg, #43e97b, #38f9d7); }
.bar-fill.uro { background: linear-gradient(90deg, #f093fb, #f5576c); }

/* OTC Guide Ingredient Tables */
.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin: 2rem 0;
  background-color: var(--white);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 750px;
}

.comparison-table th,
.comparison-table td {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 1rem;
}

.comparison-table th {
  background-color: var(--primary);
  color: var(--white);
  font-weight: 700;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:nth-child(even) {
  background-color: rgba(61, 103, 82, 0.02);
}

/* Warnings and Alerts */
.alert {
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  font-size: 1rem;
}

.alert-danger {
  background-color: var(--secondary-light);
  border: 1px solid rgba(232, 98, 67, 0.2);
  color: var(--secondary-dark);
}

.alert-warning {
  background-color: #fff9e6;
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #856404;
}

.alert-info {
  background-color: #e6f3ff;
  border: 1px solid rgba(0, 123, 255, 0.2);
  color: #004085;
}

.alert-icon {
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1;
}

/* Interactive Drug Interaction UI */
.filter-card {
  background-color: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

.drug-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.drug-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
}

.drug-checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* Alert Layout for drug interactions */
#interaction-alert-box {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

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

/* ==========================================
   🔬 갱년기 영양제 안심 궁합 분석기 UI 전용 스타일
   ========================================== */
.harmony-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.harmony-card-btn {
  background: var(--white);
  border: 2px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
  transition: var(--transition);
  outline: none;
  font-family: var(--font-sans);
}

.harmony-card-btn:hover {
  border-color: rgba(61, 103, 82, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.harmony-card-btn.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(61, 103, 82, 0.08);
}

.harmony-icon {
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.harmony-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.harmony-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.harmony-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.harmony-status-badge {
  color: var(--white);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.harmony-status-badge.badge-safe {
  background-color: var(--success) !important;
}

.harmony-status-badge.badge-caution {
  background-color: var(--warning) !important;
  color: var(--primary-dark) !important; /* 가독성을 위한 조율 */
}

.harmony-status-badge.badge-danger {
  background-color: var(--danger) !important;
}

/* ==========================================
   🌙 웰니스 숙면 테라피 가이드 UI 전용 스타일
   ========================================== */
.wellness-radio-card {
  transition: var(--transition) !important;
}

.wellness-radio-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3), 0 0 15px rgba(232, 98, 67, 0.1) !important;
}

.youtube-therapy-btn {
  outline: none;
  font-family: var(--font-sans);
}

.youtube-therapy-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.youtube-therapy-btn:active {
  transform: scale(0.98);
}

.adsense-slot {
  background-color: transparent;
  border: none;
  text-align: center;
  margin: 1.5rem auto;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90px;
}

/* Coupang Partners Dynamic Widget styling */
.coupang-widget-fixed {
  background: var(--white);
  border-top: 2px solid var(--secondary);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
  padding: 1.25rem 0;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  animation: slideUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.coupang-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media(min-width: 768px) {
  .coupang-container {
    flex-direction: row;
    gap: 2rem;
  }
}

.coupang-title-area {
  display: flex;
  flex-direction: column;
}

.coupang-badge {
  background-color: var(--secondary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  width: fit-content;
  margin-bottom: 0.3rem;
}

.coupang-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.coupang-products {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  width: 100%;
  max-width: 680px;
  padding: 0.2rem;
  scrollbar-width: thin;
}

.coupang-card {
  display: flex;
  background-color: var(--white);
  border: 1px solid rgba(61, 103, 82, 0.1);
  border-radius: 12px;
  width: 280px;
  min-width: 280px;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.coupang-card:hover {
  transform: translateY(-3px);
  border-color: var(--secondary);
  box-shadow: 0 8px 20px rgba(232, 98, 67, 0.1);
}

.coupang-card-img {
  width: 70px;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  border-right: 1px solid rgba(61, 103, 82, 0.05);
}

.coupang-card-body {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  overflow: hidden;
}

.coupang-card-badge {
  font-size: 0.7rem;
  background-color: var(--secondary-light);
  color: var(--secondary-dark);
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.coupang-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coupang-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coupang-card-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--secondary-dark);
}

.coupang-card-btn {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 3px 8px;
  border-radius: 20px;
  transition: var(--transition);
}

.coupang-card:hover .coupang-card-btn {
  background-color: var(--secondary);
  color: var(--white);
  color: var(--secondary-dark);
}

.coupang-disclosure {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  margin-top: 0.5rem;
}

/* Timeline Layout */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-light);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3.5rem;
  width: 100%;
}

.timeline-item::after {
  content: '';
  display: table;
  clear: both;
}

.timeline-badge {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  border: 4px solid var(--white);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item:nth-child(even) .timeline-badge {
  background-color: var(--secondary);
}

.timeline-panel {
  width: 45%;
  float: left;
  position: relative;
}

.timeline-item:nth-child(even) .timeline-panel {
  float: right;
}

@media(max-width: 767px) {
  .timeline::before {
    left: 20px;
  }
  .timeline-badge {
    left: 20px;
    transform: none;
  }
  .timeline-panel {
    width: calc(100% - 50px);
    float: right !important;
  }
}

.timeline-card {
  padding: 1.75rem;
  border-radius: 12px;
}

.timeline-tag {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 0.8rem;
}

.timeline-item:nth-child(even) .timeline-tag {
  background-color: var(--secondary-light);
  color: var(--secondary-dark);
}

/* Diary Tracker and History Dashboard */
.diary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media(min-width: 992px) {
  .diary-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.chart-wrapper {
  background-color: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 1rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  transition: var(--transition);
}

.history-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.history-date {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.history-score {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.history-delete-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
}

/* FAQ Accordion */
.faq-container {
  margin: 3rem auto;
  max-width: 800px;
}

.faq-item {
  background-color: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0, 1, 0, 1);
  color: var(--text-muted);
}

.faq-item.active .faq-answer {
  padding: 0 1.5rem 1.5rem;
  max-height: 1000px;
}

.faq-icon::before {
  content: '▼';
  font-size: 0.8rem;
  transition: var(--transition);
  display: inline-block;
}

.faq-item.active .faq-icon::before {
  transform: rotate(180deg);
}

/* Footer styling */
.footer {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 7rem; /* Extra padding bottom for coupang float */
  margin-top: 5rem;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-text {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-title {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--white);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

/* Mobile First responsive adjustments */
@media(max-width: 480px) {
  body {
    font-size: 16px;
  }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .btn {
    width: 100%;
    padding: 0.9rem;
  }
  .step-actions {
    flex-direction: column-reverse;
  }
  .navbar {
    padding: 0.75rem 0;
  }
  .nav-menu {
    gap: 1rem;
  }
  .nav-link {
    font-size: 0.95rem;
  }
}

/* ==========================================
   [아이랑 기술 이식] 영양제 복용 일지 UI 전용 스타일
   ========================================== */
.streak-circle.taken {
  background-color: var(--secondary) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 10px rgba(232, 98, 67, 0.25);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.streak-circle.today {
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--secondary);
}

.med-item-row {
  box-shadow: var(--shadow-sm);
}

.med-item-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  border-color: rgba(61, 103, 82, 0.25) !important;
}

.med-item-row.active {
  box-shadow: 0 4px 12px rgba(61, 103, 82, 0.08);
}

.med-item-row.active .med-check-circle {
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.med-del-btn {
  transition: var(--transition);
}

.med-del-btn:hover {
  opacity: 1 !important;
  transform: scale(1.1);
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================
   [아이랑 기술 이식] 주치의 상담용 리포트 인쇄(@media print) 전용 스타일
   ========================================== */
@media print {
  /* 1. 배경 백색 강제 변환 및 전체 폰트 색 검은색 통일 */
  body {
    background-color: var(--white) !important;
    color: #000000 !important;
    font-size: 15px !important;
  }

  /* 2. 인쇄 시 불필요한 레이아웃 노이즈 완전 제거 */
  header, 
  footer, 
  .adsense-slot, 
  #coupang-float-widget, 
  #print-report-btn, 
  .add-med-form, 
  .med-del-btn,
  .history-delete-btn,
  .chart-desc {
    display: none !important;
  }

  /* 3. 2열 대시보드 그리드를 인쇄에 맞게 깔끔한 1열 구조로 리포트화 */
  .diary-grid {
    display: block !important;
  }

  article, aside {
    width: 100% !important;
    margin-bottom: 2rem !important;
    page-break-inside: avoid; /* 페이지 나뉠 때 중간에 잘림 방지 */
  }

  /* 4. 카드 구성품의 입체 쉐도우를 단색 플랫 테두리로 변경 (메디컬 보고서용) */
  .card {
    background: var(--white) !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    transform: none !important;
    page-break-inside: avoid;
    padding: 1.5rem !important;
  }

  .chart-wrapper {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }

  /* 5. 인쇄 시에만 나타나는 소견 메모 보드 드러내기 */
  .print-only-medical-board {
    display: block !important;
  }

  /* 6. 페이지 넘침 시 차트와 목록이 한눈에 들어오도록 스티커 처리 */
  .week-streak-container {
    background: #f7f9f8 !important;
    border: 1px solid #ddd !important;
  }

  .streak-circle {
    background-color: #eee !important;
    color: #666 !important;
    border: 1px solid #ccc !important;
  }

  .streak-circle.taken {
    background-color: var(--primary) !important; /* 인쇄 가독성을 위한 메인 컬러 적용 */
    color: var(--white) !important;
  }

  .med-item-row {
    border: 1px solid #eee !important;
    background-color: var(--white) !important;
  }

  .med-item-row.active {
    border: 1px solid #ccc !important;
    background-color: #f7f9f8 !important;
  }

  /* 7. 인쇄 여백 최소화 */
  @page {
    margin: 1.5cm;
  }
}
