/* ==========================================================================
   AI 냉장고 (AI Refrigerator) - Apple iOS Style Design System (style.css)
   ========================================================================== */

/* 1. 변수 및 테마 시스템 (CSS Variables) */
:root {
  /* Pretendard 폰트 패밀리 */
  --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;

  /* 라이트 모드 컬러 */
  --bg-canvas: #f2f2f7;
  --bg-card: #ffffff;
  --bg-card-hover: #fbfbfd;
  --bg-subtle: #f8f8fa;
  --bg-glass: rgba(255, 255, 255, 0.82);

  --text-main: #1c1c1e;
  --text-sub: #6c6c70;
  --text-muted: #8e8e93;

  --border-color: rgba(60, 60, 67, 0.12);
  --border-focus: #007aff;

  --accent: #007aff;
  --accent-hover: #0062cc;
  --accent-light: rgba(0, 122, 255, 0.1);

  --green: #34c759;
  --green-light: rgba(52, 199, 89, 0.12);
  --orange: #ff9500;
  --orange-light: rgba(255, 149, 0, 0.12);
  --red: #ff3b30;
  --red-light: rgba(255, 59, 48, 0.12);
  --purple: #af52de;
  --purple-light: rgba(175, 82, 222, 0.12);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 다크 모드 변수 재정의 */
body.dark-mode {
  --bg-canvas: #000000;
  --bg-card: #1c1c1e;
  --bg-card-hover: #2c2c2e;
  --bg-subtle: #2c2c2e;
  --bg-glass: rgba(28, 28, 30, 0.85);

  --text-main: #f2f2f7;
  --text-sub: #aeaeb2;
  --text-muted: #8e8e93;

  --border-color: rgba(255, 255, 255, 0.14);
  --border-focus: #0a84ff;

  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-light: rgba(10, 132, 255, 0.22);

  --green: #30d158;
  --green-light: rgba(48, 209, 88, 0.22);
  --orange: #ff9f0a;
  --orange-light: rgba(255, 159, 10, 0.22);
  --red: #ff453a;
  --red-light: rgba(255, 69, 58, 0.22);
  --purple: #bf5af2;
  --purple-light: rgba(191, 90, 242, 0.22);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.65);
}

/* 2. 리셋 및 글로벌 기본 스타일 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  padding-bottom: 60px;
}

/* 앱 전체 중앙 컨테이너 */
.app-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 3. iOS 스타일 헤더 (Header) */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  margin-bottom: 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.brand-icon {
  font-size: 2rem;
  line-height: 1;
  background: var(--accent-light);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

.brand-text h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text p {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 4. 버튼 디자인 시스템 */
button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.action-btn {
  padding: 8px 14px;
  height: 42px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.action-btn:hover {
  background-color: var(--bg-card-hover);
  transform: translateY(-1px);
}

.action-btn:active {
  transform: scale(0.97);
}

.accent-btn {
  background-color: var(--accent);
  color: #ffffff;
  border: none;
}

.accent-btn:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

.icon-only-btn {
  width: 42px;
  padding: 0;
}

.icon-text-btn {
  position: relative;
}

.badge {
  background-color: var(--red);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  line-height: 1;
}

/* 5. iOS 카드 기본 스타일 (ios-card) */
.ios-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 24px;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

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

.title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-emoji {
  font-size: 1.4rem;
}

.title-wrap h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.count-pill {
  background-color: var(--accent-light);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* 6. 재료 입력 및 태그 목록 */
.ingredient-input-wrapper {
  margin-bottom: 16px;
}

.input-group {
  display: flex;
  align-items: center;
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.input-icon {
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.input-group input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  padding: 10px 0;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

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

.quick-ingredients-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.quick-title {
  font-size: 0.85rem;
  color: var(--text-sub);
  font-weight: 600;
  white-space: nowrap;
}

.quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-chip {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.quick-chip:hover {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent-light);
}

/* 등록된 재료 태그 컨테이너 */
.ingredient-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  align-items: center;
}

.ingredient-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  animation: tagPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.tag-delete-btn {
  color: var(--text-muted);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.tag-delete-btn:hover {
  background-color: var(--red-light);
  color: var(--red);
}

/* 7. 최근 본 요리 바 */
.recent-section {
  margin-bottom: 24px;
}

.recent-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.recent-scroll-wrap {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.recent-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.recent-item-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.recent-item-chip:hover {
  border-color: var(--accent);
}

/* 8. 필터, 검색 및 정렬 컨트롤 */
.controls-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

.search-box input {
  width: 100%;
  padding: 14px 44px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
}

/* 카테고리 탭 (가로 스크롤) */
.category-tabs-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.category-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.category-tabs {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn {
  padding: 8px 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.tab-btn.active {
  background-color: var(--text-main);
  color: var(--bg-card);
  border-color: var(--text-main);
}

.tab-btn:hover:not(.active) {
  background-color: var(--bg-card-hover);
}

.fav-tab.active {
  background-color: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

/* 세부 필터 & 정렬 바 */
.filter-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background-color: var(--bg-card);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.filter-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-sub);
  cursor: pointer;
  font-weight: 500;
}

.filter-radio input[type="radio"] {
  accent-color: var(--accent);
}

.sort-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.sort-select-wrap select {
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* 9. 레시피 카드 그리드 (Recipe Grid) */
.recipe-grid-section {
  margin-bottom: 40px;
}

.result-summary {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 16px;
  font-weight: 500;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

/* iOS 레시피 카드 */
.recipe-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  animation: fadeInCard 0.35s ease-out;
  position: relative;
}

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

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-emoji-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-emoji {
  font-size: 2.2rem;
  line-height: 1;
  background-color: var(--bg-subtle);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.card-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.badge-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  color: var(--text-sub);
}

.card-fav-btn {
  color: var(--text-muted);
  padding: 6px;
  border-radius: 50%;
}

.card-fav-btn:hover, .card-fav-btn.active {
  color: var(--red);
  background-color: var(--red-light);
}

/* 매칭바 */
.match-bar-wrap {
  margin-bottom: 14px;
}

.match-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.match-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.match-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.5s ease;
}

.match-high { background-color: var(--green); color: var(--green); }
.match-mid { background-color: var(--orange); color: var(--orange); }
.match-low { background-color: var(--text-muted); color: var(--text-muted); }

/* 메타 정보 (시간 / 난이도) */
.card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 14px;
  font-weight: 500;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 재료 프리뷰 */
.card-ingredients-preview {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 0.82rem;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ing-preview-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ing-preview-item.has { color: var(--green); }
.ing-preview-item.missing { color: var(--red); font-weight: 500; }

.card-bottom-action {
  margin-top: auto;
}

.btn-card-view {
  width: 100%;
  padding: 10px;
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 600;
  border-radius: var(--radius-md);
}

.btn-card-view:hover {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* 노데이터 메세지 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* 10. 모달 디자인 (Modals & Sheet) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.ios-modal {
  background-color: var(--bg-card);
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-backdrop:not(.hidden) .ios-modal {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-subtle);
  color: var(--text-sub);
  z-index: 10;
}

.modal-close-btn:hover {
  background-color: var(--red-light);
  color: var(--red);
}

.modal-header {
  padding: 24px 24px 16px 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.modal-emoji {
  font-size: 3rem;
  line-height: 1;
  background-color: var(--bg-subtle);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.modal-title-wrap h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-sub);
  flex-wrap: wrap;
}

.match-badge {
  background-color: var(--green-light);
  color: var(--green);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-subtle {
  font-size: 0.8rem;
  color: var(--accent);
  background-color: var(--accent-light);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.modal-ingredients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.ing-item-card {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color);
}

.ing-item-card.has {
  background-color: var(--green-light);
  color: var(--green);
  border-color: transparent;
}

.ing-item-card.missing {
  background-color: var(--red-light);
  color: var(--red);
  border-color: transparent;
}

.modal-steps-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-steps-list li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-fav-large {
  width: 100%;
  padding: 12px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-weight: 700;
}

.btn-fav-large.active {
  background-color: var(--red-light);
  color: var(--red);
  border-color: var(--red-light);
}

/* 11. 장보기 모달 상세 */
.shopping-input-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.shopping-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
}

.shopping-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.shopping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.shopping-item.checked span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.text-danger-btn {
  color: var(--red);
  font-size: 0.85rem;
}

.text-subtle-btn {
  color: var(--text-sub);
  font-size: 0.85rem;
}

/* 12. 오늘의 메뉴 랜덤 추천 */
.today-modal {
  text-align: center;
  padding: 30px 24px;
}

.today-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.today-badge {
  background-color: var(--purple-light);
  color: var(--purple);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.today-spinner {
  width: 100px;
  height: 100px;
  background-color: var(--bg-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}

.today-emoji {
  font-size: 3.5rem;
}

.spin-animation {
  animation: spinEmoji 0.15s infinite linear;
}

@keyframes spinEmoji {
  0% { transform: scale(0.9) rotate(0deg); }
  50% { transform: scale(1.1) rotate(180deg); }
  100% { transform: scale(0.9) rotate(360deg); }
}

.today-modal h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.today-reason {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-bottom: 24px;
}

.today-action-row {
  display: flex;
  gap: 10px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-accent {
  background-color: var(--green);
  color: #ffffff;
}

/* 13. 토스트 알림 메시지 (Toast) */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  background-color: var(--text-main);
  color: var(--bg-card);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Utility Helpers */
.hidden {
  display: none !important;
}

.justify-between {
  justify-content: space-between;
}

/* 반응형 모바일 대응 */
@media (max-width: 640px) {
  .header-inner {
    padding: 0 12px;
  }

  .brand-text p {
    display: none;
  }

  .btn-text {
    display: none;
  }

  .action-btn {
    padding: 8px 10px;
  }

  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .filter-sort-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-ingredients-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
