:root {
  --cream: #fff8f0;
  --peach: #ffd4b8;
  --mint: #b8e8d4;
  --coral: #ff8a7a;
  --sage: #7eb89a;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  background: linear-gradient(180deg, var(--cream) 0%, #fff 50%, #fef9f5 100%);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

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

.nav-tab.active {
  background: linear-gradient(135deg, #ff9a8b, #ff6b6b);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.ad-placeholder {
  background: repeating-linear-gradient(45deg, #f5f5f5, #f5f5f5 10px, #ebebeb 10px, #ebebeb 20px);
  border: 2px dashed #ccc;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.8rem;
  border-radius: 0.75rem;
}

.autocomplete-list { box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.ac-item:hover { background: #fff5f0; }

.preset-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 154, 139, 0.2);
}

.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { color: #e85d4c; }

.recent-item:hover { background: #fff5f0; }

input[type="range"] { accent-color: #ff6b6b; }

#nutrient-modal:not(.hidden) { display: flex; }

.meal-plan-tab.active {
  background: linear-gradient(135deg, #ff9a8b, #ff6b6b);
  color: #fff;
}

@media (max-width: 640px) {
  .ingredient-table-wrap { -webkit-overflow-scrolling: touch; }
  /* iOS가 16px 미만 입력 포커스 시 화면을 자동 확대하는 것 방지 */
  input, select, textarea { font-size: 16px !important; }
}

/* 모바일: 가로 스크롤 표 힌트 (sm 이상에서 숨김) */
.scroll-hint { display: none; }
@media (max-width: 640px) {
  .scroll-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    padding: 6px 12px 8px;
  }
}

@media print {
  body { background: #fff; }
  .ad-placeholder, .no-print, header, footer, aside,
  #mobile-menu-btn, #mobile-nav, #add-ingredient,
  #calc-btn, #cube-btn, .nav-tab, #nutrient-modal { display: none !important; }
  .tab-panel { display: none !important; }
  #panel-calculator { display: block !important; }
  #result-section { display: block !important; }
  .print-result-card, #iron-highlight {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  .bg-gradient-to-r, .bg-red-50, .bg-orange-50 { background: #fff !important; }
}