/* Google Fonts - Noto Sans KR */
:root {
  --bg-color: #fff;
  --text-color: #222;
  --card-bg: #f8fafc;
  --primary: #4a69bd;
  --btn-text: #fff;
  --border: #e0e6ed;
  --input-border: #ced4da;
  --secondary: #2451a6;
}

/* Site Brand Fixed */
.site-brand-fixed {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
}

.site-brand-fixed a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

/* 로고 이미지 스타일 */
.logo-image {
  height: 32px;
  width: auto;
  transition: opacity 0.3s ease;
}

.site-brand-fixed .logo-image {
  height: 28px;
}

.brand-logo .logo-image {
  height: 32px;
  width: auto;
}

.site-brand-fixed a:hover {
  color: var(--secondary);
}

/* 메인 페이지 전용 스타일 */
body.home-page {
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Noto Sans KR", sans-serif;
}

body.home-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* 마이페이지 스타일 */
body.mypage-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* 영양제 페이지 전용 스타일 */
body.supplement-page {
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Noto Sans KR", sans-serif;
}

body.supplement-page .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* 식단 플래너 페이지 전용 스타일 */
body.meal-plan-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 10px;
  box-sizing: border-box;
}

body.meal-plan-page .container {
  max-width: 800px;
  padding: 20 20px;
}

/* meal-plan 페이지에서만 main-nav 숨김 (데스크탑) */
body.meal-plan-page .main-nav {
  display: none;
}

/* 식재료 분석기 페이지 전용 스타일 */
body.ingredient-analyzer-page {
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Noto Sans KR", sans-serif;
  min-height: auto;
}

/* ingredient-analyzer-page 레이아웃 설정 */
body.ingredient-analyzer-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  box-sizing: border-box;
}

/* ingredient-analyzer-page에서 auth-links 위치 조정 */
body.ingredient-analyzer-page .auth-links {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 1000;
}

/* 레이아웃 상태 관리 - ingredient-analyzer-page에서 사용 */
body.ingredient-analyzer-page {
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding-top: 40px;
}

body.ingredient-analyzer-page.has-results {
  align-items: stretch;
  justify-content: flex-start;
  padding-top: 20px;
}

body.ingredient-analyzer-page.has-results .analyzer-header {
  margin-bottom: 20px;
  padding: 20px;
}

body.ingredient-analyzer-page.has-results .analyzer-header .page-title {
  font-size: 1.8rem;
}

body.ingredient-analyzer-page.has-results .analyzer-header .page-description {
  display: none;
}

.search-section {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 0px auto;
  transition: all 0.5s ease;
}

body.ingredient-analyzer-page.has-results .search-section {
  max-width: 800px;
  margin-bottom: 20px;
}

/* 음식 영양성분 검색 페이지 전용 스타일 */
body.ingredient-analyzer-page.has-search-results {
  align-items: stretch;
  justify-content: flex-start;
  padding-top: 20px;
}

body.ingredient-analyzer-page.has-search-results .analyzer-header {
  display: none;
}

body.ingredient-analyzer-page.has-search-results .search-section {
  max-width: 800px;
  margin: 20px auto 20px auto;
  transition: all 0.5s ease;
}

body.ingredient-analyzer-page.has-search-results
  .external-nutrition-search-section {
  margin-top: 0;
  padding-top: 0;
}

/* 검색 결과 스타일 */
.search-results-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px 30px;
  border-radius: 20px 20px 0 0;
  margin-bottom: 0;
}

.search-results-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: white;
}

.search-results-header .source-info,
.search-results-header .search-keyword {
  font-size: 1rem;
  margin: 5px 0;
  opacity: 0.9;
}

.search-results-list {
  background: white;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.search-result-item {
  padding: 25px 30px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item .result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.search-result-item .food-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  flex: 1;
}

.search-result-item .result-actions {
  flex-shrink: 0;
}

.search-result-item .btn-detail {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-result-item .btn-detail:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.search-result-item .result-basic-info {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.search-result-item .info-item {
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.search-result-item .manufacturer,
.search-result-item .weight {
  font-size: 0.9rem;
  color: #888;
  margin-top: 5px;
}

/* 레스토랑 추천 페이지 전용 스타일 */
body.restaurant-page {
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Noto Sans KR", sans-serif;
  min-height: auto;
  overflow-x: hidden; /* 가로 스크롤 방지 */
}

body.restaurant-page .recommendation-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  box-sizing: border-box;
}

/* 지도 컨테이너 스타일 */
.map-container {
  width: 100%;
  height: 350px;
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kakao-map {
  width: 100%;
  height: 100%;
}

/* 단계별 컨텐츠 스타일 */
.step-content {
  width: 100%;
  box-sizing: border-box;
}

.step-container {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

body {
  font-family: "Noto Sans KR", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* 상단 정렬로 변경 */
  min-height: 100vh;
  margin: 0;
  padding: 10px;
  box-sizing: border-box;
}

/* 페이지별 body 스타일이 있는 경우 기본 flex 레이아웃 비활성화 */
body.home-page,
body.supplement-page,
body.ingredient-analyzer-page,
body.nutrition-info-page,
body.restaurant-page {
  display: block;
  min-height: auto;
  padding: 0;
}

.container {
  background-color: transparent;
  padding: 10px 30px 15px 30px;
  /* 위쪽 패딩 10px로 줄임 */
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
  margin-top: 0px;
  /* 위쪽 마진 0으로 줄임 */
  margin-bottom: 4px;
}

.section {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
  /* 섹션 내용에 따라 조절 가능 */
  box-sizing: border-box;
  /* 패딩 포함 높이 계산 */
  height: 100%;
}

.section.active {
  display: block;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  color: #4a69bd;
  /* 브랜드 컬러 */
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
}

h2 {
  color: #4a69bd;
  border-bottom: 2px solid #e0e6ed;
  padding-bottom: 10px;
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: 500;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
  margin-top: 15px;
}

input[type="number"],
input[type="text"] {
  width: calc(100% - 20px);
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 1rem;
  transition: border-color 0.3s;
}

input[type="number"]:focus,
input[type="text"]:focus {
  border-color: #6a89cc;
  outline: none;
  box-shadow: 0 0 0 3px rgba(106, 137, 204, 0.2);
}

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.option {
  background: #eaf0fb;
  color: #2451a6;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(44, 62, 80, 0.06);
  user-select: none;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

.option.selected,
.option:active {
  background: #4a69bd !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(74, 105, 189, 0.3) !important;
  border: 2px solid #2451a6 !important;
}

/* 더 구체적인 선택자로 확실하게 적용 */
.option-group .option.selected {
  background: #4a69bd !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(74, 105, 189, 0.3) !important;
  border: 2px solid #2451a6 !important;
}

.option:focus {
  outline: 2px solid #4a69bd;
}

button {
  background-color: #4a69bd;
  /* CTA 버튼 색상 */
  color: white;
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 20px;
  width: 100%;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(74, 105, 189, 0.2);
}

button:hover:not(:disabled) {
  background-color: #3b5093;
  transform: translateY(-2px);
}

button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  box-shadow: none;
}

/* Accordion Styles */
.accordion {
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.06);
}

.accordion-header {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 1.08rem;
  cursor: pointer;
  border-bottom: 1px solid #e0e6ed;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-header::after {
  content: "▼";
  font-size: 0.9em;
  color: #4a69bd;
  margin-left: 8px;
  transition: transform 0.2s;
}

.accordion.open .accordion-header::after {
  transform: rotate(-180deg);
}

.accordion-content {
  display: none;
  padding: 18px 18px 10px 18px;
}

.accordion.open .accordion-content {
  display: block;
}

/* Meal Plan Result */
#meal_plan_content {
  background-color: #fcfdff;
  border: 1px solid #e0e6ed;
  border-radius: 10px;
  padding: 25px;
  line-height: 1.8;
  color: #333;
  word-break: keep-all;
  /* 단어가 잘리지 않도록 */
  /* 최소 높이 추가: 내용이 적을 때 빈 공간처럼 보이지 않게 */
  min-height: 200px;
  /* 필요에 따라 조절 */
  /* multi-step-loading이 컨테이너를 벗어나지 않도록 설정 */
  overflow: hidden;
}

/* meal_plan_content 내부의 multi-step-loading 최적화 */
#meal_plan_content {
  padding: 15px;
}

#meal_plan_content .multi-step-loading {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

#meal_plan_content .loading-step {
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#meal_plan_content .loading-step-texts {
  flex: 1;
  min-width: 0; /* flex 아이템이 축소될 수 있도록 */
  overflow: hidden;
}

#meal_plan_content .loading-title,
#meal_plan_content .loading-desc {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

#meal_plan_content h2 {
  color: #4a69bd;
  font-size: 1.6rem;
  margin-top: 30px;
  border-bottom: 1px solid #cdd4dc;
  padding-bottom: 10px;
}

#meal_plan_content h2:first-of-type {
  margin-top: 0;
}

#meal_plan_content strong {
  color: #3b5093;
}

#meal_plan_content ul {
  list-style-type: disc;
  padding-left: 25px;
  margin-bottom: 20px;
}

#meal_plan_content li {
  margin-bottom: 8px;
}

#meal_plan_content p {
  margin-bottom: 10px;
}

/* Home Section Specific Styles */
.main-title {
  font-size: 2rem;
  margin-bottom: 5px;
  color: #2c3e50;
  /* 짙은 남색 */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.subtitle {
  font-size: 1.1rem;
  color: #7f8c8d;
  /* 부드러운 회색 */
  text-align: center;
  margin-bottom: 20px;
}

/* 카테고리 탭 스타일 */
.purpose-category-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  background: transparent;
  padding: 8px;
  border-radius: 12px;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  margin: 10px 0;
  background: transparent;
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  color: #666;
  min-width: 120px;
  justify-content: center;
  box-shadow: none;
}

.category-tab:hover {
  background-color: transparent !important;
  background: #e3f2fd;
  color: #1976d2;
}

.category-tab.active {
  border-bottom: 4px solid #103290;
}

.tab-icon {
  font-size: 1.2em;
}

.tab-text {
  font-weight: 600;
}

/* 식단 목적 선택 영역 */
.meal-type-selection {
  position: relative;
  min-height: 280px;
  margin-bottom: 20px;
}

.purpose-group {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  animation: fadeIn 0.4s ease-in-out;
  align-items: start;
}

.purpose-group.active {
  display: grid;
}

/* 스크롤바 디자인 (선택 사항) */
.meal-type-selection::-webkit-scrollbar {
  height: 8px;
}

.meal-type-selection::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.meal-type-selection::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.meal-type-selection::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.meal-type-card {
  background-color: #f7f9fc;
  border: 2px solid #e0e6ed;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  position: relative;
}

.meal-type-card:hover {
  border-color: #6a89cc;
  box-shadow: 0 8px 20px rgba(106, 137, 204, 0.2);
}

.meal-type-card.selected,
.meal-type-card.selected:hover {
  background-color: #4a69bd;
  border-color: #2451a6;
  box-shadow: 0 8px 20px rgba(74, 105, 189, 0.5);
  transform: none;
  z-index: 10;
  position: relative;
}

.meal-type-card.selected h3 {
  color: white;

  font-weight: 600;
}

.meal-type-card.selected p {
  color: #e6f0ff;
}

.meal-type-card .icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.meal-type-card h3 {
  color: #4a69bd;
  font-size: 1.1rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.meal-type-card p {
  color: #666;
  font-size: 0.85rem;
  line-height: 1.4;
}

#home {
  padding-bottom: 20px;
}

.cta-button {
  position: static;
  width: 100%;
  max-width: none;
  z-index: auto;
  background-color: #4a69bd;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 6px 20px rgba(74, 105, 189, 0.4);
  margin-top: 10px;
  /* 간격 줄임 */
}

.cta-button:hover:not(:disabled) {
  background-color: #3b5093;
  transform: translateY(-2px);
}

.cta-button:disabled {
  background-color: #b0c4de;
  /* 변경: 비활성화된 파란색 */
  cursor: not-allowed;
  box-shadow: none;
}

/* 작은 버튼 스타일 (많은 옵션용) */
.meal-block-btn-small {
  min-width: 120px;
  padding: 0.8em 1.2em;
  background: #f4f7fb;
  border: 2px solid #e0e6f2;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 500;
  color: #34495e;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 1px 4px rgba(44, 62, 80, 0.06);
  margin-bottom: 0.5em;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.meal-block-btn-small:hover {
  background: #e3f2fd;
  color: #1976d2;
  border-color: #1976d2;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.15);
}

.meal-block-btn-small.selected {
  background: #2d7ff9;
  color: #fff;
  border-color: #2d7ff9;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.12);
}

.section-guide {
  font-size: 1rem;
  margin-bottom: 18px;
  padding: 10px 16px;
  border-radius: 8px;
  line-height: 1.6;
}

.section-guide.required {
  background: #eaf0fb;
  color: #2451a6;
  font-weight: 700;
}

.section-guide.optional {
  background: #f4f7fa;
  color: #4a69bd;
  border-left: 5px solid #b0c4de;
  font-weight: 500;
}

/* 진행 상태 표시줄 스타일 */
.progress-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
  background-color: #e0e6ed;
  /* 바의 레일 색상 */
  height: 8px;
  /* 바의 높이 */
  border-radius: 4px;
}

.progress-container .progress-bar {
  position: absolute;
  /* .progress-container 내부에서 위치 지정 */
  top: 0;
  left: 0;
  height: 100%;
  /* 부모 .progress-container의 높이와 동일하게 */
  width: 0;
  /* 초기 너비는 0 */
  background-color: #4a69bd;
  /* 채워지는 바의 색상 */
  border-radius: 4px;
  transition: width 0.3s ease;
  /* 너비 변화에 애니메이션 효과 */
  z-index: 0;
  /* 스텝 원 아래에 위치 */
}

.progress-step {
  width: 30px;
  height: 30px;
  background-color: #e0e6ed;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  /* 스텝 원이 바 위에 오도록 */
  cursor: pointer;
  font-size: 0.8rem;
  color: #777;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
  /* 색상 변화 애니메이션 */
}

.progress-step::before {
  content: attr(data-step);
  position: absolute;
}

.progress-step::after {
  content: attr(data-text);
  /* data-text 속성으로 텍스트 가져오기 */
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #555;
  font-size: 0.9rem;
  /* 텍스트 크기 조정 */
}

.progress-step.active {
  background-color: #4a69bd;
  color: white;
}

.progress-step.active::after {
  font-weight: bold;
  color: #4a69bd;
  /* 활성화된 스텝 텍스트 색상 */
}

/* 에러 메세지 스타일 */
.error-message {
  display: none;
  color: #dc3545;
  font-size: 0.85rem;
  margin-bottom: 5px;
  font-weight: 500;
}

.error-message.active {
  display: block;
}

input.invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

/* 버튼 그룹 스타일 */
.button-group {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  gap: 15px;
}
.button-group button {
  flex: 1;
  padding: 12px 20px;
  font-size: 1rem;
  margin-top: 0;
  width: auto;

  /* cta-button 스타일 적용 */
  background-color: #4a69bd;
  /* 변경 */
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(74, 105, 189, 0.3);
  /* 변경 */
}

.button-group button:hover:not(:disabled) {
  background-color: #3b5093;
  /* 변경 */
  transform: translateY(-2px);
}

/* 식단 구성 페이지 버튼 스타일 */
#meal_form .back-button,
#meal_form .submit-button {
  background-color: #4a69bd;
  /* 변경 */
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(74, 105, 189, 0.3);
  /* 변경 */
  padding: 12px 20px;
  /* 프로필 버튼과 통일 */
  font-size: 1rem;
  /* 프로필 버튼과 통일 */
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#meal_form .back-button:hover:not(:disabled),
#meal_form .submit-button:hover:not(:disabled) {
  background-color: #3b5093;
  /* 변경 */
  transform: translateY(-2px);
}

#meal_form .back-button {
  width: auto;
  /* 이전 버튼만 너비 자동 조정 */
}

/* option-group 내 value-input 스타일 */
.option .value-input {
  display: none;
  margin-top: 10px;
  width: calc(100% - 20px);
  /* 부모 옵션 너비에 맞춰 조절 */
  padding: 8px;
  border: 1px solid #cdd4dc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: block;
  /* 블록 요소로 배치 */
  opacity: 0;
  /* 초기 투명하게 숨김 */
  height: 0;
  /* 초기 높이 0 */
  overflow: hidden;
  /* 숨길 때 내용 잘라냄 */
  padding-top: 0;
  padding-bottom: 0;
}

.option .value-input.active {
  opacity: 1;
  /* 활성화될 때 보이게 */
  height: auto;
  /* 활성화될 때 높이 자동 */
  padding-top: 8px;
  padding-bottom: 8px;
}

.option .value-input:focus {
  border-color: #4a69bd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.2);
}

/* 단위 텍스트 스타일 */
.option .unit {
  font-size: 0.85em;
  /* 단위 텍스트를 약간 작게 */
  color: #888;
  /* 흐린 색상으로 */
  margin-left: 5px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 1.15rem;
  color: #4a69bd;
  font-weight: 600;
  margin: 40px 0 30px 0;
}

/* 통합된 로딩 스피너 스타일 */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #4a69bd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
  display: block;
  box-sizing: border-box;
}

/* 크기별 modifier 클래스 */
.loading-spinner.small {
  width: 28px;
  height: 28px;
  margin: 0 auto;
}

.loading-spinner.medium {
  width: 32px;
  height: 32px;
  margin: 0;
}

.loading-spinner.large {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
}

/* 컨텍스트별 스타일 */
.loading-spinner.step-loading {
  width: 30px;
  height: 30px;
  border: 2px solid #e0e7ff;
  border-top: 2px solid #3b5fc5;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* 스피너가 정확히 중앙에 위치하도록 보장 */
  z-index: 1;
  /* 스피너가 부모 컨테이너를 벗어나지 않도록 보장 */
  box-sizing: border-box;
  /* 스피너가 부모 컨테이너 밖으로 나가지 않도록 보장 */
  max-width: 100%;
  max-height: 100%;
  /* 애니메이션을 별도로 적용하여 transform 충돌 방지 */
  animation: spin-step-loading 1s linear infinite;
}

.loading-spinner.inline {
  display: inline-block;
  margin-bottom: 16px;
}

.loading-spinner.light-bg {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4a69bd;
}

.loading-spinner.purple-accent {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes spin-step-loading {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.recipe-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #4a69bd;
  margin-bottom: 8px;
}

/* 식단 결과 강조 스타일 */
.status-section-title,
.meal-section-title {
  color: #2d7ff9;
  font-size: 2.3em;
  font-weight: bold;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.status-key {
  color: #e67e22;
  font-weight: bold;
  font-size: 1.1em;
  margin-right: 0.5em;
  position: relative;
}

.status-key::before {
  content: "";
}

.status-value {
  color: #34495e;
  font-weight: normal;
  font-size: 1em;
}

.buy-btn {
  background: #2d7ff9;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.3em 0.8em;
  font-size: 0.95em;
  text-decoration: none;
  transition: background 0.2s;
  margin-left: 0.5em;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(44, 62, 80, 0.08);
  cursor: pointer;
}

.buy-btn:hover {
  background: #1a5fc2;
}

/* 저장 버튼 특수 스타일 */
button.save-button {
  background: #43b581;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 32px;
  font-size: 1.1rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(67, 181, 129, 0.12);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

button.save-button:hover,
button.save-button:focus {
  background: #238c4a;
  box-shadow: 0 4px 16px rgba(35, 140, 74, 0.18);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#profileSaveModal .modal-content {
  background: #fff;
  padding: 40px 36px 40px 36px;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  position: relative;
}

#profileSaveModal .modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

#profileSaveModal .modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

#profileSaveModal .modal-btn-row {
  display: flex;
  flex-direction: row;
  gap: 24px;
  justify-content: center;
  align-items: center;
  margin: 0 0 6px 0;
}

#profileSaveModal .modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 140px;
  padding: 18px 32px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background: #4a69bd;
  color: #fff;
  box-shadow: 0 2px 8px rgba(74, 105, 189, 0.1);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  white-space: nowrap;
  text-align: center;
}

#profileSaveModal .modal-btn.alt {
  background: #e0e6ed;
  color: #27408b;
  font-weight: bold;
  border: none;
  box-shadow: 0 2px 8px rgba(74, 105, 189, 0.08);
}

#profileSaveModal .modal-btn.alt:hover,
#profileSaveModal .modal-btn.alt:focus {
  background: #cfd8dc;
  color: #1a2956;
}

/* 다이나믹 식단 질문 블록 스타일 */

.meal-question-block {
  overflow-x: hidden !important;
  max-width: 640px;
  width: 100%;




  margin: 0 auto 0 auto;
  box-sizing: border-box;
  background: white;
  padding: 40px 36px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* 컨테이너 역할 추가 */
  min-height: calc(100vh - 300px);
  overflow-y: auto;
  padding-bottom: 30px;
}

.meal-question-block.many-options {
  align-items: center;
  justify-content: center;
}

/* 슬라이드 애니메이션을 위한 컨테이너 */
/* meal-question-container 제거됨 - meal-question-block이 직접 컨테이너 역할 */

/* 슬라이드 애니메이션 클래스들 */
.meal-question-slide {
  transition: transform 0.15s ease-in-out;
}

.meal-question-slide.slide-in-right {
  transform: translateX(200%);
}

.meal-question-slide.slide-in-left {
  transform: translateX(-200%);
}

.meal-question-slide.slide-out-right {
  transform: translateX(200%);
}

.meal-question-slide.slide-out-left {
  transform: translateX(-200%);
}

.meal-question-slide.slide-current {
  position: static !important;
  transform: translateX(0);
}

.meal-question-label {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: #4a69bd;
  text-align: center;
}

.meal-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
}

.meal-block-btn {
  min-width: 160px;
  padding: 1.2em 2em;
  background: #f4f7fb;
  border: 2px solid #e0e6f2;
  border-radius: 12px;
  font-size: 1.25em;
  font-weight: 500;
  color: #34495e;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 1px 4px rgba(44, 62, 80, 0.06);
  margin-bottom: 0.5em;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.meal-block-btn:hover {
  background: #e3f2fd;
  color: #1976d2;
  border-color: #1976d2;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.15);
}

.meal-block-btn.selected {
  background: #2d7ff9;
  color: #fff;
  border-color: #2d7ff9;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.12);
}

.meal-other-input input {
  margin-top: 0.5em;
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.meal-other-input input {
  width: 80%;
  padding: 0.7em 1em;
  border-radius: 8px;
  border: 1px solid #d0d6e2;
  font-size: 1em;
}

.meal-nav-btns {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: 2em;
}

.meal-nav-btns button {
  flex: 1 1 0;
  min-width: 0;
  width: 48%;
  padding: 1em 0;
  background: #4a6fdc;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  margin: 0;
  box-sizing: border-box;
}

.meal-nav-btns button:hover {
  background: #2d7ff9;
}

.profile-edit-btn {
  display: block;
  margin: 0 auto 1.5em auto;
  min-width: 120px;
  max-width: 220px;
  width: auto;
  padding: 0.6em 1.2em;
  font-size: 1em;
}

.meal-submit-btn {
  background: #27ae60 !important;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.12);
}

.meal-submit-btn:hover {
  background: #219150 !important;
}

.meal-nav-btns-fixed {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 32px;
  width: 100%;
  max-width: 800px;
  display: flex;
  justify-content: space-between;
  gap: 1em;
  z-index: 100;
  padding: 0 2vw;
  background: transparent;
  box-sizing: border-box;
}

.meal-nav-btns-fixed button {
  flex: 1 1 0;
  min-width: 0;
  width: 48%;
  padding: 1em 0;
  background: #4a6fdc;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  margin: 0;
  box-sizing: border-box;
}

/* 작은 크기의 음식 재료 버튼 */
.meal-block-btn-small {
  min-width: 60px;
  padding: 0.8em 1.5em;
  background: #f4f7fb;
  border: 2px solid #e0e6f2;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #34495e;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 1px 4px rgba(44, 62, 80, 0.06);
  margin-bottom: 0.5em;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.meal-block-btn-small:hover {
  background: #e3f2fd;
  color: #1976d2;
  border-color: #1976d2;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.15);
}
.meal-block-btn-small.selected {
  background: #2d7ff9;
  color: #fff;
  border-color: #2d7ff9;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.12);
}

/* 토스트 메시지 스타일 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.toast-message {
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  max-width: 300px;
  word-wrap: break-word;
}

/* 모바일에서 toast 메시지 크기 조정 */
@media (max-width: 480px) {
  .toast-message {
    max-width: 280px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    margin-bottom: 8px !important;
  }
}

@media (max-width: 360px) {
  .toast-message {
    max-width: 250px !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    margin-bottom: 6px !important;
  }
}

.toast-message.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-message.toast-success {
  background: #10b981;
}

.toast-message.toast-error {
  background: #ef4444;
}

.toast-message.toast-info {
  background: #3b82f6;
}

.toast-message.toast-warning {
  background: #f59e0b;
}

/* 프로필 저장 모달 스타일 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 15px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  width: auto;
  padding: 5px;
  margin: 0;
}

.modal-close:hover {
  color: #333;
  background: none;
  transform: none;
}

.modal-content h3 {
  color: #4a69bd;
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.3rem;
  font-weight: 600;
}

.modal-btn-row {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.modal-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
  width: auto;
}

.modal-btn {
  background-color: #4a69bd;
  color: white;
}

.modal-btn:hover {
  background-color: #3b5093;
  transform: translateY(-2px);
}

.modal-btn.alt {
  background-color: #27ae60;
  color: white;
}

.modal-btn.alt:hover {
  background-color: #219150;
}

.menu-section-title {
  color: #8e44ad;
  font-size: 1.7em;
  font-weight: 700;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* 섹션 제목 텍스트 스타일 통일 */
.nutrition-title,
.ingredient-title,
.recipe-title,
.tip-title,
.reason-title {
  font-size: 1.25em;
  font-weight: 700;
  color: #34495e;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* 상태진단 섹션 제목 */
.status-section-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #2a7de1;
  margin-bottom: 0.5em;
  border-left: 4px solid #2a7de1;
  padding-left: 0.5em;
  background: #f3f8fd;
}

/* 추천식단 섹션 제목 */
.meal-section-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #e17d2a;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  border-left: 4px solid #e17d2a;
  padding-left: 0.5em;
  background: #fdf7f3;
}

/* 메뉴명 */
.menu-section-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  margin-top: 1em;
  margin-bottom: 0.2em;
}

.menu-name {
  font-size: 1.1em;
  font-weight: bold;
  color: #1a1a1a;
  margin-bottom: 0.5em;
}
/* 영양정보 */
.nutrition-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #2a9d8f;
  margin-top: 1em;
  margin-bottom: 0.2em;
}

.nutrition-list {
  margin-bottom: 1em;
  padding-left: 1.2em;
  color: #2a9d8f;
}

/* 재료 */
.ingredient-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #b48a1e;
  margin-top: 1em;
  margin-bottom: 0.2em;
}

.main-ingredient-title {
  color: #b48a1e;
  font-weight: bold;
}

.sauce-title {
  color: #b48a1e;
  font-weight: bold;
}

.etc-title {
  color: #b48a1e;
  font-weight: bold;
}

.ingredient-list {
  margin-bottom: 0.5em;
  padding-left: 1.2em;
}

.ingredient-item {
  margin-bottom: 0.2em;
}

.ingredient-name {
  margin-right: 0.5em;
}

.buy-btn {
  background: #2a7de1;
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.95em;
  margin-left: 0.5em;
  text-decoration: none;
  transition: background 0.2s;
}

.buy-btn:hover {
  background: #1a5ca1;
}

/* 레시피 */
.recipe-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #e12a7d;
  margin-top: 1em;
  margin-bottom: 0.2em;
}

.recipe-list {
  margin-bottom: 1em;
  padding-left: 1.2em;
}

/* 추가팁 */
.tip-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #7d2ae1;
  margin-top: 1em;
  margin-bottom: 0.2em;
}

.tip-content {
  background: #f7f3fd;
  padding: 0.5em 1em;
  margin-bottom: 1em;
}

/* 식단 추천 이유 */
.reason-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #2a7d3a;
  margin-top: 1em;
  margin-bottom: 0.2em;
}

.reason-content {
  background: #f3fdf7;
  padding: 0.5em 1em;
  margin-bottom: 1em;
}

/* 상태진단 전체 블록 */
.status-section {
  margin-bottom: 2em;
  padding: 1em 1.5em;
  background: #f8fbff;
  border-radius: 8px;
  border: 1px solid #e3eaf2;
}

/* 상태진단 항목 통합 스타일 */
.status-item-title {
  font-weight: bold;
  color: #2a7de1;
  margin-top: 0.7em;
  margin-bottom: 0.1em;
  font-size: 1.05em;
}

/* 기존 개별 항목 스타일 제거 */
.bmr-title,
.tee-title,
.calorie-title,
.disease-title,
.summary-title {
  font-weight: bold;
  color: #2a7de1;
  margin-top: 0.7em;
  margin-bottom: 0.1em;
  font-size: 1.05em;
}

/* 메뉴별 블록 카드 스타일 */
.menu-block {
  background: #fff;
  border: 1.5px solid #e3eaf2;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(42, 125, 225, 0.07);
  margin-bottom: 2em;
  padding: 1.2em 1.5em 1.5em 1.5em;
  transition: box-shadow 0.2s;
  position: relative;
}

.menu-block:hover {
  box-shadow: 0 4px 18px rgba(42, 125, 225, 0.13);
}

/* 저장하기 버튼 스타일 */
.save-meal-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: #4a69bd;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 13px;
  cursor: pointer;
  z-index: 10;
  min-width: unset;
  width: auto;
  height: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background 0.2s;
  display: block;
}

.save-meal-btn:hover {
  background: #3b5093;
  transform: translateY(-1px);
}

.save-meal-btn:disabled {
  background: #28a745;
  cursor: not-allowed;
  transform: none;
}

/* 메뉴 슬라이더 스타일 */
.menu-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.menu-slider {
  display: flex;
  transition: transform 0.3s ease;
  width: 100%;
}

.menu-slide {
  min-width: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  display: none;
}

.menu-slide.active {
  opacity: 1;
  transform: translateX(0);
  display: block;
}

/* 메뉴 슬라이더 네비게이션 3분할 구조 */
.menu-slider-nav {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 10px;
}

.menu-nav-btn {
  background: #4a69bd;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(74, 105, 189, 0.12);
  padding: 0;
  justify-self: center;
}

.menu-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.menu-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0e6ed;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.menu-dot.active {
  background: #4a69bd;
  transform: scale(1.15);
}

.meal-section-title {
  margin-bottom: 8px !important;
}

/* 프로필 상단 탭 네비게이션 */
.profile-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.profile-tab {
  background: #eaf0fb;
  color: #2451a6;
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 12px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.profile-tab.active {
  background: #4a69bd;
  color: #fff;
}

/* 탭별 섹션 숨김/표시 */
.tab-section {
  display: none;
}

.tab-section[style*="display:block"] {
  display: block;
}

/* 기본 정보 2열 그리드 */
.profile-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

/* 나이, 키, 몸무게 한 줄 배치 */
.input-row {
  display: flex;
  gap: 15px;
  /* 입력 필드 사이 간격 */
  margin-bottom: 15px;
  flex-wrap: wrap;
  /* 화면이 작을 때 줄바꿈 허용 */
  align-items: center;
}

.input-group-item {
  flex: 1;
  /* 가용한 공간을 균등하게 분배 */
  min-width: 100px;
  /* 최소 너비를 줄여서 더 유연하게 설정 */
}

.input-group-item label {
  margin-top: 0;
  /* 레이블 상단 여백 제거 */
}

.desc {
  font-size: 0.92em;
  color: #888;
  margin-left: 6px;
  font-weight: 400;
  white-space: nowrap;
}

.week-slider {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 16px;
  min-height: 320px;
}

.week-slider-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  width: 100%;
  max-width: 580px;
  gap: 8px;
  margin-left: auto;
  margin-right: auto;
}

.week-nav-btn {
  background: #4a69bd;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(74, 105, 189, 0.12);
  padding: 0;
}

.week-nav-btn:disabled,
.week-nav-btn[style*="hidden"] {
  opacity: 0.2;
  cursor: default;
  display: none;
}

.week-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  gap: 8px;
}

.week-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0e6ed;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.week-dot.active {
  background: #4a69bd;
  transform: scale(1.15);
}

.week-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  padding: 32px 28px 28px 28px;
  margin: 0 auto 24px auto;
  min-width: 380px;
  max-width: 620px;
  min-height: 320px;
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.2s;
  display: flex;
}

.week-day-label {
  display: inline-block;
  background: #f3f6fa;
  color: #3a5ba0;
  font-weight: 700;
  font-size: 1.1em;
  border-radius: 12px;
  padding: 4px 16px 4px 16px;
  margin-bottom: 12px;
  margin-top: 0;
  letter-spacing: 1px;
  text-align: left;
}

.week-day-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0 24px 0;
}

.week-day-btn {
  background: #f3f3f3;
  color: #888;
  border: none;
  border-radius: 16px;
  padding: 8px 18px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.week-day-btn.active {
  background: #3b5fc5;
  color: #fff;
  font-weight: bold;
}

.week-day-btn:hover:not(.active) {
  background: #e0e7ff;
  color: #3b5fc5;
}

.multi-step-loading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin: 20px auto 32px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px 0 rgba(60, 80, 120, 0.07);
  padding: 36px 36px 32px 36px;
  min-width: 400px;
  max-width: 640px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.loading-step {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
  opacity: 0.5;
  transition: opacity 0.3s;
  font-size: 1.1em;
  width: 100%;
  text-align: left;
}

.loading-step.active {
  opacity: 1;
  font-weight: bold;
}

.loading-icon {
  width: 32px;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  margin-left: 4px;
  position: relative;
  /* step-loading 스피너가 정확히 중앙에 위치하도록 보장 */
  overflow: visible;
}

/* 로딩 스텝에서는 step-loading modifier 사용 */

.loading-step .loading-check {
  font-size: 1.7em;
  color: #2ecc40;
  margin: 0;
}

.loading-step-texts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0;
  text-align: left;
}

.loading-title {
  font-size: 1.18em;
  font-weight: 700;
  color: #2d3559;
  margin-bottom: 2px;
}

.loading-desc {
  font-size: 0.98em;
  color: #7a7a8c;
  margin-left: 0;
  font-weight: 400;
}

/* 웹폰트 적용 */
body,
html {
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", Arial,
    sans-serif;
}

/* 회원가입/로그인 링크 네이버 스타일 참고 */
.auth-links {
  display: flex;
  gap: 6px;
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 10;
  font-size: 1rem;
}

.auth-links a:not(.nav-btn) {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f5f7fa;
  color: #2c3e50;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid #e0e6ed;
  transition: background 0.2s, color 0.2s, border 0.2s;
}

.auth-links a:not(.nav-btn):hover {
  background: #e6f0ff;
  color: #2451a6;
  border: 1.5px solid #4a69bd;
}

/* [마이페이지 전용] 프로필 입력 프로그레스 바 */
.mypage-progress-bar-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 24px auto;
  background: var(--card-bg);
  border-radius: 12px;
  height: 22px;
  position: relative;
  box-shadow: 0 2px 8px rgba(74, 105, 189, 0.08);
}

.mypage-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 70%, var(--secondary) 100%);
  border-radius: 12px;
  width: 0%;
  min-width: 36px;
  max-width: 100%;
  position: relative;
  transition: width 0.3s;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mypage-progress-bar-label {
  color: var(--btn-text);
  font-weight: 700;
  font-size: 1rem;
  margin-right: 12px;
  text-shadow: 0 1px 4px rgba(44, 62, 80, 0.12);
}

.mypage-progress-bar[style*="width: 0%"] .mypage-progress-bar-label {
  color: var(--primary);
  margin-right: 0;
  left: 12px;
  position: absolute;
  text-shadow: none;
}

/* 기타 입력창 */
.hidden-input-container {
  display: none;
  margin-top: 10px;
}

.hidden-input-container.active {
  display: block;
}

.hidden-input-container input[type="text"] {
  width: 100%;
  max-width: 320px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ced4da;
  font-size: 1rem;
  background: #f8fafc;
}

.mypage-dashboard {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr;
  grid-template-rows: auto auto auto;
  gap: 32px;
  margin: 0;
  background: transparent;
  padding: 16px;
}

.mypage-profile-card {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
  max-width: 320px;
}

.mypage-health-card {
  grid-row: 1 / 2;
  grid-column: 2 / 3;
  flex-grow: 1;
}

.mypage-exercise-card {
  grid-row: 2 / 3;
  grid-column: 1 / 2;
}

.mypage-meal-card {
  grid-column: 1 / 2;
  margin-top: 0;
}

.mypage-health-card .mypage-card-content {
  width: 100%;
}


.mypage-profile-card {
  grid-column: span 1;
  position: relative;
}

.mypage-health-card {
  grid-column: span 2;
}

.mypage-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary);
}

.mypage-card-content {
  font-size: 1.08rem;
  color: var(--text-color);
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: -0.5px;
  margin-top: 0;
  padding-left: 0;
}

.mypage-profile-flex {
  display: flex;
  align-items: center;
  gap: 28px;
}

.mypage-profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #e0e6ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  flex-shrink: 0;
  margin-left: 10px;
}


.mypage-profile-info {
  flex: 1;
}

.mypage-edit-icon {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 1.2rem;
  color: var(--primary);
  vertical-align: middle;
  cursor: pointer;
}

.mypage-health-bar {
  height: 60px;
  background: #eaf0fb;
  border-radius: 8px;
  margin-bottom: 10px;
}


.mypage-supplement-label {
  font-size: 0.97rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mypage-supplement-label input[type="checkbox"] {
  margin-right: 6px;
}

.settings-section {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
  padding: 10px 18px 18px 18px;
  margin-bottom: 12px;
}

.settings-section h2 {
  font-size: 1.13rem;
  color: #2451a6;
  margin-bottom: 12px;
  font-weight: 700;
  margin-top: 0;
}

.settings-group {
  margin-bottom: 10px;
}

.settings-btn {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 10px 22px;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: var(--btn-text);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-btn:hover {
  background: #3b5093;
}


.mypage-dashboard-row1 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  row-gap: 32px;
  margin-bottom: 32px;
  padding: 0;
}

.mypage-dashboard-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  row-gap: 32px;
  margin-bottom: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.mypage-meal-row {
  display: block;
  margin: 0;
  padding: 0;
  margin-top: 32px;
}

.mypage-profile-card {
  max-width: 280px;
  position: relative;
}

/* 약관 모달 스타일 */

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mypage-card,
.mypage-card:focus,
.mypage-card:hover {
  cursor: pointer;
}

/* 새로운 홈페이지 스타일 */

/* 메인 네비게이션 */
.main-nav {
  display: none; /* 기본적으로 숨김 */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* index.html (home-page)에서만 데스크탑에서 보이도록 설정 */
body.home-page .main-nav,
body.mypage-page .main-nav {
  display: flex;
}

.admin-container {
  max-width: 1200px;
  background: #fff;
  border: 1.5px solid #e0e6ed;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.06);
  padding: 20px;
}

.admin-container h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  margin-top: 0px;
  margin-bottom: 22px;
  text-align: center;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 1rem;
}

.admin-table th,
.admin-table td {
  border: 1px solid #e0e6ed;
  padding: 10px 8px;
  text-align: center;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
  max-width: 200px;
  word-break: break-all;
  text-align: left;
}

.admin-table th {
  background: #f7f9fc;
  color: #2451a6;
  font-weight: 600;
}

.admin-table tr:nth-child(even) {
  background: #f4f7fa;
}

#adminMsg {
  color: #e74c3c;
  text-align: center;
  font-size: 0.98rem;
}

.delete-btn {
  display: block;
  margin: 0 auto;
  padding: 8px 20px;
  font-size: 1rem;
  border-radius: 10px;
  background: #4a69bd;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(74, 105, 189, 0.12);
  transition: background 0.2s;
  line-height: 1.2;
}

.admin-table td {
  vertical-align: middle;
  padding: 8px 8px;
}

/* 잇플스토어 네비게이션 강조 */
.nav-menu .nav-shop-link {
  color: #219150;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-menu .nav-shop-link:hover,
.nav-menu .nav-shop-link:focus {
  color: #17806d;
}

.profile-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile-list li {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
}

.profile-list label {
  font-weight: 500;
  color: #333;
  min-width: 120px;
  margin-right: 16px;
  flex-shrink: 0;
}
.profile-list input[type="number"],
.profile-list input[type="text"],
.profile-list select {
  width: 100%;
  max-width: 320px;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #f8fafc;
  transition: border-color 0.3s;
}

.profile-list input[type="number"]:focus,
.profile-list input[type="text"]:focus,
.profile-list select:focus {
  border-color: #4a69bd;
  outline: none;
  background: #fff;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.nav-brand a {
  font-size: 1.8rem;
  font-weight: 700;
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-brand .logo-image {
  height: 36px;
}

.nav-brand a:hover {
  color: #764ba2;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu a:hover {
  color: #667eea;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #667eea;
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-auth {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}

/* 데스크탑에서 모바일 네비게이션 컨테이너 숨김 */
.mobile-nav-container {
  display: none;
}

/* 데스크탑에서 nav-toggle 숨김 */
.nav-toggle {
  display: none;
}

/* nav-btn 클래스 스타일 정의 */
.nav-btn {
  /* 기본 스타일 리셋 */
  all: unset;

  /* 레이아웃 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;

  /* 크기 및 간격 */
  padding: 0.5rem 1rem;
  min-height: 36px;
  min-width: 80px;

  /* 폰트 */
  font-family: "Noto Sans KR", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;

  /* 외관 */
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  color: #333;

  /* 상호작용 */
  cursor: pointer;
  transition: all 0.3s ease;

  /* 그림자 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
  background: #f8f9fa;
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn.primary {
  background: #667eea !important;
  color: white !important;
  border-color: #667eea !important;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3) !important;
}

.nav-btn.primary:hover {
  background: #764ba2 !important;
  border-color: #764ba2 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(118, 75, 162, 0.4) !important;
}

/* auth-links 내의 nav-btn에 대한 더 구체적인 스타일 */
.auth-links a.nav-btn {
  /* 기본 스타일 리셋 */
  all: unset;

  /* 레이아웃 */
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;

  /* 크기 및 간격 */
  padding: 0.5rem 1rem !important;
  min-height: 36px;
  min-width: 80px;

  /* 폰트 */
  font-family: "Noto Sans KR", sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.4;
  text-decoration: none !important;
  white-space: nowrap;

  /* 외관 */
  border: 1px solid #e0e0e0 !important;
  border-radius: 20px !important;
  background: #fff !important;
  color: #333 !important;

  /* 상호작용 */
  cursor: pointer;
  transition: all 0.3s ease;

  /* 그림자 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.auth-links a.nav-btn:hover {
  background: #f8f9fa !important;
  border-color: #667eea !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.auth-links a.nav-btn.primary {
  background: #667eea !important;
  color: white !important;
  border-color: #667eea !important;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3) !important;
}

.auth-links a.nav-btn.primary:hover {
  background: #764ba2 !important;
  border-color: #764ba2 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(118, 75, 162, 0.4) !important;
}

/* 메인 네비게이션 버튼 - 완전히 새로운 클래스 정의 */
.main-nav-button {
  /* 기본 스타일 리셋 */
  all: unset;

  /* 레이아웃 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;

  /* 크기 및 간격 */
  padding: 0.5rem 1rem;
  min-height: 36px;
  min-width: 80px;

  /* 폰트 */
  font-family: "Noto Sans KR", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;

  /* 외관 */
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  color: #333;

  /* 상호작용 */
  cursor: pointer;
  transition: all 0.3s ease;

  /* 그림자 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-nav-button:hover {
  background: #f8f9fa;
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.main-nav-button.primary {
  background: #667eea;
  color: white;
  border-color: #667eea;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.main-nav-button.primary:hover {
  background: #764ba2;
  border-color: #764ba2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(118, 75, 162, 0.4);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 3px 0;
  transition: 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-2.5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-2.5px, -6px);
}

/* 히어로 섹션 */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 100px 0 60px;
  min-height: 50vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero-content-center {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem auto;
  padding: 1rem 0;
  position: relative;
  z-index: 5;
  color: #ffffff;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(4, 180px);
  gap: 5rem;
  justify-content: center;
  justify-items: center;
  position: relative;
  z-index: 5;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hero-title .highlight {
  color: #ffd700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #e2e8f0;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #ffd700;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
.hero-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.hero-btn.primary {
  background: #ffd700;
  color: #333;
}

.hero-btn.secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-btn.primary:hover {
  background: #ffed4e;
}

.hero-btn.secondary:hover {
  background: white;
  color: #667eea;
}

.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.hero-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 10;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 170px;
  min-height: 170px;
  max-height: 170px;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.hero-card:hover {
  transform: translateY(-10px) scale(1.05);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #ffffff;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card-description {
  opacity: 0.8;
  font-size: 0.9rem;
  color: #cbd5e0;
  line-height: 1.4;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-features {
  padding: 5rem 0;
  background: #f8f9fa;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 3rem;
  color: #333;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.feature-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
}

.feature-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #667eea;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.feature-badge.new {
  background: #28a745;
}

.quick-actions {
  padding: 4rem 0;
  background: white;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.action-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.action-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 24px;
}

.action-card:nth-child(1)::before {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.action-card:nth-child(2)::before {
  background: linear-gradient(135deg, #4834d4, #686de0);
}

.action-card:nth-child(3)::before {
  background: linear-gradient(135deg, #00d2d3, #54a0ff);
}

.action-card:hover::before {
  opacity: 1;
}

.action-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  color: white;
}

.quick-action-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.action-text {
  position: relative;
  z-index: 2;
}

.action-text h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.action-text p {
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.action-card:hover .action-text h4,
.action-card:hover .action-text p {
  color: white;
}

.action-card:hover .action-text p {
  opacity: 0.95;
}

.testimonials {
  padding: 5rem 0;
  background: #f8f9fa;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.testimonial-rating {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-style: italic;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  font-weight: 600;
  color: #333;
}

.cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.cta-section > .container {
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #ffffff;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 255, 255, 0.1);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.cta-description {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  color: #f8f9fa;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-btn {
  padding: 1.2rem 2.5rem;
  border: none;
  border-radius: 60px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  min-width: 200px;
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
}

.cta-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
  z-index: -1;
}

.cta-btn:hover::before {
  left: 100%;
}

.cta-btn.primary {
  background: linear-gradient(135deg, #00d4aa, #00b894);
  color: white;
  box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.cta-btn.primary:hover {
  background: linear-gradient(135deg, #00c9a7, #00a085);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 212, 170, 0.4);
}

.cta-btn.secondary {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.05)
  );
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.cta-btn.secondary:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0.15)
  );
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.footer {
  background: #333;
  color: white;
  padding: 3rem 0 1rem;
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.brand-logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffd700;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: #ffd700;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #ffd700;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #555;
  color: #ccc;
}

.footer-copyright {
  font-size: 0.8rem;
  color: #999;
  margin-top: 1rem;
  line-height: 1.4;
  opacity: 0.8;
  text-align: center; /* 데스크탑에서는 중앙정렬 */
}

/* 영양제 페이지 스타일 */
.page-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.page-hero .container {
  text-align: center;
}

.page-hero .hero-content {
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-title .highlight {
  color: #ffd700;
}

.page-description {
  font-size: 1.2rem;
  opacity: 0.9;
}

.supplement-wizard {
  padding: 1rem 0 0rem 0;
  background: #f8f9fa;
}

.wizard-progress {
  margin-bottom: 3rem;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #667eea;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.step.active {
  opacity: 1;
}

.step-number {
  width: 40px;
  height: 40px;
  background: #e0e0e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: #667eea;
  color: white;
}

.step-text {
  font-size: 0.9rem;
  text-align: center;
}

.wizard-content {
  background: white;
  border-radius: 20px;
  padding: 0.9rem 3rem 1.5rem 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

/* Step 4 (결과 페이지) 전용 스타일 */
.results-step {
  max-width: 1200px;
  margin: 0 auto;
}

/* Step 4에서 상위 컨테이너도 1200px로 확장 */
body.supplement-page.step-4 .container {
  max-width: 1200px !important;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.step-header {
  text-align: center;
  margin-bottom: 1rem;
}

.step-header h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 1rem;
  color: #333;
}

.step-header p {
  color: #666;
  font-size: 1.1rem;
}

.health-goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.goal-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.goal-card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}

.goal-card.selected {
  border-color: #667eea;
  background: #f0f4ff;
}

.goal-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.goal-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.goal-card p {
  color: #666;
  font-size: 0.9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.form-group input,
.form-group textarea {
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #f8f9fa;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-option:hover {
  background: #e9ecef;
}

.radio-option input[type="radio"] {
  margin-right: 0.5rem;
}

.radio-option input[type="radio"]:checked + span {
  color: #667eea;
  font-weight: 600;
}

.lifestyle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.lifestyle-group {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 15px;
}

.lifestyle-group h3 {
  margin-bottom: 1rem;
  color: #333;
}

.option-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-btn {
  padding: 0.8rem 1rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.option-btn:hover {
  border-color: #667eea;
}

.option-btn.selected {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.wizard-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
}
.wizard-navigation .nav-btn {
  padding: 1rem 2rem;
  margin-top: 4px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-navigation .nav-btn.prev {
  background: white;
  color: #4a69bd;
  border: 2px solid #4a69bd;
}

.wizard-navigation .nav-btn.next {
  background: #4a69bd;
  color: white;
}

.wizard-navigation .nav-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.wizard-navigation .nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 이전 버튼만 표시될 때 가운데 정렬 */
.wizard-navigation .nav-btn.prev:only-child {
  margin: 0 auto;
}

/* 다음 버튼이 숨겨져 있을 때 이전 버튼 가운데 정렬 */
.wizard-navigation:has(.nav-btn.next[style*="display: none"]) .nav-btn.prev,
.wizard-navigation:has(
    .nav-btn.next:not([style*="display: block"]):not([style*="display: inline"])
  )
  .nav-btn.prev {
  margin: 0 auto;
}

/* 또는 더 간단한 방법으로 이전 버튼이 혼자 보일 때 */
.wizard-navigation .nav-btn.prev[style*="display: block"] {
  margin: 0 auto;
}

.priority-section {
  margin-bottom: 3rem;
}

.priority-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.priority-title.high {
  color: #e74c3c;
}

.priority-title.medium {
  color: #f39c12;
}

.supplement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
/* 영양정보 섹션 스타일 */
.nutrition-info {
  background: #f8fafc;
  padding: 80px 0;
}
.section-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.nutrition-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.nutrition-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.nutrition-thumbnail {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.nutrition-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.nutrition-card:hover .nutrition-thumbnail img {
  transform: scale(1.05);
}

.nutrition-type {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nutrition-type[data-type="뉴스"] {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.nutrition-type[data-type="영상"] {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.nutrition-type[data-type="논문"] {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.trust-score {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.nutrition-card:hover .trust-score {
  background: rgba(0, 0, 0, 0.8);
}

.nutrition-content {
  padding: 15px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nutrition-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nutrition-summary {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nutrition-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #999;
}

.nutrition-source {
  font-weight: 500;
  color: #4a69bd;
}

.nutrition-date {
  color: #999;
}

.nutrition-more {
  text-align: center;
  margin-top: 40px;
}

.nutrition-more-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.nutrition-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}
/* Scroll to Top 버튼 */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #00d4aa, #00b894);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: linear-gradient(135deg, #00c9a7, #00a085);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

.scroll-to-top span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  line-height: 1;
}
/* 영양제 추천 페이지 스타일 */
.preference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.preference-group {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.preference-group.full-width {
  grid-column: 1 / -1;
}

.preference-group h3 {
  margin: 0 0 12px 0;
  color: #2d3748;
  font-size: 1.1rem;
  font-weight: 600;
}

.preference-description {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-btn {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
}

.option-btn:hover {
  border-color: #4a69bd;
  background: #f7fafc;
}

.option-btn.selected {
  background: #4a69bd;
  color: white;
  border-color: #4a69bd;
}

.allergy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.allergy-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.allergy-option:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.allergy-option input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
}

.allergy-option span {
  font-size: 0.9rem;
  color: #4a5568;
}

.other-allergy {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.other-allergy input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
}

.safety-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.safety-group {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.safety-group h3 {
  margin: 0 0 12px 0;
  color: #2d3748;
  font-size: 1.1rem;
  font-weight: 600;
}

.safety-group textarea {
  width: 100%;
  min-height: 80px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  resize: vertical;
  box-sizing: border-box;
}

.recommendations-loading {
  text-align: center;
  padding: 10px;
  color: #718096;
  /* multi-step-loading이 컨테이너를 벗어나지 않도록 설정 */
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* recommendations-loading 내부의 multi-step-loading 최적화 */
.recommendations-loading .multi-step-loading {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 auto;
}

.recommendations-loading .loading-step {
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.recommendations-loading .loading-step-texts {
  flex: 1;
  min-width: 0; /* flex 아이템이 축소될 수 있도록 */
  overflow: hidden;
}

.recommendations-loading .loading-title,
.recommendations-loading .loading-desc {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* 이미 통합된 스타일로 대체됨 */

.ai-recommendations {
  background: #f8fafc;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
}

.recommendation-summary {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
  border-left: 4px solid #4a69bd;
}

.recommendation-summary h3 {
  margin: 0 0 12px 0;
  color: #2d3748;
  font-size: 1.2rem;
  font-weight: 600;
}

.recommendation-summary p {
  margin: 0;
  color: #4a5568;
  line-height: 1.6;
}

.supplements-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.supplement-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.supplement-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.supplement-card.priority-high {
  border-left: 4px solid #e53e3e;
}

.supplement-card.priority-medium {
  border-left: 4px solid #ed8936;
}

.supplement-card.priority-low {
  border-left: 4px solid #38a169;
}

.supplement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.supplement-name {
  margin: 0;
  color: #2d3748;
  font-size: 1.1rem;
  font-weight: 600;
}

.supplement-dosage {
  background: #4a69bd;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.supplement-timing {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.timing-label {
  color: #718096;
  font-weight: 500;
}

.timing-value {
  color: #4a5568;
  margin-left: 4px;
}

.supplement-reason {
  color: #4a5568;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.supplement-warning {
  background: #fed7d7;
  color: #c53030;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.supplement-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.supplement-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}

.supplement-btn.add {
  background: #4a69bd;
  color: white;
}

.supplement-btn.add:hover {
  background: #3c5aa6;
}

.supplement-btn.info {
  background: #e2e8f0;
  color: #4a5568;
}

.supplement-btn.info:hover {
  background: #cbd5e0;
}

.general-warnings {
  background: #fed7d7;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.general-warnings h3 {
  margin: 0 0 12px 0;
  color: #c53030;
  font-size: 1.1rem;
  font-weight: 600;
}

.general-warnings ul {
  margin: 0;
  padding-left: 20px;
  color: #c53030;
}

.general-warnings li {
  margin-bottom: 8px;
  line-height: 1.4;
}

.recommendation-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.action-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
}

.action-btn.primary {
  background: #4a69bd;
  color: white;
}

.action-btn.primary:hover {
  background: #3c5aa6;
}

.action-btn.secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.action-btn.secondary:hover {
  background: #cbd5e0;
}

.error-message h3 {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.error-message p {
  margin: 0 0 20px 0;
  color: #c53030;
}

.retry-btn {
  background: #e53e3e;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.retry-btn:hover {
  background: #c53030;
}

/* Supplement Type Selection Styles */
.supplement-type-selection {
  margin: 0 auto 20px auto;
  padding: 0 0 15px 0;
  background: #f8fafc;
  border-radius: 12px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 탭 메뉴 스타일 */
.system-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f3f0ff;
  border: 1px solid #e9d5ff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333333;
  font-weight: 600;
  font-size: 15px;
  min-width: 80px;
  justify-content: center;
  box-shadow: none;
}

.tab-button:hover {
  background: #e9d5ff;
  border-color: #c4b5fd;
  color: #222222;
}

.tab-button.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
  font-weight: 700;
}

.tab-button .tab-icon {
  font-size: 18px;
}

.tab-button span {
  font-size: 14px;
  white-space: nowrap;
}

/* 탭 컨텐츠 스타일 */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

/* 2행 그리드 레이아웃 */
.supplement-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 180px);
  row-gap: 20px;
  column-gap: 50px;
  margin-top: 5px;
  justify-content: center;
}

.supplement-type-selection::-webkit-scrollbar {
  height: 8px;
}

.supplement-type-selection::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.supplement-type-selection::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.supplement-type-selection::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}
.supplement-type-card {
  background-color: #f7f9fc;
  border: 2px solid #e0e6ed;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 140px;
}

.supplement-type-card:hover {
  border-color: #6a89cc;
  box-shadow: 0 8px 20px rgba(106, 137, 204, 0.2);
  transform: translateY(-3px);
}

.supplement-type-card.selected {
  background-color: #4a69bd;
  border-color: #2451a6;
  box-shadow: 0 8px 20px rgba(74, 105, 189, 0.5);
  transform: translateY(-3px);
}

.supplement-type-card.selected .icon {
  font-size: 2.3rem;
  margin-bottom: 6px;
}

.supplement-type-card.selected h3 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.supplement-type-card.selected p {
  color: #e6f0ff;
  font-size: 0.8rem;
  line-height: 1.4;
}

.supplement-type-card .icon {
  font-size: 2.3rem;
  margin-bottom: 6px;
}

.supplement-type-card h3 {
  color: #4a69bd;
  font-size: 1.1rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.supplement-type-card p {
  color: #666;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* 시스템 헤더 스타일 */
.system-header {
  width: 100%;
  text-align: center;
  margin: 0 0 1.5rem 0;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border: 1px solid #dee2e6;
}

.system-header h4 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #495057;
  margin: 0 0 0.5rem 0;
}

.system-header p {
  font-size: 0.95rem;
  color: #6c757d;
  margin: 0;
  line-height: 1.4;
}

/* ===== BGM 토글 버튼 아이콘 상단 정렬 및 스타일 ===== */
.bgm-toggle-btn-gameengine {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* 상단 정렬 */
  padding-top: 6px; /* 필요시 조정 */
  /* 기존 인라인 스타일과 충돌하지 않음 */
}
.bgm-toggle-btn-gameengine .bgm-icon {
  font-size: 28px; /* 아이콘 크기 */
  line-height: 1; /* 줄간격 최소화 */
  margin-top: 4px; /* 상단 여백 */
  margin-bottom: 0;
  align-self: center; /* flex 컨테이너에서 가운데 정렬 */
  user-select: none; /* 드래그 방지 */
  display: block; /* 블록 요소로 배치 */
  width: 28px; /* 고정 너비 */
  height: 28px; /* 고정 높이 */
  text-align: center; /* 가운데 정렬 */
  /* 필요시 추가 스타일 조정 가능 */
}

/* 영양제 다이나믹 질문 시스템 스타일 */
.preference-question-container {
  width: 100%;
  overflow: hidden;
}

.preference-question-block {
  padding: 0 20px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.question-container {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  width: 100%;
}

.preference-question-block {
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  position: relative;
  width: 100%;
  padding: 20px 0;
}

.preference-question-block.slide-current {
  opacity: 1;
  transform: translateX(0);
}

.preference-question-block.slide-out-left {
  opacity: 0;
  transform: translateX(-100%);
}

.preference-question-block.slide-out-right {
  opacity: 0;
  transform: translateX(100%);
}

.preference-question-block.slide-in-from-right {
  opacity: 0;
  transform: translateX(100%);
}

.preference-question-block.slide-in-from-left {
  opacity: 0;
  transform: translateX(-100%);
}

.preference-question-label {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 12px;
  color: #333;
  text-align: center;
}

.preference-question-description {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
  text-align: center;
}

.preference-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 2rem;
}

.preference-options.two-columns {
  grid-template-columns: 1fr 1fr;
}

.preference-option-btn {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.preference-option-btn:hover {
  background: #e3f2fd;
  border-color: #90caf9;
}

.preference-option-btn.selected {
  background: #4a69bd;
  border-color: #4a69bd;
  color: white;
}

.preference-text-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.3s ease;
  background-color: #ffffff;
}

.preference-text-input:focus {
  outline: none;
  border-color: #4a69bd;
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

.preference-text-input-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.preference-input-label {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  text-align: left;
}

.preference-other-input {
  margin-top: 1rem;
}

.preference-other-input input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.preference-other-input input:focus {
  outline: none;
  border-color: #4a69bd;
}

.preference-nav-btns-fixed {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.preference-prev-btn,
.preference-next-btn,
.preference-complete-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.preference-prev-btn {
  background: white;
  color: #4a69bd;
  border: 2px solid #4a69bd;
}

.preference-prev-btn:hover {
  background: #f8f9fa;
}

.preference-next-btn,
.preference-complete-btn {
  background: #4a69bd;
  color: white;
}

.preference-next-btn:hover,
.preference-complete-btn:hover {
  background: #3d5ba8;
}
/* 새로운 AI 추천 UI 스타일 */
.ai-recommendations {
  max-width: none;
  margin: 0 auto;
  padding: 20px;
}

.section-header {
  margin-bottom: 30px;
  text-align: center;
}

.section-header h3 {
  color: #4a69bd;
  font-size: 2rem;
  margin-bottom: 10px;
  font-weight: 600;
}

/* 개인화된 분석 섹션 */
.analysis-section {
  margin-bottom: 40px;
}

.analysis-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.analysis-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.analysis-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.analysis-card .card-icon {
  font-size: 2.5rem;
  min-width: 50px;
}

.analysis-card .card-content h4 {
  color: #2c3e50;
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 600;
}

.analysis-card .card-content p {
  color: #5a6c7d;
  line-height: 1.6;
  margin: 0;
}

/* 영양제 추천 섹션 */
.supplements-section {
  margin-bottom: 40px;
}

.priority-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

.priority-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.priority-badge.essential {
  background: #e74c3c;
  color: white;
}

.priority-badge.recommended {
  background: #f39c12;
  color: white;
}

.priority-badge.optional {
  background: #95a5a6;
  color: white;
}

/* 슬라이더 컨테이너 */
.supplements-slider-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 60px 0 0;
}

.supplements-slider-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  position: relative;
}

/* 새로운 슬라이더 구조 - 한 개씩만 보이도록 */
.supplements-slides {
  display: flex;
  transition: transform 0.3s ease;
  width: 100%;
}

.supplements-slide {
  min-width: 100%;
  display: none;
  justify-content: center;
  align-items: center;
}

.supplements-slide:first-child {
  display: flex;
}

.supplements-slide .supplement-card-modern {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

/* 기존 supplements-grid는 유지하되 구조 변경 */
.supplements-grid {
  display: flex;
  gap: 24px;
  margin: 0 auto;
  padding: 0 20px;
  transition: transform 0.3s ease;
  width: max-content;
}

/* 태블릿 환경 (768px ~ 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .supplements-slider-wrapper {
    padding: 20px 40px;
  }
  
  .supplements-grid {
    padding: 0 30px;
    gap: 20px;
  }
  
  /* 태블릿에서 건강 고민 설명 텍스트 줄바꿈 숨김 */
  .supplement-wizard .step-header p .mobile-break {
    display: none;
  }
}

/* 작은 태블릿 환경 (481px ~ 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .supplements-slider-wrapper {
    padding: 20px 30px;
  }
  
  .supplements-grid {
    padding: 0 20px;
    gap: 18px;
  }
}

/* 작은 모바일 환경 (320px ~ 480px) */
@media (max-width: 480px) {
  
  .supplements-grid {
    padding: 0 15px;
    gap: 16px;
  }
  
  .supplements-slide .supplement-card-modern {
    max-width: 265px;
    box-shadow: none;
    border: 1px solid #b0b0b0;
  }
}

.supplements-slider-container {
  width: 100%;
  position: relative;
  padding: 20px 0;
}

.supplements-slider-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
  pointer-events: none;
}

/* 모든 카드 타입에 대해 동일한 기본 스타일 적용 */
.supplements-grid .supplement-card-modern,
.supplements-grid .supplement-card-modern.essential,
.supplements-grid .supplement-card-modern.recommended,
.supplements-grid .supplement-card-modern.optional {
  flex: 0 0 auto;
  margin-right: 0;
  /* 마진 대신 gap 사용 */
}

/* 슬라이더 컨트롤 스타일 개선 */
.supplements-slider-arrow {
  width: 48px;
  height: 48px;
  padding: 25px 25px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  backdrop-filter: blur(4px);
}

.supplements-slider-arrow:hover {
  background: #00d4aa;
  color: white;
  transform: scale(1.05);
}

.supplements-slider-arrow:disabled {
  background: #f5f5f5;
  border-color: #ddd;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.supplements-slider-indicators {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.supplements-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0e0e0;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.supplements-slider-dot:hover {
  background: #ccc;
  transform: scale(1.1);
}

.supplements-slider-dot.active {
  background: #007bff;
  border-color: #007bff;
  transform: scale(1.3);
}

.supplement-card-modern {
  background: white;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.supplement-card-modern:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

/* 새로운 가로 레이아웃 구조 */
.supplement-card-modern .card-header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f3f4;
}

.supplement-card-modern .supplement-main-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.supplement-card-modern .supplement-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.supplement-card-modern .card-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.supplement-card-modern .section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 복용 정보 섹션 */
.supplement-card-modern .dosage-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
}

.supplement-card-modern .dosage-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.supplement-card-modern .dosage-amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f2937;
}

.supplement-card-modern .timing-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supplement-card-modern .timing-when,
.supplement-card-modern .timing-frequency,
.supplement-card-modern .timing-duration {
  background: #e5e7eb;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #4b5563;
  font-weight: 500;
}

/* 주요 효능 섹션 */
.supplement-card-modern .benefits-section {
  background: #ecfdf5;
  border-radius: 12px;
  padding: 16px;
}

.supplement-card-modern .benefits-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.supplement-card-modern .benefit-tag {
  background: #10b981;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* 과학적 근거 및 예상 효과 */
.supplement-card-modern .rationale-section,
.supplement-card-modern .results-section {
  padding: 16px;
  border-radius: 12px;
  background: #fefefe;
  border: 1px solid #e5e7eb;
}

.supplement-card-modern .rationale-text,
.supplement-card-modern .results-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b5563;
  margin: 0;
}

/* 경고 섹션 */
.supplement-card-modern .warnings-section {
  display: flex;
  gap: 16px;
}

.supplement-card-modern .safety-warning,
.supplement-card-modern .interactions-info {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
}

.supplement-card-modern .safety-warning {
  background: #fef2f2;
}

.supplement-card-modern .interactions-info {
  background: #f0f9ff;
}

.supplement-card-modern .warning-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.supplement-card-modern .safety-warning p,
.supplement-card-modern .interactions-info p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
  color: #6b7280;
}

.supplement-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.supplement-icon {
  font-size: 1.8rem;
  min-width: 40px;
}

.supplement-name {
  color: #2c3e50;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.supplement-category {
  color: #7f8c8d;
  font-size: 0.9rem;
  font-weight: 500;
}

.dosage-info {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.dosage-amount {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 8px;
}

.timing-info {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

.benefits-section,
.rationale-section,
.results-section {
  margin-bottom: 20px;
}

.benefits-section h5,
.rationale-section h5,
.results-section h5 {
  color: #34495e;
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.benefits-list {
  margin: 0;
  padding-left: 16px;
}

.benefits-list li {
  color: #5a6c7d;
  margin-bottom: 4px;
  line-height: 1.4;
}
.rationale-text,
.results-text {
  color: #5a6c7d;
  line-height: 1.6;
  margin: 0;
}

/* 과학적 근거 항목화 스타일 */
.rationale-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.rationale-item {
  color: #5a6c7d;
  line-height: 1.5;
  font-size: 14px;
  padding-left: 0;
}
.safety-warning {
  background: #fef2f2;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.safety-warning h5 {
  color: #dc2626;
  margin-top: 0;
  margin-bottom: 8px;
}

.safety-warning p {
  color: #7f1d1d;
  margin: 0;
}

.interactions-info {
  background: #f0f9ff;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.interactions-info h5 {
  color: #1d4ed8;
  margin-top: 0;
  margin-bottom: 8px;
}

.interactions-info p {
  color: #1e40af;
  margin: 0;
}

.supplement-actions .action-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.supplement-actions .action-btn.primary {
  background: #4a69bd;
  color: white;
}

.supplement-actions .action-btn.primary:hover {
  background: #3b5093;
  transform: translateY(-2px);
}

.supplement-actions .action-btn.secondary {
  background: #f8f9fa;
  color: #6c757d;
  border: 2px solid #e9ecef;
}

.supplement-actions .action-btn.secondary:hover {
  background: #e9ecef;
  color: #495057;
}

/* 생활 통합 가이드 */
.lifestyle-section {
  margin-bottom: 40px;
}

.lifestyle-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.lifestyle-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.3s ease;
}

.lifestyle-card:hover {
  transform: translateY(-4px);
}

.lifestyle-card .card-icon {
  font-size: 2rem;
  min-width: 40px;
}

.lifestyle-card h4 {
  color: #2c3e50;
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 600;
}

.lifestyle-card p {
  color: #5a6c7d;
  line-height: 1.6;
  margin: 0;
}

/* 영양제 섭취 시 주의사항*/
.safety-section {
  margin-bottom: 40px;
}

.safety-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.safety-item {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.safety-item.emergency {
  background: #fef2f2;
}

.safety-item h4 {
  color: #2c3e50;
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 600;
}

.safety-item ul {
  margin: 0;
  padding-left: 16px;
}

.safety-item li {
  color: #5a6c7d;
  margin-bottom: 8px;
  line-height: 1.5;
}

.safety-item p {
  color: #5a6c7d;
  line-height: 1.6;
  margin: 0;
}

/* 후속 계획 */
.followup-section {
  margin-top: 2rem;
}

.followup-timeline {
  margin-top: 1rem;
}

.timeline-item {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-4px);
}

.timeline-icon {
  font-size: 2rem;
  min-width: 40px;
}

.timeline-content h4 {
  color: #2c3e50;
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 600;
}

.timeline-content p {
  color: #5a6c7d;
  line-height: 1.6;
  margin: 0;
}

/* 액션 버튼 */
.recommendation-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.recommendation-actions .action-btn {
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.recommendation-actions .action-btn.large {
  min-width: 200px;
  justify-content: center;
}

.recommendation-actions .action-btn.primary {
  background: #4a69bd;
  color: white;
}

.recommendation-actions .action-btn.primary:hover {
  background: #3b5093;
  transform: translateY(-2px);
}

.recommendation-actions .action-btn.secondary {
  background: #f8f9fa;
  color: #6c757d;
  border: 2px solid #e9ecef;
}

.recommendation-actions .action-btn.secondary:hover {
  background: #e9ecef;
  color: #495057;
}

.recommendation-actions .action-btn.tertiary {
  background: #e8f5e8;
  color: #2d5016;
  border: 2px solid #c3e6cb;
}

.recommendation-actions .action-btn.tertiary:hover {
  background: #d4edda;
  color: #155724;
}
/* 토스트 메시지 스타일 */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.toast-message {
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-message.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.toast-success {
  background: #4caf50;
}

.toast.toast-error {
  background: #f44336;
}

.toast.toast-info {
  background: #2196f3;
}

/* 저장된 영양제 페이지 스타일 */
.saved-supplements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin-bottom: 12px;
  color: #333;
}

.empty-state p {
  margin-bottom: 24px;
  color: #666;
}

.btn-primary {
  display: inline-block;
  background: #4caf50;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background: #45a049;
}

.saved-date {
  font-size: 0.85rem;
  color: #888;
  text-align: right;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.action-btn.danger {
  background: #f44336;
  color: white;
}

.action-btn.danger:hover {
  background: #d32f2f;
}

.preference-complete-btn {
  background: #4caf50;
  color: white;
  border: 2px solid #45a049;
  border-radius: 25px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
  text-align: center;
}

.preference-complete-btn:hover {
  background: #45a049;
  border-color: #3d8b40;
}

.preference-complete-btn:disabled {
  background: #ccc;
  border-color: #bbb;
  cursor: not-allowed;
}

/* 건강 고민 수정 버튼 스타일 */
.health-goal-edit-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.health-goal-edit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.health-goal-edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.health-goal-edit-btn:hover::before {
  left: 100%;
}

.health-goal-edit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* AI 식재료 분석 페이지 스타일 */
.ingredient-analyzer-page {
  background: #f8fafc;
}

.ingredient-analyzer-page .main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: transparent;
}

.ingredient-analyzer-page .container {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  max-width: none;
}

/* 헤더 섹션 */
.analyzer-header {
  background: none;
  color: #222;
  padding: 60px 0 20px;
  border-radius: 0;
  margin-bottom: 0;
}

.analyzer-header .page-description {
  color: #222;
}

.analyzer-header .header-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.analyzer-header .page-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #222;
}

.analyzer-header .page-description {
  color: #222;
  font-size: 1.2rem;
  opacity: 0.9;
  line-height: 1.6;
}

/* 검색 섹션 */
.ingredient-search-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  width: 100%;
}

/* 검색 결과 요약 섹션 */
.search-results-summary {
  padding: 10px 0;
  margin: 20px 0;
}

.search-results-summary .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.search-results-summary .summary-content {
  text-align: center;
}

.search-results-summary .summary-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
  color: #333;
}

.search-results-summary .search-keyword {
  font-weight: 700;
  color: #667eea;
}

.search-results-summary .result-count {
  font-weight: 700;
  color: #667eea;
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e6ed;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 8px;
  position: relative;
}

.ingredient-search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 8px;
  position: relative;
  min-width: 500px;
}

input.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 24px;
  font-size: 1.1rem;
  background: transparent;
  color: #333;
  margin-bottom: 0;
}

/* 영양정보 페이지 전용 검색 입력창 */
.nutrition-search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 300px;
  width: 100%;
}

input.nutrition-search-input {
  width: 100%;
  padding: 12px 16px;
  padding-left: 50px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: white;
  transition: all 0.3s ease;
  outline: none;
  color: #333;
}

input.nutrition-search-input:focus {
  outline: none;
  border-color: #4a69bd;
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

input.nutrition-search-input::placeholder {
  color: #a0aec0;
  font-size: 0.95rem;
}

.nutrition-search-icon {
  position: absolute;
  left: 16px;
  top: 43%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 1;
}

input.nutrition-search-input:focus ~ .nutrition-search-icon {
  color: #4a69bd;
}

input.search-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

input.search-input::placeholder {
  color: #999;
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s ease;
}

.search-icon:hover {
  color: #667eea;
}

.search-icon svg {
  width: 24px;
  height: 24px;
}

.search-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50px;
  padding: 16px 24px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.search-suggestions {
  position: absolute;
  top: 102%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

.suggestion-item {
  padding: 15px 20px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
  border-bottom: none;
  border-radius: 0 0 20px 20px;
}

.suggestion-item:hover {
  background-color: #f8f9fa;
}

/* 로딩 섹션 */
.loading-section {
  text-align: center;
  padding: 60px 20px;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* 이미 통합된 스타일로 대체됨 - purple-accent large 사용 */

.loading-text {
  font-size: 1.1rem;
  color: #666;
  font-weight: 500;
}
/* 결과 섹션 - 새로운 탭 기반 레이아웃 */
.result-section {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.result-section.show {
  opacity: 1;
  transform: translateY(0);
}

.result-container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* 결과 헤더 */
.result-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.ingredient-title {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 200px;
}

.ingredient-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
  color: white;
  flex: 1;
  min-width: 200px;
}

.ingredient-title p {
  font-size: 1.1rem;
  color: #e8e8e8;
  margin: 0;
  line-height: 1.6;
  flex: 2;
  min-width: 300px;
}

/* 구매하기 버튼 스타일 */
.purchase-section {
  flex-shrink: 0;
}

.purchase-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.purchase-btn:hover {
  background: #ff5722 !important;
}

.purchase-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.purchase-btn svg {
  width: 16px;
  height: 16px;
}

/* 탭 네비게이션 */
.tab-navigation {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 20px 16px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.tab-btn:hover {
  color: #495057;
  background: rgba(102, 126, 234, 0.05);
}

.tab-btn.active {
  color: #667eea;
  background: white;
  border-bottom-color: #667eea;
}

.tab-btn.active::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Ingredient Analyzer 탭 네비게이션 */
.ingredient-tab-navigation {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ingredient-tab-navigation::-webkit-scrollbar {
  display: none;
}

.ingredient-tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 20px 16px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.ingredient-tab-btn:hover {
  color: #495057;
  background: rgba(102, 126, 234, 0.05);
}

.ingredient-tab-btn.active {
  color: #667eea;
  background: white;
  border-bottom-color: #667eea;
}

.ingredient-tab-btn.active::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Ingredient Analyzer 탭 콘텐츠 */
.ingredient-tab-content-container {
  min-height: 500px;
}

.ingredient-tab-content {
  display: none;
  padding: 40px;
  animation: fadeInUp 0.5s ease;
}

.ingredient-tab-content.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 개요 탭 */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.overview-card {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 30px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.overview-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #495057;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
}

.quick-facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.fact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fact-label {
  font-size: 0.9rem;
  color: #4a90e2;
  font-weight: 500;
}

.fact-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
}

.storage-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #495057;
}

.compatibility-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.compatibility-card {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 30px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.compatibility-card.good {
  border-left: 4px solid #28a745;
}

.compatibility-card.bad {
  border-left: 4px solid #dc3545;
}

.compatibility-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.compatibility-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #495057;
  margin: 0 0 16px 0;
}

.compatibility-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #495057;
}

/* 영양정보 탭 */
.nutrition-header {
  text-align: center;
  margin-bottom: 40px;
}

.nutrition-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #495057;
  margin: 0;
}

/* 식재료 분석기 영양정보 헤더 */
.ingredient-nutrition-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.ingredient-nutrition-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.ingredient-nutrition-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.nutrition-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.nutrition-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.nutrition-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-color: #4a69bd;
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.nutrition-label {
  font-size: 1.1rem;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nutrition-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a202c;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 건강효과 탭 */
.health-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.health-section {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 30px;
  border: 1px solid #e9ecef;
}

.health-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #495057;
  margin: 0 0 20px 0;
}

.benefits-list,
.components-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.effect-item,
.component-item {
  background: white;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.effect-item:hover,
.component-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.component-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  justify-content: center;
}

.side-effects-section,
.allergy-section {
  background: #fff5f5;
  border-radius: 16px;
  padding: 30px;
  border: 1px solid #fed7d7;
  margin-bottom: 30px;
}

.side-effects-section h3,
.allergy-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #c53030;
  margin: 0 0 20px 0;
}

.side-effects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-effects-list .effect-item {
  background: white;
  border-color: #fed7d7;
}

.allergy-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #c53030;
}

/* 활용법 탭 */
.usage-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.recipes-section,
.traditional-section {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 30px;
  border: 1px solid #e9ecef;
}

.recipes-section h3,
.traditional-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #495057;
  margin: 0 0 20px 0;
}

.recipes-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.recipe-item {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}



.recipe-number {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.recipe-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #495057;
}

.traditional-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #495057;
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e9ecef;
}

/* 추가정보 탭 */
.additional-content {
  max-width: 800px;
  margin: 0 auto;
}

.info-disclaimer,
.data-source {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 30px;
  border: 1px solid #e9ecef;
  margin-bottom: 30px;
}

.info-disclaimer h3,
.data-source h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #495057;
  margin: 0 0 16px 0;
}

.info-disclaimer p,
.data-source p {
  font-size: 1rem;
  line-height: 1.6;
  color: #495057;
  margin: 0;
}

/* 레이아웃 상태 관리 - ingredient-analyzer-page에서 사용 */
body.ingredient-analyzer-page {
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding-top: 40px;
}

body.ingredient-analyzer-page.has-results {
  align-items: stretch;
  justify-content: flex-start;
  padding-top: 20px;
}

body.ingredient-analyzer-page.has-results .analyzer-header {
  margin-bottom: 20px;
  padding: 20px;
}

body.ingredient-analyzer-page.has-results .analyzer-header .page-title {
  font-size: 1.8rem;
}

body.ingredient-analyzer-page.has-results .analyzer-header .page-description {
  display: none;
}

.search-section {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 0px auto;
  transition: all 0.5s ease;
}

body.ingredient-analyzer-page.has-results .search-section {
  max-width: 800px;
  margin-bottom: 20px;
}

/* 음식 영양성분 검색 페이지 전용 스타일 */
body.ingredient-analyzer-page.has-search-results {
  align-items: stretch;
  justify-content: flex-start;
  padding-top: 20px;
}

body.ingredient-analyzer-page.has-search-results .analyzer-header {
  display: none;
}

body.ingredient-analyzer-page.has-search-results .search-section {
  max-width: 800px;
  margin: 20px auto 20px auto;
  transition: all 0.5s ease;
}

body.ingredient-analyzer-page.has-search-results
  .external-nutrition-search-section {
  margin-top: 0;
  padding-top: 0;
}

/* 검색 결과 스타일 */
.search-results-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px 30px;
  border-radius: 20px 20px 0 0;
  margin-bottom: 0;
}

.search-results-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: white;
}

.search-results-header .source-info,
.search-results-header .search-keyword {
  font-size: 1rem;
  margin: 5px 0;
  opacity: 0.9;
}

.external-search-results-list {
  background: white;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  padding: 5px 0px;
}

.external-search-result-item {
  padding: 15px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s ease;
  margin-bottom: 12px;
  background: #ffffff;
  box-shadow: 0px 2px 10px rgba(70, 56, 147, 0.1);
}

.external-search-result-item:last-child {
  margin-bottom: 0;
}

.external-search-result-item {
  cursor: pointer;
}

.external-search-result-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.external-search-result-item .result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  gap: 16px;
  background: #ffffff;
  padding: 0px 0px 5px 0px;
  text-align: left;
}

.external-search-result-item .food-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: #667eea;
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.external-search-result-item .result-actions {
  flex-shrink: 0;
}

.external-search-result-item .btn-detail {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.external-search-result-item .btn-detail:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #1f2937;
}

.external-search-result-item .result-basic-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.external-search-result-item .info-item {
  background: #f9fafb;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 400;
  border: 1px solid #f3f4f6;
}

.external-search-result-item .manufacturer,
.external-search-result-item .weight {
  font-size: 0.8rem;
  color: #9ca3af;
  font-weight: 400;
  margin-top: 4px;
  display: inline-block;
  margin-right: 16px;
}

/* 상세정보 컨테이너 스타일 */
.nutrition-detail-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  overflow: hidden;
}

/* 상세정보가 표시될 때 헤더섹션 숨기고 검색섹션 올리기 */
body.ingredient-analyzer-page.showing-detail .analyzer-header {
  display: none;
}

/* 상세정보가 표시될 때 검색섹션을 상단으로 이동 */
body.ingredient-analyzer-page.showing-detail .search-section {
  margin-top: 0;
  padding-top: 20px;
  order: -1;
}

/* 상세정보가 표시될 때 메인 콘텐츠를 flex로 변경 */
body.ingredient-analyzer-page.showing-detail {
  display: flex;
  flex-direction: column;
}

/* 상세정보가 표시될 때 결과 섹션 레이아웃 조정 */
body.ingredient-analyzer-page.showing-detail .result-section {
  margin-top: 0;
}

.nutrition-detail-container .detail-header {
  background: #ffffff;
  padding: 15px 15px 0px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nutrition-detail-container .detail-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.nutrition-detail-container .btn-close {
  background: rgba(255, 255, 255, 0.2);
  color: #333;
  border: none;
  border-radius: 8px;
  padding: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100px;
  margin-top: 0px;
}

.nutrition-detail-container .btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nutrition-detail-container .detail-content {
  padding: 0px 30px;
}

.nutrition-detail-container .basic-info {
  margin-bottom: 30px;
}

.nutrition-detail-container .info-row {
  display: flex;
  margin-bottom: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.nutrition-detail-container .info-row:last-child {
  border-bottom: none;
}

.nutrition-detail-container .info-row .label {
  font-weight: 600;
  color: #333;
  min-width: 100px;
  margin-right: 15px;
}

.nutrition-detail-container .info-row .value {
  color: #666;
  flex: 1;
}

.nutrition-detail-container .nutrition-table {
  margin-bottom: 20px;
}

.nutrition-detail-container .nutrition-table h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
}

.nutrition-detail-container .nutrition-table table {
  width: 100%;
  border-collapse: collapse;
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
}

.nutrition-detail-container .nutrition-table th,
.nutrition-detail-container .nutrition-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.nutrition-detail-container .nutrition-table th {
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.nutrition-detail-container
  .nutrition-table
  tbody
  tr:nth-child(odd)
  td:first-child {
  background-color: #f8f9fa;
}

.nutrition-detail-container
  .nutrition-table
  tbody
  tr:nth-child(even)
  td:first-child {
  background-color: #f8f9fa;
}

.nutrition-detail-container .nutrition-table tbody td:last-child {
  background-color: white;
}

.nutrition-detail-container .nutrition-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.nutrition-detail-container .nutrition-table tr:last-child td {
  border-bottom: none;
}

.nutrition-detail-container .reference-info,
.nutrition-detail-container .data-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.nutrition-detail-container .reference-info .label,
.nutrition-detail-container .data-info .label {
  font-weight: 600;
  color: #333;
  margin-right: 10px;
}

.nutrition-detail-container .reference-info .value,
.nutrition-detail-container .data-info .value {
  color: #666;
}

/* Restaurant Recommendation Page Styles */
.recommendation-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.step-container {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.step-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
  text-align: center;
}

.location-section {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}

.location-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* 통합된 프로필 섹션 스타일 - 모든 페이지에서 사용 */
.profile-section {
  display: none;
}

.profile-section.active {
  display: block;
}

.profile-group {
  margin-bottom: 15px;
}

.profile-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.profile-group input,
.profile-group textarea,
.profile-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.btn {
  background: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

.btn:hover {
  background: #0056b3;
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.result-container {
  margin-top: 20px;
}

.restaurant-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  border-left: 4px solid #007bff;
}

.restaurant-name {
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.restaurant-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.menu-section {
  margin-top: 15px;
}

.menu-item {
  background: white;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 5px;
  border-left: 3px solid #28a745;
}

.menu-name {
  font-weight: bold;
  color: #333;
}

.menu-price {
  color: #dc3545;
  font-weight: bold;
}

.menu-desc {
  color: #666;
  font-size: 0.9em;
  margin-top: 5px;
}

.score-badge {
  background: #ffc107;
  color: #333;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
}

.error {
  background: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
}

.success {
  background: #d4edda;
  color: #155724;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
}

/* 식당 추천 전용 로딩 스타일 */
.restaurant-loading {
  text-align: center;
  padding: 40px 20px;
  background: #f8f9fa;
  border-radius: 10px;
  margin: 20px 0;
}

.restaurant-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.restaurant-loading-step {
  display: flex;
  align-items: center;
  margin: 15px 0;
  padding: 10px;
  border-radius: 5px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.restaurant-loading-step.pending {
  opacity: 0.5;
}

.restaurant-loading-step.active {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
}

.restaurant-loading-step.completed {
  background: #e8f5e8;
  border-left: 4px solid #4caf50;
}

.restaurant-step-icon {
  margin-right: 15px;
  font-size: 20px;
  min-width: 30px;
  text-align: center;
}

.restaurant-step-text {
  flex: 1;
  font-size: 16px;
  color: #333;
}

.info {
  background: #d1ecf1;
  color: #0c5460;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
}

/* 메시지 스타일 개선 */
.success,
.error,
.info {
  position: relative;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-weight: 500;
  animation: slideInDown 0.3s ease-out;
}

.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Restaurant Page Body Style */
body.restaurant-page {
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Noto Sans KR", sans-serif;
}

body.restaurant-page .recommendation-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* Restaurant Recommendation Step Styles */

/* Step Content */
.step-content {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.step-content.active {
  display: block;
}

.step-description {
  margin-bottom: 15px;
  color: #666;
  font-size: 1.1em;
  line-height: 1.5;
  text-align: center;
}

/* Map Styles */
.map-container {
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.kakao-map {
  width: 100%;
  height: 350px;
  border-radius: 10px;
}

/* Location Info */
.location-info {
  margin-bottom: 0px;
}

.location-input-group {
  display: flex;
  flex-direction: column;
}

.location-input-group label {
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.location-input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: #f8f9fa;
}

.location-input:focus {
  border-color: #4a69bd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

/* Location Buttons */
.location-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  width: 100%;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-primary {
  background: #4a69bd;
  color: white;
}

.btn-primary:hover {
  background: #3b5093;
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 위치 버튼 스타일 - 마진 제거 */
.location-btn {
  background-color: #4a69bd;
  color: white;
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0;
  /* 마진 제거 */
  width: 100%;
  flex: 1;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(74, 105, 189, 0.2);
}

.location-btn:hover:not(:disabled) {
  background-color: #3b5093;
  transform: translateY(-2px);
}

.location-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  box-shadow: none;
}

.location-btn-secondary {
  background: #6c757d;
  color: white;
}

.location-btn-secondary:hover {
  background: #5a6268;
}

.location-btn-primary {
  background: #4a69bd;
  color: white;
}

.location-btn-primary:hover {
  background: #3b5093;
}

.location-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 주소 검색 스타일 */
.address-search-container {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

.address-search-input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  margin: 0;
  margin-bottom: 0;
}

.address-search-input:focus {
  border-color: #6a89cc;
  outline: none;
  box-shadow: 0 0 0 3px rgba(106, 137, 204, 0.2);
}

.address-search-btn {
  flex-shrink: 0;
  width: auto;
  min-width: 80px;
  padding: 12px 16px;
  background-color: #4a69bd;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
}

.address-search-btn:hover {
  background-color: #3b5093;
  transform: translateY(-1px);
}

.address-search-btn-custom {
  margin: 0;
  margin-top: 0;
  margin-bottom: 15px;
}

/* 스텝 네비게이션 버튼 스타일 - 마진 제거 */
.step-btn {
  background-color: #4a69bd;
  color: white;
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0;
  /* 마진 제거 */
  min-width: 120px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(74, 105, 189, 0.2);
}

.step-btn:hover:not(:disabled) {
  background-color: #3b5093;
  transform: translateY(-2px);
}

.step-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  box-shadow: none;
}

.step-btn-secondary {
  background: #6c757d;
  color: white;
}

.step-btn-secondary:hover {
  background: #5a6268;
}

.step-btn-primary {
  background: #4a69bd;
  color: white;
}

.step-btn-primary:hover {
  background: #3b5093;
}

.step-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Step Navigation */
.step-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #e0e6ed;
}

.step-navigation .btn {
  min-width: 120px;
}

/* Summary Section */
.summary-section {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.summary-section h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.2em;
}

.summary-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.summary-item {
  padding: 10px;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #4a69bd;
}

.summary-item strong {
  color: #333;
  margin-right: 8px;
}

.summary-item span {
  color: #666;
}

/* 요구사항 섹션 스타일 */
.requirement-section {
  margin-bottom: 30px;
}

.requirement-group {
  margin-bottom: 25px;
}

.requirement-group > .checkbox-label {
  display: flex;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  font-size: 1.1em;
}

/* 가격대 옵션 스타일 */
.price-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  background: white;
  margin-top: 0px;
  margin-bottom: 0px;
  transition: all 0.3s ease;
  min-width: 140px;
  position: relative;
}

.checkbox-option:hover {
  border-color: #4a69bd;
  background: #f8f9ff;
}

.checkbox-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkbox-option .checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 50%;
  margin-right: 10px;
  position: relative;
  transition: all 0.3s ease;
  background: white;
}

.checkbox-option input[type="radio"]:checked + .checkmark {
  border-color: #4a69bd;
  background: #4a69bd;
}

.checkbox-option input[type="radio"]:checked + .checkmark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.checkbox-option input[type="radio"]:checked ~ .option-text {
  color: #4a69bd;
  font-weight: 600;
}

.checkbox-option .option-text {
  font-size: 0.95em;
  color: #555;
  transition: color 0.3s ease;
}

/* 체크박스 라벨 스타일 */
.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 16px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  background: white;
  transition: all 0.3s ease;
  margin-bottom: 0;
  position: relative;
}

.checkbox-label:hover {
  border-color: #4a69bd;
  background: #f8f9ff;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-label .checkmark {
  width: 22px;
  height: 22px;
  border: 2px solid #ddd;
  border-radius: 6px;
  margin-right: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  flex-shrink: 0; /* ✅ 크기 줄어드는 것 방지 */
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  border-color: #4a69bd;
  background: #4a69bd;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.checkbox-label input[type="checkbox"]:checked ~ .label-text {
  color: #4a69bd;
  font-weight: 600;
}

.checkbox-label .label-text {
  font-size: 1em;
  color: #555;
  transition: color 0.3s ease;
}

.checkbox-option.option-any {
  min-width: 105px;
  padding-left: 12px;
  padding-right: 0px;
}

.category-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.category-options .checkbox-option {
  flex: 1 1 23%;
  /* 한 줄에 4개, 3개로 하고 싶으면 31% */
  min-width: 160px;
  max-width: 240px;
  box-sizing: border-box;
}

/* 식당 추천 페이지 로딩 단계 스타일 */
.loading-step {
  display: flex;
  align-items: center;
  margin: 15px 0;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.loading-step.pending {
  opacity: 0.5;
  background: #f8f9fa;
}

.loading-step.active {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
}

.loading-step.completed {
  background: #e8f5e8;
  border-left: 4px solid #4caf50;
}

.step-icon {
  font-size: 20px;
  margin-right: 15px;
  min-width: 30px;
  text-align: center;
}

.step-text {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

/* 식당 추천 결과 스타일 */
.restaurant-header {
  margin-bottom: 15px;
}

.recommendation-reason {
  background: #f0f8ff;
  padding: 12px;
  border-radius: 8px;
  margin: 10px 0;
  font-size: 14px;
  color: #2c5aa0;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.recommendation-keyword {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  margin: 2px 3px;
  font-size: 12px;
  font-weight: 500;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  color: white;
  vertical-align: middle;
}

/* 키워드 색상 변형 */
.recommendation-keyword.keyword-blue {
  background: #4a69bd;
}

.recommendation-keyword.keyword-green {
  background: #27ae60;
}

.recommendation-keyword.keyword-purple {
  background: #8e44ad;
}

.recommendation-keyword.keyword-orange {
  background: #e67e22;
}

.recommendation-keyword.keyword-pink {
  background: #e91e63;
}

.recommendation-keyword:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.recommendation-keyword.keyword-blue:hover {
  background: #3a5a9d;
}

.recommendation-keyword.keyword-green:hover {
  background: #229954;
}

.recommendation-keyword.keyword-purple:hover {
  background: #7d3c98;
}

.recommendation-keyword.keyword-orange:hover {
  background: #d35400;
}

.recommendation-keyword.keyword-pink:hover {
  background: #c2185b;
}

.recommended-menus-section {
  background: #fff3cd;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-left: 4px solid #ffc107;
}

.recommended-menus-section h4 {
  margin: 0 0 10px 0;
  color: #856404;
  font-size: 16px;
}

.recommended-menu-item {
  background: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 5px 0;
  border: 1px solid #ffeaa7;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recommended-menu-item .menu-name {
  font-weight: 500;
  color: #856404;
}

.recommended-menu-item .menu-price {
  color: #e74c3c;
  font-weight: 600;
  margin-left: 10px;
  font-size: 0.9em;
}

.health-considerations {
  background: #d4edda;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

.health-considerations h4 {
  margin: 0 0 10px 0;
  color: #155724;
  font-size: 16px;
}

.health-considerations p {
  margin: 0;
  color: #155724;
  font-size: 14px;
}

/* 식당 카드 개선 */
.restaurant-card {
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.restaurant-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.restaurant-name {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.score-badge {
  background: #4a69bd;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.restaurant-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 15px 0;
  font-size: 14px;
}

.restaurant-info > div {
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
}

.restaurant-info strong {
  color: #4a69bd;
  font-weight: 600;
}

/* 메뉴 섹션 개선 */
.menu-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e0e6ed;
}

.menu-section h4 {
  color: #4a69bd;
  margin-bottom: 15px;
  font-size: 16px;
}

.menu-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  margin: 8px 0;
  border-left: 3px solid #4a69bd;
}

.menu-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.menu-price {
  color: #e74c3c;
  font-weight: 500;
  margin-bottom: 5px;
}

.menu-desc {
  color: #7f8c8d;
  font-size: 13px;
  line-height: 1.4;
}

/* 네트워크 오류 메시지 */
.network-error-message {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

.network-error-message h3 {
  margin: 0 0 10px 0;
  color: #856404;
  font-size: 1.2rem;
}

.network-error-message p {
  margin: 0 0 15px 0;
  color: #856404;
}

.network-error-message button {
  background-color: #856404;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.network-error-message button:hover {
  background-color: #6c5ce7;
}

/* AI 추천 오류 메시지 */
.ai-recommendation-error-message {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

.ai-recommendation-error-message h3 {
  margin: 0 0 10px 0;
  color: #721c24;
  font-size: 1.2rem;
}

.ai-recommendation-error-message p {
  margin: 0 0 15px 0;
  color: #721c24;
}

.ai-recommendation-error-message .retry-btn {
  background-color: #721c24;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.ai-recommendation-error-message .retry-btn:hover {
  background-color: #5a1a1a;
}

/* 추천 결과 지도 스타일 */
.recommendation-map-section {
  margin: 20px 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.recommendation-map-section h3 {
  margin: 0;
  padding: 20px 24px 16px;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid #e0e6ed;
  text-align: center;
}

.recommendation-map {
  width: 100%;
  height: 400px;
  border-radius: 0 0 12px 12px;
}
/* 식당 슬라이더 스타일 */
.restaurant-slider-container {
  margin: 30px 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.restaurant-slider-container h3 {
  margin: 0;
  padding: 20px 24px 16px;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid #e0e6ed;
  text-align: center;
}

.restaurant-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0px 0 20px 0;
}

.restaurant-slider {
  flex: 1;
  overflow: hidden;
  margin: 0 50px;
}

.restaurant-slides {
  display: flex;
  transition: transform 0.3s ease;
}

.restaurant-slide {
  min-width: 100%;
  display: none;
}

.restaurant-slide:first-child {
  display: block;
}

.restaurant-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(74, 105, 189, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 50px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.restaurant-slider-arrow:hover:not(:disabled) {
  background: rgba(59, 80, 147, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.restaurant-slider-arrow:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.restaurant-slider-arrow.prev {
  left: 10px;
}

.restaurant-slider-arrow.next {
  right: 10px;
}

.restaurant-slider-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 30px 0 7px 0;
}

.restaurant-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.restaurant-slider-dot:hover {
  background: #bbb;
}

.restaurant-slider-dot.active {
  background: #4a69bd;
  transform: scale(1.2);
}

/* 식재료 분석 탭 스타일  */
.ingredient-tab-navigation {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 30px 0 20px 0;
  background: #f8fafc;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ingredient-tab-navigation::-webkit-scrollbar {
  display: none;
}

.ingredient-tab-btn {
  flex: 1;
  min-width: 100px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
  position: relative;
}

.ingredient-tab-btn:hover {
  background: #e2e8f0;
  color: #334155;
  font-weight: 600;
  transform: translateY(-1px);
}

.ingredient-tab-btn.active {
  background: #4a69bd;
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(74, 105, 189, 0.3);
  transform: translateY(-2px);
}

.ingredient-tab-btn.active:hover {
  background: #3b5093;
  transform: translateY(-2px);
}
/* 탭 콘텐츠 컨테이너 스타일 */
.ingredient-tab-content-container {
  margin-top: 20px;
}

.ingredient-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.ingredient-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
} /* 활용 팁 스타일
 */
.ingredient-tips-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #4a69bd;
  transition: all 0.3s ease;
}

.tip-item:hover {
  background: #f1f5f9;
  transform: translateX(4px);
}

.tip-number {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: #4a69bd;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.tip-content {
  flex: 1;
  color: #334155;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ===== 영양 정보 페이지 스타일 ===== */

/* 영양 정보 페이지 전용 바디 스타일 */
body.nutrition-info-page {
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Noto Sans KR", sans-serif;
}

body.nutrition-info-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

/* 영양 정보 헤더 */
.nutrition-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0 20px;
  min-height: 20vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.nutrition-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.nutrition-page-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.nutrition-page-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #e2e8f0;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  margin: 0 auto 1rem auto;
  position: relative;
  z-index: 2;
}

/* 필터 섹션 */
.nutrition-filters {
  padding: 0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.filter-container {
  display: flex;
  flex-direction: column;
  gap: 0px;
  align-items: flex-end;
}

/* 검색 컨테이너 */
.nutrition-search-container {
  display: flex;
  gap: 10px;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: white;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #4a69bd;
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

.search-btn {
  padding: 12px 20px;
  background: #4a69bd;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: #3b5093;
  transform: translateY(-1px);
}

.search-icon {
  font-size: 1.2rem;
}

/* 필터 옵션 */
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
  justify-content: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 150px;
}

.filter-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
}

.filter-select {
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #4a69bd;
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

.clear-filters-btn {
  padding: 10px 16px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  height: fit-content;
}

.clear-filters-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* 영양 정보 콘텐츠 섹션 */
/* 중복 제거 - 위의 통합된 스타일 사용 */

/* 로딩, 에러, 빈 상태 */
.loading-container,
.error-container,
.empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

/* 중복 제거됨 - 통합된 스타일 사용 */

.error-container .error-icon,
.empty-container .empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.error-container h3,
.empty-container h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 10px 0;
}

.error-container p,
.empty-container p {
  font-size: 1rem;
  color: #718096;
  margin: 0 0 20px 0;
  max-width: 400px;
}

.retry-btn {
  padding: 12px 24px;
  background: #4a69bd;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background: #3b5093;
  transform: translateY(-1px);
}

/* 영양 정보 그리드 */
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* 영양 정보 카드 - 통합된 스타일 */
/* 중복 제거 - 위의 통합된 스타일 사용 */

/* 카드 썸네일 */
.nutrition-card-thumbnail {
  position: relative;
  height: 140px;
  overflow: hidden;
}

.nutrition-card-thumbnail img,
.nutrition-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.nutrition-card:hover .nutrition-card-thumbnail img,
.nutrition-card:hover .nutrition-thumbnail img {
  transform: scale(1.05);
}

/* 카드 타입 라벨 */
.nutrition-card-type,
.nutrition-type {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nutrition-card-type[data-type="paper"],
.nutrition-type[data-type="논문"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.nutrition-card-type[data-type="youtube"],
.nutrition-type[data-type="영상"] {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.nutrition-card-type[data-type="news"],
.nutrition-type[data-type="뉴스"] {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* 신뢰도 점수 */
.nutrition-card-trust-score,
.trust-score {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nutrition-card-trust-score.high,
.trust-score.high {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.nutrition-card-trust-score.medium,
.trust-score.medium {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.nutrition-card-trust-score.low,
.trust-score.low {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #8b4513;
}

.nutrition-card:hover .trust-score {
  background: rgba(0, 0, 0, 0.8);
}

/* 카드 콘텐츠 */
.nutrition-card-content {
  padding: 15px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nutrition-card-title,
.nutrition-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 12px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nutrition-card-summary,
.nutrition-summary {
  font-size: 0.9rem;
  color: #718096;
  line-height: 1.5;
  margin: 0 0 15px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 태그 */
.nutrition-card-tags,
.nutrition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}

.nutrition-tag {
  padding: 4px 8px;
  background: #edf2f7;
  color: #4a5568;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nutrition-tag:hover {
  background: #e2e8f0;
  color: #2d3748;
}

/* 메타 정보 */
.nutrition-card-meta,
.nutrition-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #a0aec0;
}

.nutrition-source {
  font-weight: 500;
  color: #4a69bd;
}

.nutrition-date {
  color: #718096;
}

/* 통계 */

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: #718096;
}

.stat-icon {
  font-size: 0.9rem;
}

.stat-count {
  font-weight: 500;
}

/* 액션 버튼 */
.nutrition-card-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #718096;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
  color: #4a5568;
}

.action-btn.active {
  background: #4a69bd;
  border-color: #4a69bd;
  color: white;
}

.action-btn.active:hover {
  background: #3b5093;
  border-color: #3b5093;
}

.action-text {
  font-size: 0.75rem;
}

/* 네비게이션 활성 상태 */
.nav-menu a.active {
  color: #4a69bd;
  font-weight: 600;
}

/* 중복 제거 - 위의 통합된 토스트 스타일 사용 */

/* 영양 정보 로딩 및 에러 상태 */
.nutrition-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #666;
}

/* 중복 제거 - 위의 통합된 스피너 스타일 사용 */

.nutrition-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #666;
}

/* 중복 제거 - 위의 통합된 태그 스타일 사용 */
* 위치 설정 관련 스타일 */ .location-info {
  margin: 20px 0;
}

.location-input-group {
  margin-bottom: 0px;
}

.location-input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.address-search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.address-search-input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

.address-search-btn {
  padding: 12px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  white-space: nowrap;
}

.address-search-btn:hover {
  background: var(--secondary);
}

.location-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #f8f9fa;
}

.location-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 150px;
}

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

.location-btn-primary:hover {
  background: var(--secondary);
}

.location-btn-secondary {
  background: #6c757d;
  color: white;
}

.location-btn-secondary:hover {
  background: #5a6268;
}

.location-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 단계 제목 스타일 */
.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 15px;
  text-align: center;
}

.step-description p {
  margin: 0;
  font-size: 1rem;
}
/* 음식 영양성분 검색 관련 스타일 */
.search-result-count {
  margin-bottom: 20px;
  padding: 10px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #666;
  border-left: 4px solid #007bff;
}

.external-nutrition-card {
  position: relative;
  transition: all 0.3s ease;
}

.external-nutrition-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.nutrition-card-preview {
  display: flex;
  gap: 15px;
  margin: 10px 0;
  font-size: 0.85rem;
  color: #666;
}

.nutrition-card-preview span {
  padding: 4px 8px;
  background: #f1f3f4;
  border-radius: 4px;
}

.nutrition-detail-container {
  margin-top: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.nutrition-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.nutrition-detail-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.close-detail-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.close-detail-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nutrition-detail-content {
  padding: 25px;
}

.nutrition-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.nutrition-detail-table thead th {
  background: #f8f9fa;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #dee2e6;
}

.nutrition-detail-table tbody th,
.nutrition-detail-table tbody td {
  padding: 10px 15px;
  border-bottom: 1px solid #dee2e6;
}

.nutrition-detail-table tbody th {
  background: #f8f9fa;
  font-weight: 500;
  width: 30%;
}

.nutrition-detail-table tbody td {
  font-weight: 400;
}

.nutrition-detail-table .energy-row {
  background: rgba(255, 193, 7, 0.1);
}

.nutrition-detail-table .energy-row th,
.nutrition-detail-table .energy-row td {
  font-weight: 600;
  color: #856404;
}

.product-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #28a745;
}

.product-info h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.1rem;
}

.product-info p {
  margin: 8px 0;
  color: #666;
  line-height: 1.5;
}

.product-info strong {
  color: #333;
  font-weight: 600;
}
/* 영양성분 검색 관련 스타일 */
.search-actions {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.error-container {
  background-color: #fff3f3;
  border-left: 4px solid #dc3545;
  color: #dc3545;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 15px 0;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.nutrition-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nutrition-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nutrition-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a69bd;
  margin-bottom: 5px;
}

.nutrition-card-meta {
  font-size: 0.9rem;
  color: #666;
}

.nutrition-card-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.nutrition-detail-btn {
  background-color: #4a69bd;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 15px;
  font-size: 0.9rem;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  transition: background-color 0.2s;
}

.nutrition-detail-btn:hover {
  background-color: #3b5093;
}

.nutrition-detail-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-top: 30px;
}

.nutrition-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e6ed;
  padding-bottom: 10px;
}

.nutrition-detail-header h3 {
  font-size: 1.3rem;
  color: #4a69bd;
  margin: 0;
}

.close-detail-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: auto;
  box-shadow: none;
}

.close-detail-btn:hover {
  color: #333;
}

.nutrition-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.nutrition-detail-table th,
.nutrition-detail-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #e0e6ed;
}

.nutrition-detail-table td {
  color: #333;
  font-weight: 500;
}

.energy-row {
  background-color: #f7f9fc;
}

.product-info {
  background-color: #f7f9fc;
  padding: 15px;
  border-radius: 8px;
}

.product-info h4 {
  color: #4a69bd;
  margin-top: 0;
  margin-bottom: 10px;
}

.product-info p {
  margin: 5px 0;
}

.search-result-count {
  grid-column: 1 / -1;
  font-size: 1rem;
  color: #666;
  margin-bottom: 10px;
}

/* 검색 아이콘 스타일 */
.search-icon {
  position: absolute;
  right: 24px; /* 오른쪽에서 더 멀어지게 = 왼쪽으로 이동 */
  top: 53%;
  transform: translateY(-50%);
  color: #4a69bd;
  cursor: pointer;
  transition: color 0.2s ease;
}

.search-icon:hover {
  color: #3b5093;
} /* 드롭
다운 메뉴 스타일 */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  display: inline-block;
  padding: 0 0px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  cursor: pointer;
}

.dropdown-toggle:hover {
  color: var(--primary);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px); /* 기존 100%에서 10px 더 내림 */
  left: 0;
  background-color: white;
  min-width: 130px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 6px 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0); /* translateY 값 제거 (이미 top으로 조정) */
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 400;
  transition: background-color 0.2s, color 0.2s;
}

.dropdown-menu a:hover {
  background-color: #f5f8ff;
  color: var(--primary);
}

/* 잇플스토어 드롭다운 메뉴 위치 조정 */
.nav-shop-link + .dropdown-menu {
  min-width: 140px;
  right: auto;
  left: 0;
  /* top은 기본 드롭다운 메뉴 설정을 따름 */
}
/* 토스트 메시지 스타일 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
}

.toast-message {
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  max-width: 300px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.toast-message.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-message.toast-success {
  background: #10b981;
}

.toast-message.toast-error {
  background: #ef4444;
}

.toast-message.toast-info {
  background: #3b82f6;
}

.toast-message.toast-warning {
  background: #f59e0b;
}

/* 모바일 하단 네비게이션 */
.footer-nav-mobile {
  display: none;
}

/* AI 기능 모달 */
.ai-feature-modal {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 65px; /* 하단 네비게이션 높이만큼 위로 */
  width: 100%;
  height: auto;
  background: none;
  z-index: 99999; /* 매우 높은 z-index로 설정 */
  justify-content: center;
  align-items: flex-end;
  pointer-events: none; /* 모달 배경은 클릭 이벤트 무시 */
}
.ai-feature-modal.active {
  display: flex;
  pointer-events: auto; /* 활성화 시 클릭 이벤트 허용 */
}
.ai-feature-modal-content {
  background: #fff;
  border-radius: 16px 16px 16px 16px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  padding: 10px 8px 10px 8px;
  width: 98%;
  max-width: 100vw;
  margin: 0 auto 0 auto;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.ai-feature-modal-content ul {
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  width: 100%;
  justify-content: center;
  align-items: center;
}
.ai-feature-modal-content li {
  margin: 0;
  padding: 0;
}
.ai-feature-modal-content a {
  color: #4a69bd;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.15s;
  white-space: nowrap;
  display: inline-block;
}
.ai-feature-modal-content a:hover {
  background: #f0f4fa;
}
.ai-feature-modal-close {
  position: absolute;
  right: 8px;
  top: 4px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #4a69bd;
  cursor: pointer;
  z-index: 1;
}

.footer-nav-ai-btn {
  margin: 0;
  box-shadow: none;
}

/* 이메일 입력 필드 특별 스타일 */
input[type="email"] {
  font-family: inherit;
}

input[type="email"]:invalid {
  box-shadow: none;
}

input[type="email"]:focus:invalid {
  border-color: #e74c3c;
  background: #fdf2f2;
}

/* 비밀번호 재설정 페이지 스타일 */
.reset-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 40px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.reset-container h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #2c3e50;
  font-size: 1.5rem;
  font-weight: 600;
}

/* 로딩 상태 스타일 */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading button {
  position: relative;
}

.loading button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 성공/에러 메시지 스타일 개선 */
.success-message {
  color: #27ae60;
  background: #d5f4e6;
  border: 1px solid #27ae60;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
  text-align: center;
}

.error-message {
  color: #e74c3c;
  background: #fdf2f2;
  border: 1px solid #e74c3c;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
  text-align: center;
}

/* 프로필 완성도 관련 스타일 */
.profile-completion-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.completion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.completion-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.completion-reward-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.reward-icon {
  font-size: 1.2rem;
}

.completion-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.completion-stats {
  font-size: 0.9rem;
  opacity: 0.9;
}

.completed-count,
.total-count {
  font-weight: 600;
  font-size: 1rem;
}

.completion-guide-toggle button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.completion-guide-toggle button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* 모달 스타일 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 20px 24px;
}

.guide-section {
  margin-bottom: 24px;
}

.guide-section h4 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 1.1rem;
}

.guide-section ul {
  margin: 0;
  padding-left: 20px;
}

.guide-section li {
  margin-bottom: 8px;
  color: #666;
}

.guide-steps ol {
  margin: 0;
  padding-left: 20px;
}

.guide-steps li {
  margin-bottom: 8px;
  color: #666;
  line-height: 1.5;
}

/* 보상 모달 스타일 */
.reward-modal .modal-content {
  max-width: 400px;
  text-align: center;
}

.reward-content {
  padding: 32px 24px;
}

.reward-animation {
  animation: rewardPulse 0.6s ease-out;
}

@keyframes rewardPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.reward-icon-large {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.reward-content h2 {
  margin: 0 0 16px 0;
  color: #333;
  font-size: 1.8rem;
}

.reward-message {
  margin: 0 0 24px 0;
  color: #666;
  font-size: 1.1rem;
  line-height: 1.5;
}

.reward-points {
  color: #4a69bd;
  font-size: 1.3rem;
}

.reward-details {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.points-info {
  color: #666;
  font-size: 1rem;
}

.points-info strong {
  color: #333;
}

.reward-confirm-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reward-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 프로그레스 바 개선 */
.mypage-progress-bar-container {
  position: relative;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
}

.mypage-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #45a049);
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
  width: 0%;
}

.mypage-progress-bar-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  z-index: 1;
}

/* 식당 추천 결과 스타일 */
.recommendation-result {
  background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
  border: 1px solid #e1f5fe;
  border-radius: 16px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(74, 105, 189, 0.08);
  position: relative;
  overflow: hidden;
}

.recommendation-result::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.result-message {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-message::before {
  content: "🎯";
  font-size: 1.4rem;
}

.result-count {
  color: #4a69bd;
  font-weight: 700;
  font-size: 1.3rem;
}

.result-guide {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-guide::before {
  content: "💡";
  font-size: 1rem;
}

/* 영양성분 검색 결과 스타일 */
.search-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.search-result-count {
  font-weight: 600;
  color: var(--text-color);
  font-size: 1.1rem;
}

.search-result-sources {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

.nutrition-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nutrition-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.nutrition-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.nutrition-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.4;
  flex: 1;
  margin-right: 10px;
}

.nutrition-card-meta {
  font-size: 0.9rem;
  color: #666;
}

.nutrition-card-preview {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.nutrition-card-preview span {
  font-size: 0.9rem;
  color: #555;
  background: #f1f3f4;
  padding: 4px 8px;
  border-radius: 4px;
}

.nutrition-detail-btn {
  background: var(--primary);
  color: var(--btn-text);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.nutrition-detail-btn:hover {
  background: var(--secondary);
}

/* 데이터 출처 표시 */
.data-source {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.csv-source {
  background: #e8f5e8;
  color: #2d5a2d;
  border: 1px solid #c3e6c3;
}

.api-source {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #bbdefb;
}
/* 상세정보 모달 스타일 */
.nutrition-detail-container {
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.nutrition-detail-header {
  background: var(--primary);
  color: var(--btn-text);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-title-section {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.detail-title-section h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.nutrition-detail-header .data-source {
  background: rgba(255, 255, 255, 0.2);
  color: var(--btn-text);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.close-detail-btn {
  background: none;
  border: none;
  color: var(--btn-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.close-detail-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nutrition-detail-content {
  padding: 25px;
}

.nutrition-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
  background: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nutrition-detail-table thead {
  background: var(--card-bg);
}

.nutrition-detail-table th,
.nutrition-detail-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.nutrition-detail-table th {
  font-weight: 600;
  color: var(--text-color);
  background: var(--card-bg);
}

.nutrition-detail-table tbody th {
  background: #f8f9fa;
  font-weight: 500;
  width: 30%;
}

.nutrition-detail-table .energy-row {
  background: #fff3cd;
}

.nutrition-detail-table .energy-row th,
.nutrition-detail-table .energy-row td {
  font-weight: 600;
  color: #856404;
}

.product-info {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.product-info h4 {
  margin: 0 0 15px 0;
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
}

.product-info p {
  margin: 8px 0;
  color: #555;
  line-height: 1.5;
}

.product-info strong {
  color: var(--text-color);
  font-weight: 600;
}

/* 로딩 및 에러 스타일 */
.loading-container {
  text-align: center;
  padding: 40px;
  color: #666;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error-container {
  background: #f8d7da;
  color: #721c24;
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  margin-bottom: 20px;
  font-weight: 500;
}
/* 상세정보 페이지 버튼 스타일 */
.btn-back-to-list {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(74, 105, 189, 0.3);
  transition: all 0.3s ease;
  margin: 0;
}

.btn-back-to-list:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 105, 189, 0.4);
}

.btn-back-to-list .back-icon {
  font-size: 16px;
  font-weight: bold;
}

.btn-purchase {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-left: auto;
  max-width: 130px;
  margin-top: 0px;
}

.btn-purchase:hover {
  background: #e55a2b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.btn-purchase .purchase-icon {
  font-size: 16px;
}

/* 상세정보 헤더 스타일 수정 */
.nutrition-detail-container .detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.nutrition-detail-container .detail-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
}
/* 정부승인 제품 섹션 스타일 */
.government-products-section {
  margin-top: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f4f8 100%);
  border-radius: 16px;
  border: 2px solid #e1ecf4;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.government-section-header {
  text-align: center;
  margin-bottom: 25px;
}

.government-section-header h4 {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c3e50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.government-section-header .section-description {
  margin: 0;
  font-size: 0.95rem;
  color: #5a6c7d;
  font-weight: 500;
}

.government-section-header .no-products-message {
  margin: 0;
  font-size: 0.95rem;
  color: #7a8b9a;
  font-style: italic;
}

.government-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  align-items: start;
}

.government-product-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e8eef5;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
}

.government-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
  border-color: #3498db;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.product-main-info h5.product-name {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.3;
}

.product-company {
  font-size: 0.85rem;
  color: #7a8b9a;
  font-weight: 500;
}

.product-badges {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.dosage-badge {
  background: #e8f4f8;
  color: #2980b9;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* 건강고민 뱃지 섹션 */
.health-concerns-section {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
  padding: 8px 0;
}

.health-concern-badge {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 16px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}

.health-concern-badge:hover {
  background: #fff2a8;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

.approval-badge {
  background: #d5f4e6;
  color: #27ae60;
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 8px;
  font-weight: 600;
}

.product-function {
  margin-bottom: 16px;
}

.function-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #34495e;
  margin-bottom: 6px;
}

.function-text {
  font-size: 0.85rem;
  color: #5a6c7d;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp:2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-details {
  margin-bottom: 20px;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #7a8b9a;
  min-width: 50px;
  flex-shrink: 0;
}

.detail-value {
  font-size: 0.8rem;
  color: #5a6c7d;
  line-height: 1.3;
  flex: 1;
}

.product-actions {
  display: flex;
  gap: 10px;
}

.gov-product-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gov-product-btn.primary {
  background: #3498db;
  color: white;
}

.gov-product-btn.primary:hover {
  background: #2980b9;
  transform: translateY(-1px);
}

.gov-product-btn.secondary {
  background: #ecf0f1;
  color: #5a6c7d;
  border: 1px solid #d5dbdb;
}

.gov-product-btn.secondary:hover {
  background: #d5dbdb;
  color: #34495e;
}

.more-products-card {
  background: #f8f9fa;
  border: 2px dashed #d5dbdb;
  border-radius: 12px;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s ease;
  grid-column: span 2;
}

.more-products-card:hover {
  border-color: #3498db;
  background: #f0f8ff;
}

.more-products-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.more-count {
  font-size: 1rem;
  font-weight: 600;
  color: #5a6c7d;
}

.show-more-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.show-more-btn:hover {
  background: #2980b9;
  transform: translateY(-1px);
}

/* 제품 상세 모달 스타일 */
.product-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.product-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.product-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px 20px 30px;
  border-bottom: 1px solid #e8eef5;
}

.product-modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c3e50;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #7a8b9a;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f8f9fa;
  color: #34495e;
}

.product-modal-body {
  padding: 25px 30px;
}

.product-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.product-info-grid .info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-info-grid .info-item.full-width {
  grid-column: 1 / -1;
}

.product-info-grid .info-item label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #34495e;
}

.product-info-grid .info-item span {
  font-size: 0.9rem;
  color: #5a6c7d;
  line-height: 1.4;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e8eef5;
}

.product-modal-footer {
  padding: 20px 30px 25px 30px;
  border-top: 1px solid #e8eef5;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  align-items: center;
  gap: 8px;
}

.modal-btn.primary {
  background: #3498db;
  color: white;
}

.modal-btn.primary:hover {
  background: #2980b9;
}

.modal-btn.secondary {
  background: #ecf0f1;
  color: #5a6c7d;
  border: 1px solid #d5dbdb;
}

.modal-btn.secondary:hover {
  background: #d5dbdb;
  color: #34495e;
}
/* 정부승인 제품 전체 목록 모달 스타일 */
.government-products-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.government-products-modal-content {
  background: white;
  border-radius: 20px;
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  width: 1200px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.government-products-modal-content .modal-header {
  color: white;
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 20px 20px 0 0;
}

.government-products-modal-content .modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.government-products-modal-content .modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}

.products-count {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
  padding: 10px;
  background: #f8f9ff;
  border-radius: 10px;
}

.government-products-grid-modal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
}

.government-product-card-modal {
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 15px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.government-product-card-modal:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.government-product-card-modal .product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.government-product-card-modal .product-main-info {
  flex: 1;
}

.government-product-card-modal .product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 5px 0;
  line-height: 1.3;
}

.government-product-card-modal .product-company {
  font-size: 0.9rem;
  color: #7f8c8d;
  font-weight: 500;
}

.government-product-card-modal .product-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.government-product-card-modal .health-concerns-section {
  margin: 10px 0;
  padding: 6px 0;
}

.government-product-card-modal .health-concern-badge {
  font-size: 0.8rem;
  padding: 5px 10px;
}

.government-product-card-modal .product-function {
  margin-bottom: 15px;
}

.government-product-card-modal .function-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #34495e;
  margin-bottom: 5px;
}

.government-product-card-modal .function-text {
  font-size: 0.85rem;
  color: #5a6c7d;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp:3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.government-product-card-modal .product-details {
  margin-bottom: 15px;
}

.government-product-card-modal .detail-item {
  display: flex;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.government-product-card-modal .detail-label {
  font-weight: 600;
  color: #34495e;
  min-width: 50px;
  margin-right: 10px;
}

.government-product-card-modal .detail-value {
  color: #5a6c7d;
  flex: 1;
  line-height: 1.4;
}

.government-product-card-modal .product-actions {
  display: flex;
  gap: 10px;
}

.government-product-card-modal .action-btn {
  flex: 1;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.government-product-card-modal .detail-btn {
  background: #3498db;
  color: white;
}

.government-product-card-modal .detail-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.government-product-card-modal .search-btn {
  background: #e74c3c;
  color: white;
}

.government-product-card-modal .search-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

/* 비로그인 상태 블러 처리 스타일 */
.login-required-blur {
  position: relative !important;
}

/* 오버레이를 제외한 자식들만 블러 처리하여 오버레이는 선명하게 표시 */
.login-required-blur > :not(.login-required-overlay) {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
}

.login-required-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(2px);
}

.login-required-message {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 15px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  max-width: 300px;
  margin: 0 20px;
  position: relative;
  z-index: 1000;
}

.login-required-message .lock-icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}

.login-required-message .message-text {
  display: block;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero-wrapper {
    gap: 3rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-description {
    font-size: 1.1rem;
  }
  .nutrition-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
  }
  .diagnosis.status-section {
    padding: 0.8em 1.2em;
    margin-bottom: 1.5em;
  }

  .diagnosis.status-section .status-section-title {
    font-size: 1.1em;
    margin-bottom: 0.8em;
  }

  .diagnosis.status-section .status-item-title {
    font-size: 1em;
    margin-top: 0.6em;
  }

  .diagnosis.status-section .desc {
    font-size: 0.85em;
  }

  .diagnosis.status-section .desc {
    display: none;
  }

  /* meal-section-title 반응형 스타일 */
  .meal-section-title {
    font-size: 1.2em;
    margin-top: 1.3em;
    margin-bottom: 0.4em;
    padding-left: 0.4em;
  }

  /* menu-slider-container 반응형 스타일 */
  .menu-slider-container {
    margin-bottom: 1.5em;
  }

  .menu-slider-nav {
    margin-top: 3px;
    margin-bottom: 8px;
  }

  .menu-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .menu-dot {
    width: 7px;
    height: 7px;
  }

  /* menu-block 내부 요소 반응형 스타일 */
  .menu-block {
    padding: 1em 1.2em 1.3em 1.2em;
    margin-bottom: 1.5em;
  }

  .menu-name {
    font-size: 1.1em;
  }

  .nutrition-title,
  .ingredient-title,
  .main-ingredient-title,
  .sauce-title,
  .etc-title,
  .recipe-title,
  .tip-title,
  .reason-title {
    font-size: 0.95em;
    margin-top: 0.8em;
    margin-bottom: 0.4em;
  }

  .nutrition-list,
  .ingredient-list,
  .recipe-list,
  .tip-content,
  .reason-content {
    font-size: 0.85em;
    line-height: 1.4;
    margin-bottom: 0.6em;
  }

  .ingredient-item {
    margin-bottom: 0.3em;
  }

  .ingredient-name {
    font-size: 0.9em;
  }

  .buy-btn {
    font-size: 0.75em;
    padding: 3px 8px;
  }

  .save-meal-btn {
    top: 8px;
    right: 12px;
    padding: 4px 12px;
    font-size: 20px;
  }
}

@media (max-width: 900px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-visual {
    order: -1;
  }
  .diagnosis.status-section {
    padding: 0.7em 1em;
    margin-bottom: 1.3em;
  }

  .diagnosis.status-section .status-section-title {
    font-size: 1.05em;
    margin-bottom: 0.7em;
  }

  .diagnosis.status-section .status-item-title {
    font-size: 0.95em;
    margin-top: 0.5em;
  }

  .diagnosis.status-section .desc {
    font-size: 0.8em;
  }

  .diagnosis.status-section .desc {
    display: none;
  }

  /* meal-section-title 반응형 스타일 */
  .meal-section-title {
    font-size: 1.1em;
    margin-top: 1.2em;
    margin-bottom: 0.35em;
    padding-left: 0.35em;
  }

  /* menu-slider-container 반응형 스타일 */
  .menu-slider-container {
    margin-bottom: 1.3em;
  }

  .menu-slider-nav {
    margin-top: 2px;
    margin-bottom: 7px;
  }

  .menu-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .menu-dot {
    width: 6px;
    height: 6px;
  }

  /* menu-block 내부 요소 반응형 스타일 */
  .menu-block {
    padding: 0.9em 1.1em 1.2em 1.1em;
    margin-bottom: 1.3em;
  }

  .menu-name {
    font-size: 1em;
    margin-bottom: 0.7em;
  }

  .nutrition-title,
  .ingredient-title,
  .main-ingredient-title,
  .sauce-title,
  .etc-title,
  .recipe-title,
  .tip-title,
  .reason-title {
    font-size: 0.9em;
    margin-top: 0.7em;
    margin-bottom: 0.35em;
  }

  .nutrition-list,
  .ingredient-list,
  .recipe-list,
  .tip-content,
  .reason-content {
    font-size: 0.8em;
    line-height: 1.35;
    margin-bottom: 0.5em;
  }

  .ingredient-item {
    margin-bottom: 0.25em;
  }

  .ingredient-name {
    font-size: 0.85em;
  }

  .buy-btn {
    font-size: 0.7em;
    padding: 2px 7px;
  }

  .save-meal-btn {
    top: 7px;
    right: 10px;
    padding: 3px 10px;
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  /* 모바일에서도 나란히 배치 유지 */
  .mypage-dashboard-row2 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  /* meal-plan-page에서도 home-page와 동일한 container 스타일 적용 */
  body.meal-plan-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .container {
    padding: 25px 25px 50px 25px;
  }

  /* 모바일에서 상단 네비게이션 공간 확보 */
  .section.active {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  /* 식재료 분석기 검색 결과 페이지 - 모바일에서 상단 마진 제거 */
  body.ingredient-analyzer-page.has-search-results .search-section {
    margin-top: 0;
  }

  .nav-content {
    padding: 0.7rem 0;
    position: relative;
  }

  .nav-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
  }

  .purpose-category-tabs {
    flex-direction: row;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    justify-content: flex-start;
    margin-bottom: 15px;
    box-shadow: none;
    background: transparent;
  }

  .category-tab {
    min-width: auto;
    padding: 8px 12px;
    font-size: 0.85rem;
    flex-shrink: 1;
    box-shadow: none;
  }

  .cta-button {
    padding: 12px 24px;
    font-size: 1.1rem;
  }

  .purpose-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .meal-type-card {
    min-height: 120px;
    padding: 12px 8px;
  }

  .meal-type-card .icon {
    font-size: 2.4rem;
    margin-bottom: 6px;
  }

  .meal-type-card h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }

  .meal-type-card p {
    font-size: 0.9rem;
  }

  .main-title {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .option {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  button {
    padding: 12px 20px;
    font-size: 1rem;
  }

  /* 푸터 768px 반응형 */
  .footer {
    padding: 2.5rem 0 1.5rem;
    margin-bottom: 80px; /* 모바일 하단 네비게이션 공간 확보 */
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left; /* 왼쪽 정렬로 변경 */
  }

  .footer-brand {
    margin-bottom: 1.5rem;
    text-align: left; /* 브랜드 영역 왼쪽 정렬 */
  }

  .footer-brand .brand-logo {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white; /* 브랜드 로고를 흰색으로 변경 */
  }

  .footer-brand p {
    display: none; /* 모바일에서 "건강한 식생활을 위한 종합 플랫폼" 텍스트 숨김 */
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer-section {
    text-align: left; /* footer-section 왼쪽 정렬 */
  }

  .footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .footer-section ul {
    gap: 0.8rem;
  }

  .footer-section li {
    margin-bottom: 0.6rem;
  }

  .footer-section a {
    font-size: 1rem;
    padding: 0.5rem 0;
  }

  .footer-bottom {
    padding: 2rem 0 0;
    text-align: center;
  }

  .footer-bottom p {
    font-size: 0.9rem;
    text-align: left;
  }

  .footer-copyright {
    font-size: 0.75rem;
    margin-top: 0.8rem;
    line-height: 1.3;
    text-align: left !important; /* 왼쪽 정렬 강제 적용 */
  }
  /* 프로필 섹션 반응형 스타일 */
  /* 진행 상태 표시줄 */
  .progress-container {
    margin-bottom: 55px;
    height: 6px;
  }

  .progress-step {
    width: 25px;
    height: 25px;
    font-size: 0.7rem;
  }

  .progress-step::after {
    font-size: 0.8rem;
    top: calc(100% + 8px);
  }

  /* 섹션 가이드 */
  .section-guide {
    font-size: 0.9rem;
    padding: 8px 12px;
    margin-bottom: 15px;
  }

  .section-guide.required {
    background: #eaf0fb;
    color: #2451a6;
    font-weight: 700;
    font-size: 0.85rem;
  }

  .section-guide.optional {
    background: #f4f7fa;
    color: #4a69bd;
    border-left: 5px solid #b0c4de;
    font-weight: 500;
  }

  /* 입력 필드 */
  .input-group-item label {
    font-size: 0.85rem;
    margin-bottom: 5px;
  }

  input[type="number"],
  input[type="text"] {
    padding: 10px;
    font-size: 0.9rem;
  }

  /* 옵션 그룹 */
  .option-group {
    gap: 8px;
    margin-bottom: 10px;
  }

  .option {
    padding: 8px 14px;
    font-size: 0.9rem;
    min-width: auto;
    flex: 1 1 calc(50% - 4px);
    text-align: center;
  }

  /* 아코디언 */
  .accordion {
    margin-bottom: 15px;
  }

  .accordion-header {
    padding: 12px 15px;
    font-size: 1rem;
  }

  .accordion-content {
    padding: 15px 15px 8px 15px;
  }

  /* 숨겨진 입력 컨테이너 */
  .hidden-input-container {
    margin-top: 10px;
  }

  .hidden-input-container label {
    font-size: 0.85rem;
  }

  .hidden-input-container input {
    font-size: 0.85rem;
    padding: 8px;
  }

  /* 값 입력 필드 */
  .option .value-input {
    font-size: 0.8rem;
    padding: 6px;
    margin-top: 8px;
  }

  /* meal-question-block 크기 조정 */
  .meal-question-block {
    padding: 10px 3px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    border-radius: 10px;
  }

  /* meal-question-block 높이 조정 */
  .meal-question-block {
    max-height: calc(100vh - 250px);
  }

  /* meal-nav-btns-fixed 위치 조정 */
  .meal-nav-btns-fixed {
    bottom: 100px;
    padding: 0 15px;
  }

  .meal-nav-btns-fixed button {
    padding: 0.8em 0;
    font-size: 1rem;
    border-radius: 8px;
  }

  .meal-block-btn {
    font-size: 1rem;
    padding: 0.9em 1.5em;
    min-width: 140px;
    min-height: 42px;
    border-radius: 10px;
  }

  .meal-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
    justify-content: center;
  }

  .meal-options .meal-block-btn {
    flex: 0 1 calc(50% - 6em);
    min-width: 100px;
  }

  /* 한끼 식사 예산 질문의 옵션들을 세로로 배치 */
  .meal-question-block[data-question-key="budget"] .meal-options {
    flex-direction: column;
    align-items: center;
  }

  .meal-question-block[data-question-key="budget"] .meal-options .meal-block-btn {
    flex: 1 1 auto;
    width: 100%;
    max-width: 300px;
    margin-bottom: 8px;
  }

  .option .unit {
    font-size: 0.75em;
  }

  /* 버튼 그룹 */
  .button-group {
    gap: 10px;
    margin-top: 25px;
    flex-direction: row;
  }

  .button-group button {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  /* 모달 반응형 스타일 */
  .modal-content {
    padding: 25px 20px;
    width: 95%;
    margin: 20px;
  }

  .modal-content h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  .modal-btn-row {
    flex-direction: column;
    gap: 10px;
  }

  .modal-btn {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .menu-slider-nav {
    grid-template-columns: 28px 1fr 28px;
    margin-top: 4px;
    margin-bottom: 7px;
  }

  .menu-nav-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .menu-dot {
    width: 7px;
    height: 7px;
  }

  .menu-dots {
    gap: 7px;
  }
  /* 모달 반응형 */
  #profileSaveModal .modal-content {
    max-width: 320px;
    padding: 32px 24px;
  }

  #profileSaveModal .modal-btn-row {
    flex-direction: column;
    gap: 16px;
  }

  #profileSaveModal .modal-btn {
    width: 100%;
    min-width: auto;
  }
  /* 모바일에서는 모든 페이지에서 보이도록 설정 */
  .main-nav {
    display: flex !important; /* 모바일에서만 표시 - 모든 페이지에서 강제 표시 */
  }

  /* 모바일에서 기존 네비게이션 숨김 (nav-content의 직접적인 자식만) */
  .nav-content > .nav-menu,
  .nav-content > .nav-auth {
    display: none;
  }

  /* 모바일 네비게이션 컨테이너 표시 */
  .mobile-nav-container {
    display: block;
  }
  /* 모바일 네비게이션 컨테이너 */
  .mobile-nav-container {
    position: fixed;
    top: 54.4px; /* main-nav 높이만큼 아래로 */
    left: 0;
    right: 0;
    background: white;
    transform: translateY(-100vh);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .mobile-nav-container.active {
    transform: translateY(0);
  }

  /* 네비게이션 */
  .nav-menu {
    flex-direction: column;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e0e6ed;
  }

  /* 모바일 드롭다운 메뉴 스타일 */
  .mobile-nav-container .dropdown {
    position: relative;
  }

  .mobile-nav-container .dropdown-menu {
    position: static;
    display: none;
    background: #f8f9fa;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid #e0e6ed;
  }

  .mobile-nav-container .dropdown.active .dropdown-menu {
    display: block;
  }

  .mobile-nav-container .dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #e0e6ed;
  }

  .mobile-nav-container .dropdown-menu a:last-child {
    border-bottom: none;
  }

  .nav-auth {
    padding: 1rem 2rem 2rem;
    background: white;
  }

  .main-nav-button {
    padding: 0.75rem 1.5rem;
    text-align: center;
    justify-content: center;
    min-width: 120px;
    min-height: 48px;
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
  }

  .nav-toggle span {
    width: 20px;
    height: 2px;
    margin: 3px 0;
  }

  /* 히어로 섹션 */
  .hero-section {
    padding: 75px 0 60px;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 255, 255, 0.2);
  }

  .hero-description {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-btn {
    width: 100%;
    max-width: 280px;
  }

  .hero-content-center {
    padding: 0.5rem 0;
    margin-bottom: 1rem;
  }

  .hero-cards {
    grid-template-columns: repeat(2, 170px);
    gap: 3rem;
    justify-content: center;
  }

  .hero-card {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
    width: 170px;
    min-width: 170px;
    max-width: 170px;  
  }

  .hero-card:hover {
    transform: none;
  }
    
    /* 기타 섹션들 */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .action-card {
    min-height: 200px;
    padding: 2rem 1.5rem;
  }

  .quick-actions .section-title {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 2rem;
  }

  .quick-action-icon {
    font-size: 3rem;
    margin-bottom: 1.2rem;
  }

  .action-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
  }

  .action-text p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-btn {
    min-width: 250px;
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .cta-title {
    font-size: 2.2rem;
  }

  .cta-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .health-goals-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .lifestyle-grid {
    grid-template-columns: 1fr;
  }

  .supplement-grid {
    grid-template-columns: 1fr;
  }

  .wizard-content {
    background: none;
    box-shadow: none;
    padding: 2rem;
  }
  
  /* Step 4 (결과 페이지) 모바일 전용 스타일 */
  .results-step {
    max-width: 100%;
  }
  .nutrition-info {
    padding: 60px 0;
  }

  .nutrition-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }

  .nutrition-card {
    margin: 0 10px;
  }

  .nutrition-thumbnail {
    height: 180px;
  }

  .nutrition-title {
    font-size: 1.1rem;
  }

  .nutrition-summary {
    font-size: 0.9rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
  .preference-grid,
  .safety-grid {
    grid-template-columns: 1fr;
  }

  .allergy-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .supplements-list {
    grid-template-columns: 1fr;
  }

  .recommendation-actions {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
  }
  .system-tabs {
    gap: 6px;
    padding: 8px 0;
  }

  .tab-button {
    padding: 10px 12px;
    font-size: 13px;
    min-width: 100px;
  }

  .tab-button span {
    font-size: 12px;
  }

  .supplement-cards-grid {
    grid-template-columns: 180px;
    row-gap: 20px;
    column-gap: 0px;
  }
  .preference-question-block {
    padding: 0;
  }

  .preference-question-label {
    font-size: 1.6rem;
  }

  .preference-question-description {
    font-size: 1rem;
  }

  .preference-option-btn {
    padding: 10px 16px;
    font-size: 1rem;
  }

  .preference-options {
    grid-template-columns: 1fr;
  }
  .preference-options.two-columns {
    grid-template-columns: 1fr 1fr;
  }

  .preference-nav-btns-fixed {
    bottom: 50px;
    padding: 10px 20px;
    gap: 8px;
    align-items: center;
    flex-direction: row;
  }

  .preference-prev-btn,
  .preference-next-btn,
  .preference-complete-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .preference-text-input {
    padding: 12px;
    font-size: 0.95rem;
    min-height: 100px;
  }

  .preference-input-label {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .preference-text-input-container {
    margin-top: 1rem !important;
  }

  /* 모바일에서 레이아웃 조정 */
  .supplements-grid {
    padding: 0 15px;
    gap: 16px;
  }

  .supplement-card-modern {
    max-width: none;
  }

  .supplements-slider-arrow {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .supplements-slider-dot {
    width: 10px;
    height: 10px;
  }

  .analysis-card,
  .lifestyle-card,
  .safety-item,
  .timeline-item {
    padding: 20px;
  }

  .supplement-card-modern {
    padding: 24px;
  }

  .supplement-actions {
    flex-direction: column;
  }

  .section-header h3 {
    margin-bottom: 0px;
    font-size: 1.6rem;
  }

  /* ingredient-analyzer-page 모바일 하단 네비게이션 대응 */
  body.ingredient-analyzer-page {
    padding-bottom: 100px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .analyzer-header .page-title {
    font-size: 2rem;
  }

  .analyzer-header .page-description {
    font-size: 1rem;
  }

  .ingredient-nutrition-header {
    padding: 15px 20px;
    margin-bottom: 15px;
  }

  .ingredient-nutrition-header h3 {
    font-size: 1.2rem;
  }

  .tab-navigation {
    flex-wrap: wrap;
  }

  .tab-btn {
    min-width: 100px;
    padding: 16px 12px;
    font-size: 0.9rem;
  }

  .tab-content {
    padding: 20px;
  }

  .ingredient-tab-navigation {
    flex-wrap: wrap;
  }

  .ingredient-tab-btn {
    min-width: 100px;
    padding: 16px 12px;
    font-size: 0.9rem;
  }

  .ingredient-tab-content {
    padding: 20px;
  }

  .overview-grid,
  .compatibility-section,
  .health-grid,
  .usage-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .nutrition-grid-modern {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
  }

  .quick-facts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .address-search-container {
    flex-direction: row;
    gap: 8px;
  }

  .address-search-btn {
    width: 100%;
  }
  .progress-steps {
    flex-direction: column;
    gap: 15px;
  }

  .progress-step {
    flex-direction: row;
    text-align: left;
  }

  .step-number {
    margin-bottom: 0;
    margin-right: 15px;
  }

  .location-info {
    grid-template-columns: 1fr;
  }

  .location-buttons {
    flex-direction: row;
    width: 100%;
    gap: 10px;
  }
  
  .location-buttons .location-btn {
    flex: 1;
    min-width: 0;
  }

  .step-navigation {
    gap: 10px;
  }

  .summary-content {
    grid-template-columns: 1fr;
  }

  .kakao-map {
    height: 300px;
  }
  .price-options {
    flex-direction: column;
    gap: 8px;
  }

  .checkbox-option {
    min-width: auto;
  }

  .checkbox-label {
    padding: 12px;
    font-size: 1rem;
  }
  .category-options .checkbox-option {
    flex-basis: 48%;
    min-width: 140px;
  }
  .restaurant-info {
    grid-template-columns: 1fr;
  }

  .restaurant-name {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .score-badge {
    align-self: flex-start;
  }

  .recommendation-reason,
  .recommended-menus-section,
  .health-considerations {
    padding: 12px;
    font-size: 13px;
  }

  .recommendation-keyword {
    padding: 3px 6px;
    font-size: 12px;
    margin: 1px 2px;
  }

  /* 모바일에서 키워드 색상 유지 */
  .recommendation-keyword.keyword-blue {
    background: #4a69bd;
  }

  .recommendation-keyword.keyword-green {
    background: #27ae60;
  }

  .recommendation-keyword.keyword-purple {
    background: #8e44ad;
  }

  .recommendation-keyword.keyword-orange {
    background: #e67e22;
  }

  .recommendation-keyword.keyword-pink {
    background: #e91e63;
  }
  .recommendation-map {
    height: 300px;
  }

  .recommendation-map-section h3 {
    padding: 16px 20px 12px;
    font-size: 16px;
  }
  .restaurant-slider {
    margin: 0 40px;
  }

  .restaurant-slider-arrow {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .restaurant-slider-container h3 {
    padding: 16px 20px 12px;
    font-size: 16px;
  }
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast-message {
    max-width: none;
    margin: 0 0 10px 0;
  }

  .ingredient-tab-navigation {
    gap: 2px;
    padding: 4px;
    margin: 20px 0 15px 0;
  }

  .ingredient-tab-btn {
    min-width: 80px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .ingredient-tab-btn:hover {
    transform: none;
  }

  .ingredient-tab-btn.active {
    transform: none;
  }

  .ingredient-tab-btn.active:hover {
    transform: none;
  }
  .tip-item {
    padding: 12px;
    gap: 10px;
  }

  .tip-number {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }

  .tip-content {
    font-size: 0.9rem;
  }

  .tip-item:hover {
    transform: none;
  }
  .nutrition-page-title {
    font-size: 2rem;
  }

  .nutrition-page-subtitle {
    font-size: 1rem;
  }

  .nutrition-header {
    padding: 40px 0 15px;
    min-height: 25vh;
  }

  .filter-options {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: auto;
  }

  .nutrition-search-container {
    max-width: none;
  }

  .nutrition-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .nutrition-card-actions {
    flex-direction: column;
  }

  .action-btn {
    justify-content: flex-start;
    padding: 10px 12px;
  }
  body.restaurant-page .recommendation-container {
    padding: 15px;
  }

  .step-container {
    padding: 20px;
  }

  .map-container {
    height: 300px;
  }

  .location-btn {
    width: 100%;
    max-width: 300px;
  }

  .address-search-btn {
    width: 100%;
  }
  .nutrition-detail-header {
    padding: 15px 20px;
  }

  .nutrition-detail-header h3 {
    font-size: 1.1rem;
  }

  .nutrition-detail-content {
    padding: 20px;
  }

  .nutrition-detail-table {
    font-size: 0.9rem;
  }

  .nutrition-detail-table thead th,
  .nutrition-detail-table tbody th,
  .nutrition-detail-table tbody td {
    padding: 8px 12px;
  }

  .nutrition-card-preview {
    flex-direction: column;
    gap: 8px;
  }

  .product-info {
    padding: 15px;
  }
  .nutrition-grid {
    grid-template-columns: 1fr;
  }

  .nutrition-detail-container {
    padding: 15px;
  }

  .nutrition-detail-header h3 {
    font-size: 1.1rem;
  }
  .dropdown {
    display: block;
    width: 100%;
  }

  .dropdown-toggle {
    display: block;
    width: 100%;
    padding: 0px;
    border-bottom: 1px solid #eee;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0;
  }

  .dropdown:hover .dropdown-menu {
    max-height: 200px;
  }

  .dropdown-menu a {
    padding-left: 30px;
    background-color: #f9f9f9;
  }
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast-message {
    max-width: none;
    margin: 0 0 10px 0;
  }
  /* 모바일 하단 네비게이션을 위한 body 패딩 */
  body {
    padding-bottom: 80px;
  }

  /* ingredient-analyzer-page에 특별히 하단 패딩 적용 */
  body.ingredient-analyzer-page {
    padding-bottom: 80px !important;
  }

  .footer-nav-mobile {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e0e6ed;
    border-radius: 16px 16px 0 0;
    z-index: 21000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  }
  .footer-nav-mobile ul {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .footer-nav-item {
    flex: 1;
    text-align: center;
  }
  .footer-nav-item a,
  .footer-nav-item button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 0 8px 0;
    width: 100%;
    background: none;
    border: none;
    color: #4a69bd;
    font-size: 0.9rem;
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
      Roboto, sans-serif;
    font-weight: 500;
    text-decoration: none;
  }
  .footer-nav-icon {
    font-size: 1.7rem;
    margin-bottom: 4px;
  }

  .footer-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
  }

  .footer-nav-label {
    font-size: 0.75rem;
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
      Roboto, sans-serif;
    font-weight: 500;
    margin-top: 2px;
  }
  .footer-nav-item.active .footer-nav-icon,
  .footer-nav-item.active .footer-nav-label {
    color: #2451a6;
    font-weight: bold;
  }
  .completion-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .completion-reward-info {
    font-size: 0.8rem;
  }

  .completion-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .reward-content {
    padding: 24px 16px;
  }

  .reward-icon-large {
    font-size: 3rem;
  }

  .reward-content h2 {
    font-size: 1.5rem;
  }
  .recommendation-result {
    padding: 18px;
    margin: 16px 0;
  }

  .result-message {
    font-size: 1.1rem;
  }

  .result-count {
    font-size: 1.2rem;
  }

  .result-guide {
    font-size: 0.95rem;
  }
  .search-result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nutrition-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nutrition-card-preview {
    flex-direction: column;
    gap: 8px;
  }

  .detail-title-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nutrition-detail-table th,
  .nutrition-detail-table td {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .nutrition-detail-content {
    padding: 15px;
  }
  .auth-links {
    display: none !important;
  }

  .site-brand-fixed {
    display: none !important;
  }
  .nutrition-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .nutrition-loading,
  .nutrition-error {
    padding: 40px 20px;
  }

  .loading-spinner {
    width: 30px;
    height: 30px;
    border-width: 3px;
  }
  .diagnosis.status-section {
    padding: 0.6em 0.8em;
    margin-bottom: 1.2em;
    border-radius: 6px;
  }

  .diagnosis.status-section .status-section-title {
    font-size: 1em;
    margin-bottom: 0.6em;
  }

  .diagnosis.status-section .status-item-title {
    font-size: 0.9em;
    margin-top: 0.4em;
    margin-bottom: 0.05em;
  }

  .diagnosis.status-section .desc {
    font-size: 0.75em;
    line-height: 1.3;
  }

  .diagnosis.status-section .desc {
    display: none;
  }

  .diagnosis.status-section
    > div:not(.status-section-title):not(.status-item-title) {
    font-size: 0.85em;
    line-height: 1.4;
    margin-bottom: 0.3em;
  }

  /* meal-section-title 반응형 스타일 */
  .meal-section-title {
    font-size: 1em;
    margin-top: 1.1em;
    margin-bottom: 0.3em;
    padding-left: 0.3em;
  }

  /* menu-slider-container 반응형 스타일 */
  .menu-slider-container {
    margin-bottom: 1.2em;
  }

  .menu-slider-nav {
    margin-top: 2px;
    margin-bottom: 6px;
  }

  .menu-nav-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .menu-dot {
    width: 6px;
    height: 6px;
  }

  /* menu-block 내부 요소 반응형 스타일 */
  .menu-block {
    padding: 0.8em 1em 1.1em 1em;
    margin-bottom: 1.1em;
  }

  .menu-name {
    font-size: 0.95em;
    margin-bottom: 0.6em;
  }

  .nutrition-title,
  .ingredient-title,
  .main-ingredient-title,
  .sauce-title,
  .etc-title,
  .recipe-title,
  .tip-title,
  .reason-title {
    font-size: 0.85em;
    margin-top: 0.6em;
    margin-bottom: 0.3em;
  }

  .nutrition-list,
  .ingredient-list,
  .recipe-list,
  .tip-content,
  .reason-content {
    font-size: 0.75em;
    line-height: 1.3;
    margin-bottom: 0.4em;
  }

  .ingredient-item {
    margin-bottom: 0.2em;
  }

  .ingredient-name {
    font-size: 0.8em;
  }

  .buy-btn {
    font-size: 0.65em;
    padding: 2px 6px;
  }

  .save-meal-btn {
    top: 6px;
    right: 8px;
    padding: 2px 8px;
    font-size: 16px;
  }
  .step-description {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    padding: 0 0.5rem;
  }
  .step-description p {
    font-size: 0.9rem;
    text-align: center;
  }
  .btn-back-to-list {
    padding: 10px 16px;
    font-size: 13px;
    margin: 15px auto;
  }

  .btn-purchase {
    padding: 10px 16px;
    font-size: 13px;
  }


  .nutrition-detail-container .detail-header h3 {
    font-size: 1.3rem;
  }
  .toast-message {
    top: 15px;
    right: 15px;
    left: 15px;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    max-width: none;
    border-radius: 6px;
  }
  .step-header h2 {
    font-size: 1.8rem;
  }
  .step-header p {
    font-size: 1rem;
  }

  .supplement-wizard {
    padding: 0;
    background: #f8f9fa;
  }
  
  /* 모바일에서 건강 고민 설명 텍스트 줄바꿈 */
  .supplement-wizard .step-header p {
    line-height: 1.6;
  }
  
  .supplement-wizard .step-header p .mobile-break {
    display: inline;
  }
  .wizard-navigation .nav-btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
  }
  .supplement-type-card.selected .icon {
    font-size: 1.5rem;
  }

  .supplement-type-card.selected h3 {
    font-size: 0.9rem;
    font-weight: 600;
  }

  .supplement-type-card.selected p {
    color: #e6f0ff;
    font-size: 0.7rem;
    line-height: 1.4;
  }
  /* 카카오맵 인포윈도우 컨테이너 크기 조정 */
  .kakao-map .info-window {
    max-width: 280px !important;
    min-width: 200px !important;
    z-index: 1000 !important;
  }
  
  /* 인포윈도우 내부 컨텐츠 크기 조정 */
  .kakao-map .info-window div {
    padding: 8px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
  }
  
  /* 인포윈도우 제목 크기 조정 */
  .kakao-map .info-window div div:first-child {
    font-size: 12px !important;
    margin-bottom: 4px !important;
  }
  
  /* 인포윈도우 텍스트 크기 조정 */
  .kakao-map .info-window div div {
    font-size: 10px !important;
    margin-bottom: 2px !important;
  }
  
  /* 인포윈도우 메뉴 정보 크기 조정 */
  .kakao-map .info-window div div[style*="margin-top:8px"] {
    font-size: 9px !important;
    margin-top: 6px !important;
  }
  
  /* 인포윈도우 추천 이유 크기 조정 */
  .kakao-map .info-window div div[style*="font-style:italic"] {
    font-size: 9px !important;
    margin-top: 6px !important;
  }
  
  /* 인포윈도우가 화면 밖으로 나가지 않도록 조정 */
  .kakao-map .info-window {
    max-height: 80vh !important;
    overflow-y: auto !important;
    word-wrap: break-word !important;
  }
  .government-products-section {
    margin-top: 20px;
    padding: 20px 16px;
}

.government-products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
}

.more-products-card {
    grid-column: span 1;
}

.government-product-card {
    padding: 16px;
}

.product-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.product-badges {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.health-concerns-section {
    margin: 8px 0;
    padding: 4px 0;
    gap: 4px;
}

.health-concern-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
}

.product-actions {
    flex-direction: column;
    gap: 8px;
}

.gov-product-btn {
    padding: 12px 16px;
}

.product-modal-overlay {
    padding: 10px;
}

.product-modal-header,
.product-modal-body,
.product-modal-footer {
    padding-left: 20px;
    padding-right: 20px;
}

.product-info-grid {
    grid-template-columns: 1fr;
    gap: 16px;
}

.modal-btn {
    padding: 14px 20px;
    font-size: 0.95rem;
}
.government-products-modal-content {
  width: 95vw;
  max-height: 85vh;
}

.government-products-grid-modal {
  grid-template-columns: 1fr;
}

.government-product-card-modal .product-actions {
  flex-direction: column;
}

.government-products-modal-content .modal-header {
  padding: 20px;
}

.government-products-modal-content .modal-body {
  padding: 20px;
}
.login-required-message {
  font-size: 14px;
  padding: 15px 20px;
}

.login-required-message .lock-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.supplement-card-modern {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.supplement-card-modern:hover {
  transform: none;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
}

.supplement-card-modern:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* 모바일에서 스크롤 성능 최적화 */
.supplements-slide {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* 모바일에서 텍스트 선택 방지 */
.supplement-card-modern {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 모바일에서 긴 텍스트 처리 */
.supplement-card-modern .supplement-name {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.supplement-card-modern .rationale-text,
.supplement-card-modern .results-text {
  word-break: keep-all;
  overflow-wrap: break-word;
}
}

@media (max-width: 600px) {
  .input-row {
    flex-direction: row;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }

  .input-group-item {
    min-width: auto;
    /* 최소 너비 제한 해제 */
  }

  .purpose-category-tabs {
    gap: 3px;
    padding: 3px;
    margin-bottom: 10px;
  }

  .category-tab {
    min-width: auto;
    padding: 6px 10px;
    font-size: 0.8rem;
    flex-shrink: 1;
  }

  .cta-button {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .meal-type-selection {
    gap: 10px;
    padding: 0 8px;
    grid-template-rows: 1fr;
    margin-bottom: 14px;
    padding-bottom: 24px;
  }

  .purpose-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .meal-type-card {
    min-height: 100px;
    padding: 10px 8px;
    font-size: 0.9em;
  }

  .meal-type-card .icon {
    font-size: 2.3rem;
    margin-bottom: 6px;
  }

  .meal-type-card h3 {
    font-size: 1.18rem;
    margin-bottom: 4px;
  }

  .meal-type-card p {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  h3 {
    font-size: 1rem;
  }

  .main-title {
    font-size: 1.2rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .section-guide {
    font-size: 0.95rem;
  }

  .section-guide.required {
    background: #eaf0fb;
    color: #2451a6;
    font-weight: 700;
    font-size: 0.8rem;
  }

  .section-guide.optional {
    background: #f4f7fa;
    color: #4a69bd;
    border-left: 5px solid #b0c4de;
    font-weight: 500;
  }

  /* multi-step-loading 모바일 최적화 */
  .multi-step-loading {
    min-width: unset;
    max-width: 95vw;
    width: 95vw;
    padding: 20px 4vw 20px 4vw;
    margin: 15px auto 20px auto;
    gap: 16px;
    border-radius: 16px;
  }

  /* recommendations-loading 모바일 최적화 */
  .recommendations-loading {
    padding: 5px;
  }

  .recommendations-loading .multi-step-loading {
    width: 100%;
    max-width: 100%;
    padding: 15px 3vw 15px 3vw;
    margin: 10px auto 15px auto;
  }

  .recommendations-loading .loading-step {
    gap: 10px;
  }

  .recommendations-loading .loading-icon {
    width: 32px;
    min-width: 32px;
    height: 32px;
    margin-right: 4px;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .recommendations-loading .loading-title {
    font-size: 0.95em;
    line-height: 1.3;
  }

  .recommendations-loading .loading-desc {
    font-size: 0.85em;
    line-height: 1.2;
  }

  /* meal_plan_content 내부의 multi-step-loading 추가 최적화 */
  #meal_plan_content .multi-step-loading {
    width: 100%;
    max-width: 100%;
    padding: 15px 3vw 15px 3vw;
    margin: 10px auto 15px auto;
  }

  #meal_plan_content .loading-step {
    gap: 10px;
  }

  #meal_plan_content .loading-icon {
    width: 32px;
    min-width: 32px;
    height: 32px;
    margin-right: 4px;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #meal_plan_content .loading-title {
    font-size: 0.95em;
    line-height: 1.3;
  }

  #meal_plan_content .loading-desc {
    font-size: 0.85em;
    line-height: 1.2;
  }

  .loading-step {
    gap: 12px;
    font-size: 0.95em;
  }

  .loading-icon {
    width: 36px;
    min-width: 36px;
    height: 36px;
    margin-right: 6px;
    /* 모바일에서도 step-loading 스피너가 정확히 중앙에 위치하도록 보장 */
    overflow: visible;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .loading-step .loading-check {
    font-size: 1.5em;
  }

  .loading-title {
    font-size: 1em;
    margin-bottom: 3px;
  }

  .loading-desc {
    font-size: 0.9em;
    line-height: 1.4;
  }

  label {
    font-size: 0.85em;
  }

  .progress-step::after {
    font-size: 0.8rem;
  }

  /* 푸터 600px 반응형 */
  .footer {
    padding: 2rem 0 1.2rem;
    margin-bottom: 80px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    text-align: left; /* 왼쪽 정렬로 변경 */
  }

  .footer-brand {
    margin-bottom: 1.2rem;
    text-align: left; /* 브랜드 영역 왼쪽 정렬 */
  }

  .footer-brand .brand-logo {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
    color: white; /* 브랜드 로고를 흰색으로 변경 */
  }

  .footer-brand p {
    display: none; /* 모바일에서 "건강한 식생활을 위한 종합 플랫폼" 텍스트 숨김 */
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .footer-section {
    text-align: left; /* footer-section 왼쪽 정렬 */
  }

  .footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .footer-section ul {
    gap: 0.6rem;
  }

  .footer-section li {
    margin-bottom: 0.4rem;
  }

  .footer-section a {
    font-size: 0.95rem;
    padding: 0.4rem 0;
  }

  .footer-bottom {
    padding: 1.5rem 0 0;
    text-align: center;
  }

  .footer-bottom p {
    font-size: 0.85rem;
    text-align: left;
  }

  .footer-copyright {
    font-size: 0.7rem;
    margin-top: 0.6rem;
    line-height: 1.2;
    text-align: left !important; /* 왼쪽 정렬 강제 적용 */
  }
  /* 진행 상태 표시줄 */
  .progress-container {
    margin-bottom: 45px;
    height: 5px;
  }

  .progress-step {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }

  .progress-step::after {
    font-size: 0.75rem;
    top: calc(100% + 6px);
  }
  .multi-step-loading {
    min-width: unset;
    max-width: 98vw;
    width: 98vw;
    padding: 18px 6vw 18px 6vw;
    font-size: 0.98em;
  }

  .loading-step {
    font-size: 1em;
    gap: 10px;
  }

  .loading-title {
    font-size: 1.05em;
  }

  .week-day-nav {
    flex-wrap: wrap;
    gap: 4px;
    margin: 10px 0 16px 0;
  }

  .week-day-btn {
    font-size: 0.98em;
    padding: 7px 10px;
    min-width: 60px;
  }

  .week-card {
    min-width: 0 !important;
    max-width: 98vw !important;
    width: 100%;
    padding: 0 2vw;
  }

  .menu-label {
    font-size: 1em;
    padding: 3px 10px;
  }

  .profile-edit-btn {
    min-width: 90px;
    max-width: 160px;
    padding: 0.5em 0.8em;
    font-size: 0.98em;
  }

  .meal-question-block {
    padding: 8px 2px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    border-radius: 8px;
  }

  /* meal-question-block 높이 조정 */
  .meal-question-block {
    min-height: calc(100vh - 150px);
    max-height: calc(100vh - 150px);
  }

  /* meal-nav-btns-fixed 위치 조정 */
  .meal-nav-btns-fixed {
    bottom: 80px;
    padding: 0 8px;
  }

  .meal-nav-btns-fixed button {
    padding: 0.7em 0;
    font-size: 0.95rem;
    border-radius: 6px;
  }

  .meal-question-label {
    font-size: 1.4rem;
    margin-bottom: 25px;
    margin-top: 10px;
  }

  .meal-block-btn {
    font-size: 0.95rem;
    padding: 10px 0;
    min-width: 90px;
    min-height: 38px;
    border-radius: 16px;
  }

  .meal-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    justify-content: center;
  }

  .meal-options .meal-block-btn {
    flex: 0 1 calc(50% - 5em);
    min-width: 80px;
  }

  .meal-block-btn-small {
    font-size: 0.8rem;
    padding: 5px 0;
    min-width: 57px;
    min-height: 32px;
    border-radius: 14px;
  }

  .meal-other-input input {
    font-size: 0.95rem;
    padding: 7px 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  #other_allergies_text {
    font-size: 0.9rem;
    padding: 10px;
    width: 100%;
    max-width: 300px;
    display: block;
    text-align: left;
  }


  #other_illnesses_text {
    font-size: 0.95rem;
    padding: 7px 8px;
    width: 100%;
    max-width: 320px;
    display: block;
    text-align: left;
  }

  .profile-section {
    padding: 10px 2vw;
  }

  .option-group {
    gap: 6px;
    margin-bottom: 12px;
  }

  .option {
    padding: 7px 12px;
    font-size: 0.88rem;
    border-radius: 16px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  .input-group-item {
    min-width: 0;
    margin-bottom: 8px;
  }

  .input-group-item label {
    font-size: 0.95em;
  }

  input[type="number"],
  input[type="text"] {
    font-size: 1em;
    padding: 8px 10px;
  }

  .button-group {
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
  }

  .button-group button {
    font-size: 0.98rem;
    padding: 10px 0;
  }

  /* 옵션을 더 작게 */
  .option {
    padding: 6px 12px;
    font-size: 0.85rem;
    flex: 1 1 100%;
    margin-bottom: 5px;
  }

  /* 특정 옵션들은 2열로 배치 */
  .option-group[data-name="gender"] .option,
  .option-group[data-name="smoking_status"] .option,
  .option-group[data-name="meals_per_day"] .option {
    flex: 1 1 calc(50% - 4px);
  }

  /* 아코디언 헤더 */
  .accordion-header {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .accordion-content {
    padding: 12px 12px 6px 12px;
  }

  /* 버튼 그룹 */
  .button-group {
    flex-direction: column;
    gap: 8px;
  }

  .button-group button {
    padding: 12px 20px;
    font-size: 1rem;
  }

  /* 프로필 편집 버튼 */
  .profile-edit-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  /* 활동량, 식사패턴, 음주여부 옵션 - 세로배열 & 크기 제한 없음 */
  .option-group[data-name="activity_level"],
  .option-group[data-name="eating_patterns"],
  .option-group[data-name="alcohol_consumption"] {
    flex-direction: column;
  }
  .option-group[data-name="activity_level"] .option,
  .option-group[data-name="eating_patterns"] .option,
  .option-group[data-name="alcohol_consumption"] .option {
    min-width: 0;
    max-width: none;
    width: 100%;
    box-sizing: border-box;
  }
  .modal-content {
    padding: 20px 15px;
    width: 95%;
    margin: 10px;
  }

  .modal-close {
    top: 10px;
    right: 15px;
    font-size: 1.3rem;
  }

  .modal-content h3 {
    font-size: 1.1rem;
    margin-bottom: 18px;
    padding-right: 25px;
  }

  .modal-btn {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  .auth-links {
    top: 8px;
    right: 8px;
    gap: 6px;
  }

  .auth-links a {
    padding: 5px 12px;
    font-size: 0.95rem;
  }
  .profile-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-list label {
    margin-bottom: 6px;
    margin-right: 0;
  }

  .profile-list input,
  .profile-list select {
    max-width: 100%;
  }
  .profile-list-grid {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 20px 20px 25px 20px;
  }

  /* 모바일에서 상단 네비게이션 공간 확보 */
  .section.active {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .nav-content {
    padding: 0.5rem 0;
    position: relative;
  }

  .nav-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
  }

  .nav-toggle {
    padding: 0.2rem;
  }

  .nav-toggle span {
    width: 18px;
    height: 2px;
    margin: 2.5px 0;
  }

  .hero-section {
    padding: 65px 0 50px;
  }

  .hero-content-center {
    padding: 0.3rem 0;
    margin-bottom: 0.8rem;
  }

  .hero-description {
    display: none;
  }

  .hero-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    justify-content: center;
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-card {
    height: 120px;
    min-height: 120px;
    max-height: 120px;
    padding: 0.8rem;
    width: 100%;
    min-width: auto;
    max-width: none;
  }

  .card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
  }

  .card-title {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }

  .card-description {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .actions-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .action-card {
    min-height: 200px;
    padding: 2rem;
  }

  .quick-action-icon {
    font-size: 3.2rem;
    margin-bottom: 1.3rem;
  }

  .action-text h4 {
    font-size: 1.2rem;
    margin-bottom: 0.7rem;
  }

  .action-text p {
    font-size: 0.95rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* quick-actions 섹션 600px 최적화 */
  .quick-actions {
    padding: 3rem 0;
  }

  .quick-actions .section-title {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 1.8rem;
  }

  .actions-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .action-card {
    min-height: 120px;
    padding: 1rem 0.8rem;
  }

  .quick-action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .action-text h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    line-height: 1.1;
  }

  /* 600px에서 h4 텍스트 변경 */
  .quick-actions .action-card:nth-child(1) .action-text h4::before {
    content: "프로필 완성";
    font-size: 0.9rem;
  }

  .quick-actions .action-card:nth-child(1) .action-text h4 {
    font-size: 0;
  }

  .quick-actions .action-card:nth-child(2) .action-text h4::before {
    content: "포인트 얻기";
    font-size: 0.9rem;
  }

  .quick-actions .action-card:nth-child(2) .action-text h4 {
    font-size: 0;
  }

  .quick-actions .action-card:nth-child(3) .action-text h4::before {
    content: "잇플스토어";
    font-size: 0.9rem;
  }

  .quick-actions .action-card:nth-child(3) .action-text h4 {
    font-size: 0;
  }

  /* 600px에서 첫 번째 카드의 p 태그 변경 */
  .quick-actions .action-card:nth-child(1) .action-text p {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .action-text p {
    font-size: 0.75rem;
    line-height: 1.2;
  }
  .supplement-type-selection {
    padding: 16px;
    margin-bottom: 20px;
  }

  .system-tabs {
    gap: 4px;
    padding: 0;
  }

  .tab-button {
    padding: 8px 10px;
    font-size: 12px;
    min-width: 65px;
  }

  .tab-button span {
    font-size: 11px;
  }

  .supplement-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 10px;
    column-gap: 10px;
  }

  .system-header {
    margin: 1.5rem 0 1rem 0;
    padding: 0.8rem;
  }

  .system-header h4 {
    font-size: 1.2rem;
  }

  .system-header p {
    font-size: 0.85rem;
  }

  .supplement-type-card {
    width: 150px;
    height: 180px;
    padding: 12px;
    font-size: 0.95em;
  }

  .supplement-type-card .icon {
    font-size: 2.3rem;
    margin-bottom: 6px;
  }

  .supplement-type-card h3 {
    font-size: 1.18rem;
    margin-bottom: 4px;
  }

  .supplement-type-card p {
    font-size: 0.9rem;
  }
  /* ingredient-analyzer-page 중간 크기 모바일에서 패딩 조정 */
  body.ingredient-analyzer-page {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .footer-nav-mobile {
    border-radius: 12px 12px 0 0;
  }

  .footer-nav-item a,
  .footer-nav-item button {
    padding: 10px 0 7px 0;
  }

  .footer-nav-icon {
    font-size: 1.7rem;
    margin-bottom: 4px;
  }

  .footer-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
  }

  .footer-nav-label {
    font-size: 0.75rem;
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
      Roboto, sans-serif;
    font-weight: 500;
    margin-top: 2px;
  }
  .footer-nav-item.active .footer-nav-icon,
  .footer-nav-item.active .footer-nav-label {
    color: #2451a6;
    font-weight: bold;
  }

  .diagnosis.status-section {
    padding: 0.5em 0.7em;
    margin-bottom: 1em;
    border-radius: 5px;
  }

  .diagnosis.status-section .status-section-title {
    font-size: 0.95em;
    margin-bottom: 0.5em;
  }

  .diagnosis.status-section .status-item-title {
    font-size: 0.85em;
    margin-top: 0.3em;
    margin-bottom: 0.03em;
  }

  .diagnosis.status-section .desc {
    font-size: 0.7em;
    line-height: 1.2;
  }

  .diagnosis.status-section .desc {
    display: none;
  }

  .diagnosis.status-section
    > div:not(.status-section-title):not(.status-item-title) {
    font-size: 0.8em;
    line-height: 1.3;
    margin-bottom: 0.25em;
  }

  /* meal-section-title 반응형 스타일 */
  .meal-section-title {
    font-size: 0.95em;
    margin-top: 1em;
    margin-bottom: 0.25em;
    padding-left: 0.25em;
  }

  /* menu-slider-container 반응형 스타일 */
  .menu-slider-container {
    margin-bottom: 1em;
  }

  .menu-slider-nav {
    margin-top: 1px;
    margin-bottom: 5px;
  }

  .menu-nav-btn {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .menu-dot {
    width: 5px;
    height: 5px;
  }

  /* menu-block 내부 요소 반응형 스타일 */
  .menu-block {
    padding: 0.7em 0.9em 1em 0.9em;
    margin-bottom: 1em;
  }

  .menu-name {
    font-size: 0.9em;
    margin-bottom: 0.5em;
  }

  .nutrition-title,
  .ingredient-title,
  .main-ingredient-title,
  .sauce-title,
  .etc-title,
  .recipe-title,
  .tip-title,
  .reason-title {
    font-size: 0.8em;
    margin-top: 0.5em;
    margin-bottom: 0.25em;
  }

  .nutrition-list,
  .ingredient-list,
  .recipe-list,
  .tip-content,
  .reason-content {
    font-size: 0.7em;
    line-height: 1.25;
    margin-bottom: 0.35em;
  }

  .ingredient-item {
    margin-bottom: 0.15em;
  }

  .ingredient-name {
    font-size: 0.75em;
  }

  .buy-btn {
    font-size: 0.6em;
    padding: 1px 5px;
  }

  .save-meal-btn {
    top: 5px;
    right: 7px;
    padding: 1px 6px;
    font-size: 14px;
  }
  .step-header h2 {
    font-size: 1.4rem;
  }
  .step-header p {
    font-size: 0.95rem;
  }
  .tab-content {
    padding: 10px;
  }
  .wizard-content {
    padding: 1.5rem;
  }
  
  /* Step 4 (결과 페이지) 태블릿 전용 스타일 */
  .results-step {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  /* 제목 */
  #profile h1 {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    line-height: 1.3;
  }

  h2 {
    font-size: 1.2rem;
    margin-bottom: 14px;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.3;
  }

  /* 진행 상태 표시줄 */
  .progress-container {
    margin-bottom: 40px;
  }

  .progress-step {
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
  }

  .progress-step::after {
    font-size: 0.7rem;
    top: calc(100% + 5px);
  }

  /* 섹션 가이드 */
  .section-guide {
    font-size: 0.85rem;
    padding: 6px 10px;
    margin-bottom: 12px;
  }

  .section-guide.required {
    background: #eaf0fb;
    color: #2451a6;
    font-weight: 700;
    font-size: 0.75rem;
  }

  .section-guide.optional {
    background: #f4f7fa;
    color: #4a69bd;
    border-left: 5px solid #b0c4de;
    font-weight: 500;
  }

  /* 식재료 분석기 검색 결과 페이지 - 작은 화면에서 상단 마진 제거 */
  body.ingredient-analyzer-page.has-search-results .search-section {
    margin-top: 0;
  }

  /* 영양 상세 컨테이너 - 작은 화면 스타일 */
  .nutrition-detail-container {
    margin-top: 15px;
    border-radius: 15px;
  }

  .nutrition-detail-container .detail-header {
    padding: 12px 12px 12px 20px;
  }

  .nutrition-detail-container .detail-header h3 {
    font-size: 1.2rem;
    min-width: 150px;
  }

  .nutrition-detail-container .btn-close {
    padding: 6px;
    font-size: 0.8rem;
    max-width: 80px;
  }

  .nutrition-detail-container .detail-content {
    padding: 0px 20px;
  }

  .nutrition-detail-container .basic-info {
    margin-bottom: 20px;
  }

  .nutrition-detail-container .info-row {
    margin-bottom: 8px;
    padding: 8px 0;
  }

  .nutrition-detail-container .info-row .label {
    min-width: 80px;
    margin-right: 10px;
    font-size: 0.9rem;
  }

  .nutrition-detail-container .info-row .value {
    font-size: 0.9rem;
  }

  .nutrition-detail-container .nutrition-table {
    margin-bottom: 15px;
  }

  .nutrition-detail-container .nutrition-table h4 {
    font-size: 1.1rem;
    margin: 0 0 12px 0;
  }

  .nutrition-detail-container .nutrition-table th,
  .nutrition-detail-container .nutrition-table td {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .nutrition-detail-container .reference-info,
  .nutrition-detail-container .data-info {
    padding: 12px;
    margin-top: 12px;
    font-size: 0.85rem;
  }

  /* 구매하기 버튼 - 작은 화면 스타일 */
  .btn-purchase {
    padding: 8px 14px;
    font-size: 12px;
    max-width: 110px;
    gap: 6px;
  }

  .btn-purchase .purchase-icon {
    font-size: 14px;
  }

  /* multi-step-loading 모바일 최적화 */
  .multi-step-loading {
    min-width: unset;
    max-width: 98vw;
    width: 98vw;
    padding: 15px 3vw 15px 3vw;
    margin: 10px auto 15px auto;
    gap: 12px;
    border-radius: 12px;
  }

  /* meal_plan_content 내부의 multi-step-loading 추가 최적화 */
  #meal_plan_content .multi-step-loading {
    width: 100%;
    max-width: 100%;
    padding: 12px 2vw 12px 2vw;
    margin: 8px auto 12px auto;
  }

  #meal_plan_content .loading-step {
    gap: 8px;
  }

  #meal_plan_content .loading-icon {
    width: 28px;
    min-width: 28px;
    height: 28px;
    margin-right: 3px;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #meal_plan_content .loading-spinner.step-loading {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e7ff;
    border-top: 2px solid #3b5fc5;
    animation: spin-step-loading 1s linear infinite;
  }

  #meal_plan_content .loading-title {
    font-size: 0.9em;
    line-height: 1.2;
  }

  #meal_plan_content .loading-desc {
    font-size: 0.8em;
    line-height: 1.1;
  }

  .loading-step {
    gap: 8px;
    font-size: 0.9em;
  }

  .loading-icon {
    width: 32px;
    min-width: 32px;
    height: 32px;
    margin-right: 4px;
    /* 작은 모바일에서도 step-loading 스피너가 정확히 중앙에 위치하도록 보장 */
    overflow: visible;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .loading-spinner.step-loading {
    width: 22px;
    height: 22px;
    border: 2px solid #e0e7ff;
    border-top: 2px solid #3b5fc5;
    animation: spin-step-loading 1s linear infinite;
  }

  .loading-step .loading-check {
    font-size: 1.3em;
  }

  .loading-title {
    font-size: 0.95em;
    margin-bottom: 2px;
  }

  .loading-desc {
    font-size: 0.85em;
    line-height: 1.3;
  }

  /* 라벨 */
  .input-group-item label {
    font-size: 0.8rem;
    margin-bottom: 4px;
    margin-top: 12px;
  }

  /* 입력 필드 */
  input[type="number"],
  input[type="text"] {
    font-size: 0.85rem;
    margin: 0;
  }

  .address-search-container .address-search-input{
    padding: 12px;
  }

  .location-input-group .location-input{
    padding: 12px;
    width: 100%;
  }

  .nutrition-search-icon {
    position: absolute;
    left: 16px;
    top: 56%;
  }

  /* input-group-item들을 가로로 배치 */
  .input-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .input-group-item {
    flex: 1;
    min-width: 80px;
  }

  /* 옵션 그룹 - 가로배열 강제 */
  .option-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
  }

  /* 옵션 - 크기 조정 */
  .option {
    padding: 6px 10px;
    font-size: 0.75rem;
    margin-bottom: 4px;
    flex: 0 1 auto;
    min-width: 100px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  /* meal-question-block 크기 조정 */
  .meal-question-block {
    padding: 10px 5px 20px 5px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    border-radius: 6px;
  }

  /* meal-question-block 높이 조정 */
  .meal-question-block {
    min-height: calc(100vh - 350px);
  }

  /* meal-nav-btns-fixed 위치 조정 */
  .meal-nav-btns-fixed {
    bottom: 80px;
    padding: 0 10px;
  }

  .meal-nav-btns-fixed button {
    padding: 0.8em 0;
    font-size: 0.9rem;
    border-radius: 5px;
  }

  .meal-block-btn {
    font-size: 0.9rem;
    padding: 0.7em 1.2em;
    min-width: 120px;
    min-height: 36px;
    border-radius: 8px;
  }

  .meal-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    justify-content: center;
  }

  .meal-options .meal-block-btn {
    flex: 0 1 calc(50% - 4.5em);
    min-width: 60px;
  }

  /* 모바일에서 한끼 식사 예산 질문의 옵션들을 세로로 배치 */
  .meal-question-block[data-question-key="budget"] .meal-options {
    flex-direction: column;
    align-items: center;
  }

  .meal-question-block[data-question-key="budget"] .meal-options .meal-block-btn {
    flex: 1 1 auto;
    width: 100%;
    max-width: 280px;
    margin-bottom: 6px;
  }

  /* 성별, 흡연, 식사횟수 옵션 - 480px에서는 가로배열 강제 */
  .option-group[data-name="gender"] .option,
  .option-group[data-name="smoking_status"] .option,
  .option-group[data-name="meals_per_day"] .option {
    flex: 1 1 auto;
    max-width: none;
    min-width: 80px;
  }

  /* 아코디언 */
  .accordion {
    margin-bottom: 12px;
  }

  .accordion-header {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .accordion-content {
    padding: 10px 10px 5px 10px;
  }

  /* 값 입력 필드 */
  .option .value-input {
    font-size: 0.75rem;
    padding: 5px;
    margin-top: 6px;
  }

  .option .unit {
    font-size: 0.7em;
  }

  /* 숨겨진 입력 */
  .hidden-input-container label {
    font-size: 0.8rem;
  }

  .hidden-input-container input {
    font-size: 0.8rem;
    padding: 6px;
  }

  /* 버튼 */
  /* 버튼 그룹 */
  .button-group {
    flex-direction: row;
    gap: 8px;
    margin-top: 20px;
  }

  .button-group button {
    padding: 12px;
    font-size: 0.9rem;
    width: 100%;
  }

  /* 프로필 편집 버튼 */
  .profile-edit-btn {
    padding: 12px 16px;
    font-size: 0.85rem;
    margin-bottom: 15px;
  }

  .meal-other-input input {
    font-size: 0.9rem;
    padding: 6px 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  #other_allergies_text {
    font-size: 0.85rem;
    padding: 10px;
    width: 100%;
    max-width: 280px;
    display: block;
    text-align: left;
  }

  #other_illnesses_text {
    font-size: 0.85rem;
    padding: 10px;
    width: 100%;
    max-width: 280px;
    display: block;
    text-align: left;
  }

  .modal-content {
    padding: 15px 12px;
    width: 95%;
    margin: 5px;
  }

  .modal-close {
    top: 8px;
    right: 12px;
    font-size: 1.2rem;
  }

  .modal-content h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    padding-right: 20px;
  }

  .modal-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  #profileSaveModal .modal-content {
    max-width: 280px;
    padding: 24px 20px;
  }

  #profileSaveModal .modal-btn {
    padding: 16px 24px;
    font-size: 0.9rem;
  }
  .container,
  body.supplement-page .container {
    padding: 0px 0px 75px 0px;
    margin: 0px;
    box-shadow: none;
  }

  /* 모바일에서 상단 네비게이션 공간 확보 */
  .section.active {
    padding-top: 50px;
    padding-bottom: 55px;
  }

  .nav-content {
    padding: 0.3rem 0;
    position: relative;
  }

  .nav-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
  }

  .nav-toggle {
    padding: 0.15rem;
  }

  .nav-toggle span {
    width: 20px;
    height: 2px;
    margin: 2px 0;
  }

  .nav-brand a {
    font-size: 1.5rem;
  }

  .hero-section {
    padding: 55px 0 50px;
  }

  .hero-title {
    font-size: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }

  .hero-content-center {
    padding: 0.2rem 0;
    margin-bottom: 0.6rem;
  }

  .hero-description {
    display: none;
  }

  .hero-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero-card {
    padding: 0.6rem;
    height: 100px;
    min-height: 100px;
    max-height: 100px;
    width: 100%;
    min-width: auto;
    max-width: 120px;
  }

  .card-icon {
    font-size: 1.7rem;
    margin-bottom: 0.9rem;
  }

  .card-title {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
  }

  .card-description {
    font-size: 0.65rem;
    line-height: 1.1;
  }

  .hero-stats {
    gap: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .feature-card,
  .testimonial-card {
    padding: 1.5rem;
  }

  .action-card {
    padding: 1.8rem 1.5rem;
    min-height: 180px;
  }

  .quick-action-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
  }

  .action-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
  }

  .action-text p {
    font-size: 0.9rem;
  }

  .cta-section {
    padding: 3rem 0;
  }

  .cta-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .cta-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .cta-btn {
    min-width: 200px;
    padding: 0.9rem 1.8rem;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
  }

  
  /* quick-actions 섹션 모바일 최적화 */
  .quick-actions {
    padding: 2.5rem 0;
  }

  .quick-actions .section-title {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
  }

  .actions-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }

  .action-card {
    padding: 0.8rem 0.6rem;
    min-height: 100px;
  }

  .quick-action-icon {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
  }

  .action-text h4 {
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
    line-height: 1.1;
  }

  /* 모바일에서 h4 텍스트 변경 */
  .quick-actions .action-card:nth-child(1) .action-text h4::before {
    content: "프로필 완성";
    font-size: 0.85rem;
  }

  .quick-actions .action-card:nth-child(1) .action-text h4 {
    font-size: 0;
  }

  .quick-actions .action-card:nth-child(2) .action-text h4::before {
    content: "포인트 얻기";
    font-size: 0.85rem;
  }

  .quick-actions .action-card:nth-child(2) .action-text h4 {
    font-size: 0;
  }

  .quick-actions .action-card:nth-child(3) .action-text h4::before {
    content: "잇플스토어";
    font-size: 0.85rem;
  }

  .quick-actions .action-card:nth-child(3) .action-text h4 {
    font-size: 0;
  }

  /* 모바일에서 첫 번째 카드의 p 태그 변경 */
  .quick-actions .action-card:nth-child(1) .action-text p {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .action-text p {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  /* footer 섹션 480px 최적화 */
  .footer {
    padding: 1.5rem 0 1.5rem;
    margin-bottom: 80px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    text-align: left; /* 왼쪽 정렬로 변경 */
  }

  .footer-brand {
    margin-bottom: 0.8rem;
    text-align: left; /* 브랜드 영역 왼쪽 정렬 */
  }

  .footer-brand .brand-logo {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    color: white; /* 브랜드 로고를 흰색으로 변경 */
  }

  .footer-brand p {
    display: none; /* 모바일에서 "건강한 식생활을 위한 종합 플랫폼" 텍스트 숨김 */
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .footer-section {
    text-align: left; /* footer-section 왼쪽 정렬 */
  }

  .footer-section h4 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }

  .footer-section ul {
    gap: 0.4rem;
  }

  .footer-section li {
    margin-bottom: 0.25rem;
  }

  .footer-section a {
    font-size: 0.85rem;
    padding: 0.25rem 0;
    line-height: 1.3;
  }

  .footer-bottom {
    padding: 0.8rem 0 0;
    text-align: center;
  }

  .footer-bottom p {
    font-size: 0.8rem;
    text-align: left;
  }

  .footer-copyright {
    font-size: 0.65rem;
    margin-top: 0.5rem;
    line-height: 1.1;
    text-align: left; /* 왼쪽 정렬 */
  }

  .purpose-category-tabs {
    gap: 2px;
    padding: 2px;
    margin-bottom: 8px;
  }

  .category-tab {
    min-width: auto;
    padding: 5px;
    font-size: 1rem;
    flex-shrink: 1;
  }

  .cta-button {
    padding: 8px 16px;
    font-size: 1.1rem;
  }

  .purpose-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .meal-type-card {
    min-height: 130px;
    padding: 10px;
    font-size: 0.8em;
  }

  .meal-type-card .icon {
    font-size: 1.5rem;
    margin-bottom: 3px;
  }

  .meal-type-card h3 {
    font-size: 1rem;
    margin-bottom: 2px;
  }

  .meal-type-card p {
    font-size: 0.75rem;
    line-height: 1.1;
  }

  .meal-type-selection {
    gap: 8px;
    padding: 0 6px;
    grid-template-rows: 1fr;
    margin-bottom: 0px;
    padding-bottom: 10px;
  }

  .nutrition-grid {
    margin: 0 -10px;
  }

  .nutrition-card {
    margin: 0 5px;
  }

  .nutrition-thumbnail {
    height: 160px;
  }

  .nutrition-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .nutrition-more-btn {
    padding: 12px 25px;
    font-size: 0.9rem;
  }
  .scroll-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  /* 작은 모바일에서 레이아웃 조정 */
  .supplements-grid {
    padding: 0 10px;
    gap: 16px;
  }

  .supplements-grid .supplement-card-modern,
  .supplements-grid .supplement-card-modern.essential,
  .supplements-grid .supplement-card-modern.recommended,
  .supplements-grid .supplement-card-modern.optional {
    flex: 0 0 auto;
  }

  .supplement-card-modern {
    background-color: whitesmoke;
    min-height: 280px;
  }

  .ai-recommendations {
    padding: 16px;
  }

  .supplements-slider-arrow {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .supplements-slider-controls {
    padding: 0 10px;
  }

  .supplements-slider-dot {
    width: 8px;
    height: 8px;
  }

  .analysis-card,
  .lifestyle-card,
  .safety-item,
  .timeline-item {
    padding: 15px;
  }

  .supplement-card-modern {
    padding: 20px;
    margin: 0 8px;
    border-radius: 16px;
    min-height: 250px;
  }

  /* 모바일에서 그리드를 세로 배치로 변경 */
  .supplement-card-modern .card-content-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .supplement-card-modern .warnings-section {
    flex-direction: column;
    gap: 12px;
  }

  .supplement-card-modern .card-header-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .supplement-card-modern .supplement-main-info {
    width: 100%;
    gap: 12px;
  }

  .supplement-card-modern .supplement-icon {
    font-size: 2rem;
    min-width: 40px;
  }

  .supplement-card-modern .supplement-name {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  .supplement-card-modern .supplement-category {
    font-size: 0.8rem;
  }

  .supplement-card-modern .priority-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
  }

  .supplement-card-modern .section-title {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }

  .supplement-card-modern .dosage-section,
  .supplement-card-modern .benefits-section,
  .supplement-card-modern .rationale-section,
  .supplement-card-modern .results-section {
    padding: 12px;
    border-radius: 10px;
  }

  .supplement-card-modern .dosage-amount {
    font-size: 1.1rem;
  }

  .supplement-card-modern .timing-details {
    gap: 6px;
  }

  .supplement-card-modern .timing-when,
  .supplement-card-modern .timing-frequency,
  .supplement-card-modern .timing-duration {
    font-size: 0.8rem;
    padding: 3px 6px;
  }

  .supplement-card-modern .benefit-tag {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .supplement-card-modern .rationale-text,
  .supplement-card-modern .results-text {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .supplement-card-modern .safety-warning,
  .supplement-card-modern .interactions-info {
    padding: 10px 12px;
  }

  .supplement-card-modern .warning-title {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }

  .supplement-card-modern .safety-warning p,
  .supplement-card-modern .interactions-info p {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .supplement-actions {
    flex-direction: column;
  }

  .kakao-map .info-window {
    max-width: 240px !important;
    min-width: 180px !important;
    z-index: 1000 !important;
  }
  
  .kakao-map .info-window div {
    padding: 6px !important;
    font-size: 10px !important;
  }
  
  .kakao-map .info-window div div:first-child {
    font-size: 11px !important;
  }
  
  .kakao-map .info-window div div {
    font-size: 9px !important;
  }
  
  .kakao-map .info-window div div[style*="margin-top:8px"],
  .kakao-map .info-window div div[style*="font-style:italic"] {
    font-size: 8px !important;
  }
  
  /* 인포윈도우가 화면 밖으로 나가지 않도록 조정 */
  .kakao-map .info-window {
    max-height: 80vh !important;
    overflow-y: auto !important;
    word-wrap: break-word !important;
  }

  .supplement-card-modern {
    padding: 16px;
    margin: 0 4px;
    border-radius: 12px;
    min-height: 220px;
    max-width: 260px;
    box-shadow: none;
  }

  .supplement-card-modern .card-header-section {
    margin-bottom: 12px;
    padding-bottom: 8px;
    gap: 8px;
  }

  .supplement-card-modern .supplement-main-info {
    gap: 8px;
  }

  .supplement-card-modern .supplement-icon {
    font-size: 1.8rem;
    min-width: 36px;
  }

  .supplement-card-modern .supplement-name {
    font-size: 1rem;
    line-height: 1.2;
  }

  .supplement-card-modern .supplement-category {
    font-size: 0.75rem;
  }

  .supplement-card-modern .priority-badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    border-radius: 10px;
  }

  .supplement-card-modern .card-content-grid {
    gap: 10px;
  }

  .supplement-card-modern .section-title {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }

  .supplement-card-modern .dosage-section,
  .supplement-card-modern .benefits-section,
  .supplement-card-modern .rationale-section,
  .supplement-card-modern .results-section {
    padding: 10px;
    border-radius: 8px;
  }

  .supplement-card-modern .dosage-amount {
    font-size: 1rem;
  }

  .supplement-card-modern .timing-details {
    gap: 4px;
  }

  .supplement-card-modern .timing-when,
  .supplement-card-modern .timing-frequency,
  .supplement-card-modern .timing-duration {
    font-size: 0.75rem;
    padding: 2px 4px;
  }

  .supplement-card-modern .benefit-tag {
    font-size: 0.7rem;
    padding: 3px 6px;
  }

  .supplement-card-modern .rationale-text,
  .supplement-card-modern .results-text {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .supplement-card-modern .warnings-section {
    gap: 8px;
  }

  .supplement-card-modern .safety-warning,
  .supplement-card-modern .interactions-info {
    padding: 8px 10px;
  }

  .supplement-card-modern .warning-title {
    font-size: 0.8rem;
    margin-bottom: 3px;
  }

  .supplement-card-modern .safety-warning p,
  .supplement-card-modern .interactions-info p {
    font-size: 0.75rem;
    line-height: 1.2;
  }
  .benefits-section, .rationale-section, .results-section {
    margin-bottom: 0;
  }

  .section-header h3 {
    font-size: 1.2rem;
  }

  /* ingredient-analyzer-page 모바일에서 패딩 최소화 */
  body.ingredient-analyzer-page {
    padding: 0 5px 80px 5px !important;
  }

  .analyzer-header {
    padding: 30px 20px;
  }

  .analyzer-header .page-title {
    font-size: 1.8rem;
  }

  .search-box {
    margin: 0 10px;
    max-width: calc(100vw - 70px);
    width: 100%;
  }

  .search-input-wrapper {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .ingredient-search-input-wrapper {
    flex-direction: column;
    gap: 12px;
    padding: 10px 25px;
    min-width: 79%;
  }

  .ingredient-search-input-wrapper input.search-input {
    min-width: 100%;
    padding: 10px 0px;
  }

  .search-icon {
    right: 0px;
  }

  .search-btn {
    width: 100%;
  }

  .tab-btn {
    min-width: 80px;
    padding: 12px 8px;
    font-size: 0.8rem;
  }

  .ingredient-tab-btn {
    min-width: 80px;
    padding: 12px 8px;
    font-size: 0.8rem;
  }

  .overview-card,
  .compatibility-card,
  .health-section,
  .recipes-section,
  .traditional-section {
    padding: 20px;
  }

  .recipes-list {
    grid-template-columns: 1fr;
  }

  .nutrition-grid-modern {
    grid-template-columns: 1fr 1fr;
  }

  .ingredient-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ingredient-title h2 {
    font-size: 1.8rem;
    flex: none;
    min-width: auto;
  }

  .ingredient-title p {
    flex: none;
    min-width: auto;
    font-size: 13px;
  }

  /* 모바일에서 결과 헤더 레이아웃 조정 */
  .result-header {
    flex-direction: column;
    text-align: left;
    gap: 0px;
    padding: 20px;
  }

  .ingredient-title {
    flex: none;
    width: 100%;
  }

  .purchase-section {
    flex: none;
    width: 100%;
  }

  .purchase-btn {
    width: 100%;
    justify-content: center;
  }

  .ingredient-nutrition-header {
    padding: 12px 16px;
    margin-bottom: 12px;
  }

  .ingredient-nutrition-header h3 {
    font-size: 1.1rem;
  }

  /* 옵션 그룹 - 가로배열 강제 */
  .option-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
  }

  /* 옵션 - 크기 조정 */
  .option {
    padding: 10px;
    font-size: 0.85rem;
    margin-bottom: 4px;
    flex: 0 1 auto;
    min-width: 60px;
    max-width: calc(50% - 3px);
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  .progress-step {
    font-size: 0.9em;
  }

  .step-number {
    width: 35px;
    height: 35px;
    font-size: 0.9em;
  }

  .category-options .checkbox-option {
    min-width: 0;
    padding: 10px;
  }
  .restaurant-card {
    padding: 15px;
    margin: 0;
    border: none;
  }

  .restaurant-name {
    font-size: 16px;
  }

  .menu-item {
    padding: 10px;
  }
  .recommendation-map {
    height: 250px;
  }

  .recommendation-map-section h3 {
    padding: 14px 16px 10px;
    font-size: 18px;
  }
  .restaurant-slider {
    margin: 0 10px;
  }

  .restaurant-slider-arrow {
    width: 30px;
    height: 30px;
    font-size: 16px;
    padding: 20px 20px;
  }

  .restaurant-slider-container h3 {
    padding: 14px 16px 10px;
    font-size: 18px;
  }

  .restaurant-slider-indicators {
    padding: 15px 0;
  }
  body.nutrition-info-page .container {
    padding: 0 15px;
  }

  .nutrition-page-title {
    font-size: 1.8rem;
  }

  .nutrition-header {
    padding: 30px 0 10px;
    min-height: 20vh;
  }

  .nutrition-filters {
    padding: 20px 0;
  }

  .filter-container {
    gap: 15px;
  }

  /* 중복 제거 - 위의 통합된 스타일 사용 */
  .nutrition-card-title {
    font-size: 1rem;
  }

  .nutrition-card-summary {
    font-size: 0.85rem;
  }

  .action-btn {
    justify-content: center;
    min-width: 40px;
  }
  .footer-nav-mobile {
    border-radius: 10px 10px 0 0;
  }

  .footer-nav-item a,
  .footer-nav-item button {
    padding: 8px 0 6px 0;
  }

  .footer-nav-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
  }

  .footer-nav-label {
    font-size: 0.65rem;
    margin-top: 1px;
  }
  .diagnosis.status-section {
    padding: 0.4em 0.6em;
    margin-bottom: 0.8em;
    border-radius: 4px;
  }

  .diagnosis.status-section .status-section-title {
    font-size: 0.9em;
    margin-bottom: 0.4em;
  }

  .diagnosis.status-section .status-item-title {
    font-size: 0.8em;
    margin-top: 0.25em;
    margin-bottom: 0.02em;
  }

  .diagnosis.status-section .desc {
    font-size: 0.65em;
    line-height: 1.1;
  }

  .diagnosis.status-section .desc {
    display: none;
  }

  .diagnosis.status-section
    > div:not(.status-section-title):not(.status-item-title) {
    font-size: 0.75em;
    line-height: 1.2;
    margin-bottom: 0.2em;
  }

  /* meal-section-title 반응형 스타일 */
  .meal-section-title {
    font-size: 0.9em;
    margin-top: 0.9em;
    margin-bottom: 0.2em;
    padding-left: 0.2em;
  }

  /* menu-slider-container 반응형 스타일 */
  .menu-slider-container {
    margin-bottom: 0.8em;
  }

  .menu-slider-nav {
    margin-top: 1px;
    margin-bottom: 4px;
  }

  .menu-nav-btn {
    width: 24px;
    height: 24px;
    font-size: 12px;
    margin: 10px 0;
  }

  .menu-dot {
    width: 4px;
    height: 4px;
  }

  /* menu-block 내부 요소 반응형 스타일 */
  .menu-block {
    padding: 0.6em 0.8em 0.9em 0.8em;
    margin-bottom: 0.9em;
  }

  .menu-name {
    font-size: 1em;
    margin-bottom: 0;
  }
  .menu-price {
    font-size: 1em;
  }
  .health-considerations p {
    font-size: 13px;
  }
  .nutrition-title,
  .ingredient-title,
  .main-ingredient-title,
  .sauce-title,
  .etc-title,
  .recipe-title,
  .tip-title,
  .reason-title {
    font-size: 0.85em;
    margin-top: 0.4em;
    margin-bottom: 0.2em;
  }

  .nutrition-list,
  .ingredient-list,
  .recipe-list,
  .tip-content,
  .reason-content {
    font-size: 0.8em;
    line-height: 1.2;
    margin-bottom: 0.3em;
  }

  .ingredient-item {
    margin-bottom: 0.1em;
  }

  .ingredient-name {
    font-size: 0.9em;
  }

  .buy-btn {
    font-size: 0.85em;
    padding: 1px 4px;
  }

  .save-meal-btn {
    top: 4px;
    right: 12px;
    padding: 4px 8px;
    font-size: 12px;
  }
  .step-description {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    padding: 0 0.3rem;
  }

  .step-description p {
    font-size: 0.85rem;
    text-align: center;
  }
  .step-container {
    padding: 20px 10px 10px 10px;
    margin: 0px;
  }
  .location-btn {
    font-size: 0.85rem;
    padding: 12px;
    margin: 0px;
    width: 100%;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .location-buttons {
    margin-top: 12px;
    flex-direction: row;
    width: 100%;
    gap: 10px;
  }
  
  .location-buttons .location-btn {
    flex: 1;
    min-width: 0;
  }
  .address-search-btn {
    font-size: 0.85rem;
    padding: 12px;
    margin: 0px;
    width: 100%;
    max-width: 100px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .map-container {
    height: 200px;
  }
  .kakao-map {
    height: 200px;
  }
  .location-input-group label {
    margin-top: 8px;
  }
  /* Toast 메시지 모바일 반응형 스타일 */
  .toast-container {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9999;
    pointer-events: none;
  }

  .toast-message {
    position: relative;
    margin: 10px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: auto;
    max-width: 400px;
  }
  .step-header h2 {
    font-size: 1.2rem;
  }
  .step-header p {
    font-size: 0.85rem;
  }
  .step-header {
    margin-bottom: 0rem;
  }
  .tab-content {
    padding: 5px;
  }
  .wizard-content {
    padding: 1rem 1rem 0 1rem;
    margin-bottom: 0;
  }
  
  /* Step 4 (결과 페이지) 작은 모바일 전용 스타일 */
  .results-step {
    max-width: 100%;
  }
  .supplement-type-selection {
    padding: 5px 10px 10px 10px;
    margin-bottom: 0px;
  }
  .supplement-type-card {
    width: 120px;
    height: 85px;
    padding: 15px;
    font-size: 0.8em;
  }

  .supplement-type-card .icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
  }

  .supplement-type-card h3 {
    font-size: 0.9rem;
    margin-bottom: 4px;
    margin-top: 4px;
  }

  .supplement-type-card p {
    font-size: 0.7rem;
    margin-top: 5px;
  }
  .preference-nav-btns-fixed {
    bottom: 80px;
    padding: 10px 20px;
    gap: 8px;
    align-items: center;
    flex-direction: row;
  }
  .mypage-progress-bar-container {
    max-width: 300px;
    margin: 0 auto 15px auto;
    height: 22px;
    box-shadow: 0 2px 8px rgba(74, 105, 189, 0.08);
  }
  .preference-question-label {
    font-size: 1.2rem;
  }

  .preference-question-description {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
  }
  .analysis-card .card-icon {
    font-size: 1.5rem;
    min-width: 0px;
  }
  .analysis-card .card-content h4 {
    font-size: 0.95rem;
  }
  .analysis-card .card-content p {
    font-size: 0.9rem;
  }
  .dosage-info {
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 10px;
  }
  .dosage-amount {
    font-size: 0.95rem;
  }

  .timing-info {
    font-size: 0.85rem;
  }
  .benefits-list,
  .components-list {
    gap: 6px;
  }
  .benefits-list li {
    font-size: 14px;
    margin-bottom: 0px;
  }
  .rationale-text,
  .results-text {
    font-size: 14px;
  }
  .safety-warning p {
    font-size: 12px;
  }
  .interactions-info p {
    font-size: 12px;
  }
  .safety-item li,
  .safety-item p {
    font-size: 14px;
  }
  .recommendation-actions {
    gap: 0px;
    margin-top: 20px;
  }
  .safety-section {
    margin-bottom: 14px;
  }
  .recommendation-actions .action-btn {
    padding: 12px;
    font-size: 0.9rem;
  }
  .wizard-navigation {
    margin-top: 12px;
  }
  .section-header {
    margin-bottom: 10px;
  }
  .analysis-card {
    gap: 0px;
  }
  .lifestyle-card .card-icon {
    font-size: 1.5rem;
    min-width: 0px;
  }
  .lifestyle-card p {
    font-size: 14px;
  }
  .lifestyle-card h4 {
    font-size: 0.95rem;
  }
  .safety-item h4 {
    font-size: 0.95rem;
  }
  .supplement-name {
    font-size: 1.1rem;
  }
  .supplement-actions .action-btn.secondary {
    margin-top: 4px;
  }
  .supplement-actions .action-btn.primary {
    margin-top: 4px;
  }
  .step-content {
    padding-bottom: 50px;
  }
  .step-container {
    box-shadow: none;
  }
  .result-container .step-container {
    margin-bottom: 50px;
  }
  .checkbox-option .checkmark {
    width: 16px;
    height: 16px;
  }
  .checkbox-label .checkmark {
    width: 16px;
    height: 16px;
  }
  .checkbox-label .label-text {
    font-size: 0.8em;
    font-weight: 500;
  }
  .step-btn {
    padding: 10px;
    font-size: 1rem;
  }
  .summary-section {
    padding: 8px;
  }
  .summary-item strong,
  .summary-item span {
    font-size: 13px;
  }
  .result-container {
    box-shadow: none;
    margin-top: 0px;
    border-radius: 10px;
  }
  .result-message,
  .result-count {
    font-size: 0.9rem;
    gap: 6px;
  }
  .recommendation-result {
    padding: 10px;
  }
  .result-guide {
    font-size: 0.75rem;
  }
  .restaurant-info {
    gap: 8px;
    font-size: 13px;
  }
  .recommendation-map-section {
    margin: 10px 0;
    box-shadow: none;
  }
  .restaurant-slider-wrapper {
    padding: 0;
  }
  .analyzer-header .page-description {
    font-size: 0.9rem;
  }
  .ingredient-search-container {
    margin-bottom: 10px;
  }
  .suggestion-item {
    font-size: 0.9rem;
  }
  .loading-text {
    font-size: 0.9rem;
  }

  /* 식재료 분석기 결과 탭 모바일 스타일 */
  .ingredient-tab-content-container {
    padding: 0 10px;
  }

  .ingredient-tab-content {
    padding: 15px 10px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 0;
  }

  .overview-card {
    padding: 15px;
    margin-bottom: 15px;
  }

  .overview-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .quick-facts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .fact-item {
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
  }

  .fact-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
  }

  .fact-value {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .storage-card .storage-content {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .compatibility-section {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
  }

  .compatibility-card {
    padding: 15px;
  }

  .compatibility-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .compatibility-content {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .nutrition-grid-modern {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .nutrition-item {
    padding: 8px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 6px;
  }

  .nutrition-label {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .nutrition-value {
    font-size: 0.9rem;
    font-weight: 600;
  }

  .health-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .health-section {
    padding: 15px;
  }

  .health-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .benefits-list,
  .side-effects-list {
    gap: 8px;
  }

  .effect-item {
    padding: 8px 10px;
    font-size: 0.85rem;
    line-height: 1.3;
    border-radius: 6px;
  }

  .effect-item.benefit {
    background: #e8f5e8;
    border-left: 3px solid #28a745;
  }

  .effect-item.side-effect {
    background: #ffeaa7;
    border-left: 3px solid #f39c12;
  }

  .effect-icon {
    margin-right: 8px;
  }

  .components-section {
    padding: 15px;
  }

  .components-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .component-item {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
  }

  .traditional-section {
    padding: 15px;
    margin-top: 20px;
  }

  .traditional-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .traditional-content {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .cautions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .side-effects-section,
  .allergy-section {
    padding: 15px;
  }

  .allergy-content {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .info-disclaimer {
    padding: 15px;
    margin-top: 20px;
    background: #f8f9fa;
    border-radius: 8px;
  }

  .info-disclaimer h3 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .info-disclaimer p {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .usage-content {
    padding: 10px;
  }

  .recipes-section,
  .tips-section {
    margin-bottom: 25px;
  }

  .recipes-section h3,
  .tips-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }

  .recipes-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .recipe-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    gap: 12px;
  }

  .recipe-number {
    background: #4a69bd;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
  }

  .recipe-content {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  .ingredient-tips-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .tip-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
  }

  .tip-number {
    background: #28a745;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
  }

  .tip-item .ingredient-tips-content {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .tip-item .ingredient-tips-content strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
  }
  body.mypage-page .container {
    padding: 12px 8px 75px 8px;
  }

  .nutrition-search-input {
    padding: 10px 20px 10px 50px !important;
  }

  /* 모바일 네비게이션 컨테이너 하위 항목 스타일 */
  .mobile-nav-container .nav-menu {
    flex-direction: column;
    padding: 1.5rem 1rem 1rem;
    border-bottom: 1px solid #e0e6ed;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .mobile-nav-container .nav-menu a {
    display: block;
    padding: 0.75rem 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
  }

  .mobile-nav-container .nav-menu a:last-child {
    border-bottom: none;
  }

  .mobile-nav-container .nav-auth {
    padding: 1rem;
    background: white;
    display: flex;
    gap: 0.75rem;
  }

  .mobile-nav-container .nav-auth .main-nav-button {
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: center;
    justify-content: center;
    min-height: 44px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .mobile-nav-container .dropdown {
    position: relative;
  }

  .mobile-nav-container .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
  }

  .mobile-nav-container .dropdown-toggle::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
  }

  .mobile-nav-container .dropdown.active .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  .mobile-nav-container .dropdown-menu {
    position: static;
    display: none;
    background: #f8f9fa;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid #e0e6ed;
  }

  .mobile-nav-container .dropdown.active .dropdown-menu {
    display: block;
  }

  .mobile-nav-container .dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #e0e6ed;
    font-size: 0.9rem;
  }

  .mobile-nav-container .dropdown-menu a:last-child {
    border-bottom: none;
  }
}

/* 데스크톱 환경 (1025px 이상) */
@media (min-width: 1025px) {
  /* 데스크톱에서 건강 고민 설명 텍스트 줄바꿈 숨김 */
  .supplement-wizard .step-header p .mobile-break {
    display: none;
  }
}
