/* ============================================
   ĂN GÌ - Design System
   Dark mode, glassmorphism, warm food palette
   ============================================ */

/* === Google Font ===
   Font được preload trong <head> của index.html (không dùng @import để tránh blocking render)
   Xem: <link rel="preload" as="style" href="https://fonts.googleapis.com/..."> */


/* === Design Tokens === */
:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #111119;
  --bg-tertiary: #1a1a25;

  --accent: #ff8c42;
  --accent-light: #ffaa6b;
  --accent-dark: #e07030;
  --accent-glow: rgba(255, 140, 66, 0.25);
  --coral: #ff6b6b;
  --coral-glow: rgba(255, 107, 107, 0.2);

  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;
  --info: #60a5fa;

  --text-primary: #f0f0f5;
  --text-secondary: rgba(240, 240, 245, 0.7);
  --text-muted: rgba(240, 240, 245, 0.4);

  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-bg-hover: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px var(--accent-glow);

  --transition-fast: 150ms cubic-bezier(.4,0,.2,1);
  --transition-normal: 300ms cubic-bezier(.4,0,.2,1);
  --transition-slow: 500ms cubic-bezier(.4,0,.2,1);

  --font: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: scroll;          /* luôn hiện scrollbar → không giật layout */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Slightly darker outside the app frame on wide screens */
  background-image: radial-gradient(ellipse at 50% 0%, rgba(249,115,22,0.04) 0%, transparent 60%);
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
a { color: inherit; text-decoration: none; }

/* === Animated Background === */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-glow::before,
.bg-glow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: bgFloat 12s ease-in-out infinite alternate;
}
.bg-glow::before {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -150px; right: -100px;
  opacity: 0.12;
}
.bg-glow::after {
  width: 400px; height: 400px;
  background: var(--coral);
  bottom: -100px; left: -80px;
  opacity: 0.1;
  animation-delay: -6s;
}
/* Overlay danh sách mâm đang mở → tạm dừng 2 quầng blur(120px) animate phía sau:
   user không nhìn thấy chúng (màn đen 78% che) nhưng GPU iOS vẫn phải raster
   mỗi frame, tranh tài nguyên với việc vẽ lưới đang cuộn (IMG_0888 giật).
   Class gắn/gỡ tại _openComboList/_closeComboList (js/combo-list.js). */
body.has-overlay .bg-glow::before,
body.has-overlay .bg-glow::after {
  animation-play-state: paused;
}

/* === Layout === */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  /* Subtle border on large screens to frame the app */
  box-shadow: 0 0 0 1px var(--glass-border),
              0 0 80px rgba(0,0,0,0.6);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  /* Standalone iOS (status bar black-translucent + viewport-fit=cover): nội dung
     tràn dưới đồng hồ/Dynamic Island — header gánh phần đệm, nền blur phủ liền mạch */
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 18, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  /* Nếp THU KHUNG ĐẦU ở màn «Món ngon» (v3.39.1, cuối file): header rút lên BÁM cuộn 1:1
     bằng transform do JS ghi inline (_applyChromeOffset) — KHÔNG khai transition ở đây:
     transform đổi mỗi frame theo ngón tay, có transition là header đuổi theo trễ 260ms.
     Bước nhảy lập trình cần hiệu ứng thì JS tự gắn transition inline rồi gỡ. */
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1.25rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 10px;
  transition: background 0.2s ease, filter 0.2s ease;
}
.header__logo:hover {
  background: rgba(255,255,255,0.06);
  filter: brightness(1.12);
}
.header__logo:active {
  background: rgba(255,255,255,0.1);
}
.header__logo-text {
  background: linear-gradient(135deg, var(--accent), var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.header__actions { display: flex; gap: 6px; align-items: center; }

/* Header icon button (bell) */
.btn-icon-header {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.btn-icon-header:hover { background: var(--glass-bg-hover); transform: scale(1.1); }
.btn-icon-header.is-active { background: var(--accent); border-color: var(--accent); }

/* Google Login Button — ghost style (v3.0 P2.3): không tranh chú ý khi user là khách */
.btn-login-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 5px 12px 5px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-login-header:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
}
.btn-login-header img.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* Notification Settings Panel */
.notif-panel {
  position: fixed;
  top: calc(60px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 500;
  width: 280px;
  animation: fadeScaleIn 0.2s ease;
}
@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.notif-panel__content {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
}
.notif-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.notif-panel__title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.notif-panel__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 50%;
}
.notif-panel__close:hover { background: var(--glass-bg); }
.notif-panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
}
.notif-panel__row:last-of-type { border-bottom: none; }
.notif-panel__label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.notif-time-input {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: pointer;
  color-scheme: dark;
}
/* Popup <option> của native select: nền trong suốt (--glass-bg) bị Chrome
   ghép lên canvas trắng mặc định → list trắng, chữ mờ. Ép nền tối đặc +
   chữ sáng đục để đọc được (Chrome/Windows tôn trọng màu trên từng <option>). */
.notif-time-input option {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.notif-time-input option:checked {
  background: var(--accent-dark);
  color: #fff;
}
.notif-panel__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch__slider {
  position: absolute;
  inset: 0;
  background: var(--glass-bg-hover);
  border-radius: 24px;
  transition: 0.3s;
}
.toggle-switch__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-switch__slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-switch__slider::before { transform: translateX(20px); }

/* Feedback Widget */
.feedback-widget {
  margin: 16px 0 8px;
  padding: 14px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  text-align: center;
}
.feedback-widget__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.feedback-widget__buttons { display: flex; gap: 10px; justify-content: center; }
.btn-feedback {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-feedback:hover { background: var(--glass-bg-hover); transform: scale(1.03); }
.btn-feedback.selected-up   { background: rgba(34,197,94,0.2); border-color: #22c55e; color: #22c55e; }
.btn-feedback.selected-down { background: rgba(239,68,68,0.2);  border-color: #ef4444; color: #ef4444; }
.feedback-comment-wrap { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.feedback-comment {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px;
  color: var(--text-primary);
  font-size: 0.82rem;
  resize: none;
  font-family: inherit;
}
.feedback-comment:focus { outline: none; border-color: var(--accent); }
.feedback-thanks {
  font-size: 0.85rem;
  color: #22c55e;
  font-weight: 600;
  padding: 8px 0;
}
.btn--sm { padding: 6px 14px; font-size: 0.8rem; }

/* PWA Install Button (Android/Chrome) — ghost đồng bộ .btn-login-header:
   header không nên có pill gradient tự pulse tranh chú ý với nội dung chính */
.btn-install-pwa {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-install-pwa:hover {
  background: rgba(255, 140, 66, 0.08);
  border-color: rgba(255, 140, 66, 0.5);
  color: var(--accent);
}

/* iOS Install Popup */
.ios-install-popup {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 9999;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
  animation: slideUpPopup 0.3s ease;
}
@keyframes slideUpPopup {
  from { transform: translateX(-50%) translateY(100%); }
  to   { transform: translateX(-50%) translateY(0); }
}
.ios-install-popup__content {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px 20px 16px;
  text-align: center;
  position: relative;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}
.ios-install-popup__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--glass-bg);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ios-install-popup__icon { font-size: 2.4rem; margin-bottom: 8px; }
.ios-install-popup__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.ios-install-popup__steps {
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 20px;
  margin-bottom: 12px;
}
.ios-install-popup__steps li { margin-bottom: 6px; }
.ios-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 3px 7px;
  vertical-align: middle;
  line-height: 1;
}
.ios-share-icon svg {
  display: block;
  fill: #fff;
}
.ios-install-popup__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  margin-bottom: 8px;
}
.ios-install-popup__arrow {
  font-size: 1.8rem;
  color: var(--accent);
  line-height: 1;
  animation: bounceDown 1s ease-in-out infinite;
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}


/* Language Toggle */
.lang-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.lang-toggle:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}
.lang-toggle .active-lang { color: var(--accent); }

/* ===== Nickname bottom-sheet ===== */
.nickname-sheet {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.nickname-sheet.is-open {
  display: flex;
}
.nickname-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nickname-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  /* Sheet neo đáy (align-items:flex-end). Khi nội dung cao hơn vùng nhìn (vd sheet mâm
     cơm lúc bật ảnh + Safari iOS còn thanh công cụ / màn ngắn / xoay ngang) mà panel
     không cuộn được thì tiêu đề + nút ✕ bị đẩy khỏi khung, kéo không tới, backdrop lại
     bị panel phủ kín → kẹt. Giới hạn chiều cao + cho cuộn trong panel để không mục nào
     ra ngoài tầm với. dvh bám chiều cao động của Safari; vh làm fallback máy cũ. */
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 32px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.1, 0.64, 1);
}
.nickname-sheet.is-open .nickname-sheet__panel {
  transform: translateY(0);
}
.nickname-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.nickname-sheet__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.nickname-sheet__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}
.nickname-sheet__close {
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.nickname-sheet__close:hover { background: rgba(255,80,80,0.2); color: #ff6b6b; }

/* ==================== SHOPPING LIST SHEET (Đi chợ cả tuần) ==================== */
/* Nút vào ở màn Lịch tuần */
.weekly-shopping-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  /* Cha (.screen flex) đã có gap 20px; kéo hàng ghost sát lại còn ~12px để
     gold + 2 ghost đọc thành MỘT cụm hành động (như mockup v2) */
  margin: 0 0 -8px;
}
/* display:flex ở trên đè [hidden] mức UA → phải khôi phục ẩn tường minh khi tuần trống */
.weekly-shopping-btn[hidden] { display: none; }
/* Hàng 2 ghost "Xếp lại tuần / Chọn mâm An xếp" — bộ B của cụm nút theo trạng thái */
.weekly-ghost-row { margin-bottom: 0; }
.weekly-ghost-row[hidden] { display: none; }
/* Bộ A (cam + link) bị ẩn khi tuần có mâm — cả 2 đều có display riêng nên cần guard */
#weekly-autofill-actions[hidden] { display: none; }
.weekly-pick-link[hidden] { display: none; }
.weekly-shopping-btn__count {
  background: rgba(0,0,0,0.18); border-radius: 999px; padding: 1px 9px;
  font-size: 0.8rem; font-weight: 800;
}
/* Panel cao tối đa 88vh, thân danh sách cuộn riêng */
.shopping-sheet__panel {
  display: flex; flex-direction: column;
  max-height: 88vh; padding: 20px 16px 20px;
}
.shopping-sheet__body {
  flex: 1 1 auto; overflow-y: auto; overflow-x: hidden;
  margin: 4px -4px 0; padding: 0 4px;
  -webkit-overflow-scrolling: touch;
}
/* Khẩu phần chỉnh tại chỗ */
.shopping-serv { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.shopping-serv__lead { font-size: 0.82rem; color: var(--text-secondary); }
.shopping-serv__chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,140,66,0.1); border: 1px solid rgba(255,140,66,0.35);
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
  color: var(--accent-light); font-weight: 650; font-size: 0.85rem; font-family: inherit;
}
.shopping-serv__pen { font-size: 0.72rem; opacity: 0.85; }
.shopping-serv__edit {
  flex-basis: 100%; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-top: 4px;
  background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,140,66,0.4);
  border-radius: 14px; padding: 10px 12px;
}
.shopping-serv__autosave { font-size: 0.72rem; color: var(--text-muted); }
.shopping-serv__autosave b { color: var(--accent-light); }
/* Thanh tiến độ */
.shopping-progress { margin-bottom: 6px; }
.shopping-progress__row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 6px;
}
.shopping-progress__row b, #shopping-progress-pct { color: #fbbf24; font-variant-numeric: tabular-nums; }
.shopping-progress__bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.shopping-progress__bar > i {
  display: block; height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b); transition: width 0.3s ease;
}
/* Nhóm quầy chợ */
.shopping-group { margin-top: 16px; }
.shopping-group__head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.85rem; font-weight: 700; color: var(--text-primary); margin-bottom: 7px;
}
.shopping-group__count { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }
.shopping-items { display: grid; gap: 5px; }
.shopping-item {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.05);
  border-radius: 11px; padding: 9px 12px; cursor: pointer; user-select: none;
  transition: opacity 0.18s ease;
}
.shopping-item__box {
  width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,0.28);
  display: grid; place-items: center; font-size: 0.72rem; color: #000; font-weight: 900;
  transition: background 0.15s, border-color 0.15s;
}
.shopping-item__name { font-size: 0.86rem; color: var(--text-primary); }
.shopping-item__merge {
  font-size: 0.62rem; color: #fbbf24; background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.3); border-radius: 5px; padding: 1px 5px; margin-left: 6px; white-space: nowrap;
}
.shopping-item__qty { font-size: 0.82rem; color: var(--accent-light); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shopping-item.is-done { opacity: 0.4; }
.shopping-item.is-done .shopping-item__box { background: linear-gradient(135deg, #fbbf24, #f59e0b); border-color: transparent; }
.shopping-item.is-done .shopping-item__box::after { content: "✓"; }
.shopping-item.is-done .shopping-item__name,
.shopping-item.is-done .shopping-item__qty { text-decoration: line-through; }
/* Món tự nhập */
.shopping-custom__note { font-size: 0.78rem; color: var(--text-muted); margin: 2px 0 8px; }
.shopping-custom__note b { color: var(--text-secondary); }
.shopping-custom__add {
  width: 100%; box-sizing: border-box; margin-top: 5px;
  background: rgba(255,255,255,0.05); border: 1px dashed rgba(255,255,255,0.22);
  border-radius: 11px; padding: 9px 12px; color: var(--text-primary); font: inherit; font-size: 0.82rem;
}
.shopping-custom__add::placeholder { color: var(--text-muted); }
.shopping-custom__add:focus { outline: none; border-color: #fbbf24; }
/* Gia vị thu gọn */
.shopping-spices { margin-top: 18px; border-top: 1px dashed rgba(255,255,255,0.12); padding-top: 13px; }
.shopping-spices > summary {
  cursor: pointer; font-size: 0.82rem; font-weight: 700; color: var(--text-primary);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.shopping-spices > summary::-webkit-details-marker { display: none; }
.shopping-spices__chev { color: var(--text-muted); transition: transform 0.2s ease; }
.shopping-spices[open] .shopping-spices__chev { transform: rotate(180deg); }
.shopping-spices__hint { font-size: 0.72rem; color: var(--text-muted); margin: 4px 0 9px; }
.shopping-spices__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.shopping-chip {
  font-size: 0.76rem; color: var(--text-secondary); background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 999px; padding: 3px 11px;
}
/* Chân sheet */
.shopping-sheet__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; flex-shrink: 0; }
.shopping-btn { border-radius: 12px; padding: 12px; font-weight: 700; font-size: 0.85rem; font-family: inherit; cursor: pointer; border: none; }
.shopping-btn--copy { background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); color: var(--text-primary); }
.shopping-btn--copy:active { transform: scale(0.98); }
.shopping-btn--zalo { background: #0068ff; color: #fff; }
.shopping-btn--zalo:active { transform: scale(0.98); }
.shopping-sheet__note { font-size: 0.68rem; color: var(--text-muted); text-align: center; margin: 10px 0 0; flex-shrink: 0; }
.shopping-sheet__note b { color: var(--text-secondary); }
.shopping-empty { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 24px 0; }

/* Mood sheet — hỏi khẩu vị khi "Đổi món" lần đầu trong phiên */
.mood-sheet__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.mood-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mood-chip:hover {
  border-color: var(--accent);
  background: rgba(255, 140, 66, 0.08);
}
.mood-chip__icon { font-size: 1.1rem; }
.mood-chip--skip {
  grid-column: 2 / 3;
  background: rgba(255, 140, 66, 0.08);
  border: 1px dashed rgba(255, 140, 66, 0.35);
  color: #ffb37a;
  font-size: 0.78rem;
}
.mood-sheet__footnote {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

/* ===== Soft prompt sheets (v2.17: push prompt + login nudge) ===== */
.soft-prompt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.soft-prompt__avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a0e04;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.soft-prompt__avatar--tint {
  background: var(--accent-glow);
  font-size: 1.2rem;
}
.soft-prompt__text { flex: 1; }
.soft-prompt__text .nickname-sheet__hint b { color: var(--text-primary); }
.soft-prompt__cta { width: 100%; }
.soft-prompt__later {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.soft-prompt__google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #f0f0f5;
  color: #1a1a26;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
/* Nudge login có thể mở CHỒNG lên combo-overlay (z-index 9999) từ nút sửa mâm
   trong danh sách — khuôn .nickname-sheet chỉ có z-index 310, phải nâng riêng */
#login-nudge-sheet { z-index: 10050; }

/* Bước hướng dẫn thoát Safari trong webview-login-sheet (chỉ hiện trên iOS) */
.webview-login__step {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.webview-login__step b { color: var(--text-primary); }

/* Nickname card grid */
.nickname-sheet__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.nickname-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}
.nickname-card:hover {
  background: rgba(255, 140, 66, 0.1);
  border-color: rgba(255, 140, 66, 0.3);
  transform: translateY(-2px);
}
.nickname-card.is-selected {
  background: rgba(255, 140, 66, 0.15);
  border-color: rgba(255, 140, 66, 0.6);
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.2);
}
.nickname-card.is-selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
}
.nickname-card__emoji {
  font-size: 1.6rem;
  line-height: 1;
}
.nickname-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Custom input row */
.nickname-sheet__custom {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  padding-top: 16px;
}
.nickname-custom-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.nickname-custom-input::placeholder { color: var(--text-muted); opacity: 0.65; }
.nickname-custom-input:focus {
  border-color: rgba(255, 140, 66, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

/* === Screens === */
.screen {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 20px 40px;
  animation: fadeInUp 0.5s ease both;
}
.screen.is-active { display: flex; }
.screen.loading { justify-content: center; }

/* =============================================
   Meal Tabs — Bữa Trưa / Bữa Tối
   ============================================= */
.meal-tabs {
  display: flex;
  width: 100%;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: calc(57px + env(safe-area-inset-top, 0px)); /* below main header (header cao thêm safe-area khi standalone) */
  z-index: 90;
  padding: 0;
  /* align to top of screen-cook-results, outside the padding */
  margin: -24px -20px 0;
  /* re-apply full width */
  width: calc(100% + 40px);
}

.meal-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  letter-spacing: 0.2px;
}

.meal-tab__icon {
  font-size: 1rem;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.meal-tab__label {
  white-space: nowrap;
}

.meal-tab:hover {
  color: var(--text-secondary);
}
.meal-tab:hover .meal-tab__icon {
  transform: scale(1.15);
}

/* Active state — orange gradient underline + glow */
.meal-tab.is-active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}
.meal-tab.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  filter: blur(2px);
  border-radius: 9999px;
}
.meal-tab.is-active .meal-tab__icon {
  filter: drop-shadow(0 0 6px var(--accent-glow));
  transform: scale(1.1);
}

/* Screen cook-results: push content below the sticky tabs */
#screen-cook-results {
  justify-content: flex-start;
  padding-top: 8px;
}

/* === Swipe Screen — overrides .screen base === */
.swipe-screen.is-active {
  align-items: stretch !important;   /* don't center children horizontally */
  justify-content: flex-start !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.swipe-screen .swipe-stack {
  width: 100% !important;  /* guarantee full width even if parent shrinks */
}



/* === Welcome Screen === */
.welcome {
  text-align: center;
  gap: 20px;
  justify-content: flex-start;
  padding-top: clamp(12px, 4vh, 48px);
  /* Đảm bảo banner/strip cuối không bị bottom-nav (60px) che */
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.welcome__emoji {
  font-size: 4rem;
  animation: bounceIn 0.8s ease both;
  filter: drop-shadow(0 4px 12px rgba(255,140,66,0.3));
}

.welcome__title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome__subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* === An greeting — lời chào + thời tiết trong một bubble === */
.an-greeting {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  text-align: left;
  animation: fadeInUp 0.4s ease both;
}
.an-greeting__avatar {
  width: 54px;
  height: 50px;
  background: radial-gradient(circle at 50% 42%, rgba(255, 140, 66, 0.22), rgba(255, 140, 66, 0.06) 46%, transparent 72%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: none;
  padding-top: 2px;
}
/* Mascot An — tô cơm (hình B). Nét mặt + blink dùng chung cho mọi chỗ đặt An;
   biểu cảm "chào" chớp mắt ~4.2s. Tôn trọng prefers-reduced-motion. */
.an-face { display: block; }
.an-face__eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: anBlink 4.2s ease-in-out infinite;
}
@keyframes anBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}
@media (prefers-reduced-motion: reduce) {
  .an-face__eyes { animation: none; }
}
/* Chỗ đặt An 1: bong bóng chào (avatar lớn, quầng cam) */
.an-greeting__avatar .an-face { width: 48px; height: 42px; }
/* Chỗ đặt An 2: sheet nhắc bữa — thay nền cam đặc bằng quầng sáng để tô cơm nổi
   (dùng modifier --an để KHÔNG đụng avatar 💾 login dùng chung class base) */
.soft-prompt__avatar--an {
  background: radial-gradient(circle at 50% 42%, rgba(255, 140, 66, 0.22), rgba(255, 140, 66, 0.06) 46%, transparent 72%);
}
.soft-prompt__avatar--an .an-face { width: 40px; height: 35px; }

/* Biểu cảm An theo khoảnh khắc — mặt do AnFace đổi, thân nhận animation dưới đây.
   Một phát (chốt bữa/streak) chạy hữu hạn rồi lắng; idle (chào/nhắc/chọn) lặp nhẹ. */
.an-anim { transform-box: fill-box; transform-origin: center; }
@keyframes anBounce { 0%{transform:translateY(0)} 30%{transform:translateY(-7px)} 55%{transform:translateY(0)} 72%{transform:translateY(-3px)} 100%{transform:translateY(0)} }
@keyframes anWiggle { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-6deg)} 75%{transform:rotate(6deg)} }
@keyframes anShake  { 0%,100%{transform:rotate(3deg)} 50%{transform:rotate(-3deg)} }
@keyframes anNod    { 0%,100%{transform:translateY(0) rotate(-4deg)} 50%{transform:translateY(-2px) rotate(-4deg)} }
.an-face--happy    .an-anim { animation: anBounce .9s ease-out both; }
.an-face--streak   .an-anim { animation: anWiggle .8s ease-in-out 2; }
.an-face--confused .an-anim { animation: anShake 2.2s ease-in-out infinite; }
.an-face--choose   .an-anim { animation: anNod 1.6s ease-in-out infinite; }
.an-face--remind   .an-anim { animation: anNod 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .an-anim { animation: none !important; } }
/* An trong empty-state (bí quá) + popup thành tựu (streak) */
.an-empty-mascot .an-face { display: block; width: 72px; height: 63px; margin: 0 auto 10px; }
.achievement-popup__badge .an-face { width: 46px; height: 40px; }
.an-greeting__bubble {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 4px 16px 16px 16px;
  padding: 10px 14px;
  min-width: 0;
}
.an-greeting__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.an-greeting__weather {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
/* Lời mời đặt xưng hô inline — chip mềm trong bong bóng An (thay nút mặt cười nhấp nháy) */
.an-greeting__nudge {
  margin: 8px 0 0;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255, 140, 66, 0.10);
  border: 1px solid rgba(255, 140, 66, 0.30);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.an-greeting__nudge:hover { background: rgba(255, 140, 66, 0.18); }

/* Weather card: dữ liệu giờ hiển thị trong bubble An — giữ DOM cho weather-core
   và MutationObserver nhưng ẩn hẳn khỏi mắt người dùng */
#weather-card { display: none !important; }

/* Dòng trạng thái GPS: ẩn/hiện do UI.updateLocationStatus điều khiển bằng inline
   style (ẩn mặc định trong HTML) — rule .is-granted cũ đã bỏ vì JS không set nữa */

/* Hero title mang câu hỏi thương hiệu → to hơn label cũ */
.auto-pick-btn__title--hero { font-size: 1.25rem; }

/* Auto-Pick CTA Button */
.auto-pick-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 400px;
  padding: 16px 22px;
  background: linear-gradient(135deg, var(--accent), var(--coral));
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 24px rgba(255, 140, 66, 0.3);
}
.auto-pick-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px rgba(255, 140, 66, 0.45);
}
.auto-pick-btn:active { transform: scale(0.98); }

.auto-pick-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 60%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  animation: autoPickShimmer 3s ease-in-out infinite;
}
@keyframes autoPickShimmer {
  0%, 100% { left: -60%; }
  50% { left: 120%; }
}

.auto-pick-btn__sparkle {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.auto-pick-btn__text { flex: 1; }
.auto-pick-btn__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.auto-pick-btn__desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}
.auto-pick-btn__arrow {
  font-size: 1.4rem;
  color: rgba(255,255,255,0.7);
  transition: transform var(--transition-fast);
}
.auto-pick-btn:hover .auto-pick-btn__arrow {
  transform: translateX(4px);
  color: #fff;
}

/* Divider */

/* === An's Pick Card (Welcome) ===
   Card 2 trạng thái: A = gợi ý (chưa chốt), B = đã chốt
   Cả hai dùng chung layout ảnh đầy đủ (photo-wrap + overlay + label + body)
   Chỉ khác nhau badge, label text và tap-hint.
   Bấm card → mở màn chọn món, KHÔNG chốt luôn.
   ─────────────────────────────────────────────── */

.an-pick {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.22s, border-color 0.22s;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  position: relative;
}

.an-pick.an-pick--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Skeleton (v3.6.0 perf): hiện ngay từ first-paint trong lúc chờ JS+data.
   Base .an-pick có opacity:0 chờ --visible nên skeleton phải tự bật opacity.
   Shimmer tái dùng pattern ::after của .welcome--loading (gradient trượt ngang). */
.an-pick.an-pick--skeleton {
  opacity: 1;
  transform: none;
  cursor: default;
  pointer-events: none;
}

.an-pick__skel-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.an-pick__skel-row {
  height: 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  margin: 12px 0;
  position: relative;
  overflow: hidden;
}

.an-pick__skel-row--short { width: 55%; }

.an-pick__skel-photo::after,
.an-pick__skel-row::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-100%);
  animation: an-pick-shimmer 1.4s ease-in-out infinite;
}

@keyframes an-pick-shimmer {
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .an-pick__skel-photo::after,
  .an-pick__skel-row::after { animation: none; }
}

@media (hover: hover) {
  .an-pick:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.14);
  }
}

.an-pick:active {
  transform: scale(0.975) !important;
  transition-duration: 0.1s;
}

/* ─── Photo ─── */
.an-pick__photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--glass-bg);
}

.an-pick__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

@media (hover: hover) {
  .an-pick:hover .an-pick__photo {
    transform: scale(1.03);
  }
}

.an-pick__photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.04) 0%,
    rgba(0, 0, 0, 0.18) 40%,
    rgba(0, 0, 0, 0.62) 100%
  );
  pointer-events: none;
}

/* ─── Label + Badges (bottom of photo) ─── */
.an-pick__label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Badge chung */
.an-pick__badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Badge 📌 Theo lịch tuần — trạng thái A */
.an-pick__badge--template {
  background: rgba(255, 209, 102, 0.2);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.28);
}

/* Badge ✓ Đã chốt — trạng thái B, user tự chốt */
.an-pick__badge--confirmed {
  background: rgba(80, 200, 120, 0.18);
  color: #6ee09e;
  border: 1px solid rgba(80, 200, 120, 0.28);
}

/* Badge 📅 Theo lịch tuần · T4 — trạng thái B, từ template */
.an-pick__badge--weekly {
  background: rgba(255, 209, 102, 0.18);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.28);
}

/* ─── Body (below photo) ─── */
/* Gradient nền ấm; danh sách món dạng hàng + footer thời gian/hint bên dưới */
.an-pick__body {
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 160, 60, 0.06) 0%,
    transparent 100%
  );
  border-top: 1px solid rgba(255, 160, 60, 0.08);
}

/* ─── Danh sách món: mỗi món 1 hàng căn trái, nhãn vai trò bên phải ───
   text-align:left bắt buộc: .welcome đặt text-align:center ở tổ tiên,
   thuộc tính này kế thừa xuống mọi span con nếu không reset lại — đây
   là nguyên nhân gốc khiến icon+tên món bị canh giữa dù box đã đúng vị trí. */
.an-pick__dishes {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.an-pick__dish-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.an-pick__dish-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

/* Icon nằm chung text node với tên món (xem _buildDishListHTML) — không bọc
   riêng để tránh lệ thuộc padding nội bộ của glyph emoji theo từng font/OS. */
.an-pick__dish-name {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  line-height: 1.35;
}

.an-pick__dish-role {
  flex: none;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ─── Footer: thời gian nấu (khi có) + tap-hint, cân hai đầu ─── */
.an-pick__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  margin-top: 2px;
  border-top: 1px solid rgba(255, 160, 60, 0.12);
}

.an-pick__footer--hint-only {
  justify-content: flex-end;
}

.an-pick__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Tap hint — mini ghost button style */
.an-pick__tap-hint {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 140, 50, 0.25);
  background: rgba(255, 140, 50, 0.08);
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.an-pick__tap-hint:hover {
  background: rgba(255, 140, 50, 0.16);
  border-color: rgba(255, 140, 50, 0.4);
}

.an-pick__tap-hint--muted {
  color: var(--text-muted);
  font-weight: 500;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

/* ─── Photo placeholder (loading/error) ─── */
.an-pick__photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, rgba(255,140,66,0.08), rgba(255,140,66,0.04));
}

/* ─── Next-meal teaser card (P2) ─── */
.an-pick-next {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  animation: fadeInUp 0.45s ease 0.15s both;
}

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

.an-pick-next {
  animation: anPickNextIn 0.4s ease 0.2s both;
}

@media (hover: hover) {
  .an-pick-next:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  }
}

.an-pick-next:active { transform: scale(0.98); }

.an-pick-next__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
}

.an-pick-next__body {
  flex: 1;
  min-width: 0;
}

.an-pick-next__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px;
}

.an-pick-next__sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.an-pick-next__cta {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ─── Week mini strip (P2) ─── */
.week-mini-strip {
  width: 100%;
  max-width: 400px;
}

.week-mini__label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  cursor: pointer;
  transition: color 0.2s;
}
.week-mini__label:hover {
  color: var(--accent);
}

.week-mini__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.week-mini__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  border-radius: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-width: 0;
}

.week-mini__day:hover {
  background: rgba(255, 255, 255, 0.07);
}

.week-mini__day--today {
  border-color: var(--accent);
  background: rgba(255, 140, 66, 0.08);
}

.week-mini__day-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 600;
}

.week-mini__day--today .week-mini__day-label {
  color: var(--accent);
}

.week-mini__day-emoji {
  font-size: 1rem;
  line-height: 1;
}

.week-mini__day-empty {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.4;
}

.week-mini__today-tag {
  font-size: 0.5rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.welcome__modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin-top: 16px;
}

/* Khi chỉ có 2 cards thì giữ 2 cột đẹp hơn */
.welcome__modes:has(> :last-child:nth-child(2)) {
  grid-template-columns: repeat(2, 1fr);
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px 20px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.mode-card--cook::before  { background: radial-gradient(ellipse at top, rgba(74,222,128,0.08), transparent 70%); }
.mode-card--eatout::before { background: radial-gradient(ellipse at top, rgba(249,115,22,0.08), transparent 70%); }
.mode-card--plan::before  { background: radial-gradient(ellipse at top, rgba(96,165,250,0.08), transparent 70%); }
.mode-card:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.mode-card:hover::before { opacity: 1; }
.mode-card:active { transform: scale(0.97); }
.mode-card--eatout:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.mode-card--cook:hover   { border-color: var(--success); box-shadow: 0 0 24px rgba(74,222,128,0.2); }
.mode-card--plan:hover   { border-color: var(--info);    box-shadow: 0 0 24px rgba(96,165,250,0.2); }

.mode-card__emoji { font-size: 2.4rem; line-height: 1; }
.mode-card__label { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-top: 2px; }
.mode-card__desc  { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

.welcome__extra {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

/* === Lịch tuần 2.0 (Weekly Template) === */
.weekly__days {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.weekly-day-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
  /* header ngoài sticky (z-index 100) đè lên card sau scrollIntoView — cùng
     bài học scroll-margin-top của màn fridge */
  scroll-margin-top: 76px;
}
.weekly-day-card.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.weekly-day-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.weekly-day-card__today-chip {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
}

.weekly-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.weekly-slot + .weekly-slot { margin-top: 6px; }
.weekly-slot:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border);
}

.weekly-slot__meal {
  flex-shrink: 0;
  width: 62px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.weekly-slot__value {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.weekly-slot__value--auto { color: var(--text-secondary); }
.weekly-slot__more {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
}
.weekly-slot__arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== Segment tab Tuần này / Mỗi tuần ===== */
.weekly-seg {
  display: flex;
  gap: 6px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 10px;
}
.weekly-seg__btn {
  flex: 1;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.weekly-seg__btn.is-active {
  background: var(--accent-glow);
  border-color: rgba(255, 140, 66, 0.45);
  color: var(--accent);
  font-weight: 700;
}

/* ===== Dòng thời gian (tab Tuần này) ===== */
.weekly-empty-hint {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 10px;
  padding: 12px 14px;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-size: 0.84rem;
  text-align: center;
}
/* Cảnh báo "Món không ăn đang ẩn N mâm" — mẫu tuần không bị ghi đè, chỉ bị lọc lúc
   render, nên đây là chỗ DUY NHẤT người dùng biết vì sao ô lịch hoá trống. */
.weekly-excl-note {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 168, 76, 0.35);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-md);
  background: rgba(255, 168, 76, 0.08);
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}
.weekly-excl-note__how {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.weekly-day-card__date {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}
.weekly-day-card--past { background: rgba(255, 255, 255, 0.02); }
.weekly-day-card--past .weekly-day-card__head { color: var(--text-secondary); }
/* Slot đã chốt (quá khứ / hôm nay) — đọc lịch sử */
.weekly-slot--done .weekly-slot__value { color: var(--text-secondary); }
.weekly-slot__check { color: rgba(74, 222, 128, 0.75); font-weight: 700; }
/* Slot trống — trơ, không bấm */
.weekly-slot--blank { cursor: default; }
.weekly-slot--blank:hover { background: rgba(255, 255, 255, 0.04); border-color: transparent; }
.weekly-slot__blank { color: var(--text-muted); font-style: italic; }
/* Slot bữa kế hôm nay — CTA vào luồng gợi ý */
.weekly-slot--next {
  border-color: rgba(255, 140, 66, 0.55);
  border-style: dashed;
  background: rgba(255, 140, 66, 0.07);
}
.weekly-slot--next .weekly-slot__arrow { color: var(--accent); }
.weekly-slot__next-cta { color: var(--accent-light); font-weight: 600; }

/* ===== Sheet "Nấu lại" (chi tiết mâm quá khứ) ===== */
.weekly-recook-dishes { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 2px; }
.weekly-recook-dish {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.weekly-recook-dish__emoji { flex-shrink: 0; }
.weekly-recook-dish__name { flex: 1; min-width: 0; }
.weekly-recook-dish__role {
  flex-shrink: 0;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
}
.weekly-recook-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.weekly-recook-actions .btn { width: 100%; }

/* ===== Thanh công cụ Lịch tuần (view switch + chip bữa) ===== */
.weekly-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 12px;
}
.weekly-view-switch {
  display: inline-flex;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 3px;
}
.weekly-view-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.weekly-view-btn.is-active { background: var(--accent); color: #fff; }

/* Nút cấp 3 "Dọn cả tuần" — mảnh, nằm PHẢI trong toolbar (chỗ chip bữa cũ để lại,
   v3.21), không đua với CTA vàng. Ẩn khi tab Tuần này / không có mâm để dọn. */
.weekly-clear-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.weekly-clear-btn[hidden] { display: none; }
.weekly-clear-btn:hover { color: var(--accent); }
.weekly-clear-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Bố cục Lưới (cả tuần trong 1 liếc) ===== */
.weekly__days--grid { max-width: 500px; }
.wgrid {
  display: grid;
  grid-template-columns: auto repeat(var(--wgrid-cols, 2), 1fr);
  gap: 6px;
  width: 100%;
  align-items: stretch;
}
.wgrid__head {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  align-self: center;
  padding: 2px 0;
}
.wgrid__daylabel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  scroll-margin-top: 76px;
}
.wgrid__daylabel.is-today { color: var(--accent); font-weight: 700; }
.wgrid__today {
  font-size: 0.5rem;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
}
.wgrid__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 50px;
  padding: 6px 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.wgrid__cell:hover { background: var(--glass-bg-hover); border-color: var(--glass-border); }
.wgrid__cell.is-filled { background: rgba(255,140,66,0.08); }
.wgrid__cell.is-today { box-shadow: inset 0 0 0 1px var(--accent-glow); }
.wgrid__emoji { font-size: 1.15rem; line-height: 1; }
.wgrid__label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.wgrid__plus { font-size: 1rem; color: var(--text-muted); opacity: 0.5; }
.wgrid__more { font-size: 0.55rem; color: var(--accent); font-weight: 600; }

/* Link phụ dưới nút autofill — lối rẽ cho người muốn khống chế pool */
.weekly-pick-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 6px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.weekly-pick-link b { color: var(--accent-light); font-weight: 600; }
.weekly-pick-link:hover b { color: var(--accent); }

/* Sheet "Chọn mâm cho An xếp" (#weekly-pick-sheet, khuôn .nickname-sheet) */
.wpick-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.wpick-count { font-size: 0.8rem; color: var(--text-secondary); }
.wpick-quick { display: flex; gap: 6px; }
.wpick-qbtn {
  padding: 5px 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.wpick-qbtn:hover { background: var(--glass-bg-hover); color: var(--text-primary); }
.wpick-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 44vh;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 2px;
}
.wpick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity var(--transition-fast);
}
.wpick-row.is-off { opacity: 0.45; }
.wpick-row__emoji { font-size: 1.2rem; flex-shrink: 0; }
.wpick-row__body { flex: 1; min-width: 0; }
.wpick-row__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.wpick-row__sub {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wpick-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.wpick-empty {
  padding: 18px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.wpick-warn {
  margin: 0 0 10px;
  padding: 8px 11px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--warning);
}
.wpick-warn[hidden] { display: none; }
.wpick-fill {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 2px;
}
.wpick-fill input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.wpick-note {
  margin: 9px 0 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}
.wpick-note[hidden] { display: none; }

/* Sheet chỉnh 1 slot (#weekly-slot-sheet, khuôn .nickname-sheet) */
.weekly-slot-pins {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.weekly-slot-pins__empty {
  padding: 14px 10px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.weekly-slot-pin {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.weekly-slot-pin__emoji { font-size: 1.2rem; }
.weekly-slot-pin__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.weekly-slot-pin__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.weekly-slot-pin__src { font-size: 0.7rem; color: var(--text-muted); }
.weekly-slot-pin__remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.weekly-slot-pin__remove:hover {
  background: rgba(255,100,100,0.2);
  color: #ff6464;
}
/* Pin đầu = mâm chính (v3.11): An dọn bữa & tính đi chợ theo mâm này */
.weekly-slot-pin--main { border-color: rgba(251, 191, 36, 0.45); }
.weekly-slot-pin__main {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 5px;
  padding: 1px 6px;
  vertical-align: 1px;
}
.weekly-slot-pin__top {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.weekly-slot-pin__top:hover {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
}

/* v3.19: thân mâm là nút mở chi tiết (xem món + 🔄). Trong suốt, ăn cả phần trống của hàng. */
.weekly-slot-pin__open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.weekly-slot-pin__chev {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.05rem;
  transition: transform var(--transition-fast);
}
.weekly-slot-pin__open:hover .weekly-slot-pin__label { color: var(--accent-light); }
.weekly-slot-pin__open:hover .weekly-slot-pin__chev { transform: translateX(2px); }

/* Ảnh hero + pill ⏱👥 trong sheet chi tiết mâm (v3.19) — cùng ngôn ngữ card kết quả .mam-com__photo */
.weekly-mam-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
}
.weekly-mam-hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.weekly-mam-hero__meta {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(10, 10, 18, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 4px 10px;
}

.weekly-slot-add {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px dashed rgba(255, 140, 66, 0.5);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.weekly-slot-add:hover { background: var(--accent-glow); }

.weekly-slot-clear {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.weekly-slot-clear:hover { background: var(--glass-bg-hover); }

.weekly-slot-actions { margin-top: 14px; }
.weekly-slot-actions .btn { width: 100%; }

/* ===== Override theo ngày (đợt 2a): chip 📍 + banner + sheet hỏi phạm vi ===== */
/* Màu riêng cho "ghim riêng ngày này" — tím lavender, tách khỏi cam accent / vàng mâm-chính / xanh ✓ */
.weekly-slot__ovr {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* Banner trong form ghim khi slot đang override */
.weekly-slot-ovr {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.weekly-slot-ovr[hidden] { display: none; }
.weekly-slot-ovr__text { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.weekly-slot-ovr__text b { color: #a78bfa; }
.weekly-slot-ovr__revert {
  align-self: flex-start;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(167, 139, 250, 0.45);
  border-radius: var(--radius-sm);
  color: #a78bfa;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.weekly-slot-ovr__revert:hover { background: rgba(167, 139, 250, 0.16); }

/* Sheet hỏi phạm vi — ĐÈ LÊN form ghim (nickname-sheet z-index 310) */
#weekly-scope-sheet { z-index: 340; }
.weekly-scope-opts { display: flex; flex-direction: column; gap: 8px; }
.weekly-scope-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.weekly-scope-opt__icon { font-size: 1.15rem; line-height: 1.3; flex-shrink: 0; }
.weekly-scope-opt__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.weekly-scope-opt__label { font-size: 0.88rem; font-weight: 700; }
.weekly-scope-opt__sub { font-size: 0.74rem; color: var(--text-muted); line-height: 1.45; }
.weekly-scope-opt__radio {
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
}
/* Chọn "chỉ ngày này" → viền tím; "mọi thứ X" → viền cam accent */
.weekly-scope-opt.is-selected { border-color: rgba(167, 139, 250, 0.5); background: rgba(167, 139, 250, 0.12); }
.weekly-scope-opt.is-selected .weekly-scope-opt__radio {
  border-color: #a78bfa;
  background: radial-gradient(circle, #a78bfa 0 45%, transparent 50%);
}
.weekly-scope-opt--tpl.is-selected { border-color: rgba(255, 140, 66, 0.5); background: rgba(255, 140, 66, 0.1); }
.weekly-scope-opt--tpl.is-selected .weekly-scope-opt__radio {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 45%, transparent 50%);
}

/* Badge "Theo lịch tuần" trên card kết quả */
/* Badge "📌 Theo lịch tuần" — overlay góc trên-trái ảnh mâm (từ khi gỡ header).
   Chỉ dùng trong _buildMealCardHTML; dùng chung slot trên-trái với ✨ Mâm mới
   nhưng không bao giờ cùng xuất hiện (fromTemplate ⊥ isDiscovery). */
.result-template-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: rgba(10, 10, 18, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Combo overlay ở picker mode (chọn mâm để ghim vào Lịch tuần):
   ẩn nút household + badge "Đang chọn" — chỉ còn hành vi chọn-và-trả-về */
.combo-overlay--picker .combo-card__current-badge,
.combo-overlay--picker .combo-card__action-btn,
.combo-overlay--picker .combo-card__edit-link,
.combo-overlay--picker .combo-add-tile {
  display: none !important;
}
/* Panel cao hơn CHỈ ở picker (v3.41.0, nới tiếp ở v3.41.1). 85vh chừa 107px nền đen chết
   trên máy 667px, trong khi đây là màn user vào để LƯỚT 20–355 mâm — khác sheet «Tự chọn
   món» chỉ có vài dòng.

   96dvh chứ không 92: user xem trên iPhone thật vẫn thấy dải đen trên đầu chướng mắt. Đo ở
   390×734 (vùng nhìn của Safari lúc thanh URL đang hiện): 92 → 96dvh cắt dải đen 59 → 29px
   và thêm 0,42 mâm. KHÔNG đẩy tới 100dvh: dải đó là chỗ chạm-ngoài-để-đóng, và là thứ báo
   cho mắt biết đây là tấm trượt lên chứ không phải một màn mới — bỏ hẳn chỉ đổi lấy 0,8 mâm.
   ĐÁNH ĐỔI ĐÃ DUYỆT: 29px dưới ngưỡng chạm 44px của iOS nên chạm-ngoài khó trúng hơn; nút ✕
   trên tiêu đề vẫn là lối thoát chắc chắn nên không ai kẹt trong sheet.

   `dvh` chứ không `vh`: trên Safari iOS `vh` tính theo viewport LỚN NHẤT (lúc thanh URL đã
   thu), nên đặt theo vh là đáy sheet bị đẩy khuất xuống dưới thanh URL khi nó đang hiện —
   mất mấy mâm cuối mà user không biết. Dòng vh phía trên là đường lùi cho trình duyệt chưa
   biết dvh — trình nào biết thì dòng dưới đè lên. */
.combo-overlay--picker .combo-overlay__panel {
  max-height: 96vh;
  max-height: 96dvh;
  /* Mốc neo cho thanh mini absolute (v3.42.0). Panel vốn đã có transform từ animation
     comboSlideUp — về lý thuyết đủ làm containing block — nhưng dựa vào đó là dựa vào một
     hiệu ứng phụ của animation: đổi/bỏ animation là thanh mini văng ra neo theo viewport. */
  position: relative;
}


/* Dish result card v2 (hero image + expandable) */
.dish-card--v2 {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  animation: fadeInUp 0.5s ease both;
}
.dish-card--v2:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: rgba(255,255,255,0.12);
}

/* Hero image area */
.dish-card__hero {
  position: relative;
  height: 180px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.dish-card__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,10,18,0.95) 0%, rgba(10,10,18,0.3) 50%, rgba(10,10,18,0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 20px;
  gap: 4px;
}
.dish-card__hero-emoji {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
.dish-card__hero-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.dish-card__hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Body */
.dish-card__body {
  padding: 16px 20px 20px;
}
.dish-card__tag {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,140,66,0.15);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 500;
}
.dish-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.dish-card__score {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Expandable toggle button */
.dish-card__toggle {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  background: rgba(255,140,66,0.08);
  border: 1px solid rgba(255,140,66,0.15);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}
.dish-card__toggle:hover {
  background: rgba(255,140,66,0.15);
  border-color: var(--accent);
}
.dish-card.is-expanded .dish-card__toggle {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: none;
}

/* Hidden details (revealed on expand) */
.dish-card__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 0;
  border: 1px solid transparent;
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.dish-card.is-expanded .dish-card__details {
  max-height: 600px;
  padding: 14px 16px;
  border-color: rgba(255,140,66,0.15);
  background: rgba(255,140,66,0.04);
}

.dish-card__ingredients {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.dish-card__ingredients strong {
  color: var(--text-primary);
  font-size: 0.85rem;
}
.dish-card__steps {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.dish-card__steps strong {
  color: var(--text-primary);
  font-size: 0.85rem;
}
.dish-card__steps ol {
  margin-top: 6px;
  padding-left: 22px;
}
.dish-card__steps li {
  margin-bottom: 4px;
}

/* Results cards layout — single column for cook */
#cook-results-cards.results__cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 480px) {
  .welcome__modes { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mode-card { padding: 14px 8px 12px; }
  .mode-card__emoji { font-size: 1.8rem; }
  .mode-card__label { font-size: 0.85rem; }
  .mode-card__desc { font-size: 0.7rem; }
  .dish-card__hero { height: 140px; }
  .dish-card__hero-name { font-size: 1.2rem; }
  .dish-card__hero-emoji { font-size: 2rem; }
}

.welcome__location-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  justify-content: center;
  margin-top: 4px;
}
.welcome__location-status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background var(--transition-normal);
}
.welcome__location-status.is-denied .dot { background: var(--error); }
.welcome__location-status.is-loading .dot {
  background: var(--warning);
  animation: pulse 1s infinite;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: var(--radius-lg);
  font-size: 1.05rem;
  font-weight: 600;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover {
  box-shadow: 0 0 36px var(--accent-glow);
  transform: translateY(-2px);
}
.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15));
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.btn--primary:hover::after { opacity: 1; }

.btn--secondary {
  background: var(--glass-bg);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}
.btn--secondary:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

/* Outline — hành động phụ tần suất cao (vd "Đổi món"): dễ thấy, dễ bấm,
   nhưng không tranh tiêu điểm với CTA đặc duy nhất của màn hình */
.btn--outline {
  background: transparent;
  border: 1.5px solid rgba(255, 140, 66, 0.5);
  color: var(--accent);
}
.btn--outline:hover {
  background: rgba(255, 140, 66, 0.08);
  border-color: var(--accent);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 12px 20px;
  font-size: 0.9rem;
}
.btn--ghost:hover { color: var(--accent); }

.btn--small {
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
}

.btn--icon {
  width: 44px; height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
  font-size: 1.2rem;
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Focus ring cho điều hướng bàn phím — chỉ hiện khi focus bằng phím (:focus-visible),
   không hiện khi bấm chuột/chạm */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === Preferences Screen === */
.preferences { gap: 24px; max-width: 560px; width: 100%; margin: 0 auto; justify-content: center; }

.preferences__progress {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.preferences__progress .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-normal);
}
.preferences__progress .dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.preferences__progress .dot.is-done {
  background: var(--success);
  border-color: var(--success);
}

.step { 
  display: none; 
  flex-direction: column; 
  align-items: center; 
  gap: 20px; 
  width: 100%;
  animation: fadeInUp 0.4s ease both;
}
.step.is-active { display: flex; }

.step__title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.step__subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: -12px;
}

/* Option Grid */
.options-grid {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 500px;
}
.options-grid--3 { grid-template-columns: repeat(3, 1fr); }
.options-grid--2 { grid-template-columns: repeat(2, 1fr); }
.options-grid--4 { grid-template-columns: repeat(2, 1fr); }

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-align: center;
}
.option-card:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.option-card.is-selected {
  border-color: var(--accent);
  background: rgba(255, 140, 66, 0.1);
  box-shadow: 0 0 16px var(--accent-glow);
}
.option-card__emoji { font-size: 2rem; }
.option-card__label { font-size: 0.9rem; font-weight: 600; }
.option-card__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.step__nav {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}
.step__nav .btn { flex: 1; }

/* === Loading Screen === */
.loading { gap: 24px; text-align: center; }

.loading__spinner {
  position: relative;
  width: 80px; height: 80px;
}
.loading__spinner-ring {
  width: 80px; height: 80px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loading__spinner-emoji {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  animation: pulse 2s ease-in-out infinite;
}

.loading__text {
  font-size: 1.1rem;
  color: var(--text-secondary);
}
.loading__subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -16px;
}

/* === Results Screen === */
.results { gap: 20px; max-width: 700px; width: 100%; justify-content: flex-start; padding-top: 12px; }

.results__header {
  text-align: center;
  margin-bottom: 4px;
}
.results__title {
  font-size: 1.3rem;
  font-weight: 700;
}
.results__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Restaurant Card v2 (hero image) */
.restaurant-card--v2 {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 0;
  transition: all var(--transition-normal);
  animation: fadeInUp 0.5s ease both;
  position: relative;
  overflow: hidden;
}
.restaurant-card--v2:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.restaurant-card__hero {
  position: relative;
  height: 160px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.restaurant-card__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,10,18,0.92) 0%, rgba(10,10,18,0.2) 60%, rgba(10,10,18,0.05) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 16px 14px;
}
.restaurant-card__hero-bottom {
  display: flex;
  gap: 12px;
  align-items: center;
}

.restaurant-card__rank {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  align-self: flex-end;
}
.restaurant-card__rank--1 {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
}
.restaurant-card__rank--2 {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #fff;
}
.restaurant-card__rank--3 {
  background: linear-gradient(135deg, #cd7c32, #a0522d);
  color: #fff;
}

/* === Top Pick Highlight === */
.restaurant-card--top-pick {
  border: 2px solid transparent;
  background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)),
                    linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.2), var(--shadow-card);
  position: relative;
}
.restaurant-card--top-pick:hover {
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.35), 0 12px 40px rgba(0,0,0,0.4);
}

.restaurant-card--top-pick .restaurant-card__hero {
  height: 200px;
}

.restaurant-card--top-pick .restaurant-card__score-fill {
  background: linear-gradient(90deg, #fbbf24, #f59e0b) !important;
}

.top-pick-badge {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  padding: 6px 0;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: goldPulse 2s ease-in-out infinite;
}
@keyframes goldPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.btn--gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  border-color: #fbbf24 !important;
  color: #000 !important;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}
.btn--gold:hover {
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.5);
  transform: translateY(-1px);
}

.restaurant-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), var(--coral));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.restaurant-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.restaurant-card__cuisine {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 140, 66, 0.15);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 3px;
}

.restaurant-card__body {
  padding: 14px 16px 18px;
}

.restaurant-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.restaurant-card__detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.restaurant-card__detail-icon { font-size: 1rem; }

.restaurant-card__score {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.restaurant-card__score-bar {
  flex: 1;
  height: 4px;
  background: var(--glass-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.restaurant-card__score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

.restaurant-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.restaurant-card__actions .btn { flex: 1; }

/* Results single-column layout */
.results__cards,
#results-cards,
#cook-results-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-items: center;
}

/* Skeleton Loading */
.restaurant-card--skeleton {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeInUp 0.3s ease both;
}
.skeleton-hero {
  height: 160px;
  background: rgba(255,255,255,0.03);
}
.skeleton-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
}
.skeleton-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.05);
  margin-top: 4px;
}
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
.skeleton-pulse {
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* Results actions */
.results__actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}
.results__actions .btn { flex: 1; }
.results__actions--3 {
  flex-wrap: wrap;
}
.results__actions--3 .btn--ghost {
  flex: 1 1 100%;
  text-align: center;
  opacity: 0.7;
  font-size: 0.82rem;
}

/* Màn cook-results: 1 CTA vàng chính ("Chốt mâm này") độc chiếm tiêu điểm, bên dưới là
   hàng phụ 2 ô ngang nhau ("Đổi mâm khác" + "Tự chọn món") — hai lối rẽ ngang cấp, dạng
   ghost icon-trên-nhãn, gọn ~40% chiều cao so với 3 thanh full-width cũ */
.results__actions--cook {
  flex-direction: column;
  gap: 10px;
}
.results__actions-row {
  display: flex;
  gap: 10px;
  width: 100%;
}
.results__action-2 {
  flex: 1;
  flex-direction: row;
  gap: 7px;
  min-height: 44px;
  padding: 11px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.results__action-2 svg { flex-shrink: 0; width: 18px; height: 18px; }
.results__action-2 span { white-space: nowrap; }
.results__action-2:hover { background: var(--glass-bg-hover); border-color: rgba(255,255,255,0.15); }
/* Nút "Đổi mâm khác" — tần suất cao nhất trong nhóm phụ: icon nhuốm sắc accent để mời bấm */
.results__action-2--hot svg { color: var(--accent); }
.results__action-2--hot:hover { border-color: rgba(255, 140, 66, 0.5); }

/* Map container */
.results__map {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  margin-top: 4px;
}

/* === Error / Empty States === */
.state-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 40px 20px;
}
.state-message__emoji { font-size: 3rem; }
.state-message__title {
  font-size: 1.2rem;
  font-weight: 600;
}
.state-message__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 320px;
}

/* === Toast Notifications === */
.toast-container {
  position: fixed;
  top: calc(72px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;         /* 480px app - 32px padding */
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  align-items: flex-end;    /* toasts stack right-to-left within frame */
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 3s forwards;
  max-width: 320px;
  box-shadow: var(--shadow-card);
  pointer-events: auto;
}
.toast--error { border-left: 3px solid var(--error); }
.toast--success { border-left: 3px solid var(--success); }
.toast--info { border-left: 3px solid var(--info); }

/* === Spin Overlay === */
.spin-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 18, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  backdrop-filter: blur(8px);
}
.spin-overlay.is-active { display: flex; }

.spin-wheel {
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  box-shadow: var(--shadow-glow);
  position: relative;
}
.spin-wheel.is-spinning {
  animation: spinWheel 2s cubic-bezier(.2,1,.3,1) forwards;
}

.spin-result {
  text-align: center;
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.spin-result.is-visible { opacity: 1; }

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes bgFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.15); }
}
@keyframes spinWheel {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(1440deg); }
}


/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-bg-hover) 50%, var(--glass-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* === Responsive === */
@media (max-width: 480px) {
  .options-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .option-card { padding: 14px 8px; }
  .option-card__emoji { font-size: 1.6rem; }
  .option-card__label { font-size: 0.8rem; }
  .restaurant-card { padding: 16px; }
  .results__actions { flex-direction: column; }
}

@media (min-width: 768px) {
  .welcome__actions { flex-direction: row; max-width: 440px; }
  .options-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .results__map { height: 280px; }
}

@media (min-width: 1024px) {
  .results__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .restaurant-card__actions { flex-direction: column; }
}

/* === Utility === */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
/* === AI Recommendation === */
.ai-reason {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(168,85,247,0.08));
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: var(--radius-lg);
  animation: fadeInUp 0.5s ease both;
}
.ai-reason__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.ai-reason p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Typing cursor */
.ai-reason__cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: rgba(139,92,246,0.8);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: aiCursorBlink 0.6s step-end infinite;
}
.ai-reason__cursor--done { display: none; }

@keyframes aiCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}


.dish-card--ai {
  border: 1px solid rgba(139,92,246,0.3);
  box-shadow: 0 4px 24px rgba(139,92,246,0.15);
}

/* === Mâm Cơm (Meal Set — Photo-based View) === */
.dining-table {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  scroll-margin-top: 76px; /* scrollIntoView khi hoán đổi mâm không bị header sticky đè */
  border-radius: var(--radius-xl, 20px);
  overflow: hidden;
  background: var(--glass-bg, rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  animation: fadeInUp 0.6s ease both;
}

/* --- Photo container --- */
.mam-com__photo-wrap {
  position: relative;
  width: 100%;
}



/* --- Dish list below photo --- */
/* Lề ngang 10px để hàng món (cộng padding 10px của .mam-com__dish = 20px)
   thẳng cột với header (padding 20px) — trước để 16px làm nội dung thụt 26px,
   sâu hơn header/hàng chip nên trông trống hai bên (v2 Khung mâm). */
.mam-com__dish-list {
  padding: 6px 10px;
}

.mam-com__dish {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.mam-com__dish:hover {
  background: rgba(255,255,255,0.05);
}

.mam-com__dish.is-active {
  background: rgba(255,140,66,0.12);
}

.mam-com__dish-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.mam-com__dish-role {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.58);
  flex-shrink: 0;
}

.mam-com__dish-arrow {
  font-size: 1rem;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
  margin-left: -2px;
}

.mam-com__dish.is-active .mam-com__dish-arrow {
  color: rgba(255,140,66,0.6);
}

/* Footer */
.dining-table__footer {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
}
.dining-footer__label {
  color: rgba(255,140,66,0.85);
  font-weight: 600;
  flex-shrink: 0;
}
/* Lời của An: mệnh đề tráng miệng được sinh NGẮN (≤2 quả — xem _seasonalDessertClause,
   câu dài nhất ~57 ký tự) nên luôn gói gọn ≤2 dòng ở bề rộng footer trên mọi cỡ máy.
   Vì thế KHÔNG clip cứng ở đây: tránh combo -webkit-line-clamp + overflow:hidden, vì trên
   WebKit/iOS vùng bị clip hay bị compositor tô ĐEN (black-box) đè lên chữ. Để text wrap
   tự nhiên → đủ chữ, không cắt, vẫn ≤2 dòng.
   ⚠️ Nếu về sau thêm tên quả dài hơn làm câu tràn 3 dòng, hãy siết độ dài trong
   _seasonalDessertClause chứ ĐỪNG thêm lại overflow:hidden ở đây. */
.dining-footer__text {
  min-width: 0;        /* flex item: cho phép co & wrap, không tràn ngang */
  line-height: 1.4;
}

/* Detail overlay — slides open when label is tapped */
.dining-table__detail {
  max-height: 0;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border-top: 1px solid rgba(255,140,66,0.15);
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 20px;
}

.dining-table__detail.is-open {
  max-height: 400px;
  padding: 16px 20px;
}

.dining-table__detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.dining-table__detail-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.dining-table__detail-close {
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: var(--font);
}

.dining-table__detail-close:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.dining-table__detail-section {
  margin-bottom: 10px;
}

.dining-table__detail-section strong {
  display: block;
  font-size: 0.8rem;
  color: rgba(255,140,66,0.9);
  margin-bottom: 4px;
}

.dining-table__detail-section p,
.dining-table__detail-section ol {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin: 0;
  padding-left: 0;
}

.dining-table__detail-section ol {
  padding-left: 18px;
}

.dining-table__detail-section ol li {
  margin-bottom: 4px;
}

/* Plate/label appearance animation */
@keyframes plateAppear {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.hidden { display: none !important; }

/* === History Banner (on Welcome screen) === */
/* === Streak Badge === */
.streak-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin: 0 auto 12px;
  max-width: 460px;
  width: 100%;
  background: linear-gradient(135deg, rgba(247,201,72,0.15), rgba(238,90,36,0.12));
  border: 1px solid rgba(247, 201, 72, 0.3);
  border-radius: var(--radius-lg);
  animation: fadeInUp 0.4s ease both, streakGlow 3s ease-in-out infinite;
  cursor: default;
}
@keyframes streakGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247,201,72,0); }
  50%       { box-shadow: 0 0 12px 2px rgba(247,201,72,0.15); }
}
.streak-badge__fire {
  font-size: 1.6rem;
  flex-shrink: 0;
  animation: fireWiggle 1.2s ease-in-out infinite;
}
@keyframes fireWiggle {
  0%, 100% { transform: rotate(-5deg) scale(1); }
  50%       { transform: rotate(5deg) scale(1.1); }
}
.streak-badge__text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.streak-badge__text strong {
  color: #f7c948;
  font-weight: 700;
}

.history-banner {

  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin: 0 auto 20px;
  max-width: 460px;
  background: var(--glass-bg);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  animation: fadeInUp 0.4s ease both;
  cursor: pointer;
  transition: all var(--transition-normal);
}
.history-banner:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: var(--glass-bg-hover);
}
.history-banner__icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.history-banner__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.history-banner__text strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}
.history-banner__text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.history-banner__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
/* Scale down meal badge slightly inside the compact banner */
.history-banner__meta .history-meal-badge {
  font-size: 0.68rem;
  padding: 1px 6px;
}
.history-banner .btn {
  flex-shrink: 0;
  padding: 6px 16px;
  font-size: 0.8rem;
}

/* === History Overlay === */
.history-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(10, 10, 18, 0.88);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.history-overlay.is-active {
  display: flex;
}

.history-panel {
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.3s ease both;
  overflow: hidden;
}

.history-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.history-panel__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.history-panel__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}
.history-panel__close:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.history-panel__list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px;
}

.history-panel__footer {
  display: flex;
  justify-content: center;
  padding: 14px 18px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}

/* History date group */
.history-date-group {
  margin-bottom: 16px;
}
.history-date-group__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-left: 4px;
}

/* History item */
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all var(--transition-normal);
}
.history-item:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.1);
}
.history-item__emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.history-item__info {
  flex: 1;
  min-width: 0;
}
.history-item__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.history-item__time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ---- Meal time badges ---- */
.history-meal-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1;
}
.history-meal-badge--breakfast {
  background: rgba(255, 200, 50, 0.13);
  color: #ffd166;
  border: 1px solid rgba(255, 200, 50, 0.2);
}
.history-meal-badge--lunch {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.2);
}
.history-meal-badge--dinner {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.history-item__badge {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 600;
}
.history-item__badge--cook {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.history-item__badge--eatout {
  background: rgba(255, 140, 66, 0.15);
  color: var(--accent-light);
}
.history-item__badge--ai {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
}

/* History empty state */


@media (max-width: 480px) {
  .results__actions--3 {
    flex-direction: column;
  }
  .history-panel {
    max-height: 90vh;
  }
}

/* ==================== COMBO LIST POPUP ==================== */
.combo-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  /* KHÔNG dùng backdrop-filter ở đây: blur toàn màn hình trên nền bg-glow động
     bắt GPU iOS re-sample mỗi frame suốt lúc cuộn lưới mâm → giật (IMG_0888);
     nền tối đặc hơn một chút thay thế đủ tách lớp */
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.combo-overlay.is-open {
  display: flex;
  opacity: 1;
}
.combo-overlay__panel {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  /* Cột co giãn: list ăn đúng phần còn thừa dưới chrome, KHÔNG trừ bằng hằng số.
     Hằng số cũ (85vh − 160px) đã lệch sẵn 35px vì chrome thật là 195px, và mỗi lần
     đổi chrome lại lệch thêm — panel overflow:hidden nên phần lệch bị CẮT ÂM THẦM. */
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  animation: comboSlideUp 0.35s ease forwards;
}
@keyframes comboSlideUp {
  to { transform: translateY(0); }
}
.combo-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}
.combo-overlay__header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.combo-overlay__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.combo-overlay__close:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}
/* LƯỚI 2 CỘT, không phải hàng ngang cuộn (v3.36.0).
   Chỗ trống cho hàng chip = bề rộng máy − 26px (lề màn 12×2 + viền panel): 349px ở máy 375,
   334px ở máy 360. Xếp ngang thì 3 chip đã cần 379px — tràn sẵn — và tab thứ 4 («Mâm quen»)
   đẩy lên 498px. Xếp lưới thì ô CO THEO MÀN (148–155px) thay vì đẩy nhau ra ngoài: nhãn đầy đủ
   + emoji + số đếm đều nằm gọn ở mọi bề rộng, và thêm tab chỉ là thêm ô. */
/* Cụm khung đầu (tabs + chú thích + ô tìm) — v3.39.0 bọc chung 1 div để màn «Món ngon»
   trượt cả cụm bằng transform (rule .monngon-screen .monngon-chrome, cuối file). Trong
   sheet/picker: khối flex-column trung tính, con xếp dọc y như khi chúng còn là con trực
   tiếp của panel. flex:0 0 auto để panel 85vh không ép co cụm này — phần co dồn cho list
   (min-height:0) như trước giờ vẫn thế. */
.monngon-chrome {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}
.combo-overlay__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--glass-border);
}
.combo-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;    /* dọc GIỮ 6 (nới lên 10 tốn 14px cho cả khối 2 hàng).
                          Ngang hạ 14 → 8: ô do LƯỚI định rộng (1fr) nên padding ngang KHÔNG
                          chiếm chỗ, nó chỉ là khoảng hở tối thiểu — chữ căn giữa nên khi còn dư
                          trông y hệt, mà hộp chữ rộng thêm 12px để chứa số trong ngoặc. */
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: transparent;
  /* --text-secondary (.7) chứ KHÔNG phải --text-muted (.4): ở .4 tương phản trên nền panel
     chỉ 3.51, dưới ngưỡng WCAG AA 4.5 cho chữ nhỏ — mà đây là nhãn 12.48px, tức chữ nhỏ.
     .7 cho 8.42. Chip đang chọn có nguyên nền cam làm tín hiệu nên nhãn sáng lên không
     làm mất dấu «đang ở tab nào». */
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;      /* máy hẹp bất thường: cắt bằng … chứ đừng phá lưới */
  text-overflow: ellipsis;
  transition: all 0.2s;
}
.combo-tab:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.combo-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  /* Chữ TỐI trên cam, không phải trắng: cam #FF8C42 vốn đã sáng nên trắng đặt lên chỉ được
     2.31 — thấp nhất cả hàng chip, mà lại rơi đúng vào tab người dùng đang đứng. Mực tối
     cho 8.53. Hai đường khác đều đắt hơn: đổi --accent là đổi nhận diện cả app (nút, badge,
     tim…), còn làm cam tối riêng cho chip phải tối tới 69% mới đủ 4.5 cho chữ trắng. */
  color: var(--bg-primary);
}
/* Số đếm trong chip — đặt trong NGOẶC ĐƠN, vẫn chữ trần chứ không bọc nền viên thuốc (nền bo
   tròn tốn ~10px mỗi ô). Ngoặc tốn ~10px và trả về đúng thứ nó lấy: tách bạch số với nhãn,
   việc mà cỡ chữ nhỏ hơn 0,96px không làm nổi — nhất là khi số lại đậm hơn nhãn.
   Trả được nhờ hạ padding ngang của chip 14 → 8px (xem .combo-tab). Đo lại sau khi đổi, chip
   chật nhất «Mâm quen (109)» rộng 120px: hộp chữ 138px ở máy 375 (dư 17), 130px ở 360 (dư 10). */
.combo-tab__n {
  margin-left: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  /* Cùng cấp sáng với nhãn (8.42) — số cũng là chữ nhỏ nên cũng phải qua 4.5. Việc tách số
     khỏi nhãn nay do NGOẶC ĐƠN lo, không cần bóp mờ nữa; bóp mờ chính là cách cũ vừa không
     tách nổi (nó cùng màu nhãn) vừa kéo tương phản xuống 3.51. */
  color: var(--text-secondary);
  flex: 0 0 auto;
}
.combo-tab.is-active .combo-tab__n { color: rgba(10, 10, 18, 0.8); }  /* 6.24 trên nền cam */
/* Dưới 360px (SE đời 1 và Android cũ) ô chỉ còn 128px, hộp chữ 110px — «Mâm quen (109)» cần
   120px nên tràn 10px, «Khám phá (124)» tràn 9px (đo ở 320, sau khi đã hạ padding).
   Bỏ số, giữ nhãn: nhãn là thứ để chọn tab, số chỉ là thông tin kèm. */
@media (max-width: 359px) {
  .combo-tab__n { display: none; }
}
.combo-overlay__list {
  padding: 12px 12px 24px;
  overflow-y: auto;
  /* Ăn phần thừa của panel (flex column ở trên) thay cho trần `calc(85vh - 160px)` cũ.
     min-height:0 là bắt buộc: mặc định flex item không co dưới content size, list sẽ
     đẩy panel phình ra rồi bị overflow:hidden cắt mất đáy. */
  flex: 1 1 auto;
  min-height: 0;
}

/* ===== Màn «Món ngon» (v3.10.0, hộp bất động v3.39.0) — tab bottom nav thế ô Cài đặt =====
   .combo-overlay__panel được RE-PARENT vào #screen-monngon (js/combo-list.js tabMode):
   vẫn là 1 panel duy nhất, chỉ đổi "vỏ" từ sheet trượt đáy → màn hình.

   v3.39.0 — HỘP BẤT ĐỘNG: màn neo absolute từ đỉnh app-container tới sát bottom nav, panel
   chiếm trọn, danh sách chiếm trọn panel. Khung đầu (header + #monngon-chrome) là LỚP PHỦ
   trượt bằng transform ĐÈ LÊN danh sách, thanh mini là lớp phủ fade — thu/bung không làm
   bất kỳ hộp nào đổi kích thước. Trước đó (v3.38.x) thu/bung animate max-height của 6 phần
   tử VÀ của chính vùng cuộn giữa cử chỉ vuốt: trình cuộn iOS chạy bất đồng bộ nên vẽ không
   đuổi kịp layout — video IMG_0974 quay được mảng đen chưa kịp vẽ chiếm nửa màn, nội dung
   đứng sai chỗ, frame dính cả hai tầng khung đầu. Khoảng trống ô cuộn nay do PADDING-TOP
   của danh sách gánh (JS _layoutMonngonChrome đo và gán) — nội dung nằm dưới lớp phủ, cuộn
   qua nó y như app native.
   Neo absolute (KHÔNG fixed): app-container là cột 480px căn giữa + position:relative —
   fixed sẽ bung theo viewport, lệch khung trên desktop. Đáy tựa vào chính app-container
   (min-height:100dvh nên mép dưới = mép viewport trên mobile): 60px nav + 12px hở. */
.screen.monngon-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 5;              /* dưới header (100) và bottom-nav (200), trên nền glow */
  /* Đệm trên = safe-area: panel bắt đầu dưới đồng hồ/Dynamic Island khi standalone —
     header đã trượt đi thì màn phải TỰ gánh phần đệm này, và gánh THƯỜNG TRỰC chứ không
     đổi theo trạng thái thu/bung (đổi padding lúc vuốt = đổi layout = đúng cái bệnh cũ). */
  padding: env(safe-area-inset-top, 0px) 12px 0;
}
.monngon-screen .combo-overlay__panel {
  position: relative;      /* mốc cho 2 lớp phủ absolute: #monngon-chrome + thanh mini */
  /* Chiếm trọn màn bằng FLEX thay vì height:100%: hai đường cho cùng kết quả khi mọi thứ
     đúng, nhưng flex-grow ăn theo CONTENT BOX thật của .screen — nếu sau này có rule nào
     cộng thêm padding cho màn (đúng vụ padding-bottom 72px của rule đẩy-trên-nav, xem
     ~#8540), panel co theo chỗ thật chứ không tràn như %. min-height:0 cho phép co ở màn
     ngang thấp. */
  flex: 1 1 auto;
  min-height: 0;
  align-self: stretch;
  max-height: none;
  overflow: hidden;        /* clip cụm khung đầu lúc nó trượt lên khỏi mép panel */
  animation: none;   /* bỏ comboSlideUp — .screen đã có fadeInUp riêng */
  transform: none;   /* base translateY(100%) là trạng thái chờ slide-up của sheet */
  border-radius: var(--radius-lg);
}
.monngon-screen .combo-overlay__close { display: none; } /* thoát bằng nav — không cần ✕ */
/* Thanh tiêu đề: bỏ hẳn Ở ĐÂY (v3.36.0). Nó lặp nguyên văn chip tab ngay dưới nó, và khi ✕
   đã ẩn (dòng trên) thì cả hàng 61px không còn nút nào — thuần khung. Số đếm nay nằm trong chip.
   CHỈ ẩn ở màn này: trong overlay và picker Lịch tuần, tiêu đề mang ✕ — lối thoát DUY NHẤT —
   và mang cả dòng "📌 Chọn mâm để ghim" cho biết đang chọn cho slot nào. */
.monngon-screen .combo-overlay__header { display: none; }
/* v3.40.0 — lưới card KHÔNG còn là hộp cuộn: vùng cuộn dời lên #combo-list-scroll (bọc cả
   khung đầu). Phải gỡ đủ CẢ BA thứ của rule gốc, sót một cái là sinh hộp cuộn LỒNG NHAU —
   ngón tay cuộn hộp trong, khung đầu ở hộp ngoài đứng im, y như chưa sửa gì. */
.monngon-screen .combo-overlay__list,
.combo-overlay--picker .combo-overlay__list {
  overflow: visible;
  flex: none;
  min-height: auto;
  padding-top: 0;          /* khung đầu ngay trên đã tự chừa margin-bottom 12px */
}

/* ===== Khung đầu cuộn đi cùng danh sách — CHỈ màn «Món ngon» (v3.40.0) =====
   Khung đầu (lưới chip + chú thích + ô tìm) chiếm ~200px CỐ ĐỊNH, trong khi lúc lướt mâm
   không ai dùng tới nó. Cuộn xuống là nó trôi đi, để lại thanh mini 54px (đang xem kho nào
   + lối vào tìm kiếm); bấm thanh mini đưa danh sách về đầu để lấy lại nó.

   CƠ CHẾ — VIẾT LẠI LẦN 3, VÀ LÀ LẦN CUỐI VỀ MẶT NGUYÊN LÝ. Ba đời trước đều là LỚP PHỦ do
   JS dịch: v3.38.x animate max-height (giật nặng, video IMG_0974), v3.39.0 transform theo
   ngưỡng, v3.39.1 transform bám ngón tay 1:1 (video IMG_0983: VẪN giật). Đo thật bằng
   Playwright + throttle CPU ×8, đúng kịch bản video (tab Nhà mình, 6 cú vuốt, đếm frame
   trễ >25ms trên ~700 frame), 4 lượt mỗi biến thể:

       cụm nằm TRONG vùng cuộn (bản này)      6
       lớp phủ ĐỨNG YÊN, không dịch gì       14
       lớp phủ dịch + will-change            26
       lớp phủ dịch — v3.39.1 đang chạy      41

   Không bản vá nào của kiểu-lớp-phủ tới gần được: mỗi lần lớp phủ đục cao ~250px nhích 1px,
   dải danh sách nó VỪA HỞ RA phải raster lại — đó là chi phí của chính kiểu đó, không phải
   của cách viết. Cho cụm vào hộp cuộn thì nó là nội dung thật: compositor cuộn nó cùng
   card, ĐƯỜNG CUỘN KHÔNG CÒN MỘT DÒNG JS NÀO. Nhờ vậy xoá sạch cả bộ máy ba đời tích lại:
   _applyChromeOffset, offset cộng dồn, chốt mép 160ms, ngưỡng ARM, --monngon-chrome-top,
   padding-top bù lớp phủ, nhánh "màn chật", guard focus, matchMedia reduced-motion.
   Đánh đổi ĐÃ DUYỆT: cuộn lên giữa chừng không bung khung đầu ra nữa (nó về khi cuộn về
   đầu, hoặc bấm thanh mini) — xem CHANGELOG v3.40.0.

   Thanh tiêu đề toàn cục ẩn hẳn ở màn này (cũng đã duyệt): nó là thứ đắt nhất phải dịch,
   và ẩn đi thì danh sách còn ĐƯỢC THÊM ~53px so với v3.39. ⚙/Tôi vẫn ở 4 tab kia. */
body.monngon-on .header { display: none; }

/* Vùng cuộn: ở sheet «Tự chọn món» KHÔNG sinh hộp nào (display:contents) — bố cục flex cũ
   giữ nguyên, khung đầu vẫn đứng yên trên đầu sheet đúng như trước. Màn «Món ngon» và (từ
   v3.42.0) picker Lịch tuần thì nó là hộp cuộn thật, bọc cả thanh tiêu đề + khung đầu.
   Hai màn dùng CHUNG một bộ rule chứ không chép lại: cơ chế y hệt nhau thì phải nhìn ra
   được là y hệt, và sửa một chỗ là cả hai cùng đúng. */
.combo-overlay__scroll { display: contents; }
.monngon-screen .combo-overlay__scroll,
.combo-overlay--picker .combo-overlay__scroll {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* Rubber-band phải nảy TRONG vùng này, không lan ra body: video IMG_0974 frame 3-4 quay
     được CẢ MÀN (header + chip + nav) tụt xuống ~25px vì cú kéo quá đỉnh chuyền lên body. */
  overscroll-behavior-y: contain;
  /* Chỗ thanh mini che mất: thanh mini là lớp phủ đứng yên ở đỉnh panel, nhưng nó CHỈ hiện
     khi khung đầu đã trôi khuất — lúc đó nội dung dưới nó đang cuộn qua, không cần chừa
     chỗ. Chừa ở đây là mở màn đã thấy một dải trống 54px. */
}
/* Cụm khung đầu: khối tĩnh nằm trong dòng chảy của vùng cuộn (ở picker nó đứng sau thanh
   tiêu đề, ở «Món ngon» nó là phần tử đầu tiên vì tiêu đề bị ẩn). */
.monngon-screen .monngon-chrome,
.combo-overlay--picker .monngon-chrome {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 12px;
  /* Màn cực thấp (SE xoay ngang 320px) không còn là ca đặc biệt: cụm cao hơn màn thì user
     cuộn qua nó như cuộn qua card — hết cả nhánh "màn chật" lẫn luật thu-dính của v3.38.1. */
}

/* ── Thanh mini ────────────────────────────────────────────────────────────────
   Lớp phủ absolute ở đỉnh panel, ĐỨNG YÊN tuyệt đối — không transform, không opacity
   trung gian. Ngoài màn «Món ngon» (sheet/picker): display:none là đủ.

   v3.40.0 — HIỆN/ẨN NHỊ PHÂN, do IntersectionObserver quyết (không phải handler cuộn):
   khung đầu vừa trôi khỏi dải 54px trên cùng thì thanh mini bật lên, ló lại thì tắt. Hai
   trạng thái, không có giá trị ở giữa. v3.39.x hoà mờ theo quãng rút và ĐÓ LÀ LỖI: hai
   thanh cùng nền đặc chồng đúng chỗ nhau thì mọi opacity trung gian đều cho một mảng
   NHOÈ — video IMG_0983 bắt được đúng frame thanh mini trong suốt lộ cả ảnh món xuyên qua
   chip cam, kèm 2 frame trống trơn không thanh nào. Thu hẹp dải hoà mờ (v3.39.1 còn 12px)
   không chữa được, vì lướt 25-30px/frame thì frame vẫn rơi trúng giữa dải. */
.monngon-minibar { display: none; }
.monngon-screen .monngon-minibar,
.combo-overlay--picker .monngon-minibar {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;               /* trên vùng cuộn: nội dung chui qua DƯỚI nó như toolbar native */
  padding: 5px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  opacity: 0;
  visibility: hidden;       /* hidden mới thật sự rút 2 nút khỏi thứ tự Tab của bàn phím */
  pointer-events: none;
}
.monngon-minibar__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;          /* vùng chạm đủ ngưỡng ngón tay, không chỉ vừa cỡ chữ */
  max-width: calc(100% - 52px);
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--accent);
  /* Chữ TỐI trên cam — cùng lý do đã ghi ở .combo-tab.is-active: cam #FF8C42 sáng sẵn,
     chữ trắng đặt lên chỉ được 2.4, không qua nổi AA. */
  color: var(--bg-primary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
}
.monngon-minibar__label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.monngon-minibar__caret { font-size: 0.7rem; flex: 0 0 auto; opacity: 0.75; }
.monngon-minibar__search {
  margin-left: auto;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
}
/* Đang lọc theo từ khoá thì ô tìm bị thu mất — nút phải tự nói ra, không thì user
   tưởng danh sách ngắn đi là do kho hết mâm. */
.monngon-minibar__search.is-filtering {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
}
/* ── Nút đóng trên thanh mini — CHỈ picker (v3.42.0) ────────────────────────────
   Ở màn «Món ngon» lối ra là bottom nav nên không có nút này. Trong picker, thanh tiêu đề
   (mang ✕) nay cuộn đi mất, nên lướt sâu mà không có nút thay thế là chỉ còn mỗi
   chạm-ngoài-đóng — mà dải nền chỉ còn 4dvh (~29px), dưới ngưỡng chạm 44px của iOS. */
.monngon-minibar__close { display: none; }
.combo-overlay--picker .monngon-minibar__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
}
/* Chip kho phải nhường chỗ cho nút thứ HAI: trần cũ chừa 52px cho mỗi nút 🔍, nay còn thêm
   ✕ + khoảng hở. Thiếu dòng này thì ở máy 320px chip đẩy nút ✕ tràn ra ngoài thanh. */
.combo-overlay--picker .monngon-minibar__tab { max-width: calc(100% - 104px); }
/* prefers-reduced-motion (v3.40.0): nếp này không còn animation nào. Cuộn là cử chỉ trực
   tiếp của user, hiện/ẩn thanh mini là bước nhị phân. Chuyển động DUY NHẤT còn lại là cú
   đưa danh sách về đầu khi bấm thanh mini — JS tự kiểm matchMedia rồi nhảy thẳng thay vì
   `behavior: 'smooth'`. (Bài học v3.39.0: khối CSS ở đây từng thủng vì specificity, nên
   chỗ nào quyết được trong JS thì đừng chia đôi nguồn quyết định.) */

/* ===== Nút đổi kiểu xem — nằm ở cuối hàng ô tìm kiếm ===== */
.combo-view-switch {
  display: inline-flex;
  flex-shrink: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 3px;
}
.combo-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.combo-view-btn.is-active { background: var(--accent); color: #fff; }
.combo-view-btn__icon { font-size: 0.85rem; line-height: 1; }
/* Mobile: thu nút về icon để ô tìm kiếm giữ đủ rộng */
@media (max-width: 480px) {
  .combo-view-btn { padding: 5px 8px; }
  .combo-view-btn__label { display: none; }
}

/* ===== Nút ➕ Thêm mâm — cố định cuối hàng tìm kiếm (v3.6.6) =====
   Chỉ hiện ở tab "Nhà mình" (JS đặt [hidden]). Khác tile ➕ cuối lưới:
   không phụ thuộc cuộn và không ẩn khi đang search. */
.combo-add-btn {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(255, 140, 66, 0.35);
  transition: transform 0.18s ease, background 0.18s ease;
}
.combo-add-btn::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; } /* vùng chạm 42px */
.combo-add-btn:hover { background: var(--accent-light); transform: scale(1.08); }
.combo-add-btn:active { transform: scale(0.94); }
/* display:flex ở trên đè mất [hidden] mặc định của trình duyệt → phải ép lại */
.combo-add-btn[hidden] { display: none; }
/* Picker mode (chọn mâm cho Lịch tuần): ẩn cùng nhịp với tile ➕ cuối lưới */
.combo-overlay--picker .combo-add-btn { display: none !important; }

/* ===== Combo Tab Guideline — dòng riêng full-width, TRÊN ô tìm kiếm ===== */
.combo-tab-guideline {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 16px 4px;
  margin: 0;
  opacity: 0.8;
  letter-spacing: 0.01em;
}
.combo-tab-guideline[hidden] { display: none; }

/* ===== Combo Search ===== */

.combo-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin: 0 0 4px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 2;
}
.combo-search__icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  opacity: 0.55;
}
.combo-search__input {
  flex: 1;
  min-width: 0;   /* cho phép co lại khi nút đổi kiểu xem nằm cùng hàng */
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  /* Remove native search cancel button */
  -webkit-appearance: none;
  appearance: none;
}
.combo-search__input::placeholder {
  color: var(--text-muted);
  opacity: 0.65;
}
.combo-search__input:focus {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background: rgba(255, 255, 255, 0.11);
}
/* Hide native 'x' button in WebKit */
.combo-search__input::-webkit-search-cancel-button { display: none; }

.combo-search__clear {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.combo-search__clear:hover {
  background: rgba(255, 80, 80, 0.2);
  color: #ff6b6b;
}
.combo-search__clear[hidden] { display: none; }

/* Empty search state */
.combo-search-empty {
  text-align: center;
  padding: 40px 24px;
  grid-column: 1 / -1;
}
.combo-search-empty__icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  opacity: 0.5;
}
.combo-search-empty__text {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.combo-search-empty__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.household-empty .combo-search-empty__hint {
  margin-bottom: 14px;
}
.household-empty__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  max-width: 220px;
  margin: 0 auto;
}

/* ===== Card Grid Layout ===== */
.combo-list--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
  /* BẮT BUỘC max-content, đừng để hàng auto: WebKit/iOS (mọi iPhone, tái hiện cả WebKit 26.5)
     tính sai chiều cao hàng auto khi lưới nằm trong panel flex-column (v3.36.0) mà chiều cao
     card lại đến từ aspect-ratio khung ảnh — hàng chỉ ~58px trong khi card ~330px, các card
     đè chồng lên nhau thành dải ảnh. Chromium không dính nên desktop nhìn vẫn đúng. */
  grid-auto-rows: max-content;
}
.combo-list--list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* Container này cũng là vùng cuộn (max-height + overflow-y:auto). Flex column có
   max-height sẽ NÉN item cho vừa thay vì cuộn → khóa flex-shrink để hàng giữ
   nguyên chiều cao, vùng cuộn hoạt động bình thường. */
.combo-list--list > * { flex-shrink: 0; }

/* ===== combo-card (mâm trưa/tối) ===== */
.combo-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}
.combo-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(255,140,66,0.2);
}
.combo-card:active {
  transform: scale(0.97);
}
.combo-card.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,140,66,0.35);
}

/* Tile "+ Thêm mâm cơm mới" — luôn ở cuối lưới tab Mâm nhà mình */
.combo-add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 3 / 4;
  background: rgba(255,255,255,0.02);
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.combo-add-tile:hover {
  border-color: var(--accent);
  background: rgba(255,140,66,0.06);
  transform: translateY(-3px);
}
.combo-add-tile:active { transform: scale(0.97); }
.combo-add-tile__icon {
  font-size: 2rem;
  color: var(--accent);
}
.combo-add-tile__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-align: center;
}

/* Photo area */
.combo-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.combo-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.combo-card:hover .combo-card__img {
  transform: scale(1.05);
}
/* Món chính là "Món của bạn" (v3.7.0) → thumbnail emoji nét đứt thay ảnh
   (kích thước ăn theo .combo-card__img: 100% khung lưới / 52px hàng danh sách) */
.combo-card__img--custom {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  background: rgba(255, 140, 66, 0.08);
  border: 1px dashed rgba(255, 140, 66, 0.45);
  box-sizing: border-box;
}
.combo-card:hover .combo-card__img--custom { transform: none; }
.combo-card--row .combo-card__img--custom { font-size: 1.5rem; border-radius: 10px; }
.combo-card__dish--custom { color: var(--accent-light); }

/* "✓ Đang chọn" badge */
.combo-card__current-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* ✚ / ✕ action button — Mâm nhà mình */
.combo-card__action-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  /* KHÔNG backdrop-filter: mỗi nút là 1 vùng blur DI ĐỘNG khi cuộn (~10 nút
     trên màn hình cùng lúc) — iOS re-sample từng vùng mỗi frame → giật lưới;
     nền đặc hơn thay thế */
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.combo-card__action-btn:hover {
  background: rgba(0,0,0,0.75);
  transform: scale(1.08);
}
.combo-card__action-btn:active {
  transform: scale(0.92);
}
.combo-card__action-btn--remove {
  background: rgba(220,38,38,0.75);
}
.combo-card__action-btn--remove:hover {
  background: rgba(220,38,38,0.92);
}
.combo-card__action-btn.is-added {
  background: rgba(34,197,94,0.85);
  cursor: default;
}
.combo-card__action-btn.is-added:hover {
  transform: none;
  background: rgba(34,197,94,0.85);
}

/* Text body */
.combo-card__body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.combo-card__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.combo-card__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.combo-card__badge {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.07);
  padding: 2px 6px;
  border-radius: 8px;
}
.combo-card__season {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.4);
}
.combo-card__dishes {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.combo-card__dishes span {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-card__edit-link {
  align-self: flex-start;
  margin-top: 2px;
  background: none;
  border: none;
  padding: 2px 0;
  font-size: 0.72rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.combo-card__edit-link:hover { opacity: 0.8; }
.combo-card__desc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

/* ===== Kiểu Danh sách — tái dùng markup .combo-card, CSS đổi thành hàng gọn.
   Đặt SAU các rule .combo-card gốc để override cùng độ đặc hiệu thắng theo thứ tự. ===== */
.combo-card--row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 12px;
}
/* Bỏ nhấc/zoom của thẻ lưới để danh sách không nhảy khi rê chuột/cuộn */
.combo-card--row:hover { transform: none; box-shadow: none; border-color: var(--accent); }
.combo-card--row:active { transform: scale(0.99); }
.combo-card--row:hover .combo-card__img { transform: none; }
.combo-card--row .combo-card__img-wrap {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  aspect-ratio: auto;
  border-radius: 10px;
  position: static;   /* thumbnail không còn là mốc absolute cho nút hành động */
}
.combo-card--row .combo-card__body {
  padding: 0;
  gap: 2px;
  min-width: 0;       /* cho phép ellipsis tên + dòng món */
}
.combo-card--row .combo-card__row-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.combo-card--row .combo-card__label {
  font-size: 0.85rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-card--row .combo-card__badge { flex-shrink: 0; }
.combo-card--row .combo-card__season { flex-shrink: 0; }
.combo-card--row .combo-card__current-inline {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
}
/* MỖI MÓN LÀ MỘT KHỐI, lưới 2 cột (v3.41.0) — thay cho "3 món trên 1 dòng, cả dòng ellipsis".
   Kiểu cũ cắt bằng ellipsis ở mức CẢ DÒNG nên món cuối biến mất HẲN: đo trên cả 355 mâm được
   21 mâm mất món ở 375px và 197 mâm ở 320px (SE đời 1 / Android cũ — cỡ máy app đã cố ý đỡ,
   xem rule ẩn .combo-tab__n ở ≤359px). Người dùng không hề biết mâm đó có món thứ ba.

   Lưới [món 1 vừa đủ chữ | món 2 ăn phần còn lại, thiếu thì «…»], món 3 xuống chiếm trọn
   dòng hai. Kết quả trên cùng phép quét: 0 món biến mất ở CẢ hai bề rộng, số mâm phải rút
   gọn ở 375px còn 15 (kiểu cũ: 303).

   VÀ NÓ KHÔNG TỐN MỘT PIXEL NÀO: hàng vẫn đúng 66px như kiểu 1 dòng, vì khối chữ 2 dòng cao
   31px — vẫn thấp hơn cái ảnh 44px bên trái nên không đẩy hàng cao lên. (Cách "cho cả khối tự
   xuống dòng + line-clamp" cũng phủ được 100% nhưng hàng phình lên 76–85px, mất 0,67–1,16
   mâm mỗi màn.)

   `nth-child(3)` là chi tiết bắt buộc, không phải trang trí: cột 1 rộng theo món DÀI NHẤT
   trong cột, để món 3 nằm đó là nó bóp món 2 — số mâm phải rút gọn ở 375px tăng 15 → 45. */
.combo-card--row .combo-card__dishes {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 0 10px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  margin-top: 0;
}
.combo-card--row .combo-card__dishes span {
  display: block;
  min-width: 0;       /* bắt buộc: mặc định grid item không co dưới content size → hết ellipsis */
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-card--row .combo-card__dishes span:nth-child(3) { grid-column: 1 / -1; }
/* Dấu «·» ngăn cách thôi cần thiết — hai cột tự đã phân tách, mà nó còn chiếm chỗ của tên món. */
.combo-card--row .combo-card__dishes span + span::before { content: none; }
.combo-card--row .combo-card__row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.combo-card--row .combo-card__action-btn {
  position: static;   /* nằm trong flow của cụm hành động, không absolute */
  width: 30px;
  height: 30px;
}
.combo-card--row .combo-card__edit-link {
  align-self: center;
  margin: 0;
  padding: 4px;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
}
/* Tile "+ Thêm mâm cơm mới" trong kiểu Danh sách */
.combo-list--list .combo-add-tile {
  flex-direction: row;
  aspect-ratio: auto;
  gap: 10px;
  padding: 14px;
  justify-content: center;
}
.combo-list--list .combo-add-tile__icon { font-size: 1.4rem; }

/* Keep old .combo-item styles for any fallback uses */
.combo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* ===== Alt combos — "Hay đổi gió?" 2 mâm phụ dưới mâm chính ===== */
.alt-combos {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.alt-combos__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  margin: 2px 2px 8px;
}
.alt-combos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}
.alt-combo-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.alt-combo-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(255,140,66,0.2);
}
.alt-combo-card:active { transform: scale(0.97); }
.alt-combo-card__img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.alt-combo-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.alt-combo-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 10px;
  flex: 1;
}
.alt-combo-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* tên dài phải xuống dòng thay vì tràn 1 dòng rồi bị card overflow:hidden cắt cụt */
  overflow-wrap: anywhere;
}
.alt-combo-card__dishes {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alt-combo-card__cta {
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
}

/* ===== Reask Skeleton (anti layout shift) ===== */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.reask-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.reask-skeleton__img {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 400px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.reask-skeleton__lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.reask-skeleton__line {
  height: 14px;
  border-radius: 8px;
  width: 75%;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 400px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.reask-skeleton__line--wide  { width: 90%; }
.reask-skeleton__line--short { width: 50%; }

/* Prevent image causing CLS — reserve space */
.mam-com__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ============================================
   ONBOARDING OVERLAY
   ============================================ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.onboarding-box {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 32px 24px 40px;
  width: 100%;
  max-width: 480px;
  animation: slideUpOnboard 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes slideUpOnboard {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

.onboarding-step { display: flex; flex-direction: column; gap: 16px; }

.onboarding-emoji {
  font-size: 3rem;
  text-align: center;
  animation: bounceIn 0.6s ease both;
}

.onboarding-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.onboarding-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}
.onboarding-desc strong { color: var(--accent-light); -webkit-text-fill-color: var(--accent-light); }

/* Tag grid */
.onboarding-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.ob-tag {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font);
}
.ob-tag:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255,140,66,0.4);
  color: var(--text-primary);
}
.ob-tag.is-selected {
  background: linear-gradient(135deg, rgba(255,140,66,0.2), rgba(255,107,107,0.15));
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 10px rgba(255,140,66,0.2);
}

/* Next button */
.ob-next-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), var(--coral));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: var(--font);
  box-shadow: 0 4px 20px rgba(255,140,66,0.3);
}
.ob-next-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,140,66,0.45); }
.ob-next-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Meal grid (step 2) */
.onboarding-meal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ob-meal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  font-size: 1.8rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: var(--font);
}
.ob-meal span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.ob-meal:hover {
  background: var(--glass-bg-hover);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.ob-meal.is-selected {
  background: linear-gradient(135deg, rgba(255,140,66,0.2), rgba(255,107,107,0.15));
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(255,140,66,0.25);
}
.ob-meal.is-selected span { color: var(--accent-light); }

/* Skip button */
.ob-skip-btn {
  align-self: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font);
  transition: color var(--transition-fast);
}
.ob-skip-btn:hover { color: var(--text-secondary); }


/* ============================================
   Welcome Screen Skeleton Loading (safe version)
   ============================================ */

/* Shimmer animation */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* Loading state: subtle dimming while JS initialises (< 200ms) */
.welcome--loading .mode-card {
  opacity: 0.75;
  pointer-events: none;
  position: relative;
  overflow: hidden;
}
.welcome--loading .mode-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: shimmer 1.4s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255,255,255,0.06) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
  pointer-events: none;
}
.welcome--loading .auto-pick-btn {
  opacity: 0.65;
  pointer-events: none;
  position: relative;
  overflow: hidden;
}
.welcome--loading .auto-pick-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: shimmer 1.4s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255,255,255,0.08) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
  pointer-events: none;
}

/* ============================================
   Beautiful Empty States
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  animation: fadeInUp 0.4s ease both;
}

.empty-state__art {
  font-size: 4rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 16px rgba(255,140,66,0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

.empty-state__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.4;
}

.empty-state__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.6;
  max-width: 260px;
}

.empty-state__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.empty-state__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.empty-state__hint {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* History empty state */
.history-empty {
  padding: 32px 16px;
  text-align: center;
}
.history-empty__emoji {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}
.history-empty__text {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Taste profile empty state — khi chưa có profile */
.taste-empty-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}
.taste-empty-profile__emoji {
  font-size: 2.8rem;
  animation: float 3s ease-in-out infinite;
}
.taste-empty-profile__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0 0;
}
.taste-empty-profile__desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  max-width: 240px;
  line-height: 1.5;
}

/* ======================================================
   Meal Replace Confirmation Dialog
   ====================================================== */
#meal-replace-dialog {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
#meal-replace-dialog.is-visible {
  opacity: 1;
  pointer-events: all;
}

.meal-replace-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.meal-replace-modal {
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, rgba(30, 30, 40, 0.97) 0%, rgba(20, 20, 30, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px 24px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 140, 66, 0.08);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#meal-replace-dialog.is-visible .meal-replace-modal {
  transform: translateY(0) scale(1);
}

.meal-replace-icon {
  font-size: 2.6rem;
  margin-bottom: 10px;
  line-height: 1;
}

.meal-replace-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.meal-replace-dish {
  font-size: 0.82rem;
  color: var(--accent-light, #ffb347);
  background: rgba(255, 140, 66, 0.1);
  border: 1px solid rgba(255, 140, 66, 0.18);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  line-height: 1.4;
  word-break: break-word;
}

.meal-replace-question {
  font-size: 0.83rem;
  color: var(--text-secondary, #a0a0b0);
  margin-bottom: 20px;
  line-height: 1.5;
}

.meal-replace-actions {
  display: flex;
  gap: 10px;
}

.meal-replace-btn {
  flex: 1;
  padding: 11px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  font-family: inherit;
}

.meal-replace-btn--cancel {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary, #9090a0);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.meal-replace-btn--cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.meal-replace-btn--confirm {
  background: linear-gradient(135deg, #ff8c42, #ff6b1a);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 140, 66, 0.35);
}
.meal-replace-btn--confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 140, 66, 0.5);
}
.meal-replace-btn--confirm:active {
  transform: translateY(0);
}

.meal-replace-hint {
  margin-top: 14px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.02em;
}
.meal-replace-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: inherit;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
}


/* =====================================================
   SMART EXPRESS — Ăn Ngoài Redesign
   Zero-tap to first result, map-first, swipe cards
   ===================================================== */

/* --- Screen base override for eatout --- */
#screen-eatout {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  gap: 0;
}
#screen-eatout.is-active {
  display: flex;
}

/* --- Eatout Inner Scroll Container --- */
.eatout-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  /* smooth momentum scroll on iOS */
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.eatout-scroll::-webkit-scrollbar { display: none; }

/* --- Sub-header: back + location --- */
.eatout-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
  flex-shrink: 0;
}

.eatout-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 6px 12px 6px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.eatout-back-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}
.eatout-back-btn svg {
  flex-shrink: 0;
}

.eatout-location-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #60a5fa;
  transition: all var(--transition-fast);
  cursor: default;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eatout-location-badge.is-loading {
  animation: pulseOpacity 1.2s ease-in-out infinite;
}
@keyframes pulseOpacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --- Compact Map --- */
.eatout-map-wrap {
  position: relative;
  height: 240px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

#eatout-map {
  width: 100%;
  height: 100%;
  /* Leaflet z-index corrections */
  z-index: 1;
}

.eatout-map-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
  pointer-events: none;
  z-index: 2;
}

/* Expand map button */
.eatout-map-expand {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(10,10,18,0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}
.eatout-map-expand:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  transform: scale(1.1);
}

/* Map placeholder while loading */
.eatout-map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #111119, #1a1a2e);
  animation: pulseOpacity 1.5s ease-in-out infinite;
}
.eatout-map-placeholder__icon { font-size: 2rem; opacity: 0.4; }
.eatout-map-placeholder__text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- Smart Context Label --- */
.eatout-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
  flex-shrink: 0;
}

.eatout-context__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.eatout-context__label span {
  color: var(--accent-light);
}

.eatout-context__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Filter Pills --- */
.eatout-filters {
  padding: 4px 16px 8px;
  flex-shrink: 0;
}

.eatout-filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.eatout-filter-row::-webkit-scrollbar { display: none; }

.filter-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.filter-pill:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}
.filter-pill:active {
  transform: scale(0.95);
}
.filter-pill.is-active {
  background: rgba(255, 140, 66, 0.18);
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.15);
}
.filter-pill__emoji {
  font-size: 0.95rem;
  line-height: 1;
}
/* Ripple on tap */
.filter-pill.tap-feedback {
  animation: pillTap 0.15s ease;
}
@keyframes pillTap {
  0% { transform: scale(1); }
  50% { transform: scale(0.93); }
  100% { transform: scale(1); }
}

/* Divider between filter rows */
.filter-divider {
  height: 4px;
}

/* --- Card Stack Container --- */
.eatout-card-area {
  padding: 4px 16px 12px;
  flex-shrink: 0;
  position: relative;
  min-height: 360px;
}

.eatout-card-stack {
  position: relative;
  width: 100%;
  min-height: 340px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* --- Hero Card --- */
.eatout-hero-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: grab;
  will-change: transform;
  transition: box-shadow 0.2s ease;
  animation: cardAppear 0.35s cubic-bezier(0.34, 1.26, 0.64, 1) both;
}
.eatout-hero-card:active { cursor: grabbing; }
.eatout-hero-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), var(--shadow-glow);
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Behind-stack card (peek effect) */
.eatout-hero-card--behind {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  transform: scale(0.96);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--radius-xl);
  height: 60px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

/* Card Hero Image */
.eatout-card__hero {
  height: 185px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}
.eatout-card__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10,10,18,0.1) 0%,
    rgba(10,10,18,0.05) 40%,
    rgba(10,10,18,0.85) 100%
  );
  z-index: 1;
}

/* Rank badge */
.eatout-card__rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(10,10,18,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}
.eatout-card__rank--top {
  background: linear-gradient(135deg, rgba(255,140,66,0.9), rgba(255,107,107,0.9));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 12px rgba(255,140,66,0.4);
}

/* Match % badge */
.eatout-card__match {
  position: absolute;
  top: 12px;
  right: 56px;
  z-index: 2;
  background: rgba(10,10,18,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
}

/* Favorite button (top-right on hero) */
.eatout-card__fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 36px;
  height: 36px;
  background: rgba(10,10,18,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.eatout-card__fav-btn:hover {
  transform: scale(1.15);
  background: rgba(255,107,107,0.2);
  border-color: rgba(255,107,107,0.4);
}
.eatout-card__fav-btn.is-fav {
  background: rgba(255,107,107,0.25);
  border-color: rgba(255,107,107,0.6);
  animation: heartPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes heartPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Heart burst particles */
.heart-burst {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6b6b;
  pointer-events: none;
  z-index: 9999;
  animation: burstParticle 0.6s ease-out forwards;
}
@keyframes burstParticle {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); }
}

/* Card hero bottom info (name + cuisine) */
.eatout-card__hero-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 12px 14px;
}
.eatout-card__name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eatout-card__cuisine-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Card Body */
.eatout-card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Info pills row */
.eatout-card__info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.eatout-info-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.eatout-info-chip--green { color: var(--success); border-color: rgba(74,222,128,0.2); background: rgba(74,222,128,0.06); }
.eatout-info-chip--blue  { color: #60a5fa; border-color: rgba(96,165,250,0.2); background: rgba(96,165,250,0.06); }
.eatout-info-chip--open  { color: var(--success); }
.eatout-info-chip--closed{ color: var(--error); }

/* Match score bar */
.eatout-card__score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.eatout-card__score-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.eatout-card__score-bar {
  flex: 1;
  height: 4px;
  background: var(--glass-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.eatout-card__score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--coral));
  border-radius: var(--radius-full);
  width: 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.eatout-card__score-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-light);
  white-space: nowrap;
  min-width: 32px;
  text-align: right;
}

/* Card Action Buttons */
.eatout-card__actions {
  display: flex;
  gap: 8px;
}
.eatout-btn-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent), var(--coral));
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(255,140,66,0.3);
  -webkit-tap-highlight-color: transparent;
}
.eatout-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255,140,66,0.45);
}
.eatout-btn-primary:active { transform: scale(0.97); }

.eatout-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.eatout-btn-secondary:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}
.eatout-btn-secondary:active { transform: scale(0.96); }

/* --- Swipe Hint Arrows --- */
.eatout-swipe-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 4px;
  margin-top: 4px;
}
.eatout-swipe-hint__pass {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}
.eatout-swipe-hint__next {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Pagination Dots --- */
.eatout-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 4px 0 8px;
}
.eatout-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glass-border);
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.eatout-dot.is-active {
  width: 20px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255,140,66,0.4);
}
.eatout-dot.is-done { background: rgba(255,140,66,0.35); }

/* --- Swipe animations --- */
@keyframes swipeLeft {
  from { transform: translateX(0) rotate(0); opacity: 1; }
  to   { transform: translateX(-130%) rotate(-15deg); opacity: 0; }
}
@keyframes swipeRight {
  from { transform: translateX(0) rotate(0); opacity: 1; }
  to   { transform: translateX(130%) rotate(15deg); opacity: 0; }
}
@keyframes slideInRight {
  from { transform: translateX(60px) scale(0.95); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes slideInLeft {
  from { transform: translateX(-60px) scale(0.95); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}

.eatout-hero-card.swiping-left  { animation: swipeLeft  0.3s ease forwards; }
.eatout-hero-card.swiping-right { animation: swipeRight 0.3s ease forwards; }
.eatout-hero-card.entering      { animation: cardAppear  0.35s cubic-bezier(0.34, 1.26, 0.64, 1) both; }

/* Drag visual feedback */
.eatout-hero-card.dragging-left  { box-shadow: -8px 0 30px rgba(239,68,68,0.3); }
.eatout-hero-card.dragging-right { box-shadow:  8px 0 30px rgba(74,222,128,0.3); }

/* --- Empty State --- */
.eatout-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 12px;
  text-align: center;
  min-height: 260px;
}
.eatout-empty__emoji { font-size: 3rem; }
.eatout-empty__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.eatout-empty__text { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* --- Skeleton card for eatout --- */
.eatout-skeleton-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: cardAppear 0.35s ease both;
}
.eatout-skeleton__hero {
  height: 185px;
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(255,255,255,0.04) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.eatout-skeleton__body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.eatout-skeleton__line {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(255,255,255,0.04) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.eatout-skeleton__line:nth-child(2) { width: 60%; animation-delay: 0.1s; }
.eatout-skeleton__line:nth-child(3) { width: 80%; animation-delay: 0.2s; }
.eatout-skeleton__btn {
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(255,255,255,0.04) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite 0.3s;
  margin-top: 4px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* --- Recents & Favorites Section --- */
.eatout-section {
  padding: 0 16px 12px;
  flex-shrink: 0;
}
.eatout-section__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.eatout-section__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}

.eatout-recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eatout-recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.eatout-recent-item:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateX(3px);
}
.eatout-recent-item:active { transform: scale(0.98); }

.eatout-recent-item__emoji { font-size: 1.3rem; flex-shrink: 0; }
.eatout-recent-item__info { flex: 1; min-width: 0; }
.eatout-recent-item__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eatout-recent-item__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.eatout-recent-item__action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  background: rgba(255,140,66,0.08);
}
.eatout-recent-item__action:hover {
  background: rgba(255,140,66,0.18);
}
.eatout-recent-item--fav .eatout-recent-item__name {
  color: var(--accent-light);
}

/* Bottom spacer */
.eatout-bottom-space { height: 24px; flex-shrink: 0; }

/* --- MapLibre GL JS overrides for dark mode --- */
.maplibregl-map {
  font-family: var(--font) !important;
}
.maplibregl-ctrl-attrib { display: none !important; }
.maplibregl-ctrl-logo   { display: none !important; }
.maplibregl-ctrl-group {
  background: rgba(10,10,18,0.85) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-card) !important;
  backdrop-filter: blur(8px);
}
.maplibregl-ctrl-group button {
  background-color: transparent !important;
  color: var(--text-secondary) !important;
  border: none !important;
  transition: all var(--transition-fast);
}
.maplibregl-ctrl-group button:hover {
  background: var(--glass-bg-hover) !important;
  color: var(--text-primary) !important;
}
.maplibregl-ctrl-group button + button {
  border-top: 1px solid var(--glass-border) !important;
}

/* --- Custom restaurant pin marker --- */
.angi-restaurant-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.55));
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  transform-origin: bottom center;
  /* Total height: 44px bubble + 8px caret = 52px.
     MapLibre anchor:bottom positions the bottom of this element
     at the coordinates — exact pin point. */
}
.angi-restaurant-pin:hover,
.angi-restaurant-pin.is-active {
  transform: scale(1.22);
}
.angi-restaurant-pin__bubble {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff8c42, #ff5f1f);
  border: 2.5px solid rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  position: relative;
}
/* Bottom caret / arrow pointing down */
.angi-restaurant-pin__bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #ff5f1f;
}
.angi-restaurant-pin__emoji {
  font-size: 1rem;
  display: block;
  line-height: 1;
}
.angi-restaurant-pin__num {
  font-size: 0.58rem;
  font-weight: 800;
  color: rgba(255,255,255,0.95);
  display: block;
  line-height: 1;
}
/* Active state: golden glow */
.angi-restaurant-pin--active .angi-restaurant-pin__bubble {
  background: linear-gradient(145deg, #f59e0b, #d97706);
  box-shadow: 0 0 0 5px rgba(245,158,11,0.3);
}
.angi-restaurant-pin--active .angi-restaurant-pin__bubble::after {
  border-top-color: #d97706;
}
/* Cuisine colors */
.angi-restaurant-pin--cafe .angi-restaurant-pin__bubble {
  background: linear-gradient(145deg, #6366f1, #4f46e5);
}
.angi-restaurant-pin--cafe .angi-restaurant-pin__bubble::after {
  border-top-color: #4f46e5;
}
.angi-restaurant-pin--korean .angi-restaurant-pin__bubble {
  background: linear-gradient(145deg, #ef4444, #dc2626);
}
.angi-restaurant-pin--korean .angi-restaurant-pin__bubble::after {
  border-top-color: #dc2626;
}
.angi-restaurant-pin--japanese .angi-restaurant-pin__bubble {
  background: linear-gradient(145deg, #8b5cf6, #7c3aed);
}
.angi-restaurant-pin--japanese .angi-restaurant-pin__bubble::after {
  border-top-color: #7c3aed;
}
.angi-restaurant-pin--western .angi-restaurant-pin__bubble {
  background: linear-gradient(145deg, #3b82f6, #2563eb);
}
.angi-restaurant-pin--western .angi-restaurant-pin__bubble::after {
  border-top-color: #2563eb;
}
.angi-restaurant-pin--fastfood .angi-restaurant-pin__bubble {
  background: linear-gradient(145deg, #f59e0b, #d97706);
}
.angi-restaurant-pin--fastfood .angi-restaurant-pin__bubble::after {
  border-top-color: #d97706;
}

/* --- User location pulse marker --- */
.angi-user-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #60a5fa;
  border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(96,165,250,0.5);
  animation: markerPulse 2s ease-in-out infinite;
  position: relative;
}
.angi-user-marker::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(96,165,250,0.15);
  animation: markerPulse 2s ease-in-out infinite 0.4s;
}
@keyframes markerPulse {
  0%   { box-shadow: 0 0 0 0 rgba(96,165,250,0.5); }
  70%  { box-shadow: 0 0 0 12px rgba(96,165,250,0); }
  100% { box-shadow: 0 0 0 0 rgba(96,165,250,0); }
}

/* --- MapLibre custom popup card --- */
.maplibregl-popup {
  max-width: 220px !important;
}
.maplibregl-popup-content {
  background: rgba(10,10,18,0.92) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
  color: var(--text-primary) !important;
  font-family: var(--font) !important;
  padding: 10px 12px !important;
  backdrop-filter: blur(12px) !important;
}
.maplibregl-popup-tip {
  border-top-color: rgba(10,10,18,0.92) !important;
  border-bottom-color: rgba(10,10,18,0.92) !important;
}
.maplibregl-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 1.1rem !important;
  top: 4px !important;
  right: 6px !important;
}

/* Popup card content */
.angi-map-popup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.angi-map-popup__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.angi-map-popup__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.angi-map-popup__dist {
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.72rem;
}
.angi-map-popup__actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.angi-map-popup__btn {
  flex: 1;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}
.angi-map-popup__btn--primary {
  background: linear-gradient(135deg, #ff8c42, #ff5f1f);
  color: #fff;
}
.angi-map-popup__btn--primary:hover {
  filter: brightness(1.15);
}
.angi-map-popup__btn--secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}
.angi-map-popup__btn--secondary:hover {
  color: var(--text-primary);
  background: var(--glass-bg-hover);
}

/* --- Fullscreen map mode --- */
.eatout-map-wrap.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  height: 100dvh !important;
  width: 100vw !important;
  z-index: 999 !important;
  border-radius: 0 !important;
}
.eatout-map-wrap.is-fullscreen .eatout-map-expand {
  top: 16px;
  right: 16px;
}
/* Close fullscreen overlay hint */
.eatout-map-fullscreen-close {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(10,10,18,0.88);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 8px 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: none;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.eatout-map-wrap.is-fullscreen .eatout-map-fullscreen-close {
  display: block;
}

/* ============================================
   RECIPE DETAIL OVERLAY
   ============================================ */

.recipe-overlay {
  position: fixed;
  inset: 0;
  /* iOS Safari: `inset:0` fix element cao bằng LARGE viewport (thanh URL thu lại).
     Khi mở overlay lúc thanh URL/toolbar đang hiện, container cao hơn vùng thấy được
     → sheet neo flex-end bị đẩy phần đỉnh (header + nút Đóng) lên sau thanh URL/tai thỏ,
     user không tìm được nút quay lại. Ràng vào 100dvh (viewport ĐỘNG, thấy được) để
     flex-end neo đúng đáy màn hình thật. (giống .eatout-map-wrap.is-fullscreen) */
  height: 100vh;           /* fallback trình duyệt cũ chưa hỗ trợ dvh */
  height: 100dvh;
  z-index: 9500;
  display: none;            /* hidden by default — no ghost render */
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.recipe-overlay.is-open {
  display: flex;            /* show only when explicitly opened */
}

/* Backdrop — clicks outside sheet close overlay */
.recipe-overlay__backdrop {
  position: absolute;
  inset: 0;
}

/* Sheet slides up from bottom */
.recipe-overlay__sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;        /* fallback trình duyệt cũ chưa hỗ trợ dvh */
  max-height: 92dvh;       /* dvh = viewport thấy được → luôn chừa ~8% backdrop trên đỉnh cho header */
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 48px rgba(0, 0, 0, 0.6);
  animation: recipeSlideUp 350ms cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes recipeSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ── Sticky Header ── */
.recipe-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.recipe-header__back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.recipe-header__back:hover { background: var(--glass-bg-hover); }
.recipe-header__title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recipe-header__share {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}
.recipe-header__share:hover {
  background: var(--accent-glow);
  transform: scale(1.08);
}

/* ── Scrollable Body ── */
.recipe-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* ── Hero Image ── */
.recipe-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-tertiary);
  overflow: hidden;
}
.recipe-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.recipe-hero:hover .recipe-hero__img {
  transform: scale(1.03);
}
.recipe-hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(10,10,18,0.5) 60%,
    rgba(10,10,18,0.95) 100%
  );
}
.recipe-hero__info {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
}
.recipe-hero__emoji {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 4px;
}
.recipe-hero__name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.recipe-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.recipe-hero__tag {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

/* ── Quick Stats ── */
.recipe-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}
.recipe-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 8px;
  background: var(--bg-secondary);
}
.recipe-stat__icon {
  font-size: 1.2rem;
}
.recipe-stat__value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}
.recipe-stat__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Description ── */
.recipe-description {
  margin: 16px 16px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
  padding: 12px 14px;
  background: var(--glass-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ── Sections (Ingredients + Steps) ── */
.recipe-section {
  margin: 20px 16px 0;
}
.recipe-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.recipe-section__icon {
  font-size: 1.1rem;
}
.recipe-section__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Ingredients as visual pills */
.recipe-ingredients {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recipe-ingredients li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.recipe-ingredients li::before {
  content: '•';
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Steps as numbered cards */
.recipe-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: step-counter;
}
.recipe-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  counter-increment: step-counter;
  position: relative;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.recipe-steps li:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255,140,66,0.2);
}
.recipe-steps li::before {
  content: counter(step-counter);
  min-width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Footer CTA ── */
.recipe-footer {
  margin: 24px 16px 32px;
  /* chừa thêm home indicator khi sheet chạm đáy màn hình (iPhone không phím) */
  margin-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}
.recipe-footer__share-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.recipe-footer__share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.recipe-footer__share-btn:active {
  transform: translateY(0);
}

/* ══ Rich overlay (bản đầy đủ từ content/seo) ══ */

/* An intro card */
.recipe-intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 16px 0;
  padding: 14px;
  background: linear-gradient(150deg, rgba(255,140,66,0.13), rgba(255,140,66,0.02));
  border: 1px solid rgba(255,140,66,0.34);
  border-radius: var(--radius-md);
}
.recipe-intro__avatar { width: 52px; flex-shrink: 0; }
.recipe-intro__avatar .an-face { width: 52px; height: 46px; }
.recipe-intro__text { font-size: 0.9rem; color: var(--text-primary); line-height: 1.55; }
.recipe-intro__lead { margin: 0; }
.recipe-intro__who { color: var(--accent); font-weight: 800; }
.recipe-intro__appet { margin: 6px 0 0; color: var(--text-secondary); font-size: 0.86rem; }

/* Ingredients — rich (tên + định lượng + ghi chú) */
.recipe-ingredients--rich li { align-items: flex-start; }
.recipe-ingredients--rich li::before { display: none; }
.recipe-ing__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.recipe-ing__nm { color: var(--text-primary); font-weight: 600; }
.recipe-ing__note { font-size: 0.72rem; color: var(--text-muted); line-height: 1.3; }
/* qty: bám phải cho định lượng ngắn ("400g"); danh sách dài (nhóm "Gia vị") tự xuống
   dòng trong cột phải thay vì tràn ngang — bỏ nowrap, giới hạn bề rộng. */
.recipe-ing__qty {
  flex: 0 1 auto; max-width: 52%; padding-left: 12px; text-align: right;
  color: var(--text-secondary); font-size: 0.82rem; line-height: 1.35;
}

/* Steps — rich (tiêu đề bước + mô tả) */
.recipe-steps--rich li { align-items: flex-start; }
.recipe-step__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.recipe-step__title { color: var(--text-primary); font-weight: 700; font-size: 0.88rem; }
.recipe-step__detail { margin: 0; color: var(--text-secondary); font-size: 0.84rem; line-height: 1.55; }

/* Bí quyết của An */
.recipe-tips__list {
  list-style: none; margin: 0; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(74,222,128,0.07);
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: var(--radius-md);
}
.recipe-tips__list li { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.recipe-tip__label { color: var(--text-primary); font-weight: 700; }

/* FAQ — accordion */
.recipe-faq__list { display: flex; flex-direction: column; gap: 9px; }
.recipe-faq__item {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 12px 14px;
}
.recipe-faq__q {
  display: flex; gap: 8px; align-items: flex-start;
  font-weight: 700; font-size: 0.86rem; color: var(--text-primary);
  cursor: pointer; list-style: none;
}
.recipe-faq__q::-webkit-details-marker { display: none; }
.recipe-faq__q::after {
  content: '⌄'; margin-left: auto; padding-left: 8px;
  color: var(--text-muted); transition: transform var(--transition-fast);
}
.recipe-faq__item[open] .recipe-faq__q::after { transform: rotate(180deg); }
.recipe-faq__item[open] .recipe-faq__q { margin-bottom: 7px; }
.recipe-faq__qm { color: var(--accent); flex-shrink: 0; }
.recipe-faq__a { margin: 0; font-size: 0.83rem; color: var(--text-secondary); line-height: 1.55; }
.recipe-faq__an { color: var(--accent); font-weight: 700; }

/* Link bài đầy đủ */
.recipe-footer__article {
  display: block; text-align: center; text-decoration: none;
  padding: 12px; margin-bottom: 10px; border-radius: var(--radius-lg);
  border: 1px solid rgba(255,140,66,0.34); color: var(--accent);
  background: rgba(255,140,66,0.08); font-size: 0.9rem; font-weight: 700;
  transition: background var(--transition-fast);
}
.recipe-footer__article:hover { background: rgba(255,140,66,0.14); }

.mam-com__dish[data-dish-idx] {
  cursor: pointer;
}
.mam-com__dish[data-dish-idx]:hover .mam-com__dish-arrow {
  color: var(--accent);
  transform: translateX(3px);
}
.mam-com__dish-arrow {
  transition: transform var(--transition-fast), color var(--transition-fast);
}
.mam-com__dish--clickable {
  cursor: pointer !important;
}
.mam-com__dish--clickable:hover .mam-com__dish-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* =============================================
   TỦ LẠNH THÔNG MINH — Fridge Feature
   ============================================= */

/* Mode card variant */
.mode-card--fridge {
  background: linear-gradient(135deg, rgba(6,182,212,0.15) 0%, rgba(14,165,233,0.1) 100%);
  border-color: rgba(6,182,212,0.25);
}
.mode-card--fridge:hover,
.mode-card--fridge:focus-visible {
  background: linear-gradient(135deg, rgba(6,182,212,0.25) 0%, rgba(14,165,233,0.18) 100%);
  border-color: rgba(6,182,212,0.5);
  box-shadow: 0 0 20px rgba(6,182,212,0.2);
}

/* Screen layout */
.screen--fridge {
  display: none;
  flex-direction: column;
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
  background: var(--bg-primary);
}
.screen--fridge.is-active { display: flex; }

.screen--settings {
  display: none;
  flex-direction: column;
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
  background: var(--bg-primary);
}
.screen--settings.is-active { display: flex; }

.settings-section {
  margin: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.settings-section:first-of-type { margin-top: 16px; }
.settings-section__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px 8px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.15s ease;
}
.settings-row:last-child { border-bottom: none; }
.settings-row--link { cursor: pointer; }
.settings-row--link:hover { background: var(--glass-bg-hover); }
.settings-row--link:active { background: var(--glass-bg); transform: scale(0.99); }
.settings-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.settings-row__title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.settings-row__hint { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* Icon tile dẫn đầu mỗi hàng — nền tint màu riêng qua biến --tint */
.settings-row__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--tint, var(--glass-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  flex: none;
}
/* Nhóm icon + title bên trái cho hàng không có __text (control nằm phải) */
.settings-row__lead {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
/* Account row: chống vỡ dòng trên màn hẹp */
.settings-row--account .settings-row__title,
.settings-row--account .settings-row__hint {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-row__chevron {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  flex: none;
  transition: transform 0.15s ease, color 0.15s ease;
}
.settings-row--link:hover .settings-row__chevron { color: var(--accent); transform: translateX(2px); }
.settings-number-input {
  width: 60px;
  text-align: center;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.15s ease;
}
.settings-number-input:focus { outline: none; border-color: var(--accent); }

/* Household steppers — người lớn / trẻ em (thay input số cũ) */
.settings-row--household { align-items: flex-start; }
.household-steppers { display: flex; gap: 10px; flex-shrink: 0; }
.household-stepper { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.household-stepper__ctrl {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--bg-tertiary); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 3px;
}
.household-stepper__btn {
  width: 28px; height: 28px; border: none; border-radius: 7px;
  background: rgba(255,255,255,0.05); color: var(--text-primary);
  font-size: 17px; line-height: 1; cursor: pointer; font-family: inherit;
  transition: background 0.15s ease;
}
.household-stepper__btn:hover { background: var(--accent-glow); }
.household-stepper__btn:active { transform: scale(0.92); }
.household-stepper__val {
  min-width: 26px; text-align: center; font-size: 15px; font-weight: 700;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.household-stepper__lbl { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* Avatar — account row */
.settings-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #2a1508;
  box-shadow: 0 0 0 2px var(--glass-border);
}
.settings-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.settings-avatar--guest { background: var(--bg-tertiary); color: var(--text-muted); font-size: 18px; }
.settings-row--account { gap: 12px; }

/* Stacked row — dùng cho các row có control rộng (giờ nhắc + toggle) tránh cramped trên màn hẹp */
.settings-row--stacked { flex-direction: column; align-items: stretch; gap: 10px; }
.settings-row--stacked .settings-row__control-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Footer — 2 dòng thì thầm: định danh gộp 1 dòng + link pháp lý.
   Liên hệ đã thành hàng cài đặt riêng trong card KHÁC, nên footer chỉ giữ giấy tờ. */
.settings-version-footer {
  text-align: center;
  padding: 18px 16px 26px;
}
.settings-version-footer .app-footer__meta {
  font-size: 11.5px;
  color: var(--text-muted);
}
.settings-version-footer .app-footer__legal {
  display: flex;
  justify-content: center;
  gap: 0 20px;
  margin-top: 7px;
  font-size: 12px;
}
.settings-version-footer .app-footer__legal a {
  position: relative;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}
/* Dấu chấm ngăn cách giữa 2 link pháp lý, đặt giữa khe gap */
.settings-version-footer .app-footer__legal a + a::before {
  content: "·";
  position: absolute;
  left: -11px;
  color: var(--text-muted);
}
.settings-version-footer .app-footer__legal a:hover { color: var(--accent); }

/* Ghost button tông đỏ nhạt — chỉ dùng cho hành động phá hủy dữ liệu (vd xóa gu ẩm thực) */
.btn--danger-ghost {
  background: none;
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--error);
}
.btn--danger-ghost:hover { background: rgba(248,113,113,0.1); }

/* Actions của khối giờ nhắc: CSS gốc thiết kế cho popover (chỉ có margin-top),
   trong card cần padding ngang + nút giãn đều để không dính mép */
.settings-section .notif-panel__actions {
  margin: 0;
  padding: 12px 16px 16px;
}
.settings-section .notif-panel__actions .btn { flex: 1; }

/* Reminder sheet (#reminder-sheet là .nickname-sheet, KHÔNG dính rule .settings-section
   ở trên) → hàng nút mặc định canh trái. Canh phải để "Lưu cài đặt" nằm ở mép phải
   theo quy ước dialog; khi "Tắt tất cả" hiện (đã subscribe) nó nằm sát bên trái nút Lưu. */
#reminder-sheet .notif-panel__actions {
  justify-content: flex-end;
}

/* Dòng trạng thái push thật (đang bật / chưa bật / bị chặn) trong card Bữa ăn */
.notif-status {
  margin: 4px 16px 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.45;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary, #a0a0b0);
}
.notif-status--on {
  background: rgba(74,222,128,0.08);
  border-color: rgba(74,222,128,0.25);
  color: #4ade80;
}
.notif-status--warn {
  background: rgba(251,191,36,0.08);
  border-color: rgba(251,191,36,0.25);
  color: #fbbf24;
}

/* Banner hướng dẫn iOS thêm vào màn hình chính — nổi trên bottom nav (60px + safe area),
   z-index 210: trên nav (200) nhưng dưới mọi sheet/overlay (310+) */
/* display:flex bên dưới sẽ đè [hidden] của UA stylesheet — phải khai báo lại tường minh */
.a2hs-banner[hidden] { display: none; }
.a2hs-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  z-index: 210;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 14px;
  background: rgba(20,20,32,0.96);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255,140,66,0.35);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: a2hsSlideUp 0.4s ease both;
}
@keyframes a2hsSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.a2hs-banner__icon { font-size: 1.5rem; line-height: 1.2; }
.a2hs-banner__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary);
}
.a2hs-banner__text > b { font-size: 0.85rem; color: var(--text-primary, #f0f0f5); }
.a2hs-banner__share {
  display: inline-block;
  vertical-align: -2px;
  color: #ff8c42;
}
.a2hs-banner__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
}

/* Vào màn: các card trượt nhẹ lên, so le — cùng ngôn ngữ fadeInUp của taste screen */
@keyframes settingsSectionIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.screen--settings.is-active .settings-section { animation: settingsSectionIn 0.28s ease both; }
.screen--settings.is-active .settings-section:nth-of-type(2) { animation-delay: 0.05s; }
.screen--settings.is-active .settings-section:nth-of-type(3) { animation-delay: 0.10s; }
.screen--settings.is-active .settings-section:nth-of-type(4) { animation-delay: 0.15s; }
.screen--settings.is-active .settings-version-footer { animation: settingsSectionIn 0.28s ease both 0.2s; }
@media (prefers-reduced-motion: reduce) {
  .screen--settings.is-active .settings-section,
  .screen--settings.is-active .settings-version-footer { animation: none; }
}

.taste-sheet__list { max-height: 50vh; overflow-y: auto; }
.exclusion-sheet__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  padding: 4px 16px 12px;
}
.exclusion-sheet__dislikes { max-height: 30vh; overflow-y: auto; }
.region-sheet__list { max-height: 55vh; overflow-y: auto; }

/* Sheet này mở CHỒNG lên #combo-list-overlay (z-index: 9999) chứ không phải từ màn Settings
   như các .nickname-sheet khác — cần z-index riêng cao hơn để không bị overlay che khuất. */
#household-edit-sheet { z-index: 10000; }

/* Dialog xác nhận chung (thay window.confirm() gốc — không style được, luôn xấu/lệch theme).
   z-index cao hơn cả #household-edit-sheet vì có thể mở chồng lên sheet đó (nút "Xóa khỏi danh sách"). */
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-dialog.is-open { display: flex; }
.confirm-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.confirm-dialog__panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px 24px 20px;
  text-align: center;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.confirm-dialog.is-open .confirm-dialog__panel {
  transform: scale(1);
  opacity: 1;
}
.confirm-dialog__icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.confirm-dialog__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.confirm-dialog__message {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 20px;
  line-height: 1.5;
}
.confirm-dialog__actions {
  display: flex;
  gap: 10px;
}
.confirm-dialog__actions .btn { flex: 1; }
@media (prefers-reduced-motion: reduce) {
  .confirm-dialog__panel { transition: none; }
}

/* Nút xóa mang tính "hành động chính" trong dialog xác nhận — nền đỏ đặc, khác
   .btn--danger-ghost (chỉ dùng cho nút phụ nằm cạnh hành động khác quan trọng hơn). */
.btn--danger {
  background: var(--error);
  border: 1px solid var(--error);
  color: #1a1a2e;
  font-weight: 700;
}
.btn--danger:hover { background: #f65f5f; }

.household-edit-sheet__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.household-edit-sheet__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.household-edit-sheet__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}
.household-edit-sheet__input {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
}
.household-edit-sheet__input:focus {
  outline: none;
  border-color: var(--accent);
}
/* Dòng gợi ý dưới ô tên — nhắc rằng tên tự đặt theo món chính nhưng sửa được */
.household-edit-sheet__namehint {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.household-edit-sheet__namehint[data-state="manual"] { color: var(--accent-light); }
/* Hint vai trò chip ảnh món chính — hiện/ẩn cùng chip (JS _refreshHouseholdPhotoBlock) */
.household-edit-sheet__photohint {
  display: block;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.household-edit-sheet__photohint[hidden] { display: none; }
/* Cảnh báo mâm trùng cả 3 món — KHÔNG chặn lưu, chỉ nhắc */
.household-edit-sheet__dup-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--warning);
  font-size: 0.78rem;
  line-height: 1.4;
}
.household-edit-sheet__dup-warn[hidden] { display: none; }

/* Dropdown chọn món tự dựng — thay cho <select> gốc vì danh sách option bung ra
   của <select> dùng nền trắng mặc định OS/trình duyệt, không theo được theme tối
   (không style được ngoài color/background của <option>). */
.household-combo-dropdown { position: relative; }
.household-combo-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.household-combo-trigger:hover { border-color: rgba(255,255,255,0.25); }
.household-combo-trigger[aria-expanded="true"] { border-color: var(--accent); }
.household-combo-trigger__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.household-combo-trigger__chevron {
  flex-shrink: 0;
  margin-left: 8px;
  color: rgba(255,255,255,0.5);
  transition: transform 0.18s ease;
}
.household-combo-trigger[aria-expanded="true"] .household-combo-trigger__chevron {
  transform: rotate(180deg);
}
.household-combo-panel {
  margin-top: 6px;
  background: #12121f;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
}
.household-combo-panel__search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.05);
  border: none;
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 12px;
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}
.household-combo-panel__search::placeholder { color: rgba(255,255,255,0.35); }
.household-combo-panel__list {
  max-height: 220px;
  overflow-y: auto;
}
.household-combo-panel__list::-webkit-scrollbar { width: 6px; }
.household-combo-panel__list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}
.household-combo-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 10px 12px;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.household-combo-option:hover { background: rgba(255,255,255,0.06); }
.household-combo-option.is-selected {
  background: rgba(255,140,66,0.14);
  color: #fff;
  font-weight: 600;
}
.household-combo-option__check { color: var(--accent); margin-left: 8px; }
.household-combo-panel__empty {
  padding: 16px 12px;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.82rem;
}

/* ── "Món của bạn" trong dropdown món (v3.7.0) ─────────────────
   Dòng "➕ Thêm món" luôn CUỐI danh sách, tách nét đứt để không lẫn với option
   catalog; badge nhận diện món tự thêm dùng chung cho option + trigger. */
.household-combo-option--add {
  border-top: 1px dashed rgba(255, 140, 66, 0.4);
  color: var(--accent);
  font-weight: 600;
}
.household-combo-option--add:hover { background: rgba(255, 140, 66, 0.1); }
.household-combo-option--add b { color: #fff; font-weight: 700; }
.household-combo-panel__miss {
  padding: 10px 12px 4px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.78rem;
}
.household-combo-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: rgba(255, 140, 66, 0.14);
  border: 1px solid rgba(255, 140, 66, 0.35);
  border-radius: var(--radius-full);
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: 1px;
  white-space: nowrap;
}
.household-edit-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}

/* Scope B — slot tùy chọn bỏ được (Rau/Canh/Món phụ): nút "✕ bỏ" cạnh nhãn +
   nhóm nút "＋ Thêm" gom cuối phần món. Dùng lại dashed-accent như .household-combo-option--add. */
/* .household-edit-sheet__field có display:flex → phải override [hidden] tường minh
   (author beats UA [hidden]{display:none} ở cùng độ đặc hiệu), giống .household-photo[hidden]. */
.household-edit-sheet__field[hidden] { display: none; }
.household-edit-sheet__label--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.household-edit-sheet__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.15s;
}
.household-edit-sheet__remove:hover { color: var(--error); }
.household-edit-sheet__addgroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.household-edit-sheet__addcap {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.household-edit-sheet__addcap[hidden] { display: none; }
.household-edit-sheet__add {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px dashed rgba(255, 140, 66, 0.4);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.household-edit-sheet__add[hidden] { display: none; }
.household-edit-sheet__add:hover { background: rgba(255, 140, 66, 0.1); }
.household-edit-sheet__add-opt { color: var(--text-muted); font-weight: 500; }

/* ── Ảnh mâm & món trong sheet Sửa mâm (v3.9.0, spec-dish-photos) ─────────
   Preview theo chuỗi 4 tầng: ảnh user mâm → ảnh user món mặn → stock → hash.
   Layout đã duyệt qua mockup: pill nguồn đè góc trái dưới ảnh, hàng nút nằm
   DƯỚI ảnh bên phải (không đè lên ảnh — màn 375px chật). */
.household-photo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.household-photo[hidden] { display: none; }
.household-photo__hero {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  aspect-ratio: 16 / 9;
  background: #12121f;
}
.household-photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.household-photo__hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 18, 0.72) 100%);
  pointer-events: none;
}
.household-photo__pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 10, 18, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
  padding: 4px 11px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Tầng 1 — ảnh user của chính mâm này: pill viền cam để user biết "ảnh của mình" */
.household-photo__pill--mine {
  border-color: rgba(255, 140, 66, 0.55);
  color: var(--accent-light);
}
.household-photo__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.household-photo-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.household-photo-btn:hover { border-color: rgba(255, 255, 255, 0.25); }
.household-photo-btn--add {
  border-color: rgba(255, 140, 66, 0.5);
  color: var(--accent-light);
}
.household-photo-btn--add:hover { background: rgba(255, 140, 66, 0.1); }
.household-photo-btn--del {
  color: var(--error);
  border-color: rgba(248, 113, 113, 0.3);
}
.household-photo-btn--del:hover { background: rgba(248, 113, 113, 0.1); }

/* Hàng dropdown món + chip ảnh — chip đứng cạnh phải, panel dropdown bung
   trong wrapper flex:1 nên chip không bị kéo giãn (align flex-start) */
.household-edit-sheet__dishrow {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.household-edit-sheet__dishrow .household-combo-dropdown {
  flex: 1;
  min-width: 0;
}
.household-photo-chip {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  background: var(--glass-bg);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s;
}
.household-photo-chip:hover { border-color: rgba(255, 140, 66, 0.6); }
.household-photo-chip.has-photo { border: 1.5px solid rgba(255, 140, 66, 0.65); }
.household-photo-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.household-photo-chip[hidden] { display: none; }

/* Sheet đổi/xóa ảnh MÓN — mở chồng lên #household-edit-sheet (10000);
   confirm-dialog (10001) không bao giờ mở cùng lúc với sheet này */
#dish-photo-sheet { z-index: 10002; }

.fridge-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* Header */
.fridge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.fridge-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.fridge-back-btn:hover { color: var(--text-primary); background: var(--glass-bg); }
.fridge-header__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}
.fridge-header__emoji { font-size: 20px; }
.fridge-clear-btn {
  background: none;
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--error);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}
.fridge-clear-btn:hover { background: rgba(248,113,113,0.1); }

/* Selected ingredients bar */
.fridge-selected {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  min-height: 52px;
}
.fridge-selected__label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 4px;
  flex-shrink: 0;
}
.fridge-selected__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.fridge-selected__empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}
.fridge-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(6,182,212,0.15);
  border: 1px solid rgba(6,182,212,0.3);
  color: rgb(103,232,249);
  font-size: 12px;
  padding: 3px 8px 3px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.15s;
  animation: tagAppear 0.2s ease both;
}
.fridge-selected-tag:hover { background: rgba(6,182,212,0.25); }
.fridge-selected-tag__remove {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 2px;
}
@keyframes tagAppear {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

/* Search */
.fridge-search-wrap {
  padding: 12px 16px 8px;
}
.fridge-search {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  padding: 10px 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.fridge-search::placeholder { color: var(--text-muted); }
.fridge-search:focus { border-color: rgba(6,182,212,0.5); }

/* Category sections */
.fridge-categories { padding: 0 16px 8px; }
.fridge-category {
  margin-bottom: 16px;
}
.fridge-category__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  padding: 6px 0 4px;
  border-bottom: 1px solid var(--glass-border);
}
.fridge-ingredient-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fridge-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.fridge-tag:active { transform: scale(0.94); }
.fridge-tag.is-selected {
  background: rgba(6,182,212,0.12);
  border-color: rgba(6,182,212,0.5);
  box-shadow: 0 0 12px rgba(6,182,212,0.15);
}
.fridge-tag.is-hidden { display: none; }
.fridge-tag__emoji { font-size: 24px; line-height: 1; }
.fridge-tag__label {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.2;
  font-weight: 500;
}
.fridge-tag.is-selected .fridge-tag__label { color: rgb(103,232,249); font-weight: 600; }
.fridge-tag__check {
  font-size: 10px;
  height: 14px;
  color: transparent;
  transition: color 0.15s;
}
.fridge-tag.is-selected .fridge-tag__check { color: rgb(103,232,249); }

/* CTA Button */
.fridge-cta-wrap {
  padding: 16px 16px 8px;
  position: sticky;
  bottom: env(safe-area-inset-bottom, 8px);
}
.fridge-find-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  border: none;
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(6,182,212,0.35);
}
.fridge-find-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(6,182,212,0.45);
}
.fridge-find-btn:not(:disabled):active { transform: scale(0.97); }
.fridge-find-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.fridge-find-btn__icon { font-size: 20px; }

/* Results */
.fridge-results { padding: 0 16px; }
.fridge-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  /* Tránh bị header ngoài (position:sticky, z-index:100) đè lên khi
     _forceScrollTop() gọi scrollIntoView({block:'start'}) sau khi tìm món */
  scroll-margin-top: 76px;
}
.fridge-results__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.fridge-results__change {
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}
.fridge-results__change:hover { background: var(--glass-bg); }

/* Result cards */
/* ── Fridge result card — redesigned with image thumbnail ────────────────── */
.fridge-result-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: cardIn 0.3s ease both;
  overflow: hidden;
}
.fridge-result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6,182,212,0.3);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
@keyframes cardIn {
  from { opacity:0; transform: translateY(12px); }
  to   { opacity:1; transform: translateY(0); }
}
.fridge-result-card--now {
  border-color: rgba(74,222,128,0.4);
  box-shadow: 0 0 0 1px rgba(74,222,128,0.15);
}
.fridge-result-card--almost {
  border-color: rgba(251,191,36,0.35);
}
/* ── Card inner layout ──────────────────────────────────────────────────── */
.fridge-card-top {
  display: flex;
  align-items: stretch;
  gap: 0;
}
/* ── Left: photo thumbnail ──────────────────────────────────────────────── */
.fridge-card__thumb {
  width: 80px;
  min-height: 80px;
  flex-shrink: 0;
  position: relative;
  background: rgba(255,255,255,0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fridge-card__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.fridge-result-card:hover .fridge-card__thumb-img {
  transform: scale(1.06);
}
.fridge-card__thumb-emoji {
  font-size: 36px;
  line-height: 1;
}
/* ── Right: info ──────────────────────────────────────────────────────── */
.fridge-card__info {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fridge-card__top-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.fridge-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  line-height: 1.3;
}
.fridge-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  white-space: nowrap;
}
.fridge-card__badge--now {
  background: rgba(74,222,128,0.15);
  color: var(--success);
  border: 1px solid rgba(74,222,128,0.3);
}
.fridge-card__badge--almost {
  background: rgba(251,191,36,0.12);
  color: var(--warning);
  border: 1px solid rgba(251,191,36,0.25);
}
.fridge-card__badge--match {
  background: rgba(96,165,250,0.12);
  color: var(--info);
  border: 1px solid rgba(96,165,250,0.25);
}
.fridge-card__meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  align-items: center;
}
/* ── Score bar ──────────────────────────────────────────────────────────── */
.fridge-card__score-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fridge-card__score-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.fridge-card__score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.fridge-card__score-fill--now    { background: #4ade80; }
.fridge-card__score-fill--almost { background: #fbbf24; }
.fridge-card__score-fill--match  { background: #60a5fa; }
.fridge-card__score-pct {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 28px;
  text-align: right;
}
.fridge-card__missing {
  font-size: 11px;
  color: var(--text-muted);
}
.fridge-card__missing strong { color: var(--warning); }
.fridge-card__arrow {
  display: none; /* replaced by score bar visual */
}
/* No results */

   FRIDGE RESULTS — TAB TOGGLE + MÂM CƠM CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tab toggle ─────────────────────────────────────────────────────────── */
.fridge-tab-toggle {
  display: flex;
  gap: 8px;
  margin: 0 0 16px 0;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}
.fridge-tab-toggle__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.fridge-tab-toggle__btn--active {
  background: rgba(6,182,212,0.15);
  color: rgb(103,232,249);
  box-shadow: 0 0 0 1px rgba(6,182,212,0.3);
}
.fridge-tab-toggle__btn:not(.fridge-tab-toggle__btn--active):hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}
.fridge-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 700;
}
.fridge-tab-toggle__btn--active .fridge-tab-badge {
  background: rgba(6,182,212,0.25);
}

/* ── Mâm cơm card — redesigned với hero image + thumbnail rows ──────────── */
.fridge-mam-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  animation: slideUp 0.3s ease both;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fridge-mam-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

/* ── Hero image header ─────────────────────────────────────────────────── */
.fridge-mam-card__hero {
  position: relative;
  height: 110px;
  overflow: hidden;
  background: rgba(6,182,212,0.08);
}
.fridge-mam-card__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.fridge-mam-card:hover .fridge-mam-card__hero-img {
  transform: scale(1.04);
}
.fridge-mam-card__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,18,0.85) 0%, rgba(10,10,18,0.2) 60%, transparent 100%);
}
.fridge-mam-card__hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.fridge-mam-card__label {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.fridge-mam-card__meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fridge-mam-card__count {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 600;
}
.fridge-mam-card__score-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(74,222,128,0.25);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.3);
}

/* ── Thumbnail strip (mini images of dishes) ──────────────────────────── */
.fridge-mam-card__thumbs {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}
.fridge-mam-card__thumb-mini {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.fridge-mam-card__thumb-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Divider ────────────────────────────────────────────────────────────── */
.fridge-mam-card__body {
  padding: 4px 0;
}

/* ── Row trong mâm — với thumbnail nhỏ ─────────────────────────────────── */
.fridge-mam-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.fridge-mam-row:last-child { border-bottom: none; }
.fridge-mam-row:hover { background: rgba(255,255,255,0.05); }
.fridge-mam-row:active { background: rgba(255,255,255,0.09); }

/* Role chip */
.fridge-mam-row__role {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
  min-width: 46px;
  text-align: center;
}
.fridge-mam-row__role--soup {
  background: rgba(56,189,248,0.15);
  color: #38bdf8;
  border: 1px solid rgba(56,189,248,0.25);
}
.fridge-mam-row__role--main {
  background: rgba(251,113,133,0.15);
  color: #fb7185;
  border: 1px solid rgba(251,113,133,0.25);
}
.fridge-mam-row__role--side {
  background: rgba(74,222,128,0.12);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.22);
}

/* Row thumbnail */
.fridge-mam-row__thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.fridge-mam-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fridge-mam-row__name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.fridge-mam-row__arrow {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}
.fridge-mam-row:hover .fridge-mam-row__arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.fridge-no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.fridge-no-results__icon { font-size: 48px; margin-bottom: 12px; }
.fridge-no-results__text { font-size: 15px; }

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORY ROW LAYOUT — 5 nhóm × lưới 3 cột dạng hộp
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Category row ────────────────────────────────────────────────────────── */
.fridge-cat-row {
  margin-bottom: 24px;
}

/* ── Header: thanh màu + border dưới ─────────────────────────────────────────────── */
.fridge-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}
.fridge-cat-header::before {
  content: '';
  width: 3px;
  height: 16px;
  background: linear-gradient(160deg, rgb(6,182,212), rgb(59,130,246));
  border-radius: 2px;
  flex-shrink: 0;
}
.fridge-cat-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(6,182,212,0.7), transparent);
  border-radius: 1px;
}
.fridge-cat-icon {
  font-size: 20px;
  line-height: 1;
}
.fridge-cat-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Grid 3 cột ──────────────────────────────────────────────────────────── */
.fridge-chips-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ── Chip: hộp vuông (emoji trên, label dưới) ────────────────────────────── */
.fridge-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 6px 10px;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 72px;
}
.fridge-chip:hover {
  background: var(--glass-bg);
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-1px);
}
.fridge-chip:active { transform: scale(0.94); }

.fridge-chip__emoji {
  font-size: 22px;
  line-height: 1;
}
.fridge-chip__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
}

/* ── Selected state ──────────────────────────────────────────────────────── */
.fridge-chip.is-selected {
  background: rgba(6,182,212,0.14);
  border-color: rgba(6,182,212,0.6);
  box-shadow: 0 0 10px rgba(6,182,212,0.12);
}
.fridge-chip.is-selected .fridge-chip__label {
  color: rgb(103,232,249);
  font-weight: 600;
}
.fridge-chip.is-selected .fridge-chip__emoji {
  filter: drop-shadow(0 0 4px rgba(6,182,212,0.5));
}

/* ── Tile "xem thêm" ─────────────────────────────────────────────────────── */
.fridge-chip--more {
  background: rgba(6,182,212,0.08);
  border: 1.5px solid rgba(6,182,212,0.42);
  min-height: 72px;
  animation: morePulse 2.8s ease-in-out infinite;
}
@keyframes morePulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(6,182,212,0.00); }
  50%       { box-shadow: 0 0 0 3px rgba(6,182,212,0.15); }
}
.fridge-chip--more:hover {
  background: rgba(6,182,212,0.16);
  border-color: rgba(6,182,212,0.7);
  transform: translateY(-1px);
  animation: none;
  box-shadow: 0 0 16px rgba(6,182,212,0.22);
}
.fridge-chip--more .fridge-chip__emoji {
  font-size: 20px;
  color: rgb(103,232,249);
}
.fridge-chip--more .fridge-chip__label {
  color: rgb(103,232,249);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Search filter ───────────────────────────────────────────────────────── */
/* -- Hidden extra items (thu gon) ------------------------------------------- */
.fridge-chip--hidden-extra {
  display: none !important;
}

/* -- Tile thu gon (trang thai collapse) ------------------------------------- */
.fridge-chip--collapse {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  animation: none;
}
.fridge-chip--collapse:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
  box-shadow: none;
}
.fridge-chip--collapse .fridge-chip__emoji {
  font-size: 18px;
  color: var(--text-muted);
}
.fridge-chip--collapse .fridge-chip__label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.fridge-chip.is-hidden { display: none !important; }

/* -- Dang tim kiem: go display:none cua item an sau "xem them" neu no khop,
      va an luon tile "xem them" cho gon --------------------------------------- */
.fridge-categories.is-searching .fridge-chip--hidden-extra:not(.is-hidden) {
  display: flex !important;
}
.fridge-categories.is-searching .fridge-chip--more { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   BOTTOM NAVIGATION BAR
   ═══════════════════════════════════════════════════════════════════════════ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  background: rgba(10,10,18,0.88);
  /* nền đã đục 88% nên blur nhẹ vẫn frosted; blur20+saturate cũ tốn GPU khi cuộn iOS */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hidden state (loading screen + swipe screen) */
.bottom-nav--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* ── Tab button ─────────────────────────────────────────────────────────── */
.bnav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px 4px;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bnav-tab:active {
  background: rgba(255,255,255,0.06);
}

/* Active indicator pill */
.bnav-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 32px;
  height: 3px;
  background: rgb(103,232,249);
  border-radius: 0 0 3px 3px;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.bnav-tab--active::before {
  transform: translateX(-50%) scaleX(1);
}

/* Active tab color: accent cam — thống nhất với màu accent toàn app (v3.0) */
.bnav-tab--active {
  color: var(--accent);
}

.bnav-tab__icon {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

.bnav-tab--active .bnav-tab__icon {
  transform: scale(1.15) translateY(-1px);
}

.bnav-tab__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.bnav-tab--active .bnav-tab__label {
  font-weight: 700; /* spec P2.3: active label bold */
}

/* ── Content padding: push scrollable screens above nav ─────────────────── */
/* Nav cao = 60px + safe-area (home indicator iOS). Padding phải kèm safe-area,
   nếu không trên iPhone phần cuối màn (vd cụm nút cook-results) chui sau nav.
   Dùng chung giá trị với .welcome (calc 72px + safe-area).
   :not(.monngon-screen) — v3.39.0: màn Món ngon tự chừa nav bằng `bottom: calc(72px…)`
   trên hộp neo absolute, dính thêm padding này là trừ ĐÔI 72px — panel hụt đúng 72px so
   với màn ở mọi hướng (đo thật: 700/772 dọc, 178/250 ngang). Rule này specificity rất cao
   (:not(#id) đếm cả ID) nên không override nổi từ .screen.monngon-screen — phải loại từ đây. */
.screen.is-active:not(#screen-loading):not(#screen-swipe):not(.monngon-screen) {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

/* Specific scroll containers */
.fridge-scroll,
.eatout-scroll,
.taste-screen,
.swipe-screen,
.results,
.welcome {
  box-sizing: border-box;
}

/* Override: loading + swipe screens have no bottom padding (nav hidden) */
#screen-loading,
#screen-swipe {
  padding-bottom: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SWIPE BACK INDICATOR — iOS PWA left-edge gesture visual feedback
   ═══════════════════════════════════════════════════════════════════════════ */

.swipe-back-indicator {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 44px;
  background: linear-gradient(180deg, transparent, rgb(103,232,249), transparent);
  border-radius: 0 4px 4px 0;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(103,232,249,0.6);
  transition: opacity 0.15s ease, height 0.12s ease;
}

.swipe-back-indicator--visible {
  opacity: 0.55;
}

/* ═══════════════════════════════════════════════════════════════════════════
   WEATHER CARD — Trang chủ
   ═══════════════════════════════════════════════════════════════════════════ */

.weather-card {
  margin: 0 0 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 90px;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.weather-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

/* ── Shimmer loading state ───────────────────────────────────────────────── */
.weather-card--loading .weather-card__shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.10) 40%,
    rgba(255,255,255,0.04) 80%
  );
  background-size: 200% 100%;
  animation: weatherShimmer 1.6s infinite;
}
.weather-card--loading .weather-card__content { display: none; }
.weather-card:not(.weather-card--loading) .weather-card__shimmer { display: none; }

@keyframes weatherShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Mood gradients ──────────────────────────────────────────────────────── */
.weather-card--hot {
  background: linear-gradient(135deg,
    rgba(251,146,60,0.45) 0%,
    rgba(239,68,68,0.30) 60%,
    rgba(10,10,18,0.80) 100%);
  border-color: rgba(251,146,60,0.25);
}
.weather-card--rainy {
  background: linear-gradient(135deg,
    rgba(96,165,250,0.45) 0%,
    rgba(139,92,246,0.30) 60%,
    rgba(10,10,18,0.80) 100%);
  border-color: rgba(96,165,250,0.25);
}
.weather-card--cool {
  background: linear-gradient(135deg,
    rgba(103,232,249,0.42) 0%,
    rgba(96,165,250,0.28) 60%,
    rgba(10,10,18,0.80) 100%);
  border-color: rgba(103,232,249,0.22);
}
.weather-card--pleasant {
  background: linear-gradient(135deg,
    rgba(74,222,128,0.40) 0%,
    rgba(103,232,249,0.26) 60%,
    rgba(10,10,18,0.80) 100%);
  border-color: rgba(74,222,128,0.20);
}
/* Hidden state (no location / fetch failed) */
.weather-card--hidden { display: none !important; }

/* ── Content layout ──────────────────────────────────────────────────────── */
.weather-card__content {
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.weather-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.weather-card__icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.weather-card__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.weather-card__temp {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}
.weather-card__sep {
  color: var(--text-muted);
  font-size: 14px;
}
.weather-card__city {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.weather-card__label {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}
.weather-card__advice {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ── Suggestion chips ────────────────────────────────────────────────────── */
.weather-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.weather-dish-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 4px 10px 4px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.weather-dish-chip:hover {
  background: rgba(255,255,255,0.14);
  transform: scale(1.04);
}
.weather-dish-chip:active {
  transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════════════════
   WEATHER BOOST BADGE — on fridge result cards
   ═══════════════════════════════════════════════════════════════════════════ */

.weather-boost-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(251,146,60,0.15);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,0.25);
  white-space: nowrap;
  flex-shrink: 0;
}
.weather-boost-badge--rainy {
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
  border-color: rgba(96,165,250,0.25);
}
.weather-boost-badge--cool {
  background: rgba(103,232,249,0.15);
  color: rgb(103,232,249);
  border-color: rgba(103,232,249,0.25);
}
.weather-boost-badge--hot {
  background: rgba(251,146,60,0.15);
  color: #fb923c;
  border-color: rgba(251,146,60,0.25);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EATOUT WEATHER CHIP
   ═══════════════════════════════════════════════════════════════════════════ */

.weather-eatout-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(103,232,249,0.1);
  border: 1px solid rgba(103,232,249,0.2);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(103,232,249);
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.weather-eatout-chip:hover { background: rgba(103,232,249,0.18); }
.weather-eatout-chip.is-active {
  background: rgba(103,232,249,0.22);
  border-color: rgba(103,232,249,0.4);
  box-shadow: 0 0 8px rgba(103,232,249,0.2);
}

/* === Desktop App Shell (min-width: 481px) — v3.0 2B.2 ===
   Hạ từ 768px: viewport 481–767px content 480px mà nav trải full màn đã sửa.
   Overlays/sheets vẫn dùng position:fixed — căn theo viewport (đúng),
   chỉ cần đảm bảo max-width của overlay khớp với shell width.
   test: 500/768/1280px — nav luôn khớp mép shell ─────────────────── */
@media (min-width: 481px) {
  html, body {
    background: linear-gradient(145deg, #0a0a0d 0%, #111116 50%, #0a0a0d 100%);
    display: flex;
    min-height: 100vh;
    align-items: flex-start;
    justify-content: center;
  }

  body {
    padding: 28px 0 40px;
    width: 100%;
  }

  .app-container {
    max-width: 480px;
    width: 100%;
    min-height: calc(100dvh - 68px);
    border-radius: 24px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.07),
      0 4px 12px rgba(0, 0, 0, 0.3),
      0 24px 72px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
  }

  /* Bottom nav: constrain to shell width using calc — vẫn fixed nhưng không trải full màn */
  .bottom-nav {
    left: max(calc(50% - 240px), 0px);
    right: max(calc(50% - 240px), 0px);
    border-radius: 0 0 24px 24px;
    overflow: hidden;
  }

  /* Sheets + overlays: giữ nguyên position:fixed theo viewport (behavior chuẩn).
     Không override — việc sheet mở full viewport trên desktop là chấp nhận được. */
}

/* ─── Welcome footer: liên kết sang trang SEO tĩnh (v3.1.0) ─────────────── */
.welcome-footer {
  margin-top: 28px;
  padding: 16px 4px 8px;
  border-top: 1px solid var(--glass-border);
}
.welcome-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: center;
}
.welcome-footer__links a {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
}
.welcome-footer__links a:hover,
.welcome-footer__links a:active { color: var(--accent); }
.welcome-footer__brand {
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 8px;
  opacity: 0.7;
}

/* ============================================
   Ăn ngoài 2.0 — P0 «món trước, quán sau» (v3.8.0)
   ============================================ */
.eatout2-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 16px calc(84px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.eatout2-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.eatout2-chip {
  font-size: .72rem;
  color: var(--accent-light);
  background: var(--glass-bg);
  border: 1px solid rgba(255, 140, 66, .35);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  white-space: nowrap;
}
.eatout2-an { display: flex; gap: 10px; align-items: flex-start; }
.eatout2-an__avatar {
  width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #2a1a10 0%, var(--bg-tertiary) 70%);
  border: 1.5px solid rgba(255, 140, 66, .55);
  box-shadow: 0 0 16px var(--accent-glow);
  display: grid; place-items: center;
  overflow: hidden;
}
.eatout2-an__avatar svg { width: 34px; height: 34px; }
.eatout2-an__bubble {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
  padding: 9px 12px;
  font-size: .85rem;
  margin: 0;
}
.eatout2-list { display: flex; flex-direction: column; gap: 10px; }
.eatout2-dish {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.eatout2-dish--top {
  border-color: rgba(255, 140, 66, .4);
  box-shadow: 0 0 20px rgba(255, 140, 66, .1);
}
.eatout2-dish__main { display: flex; gap: 12px; align-items: center; }
.eatout2-dish__emoji {
  width: 52px; height: 52px; flex: 0 0 auto;
  font-size: 30px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  display: grid; place-items: center;
}
.eatout2-dish__info { flex: 1 1 auto; min-width: 0; }
.eatout2-dish__name { font-weight: 600; font-size: .95rem; }
.eatout2-dish__why { font-size: .74rem; color: var(--text-secondary); margin-top: 1px; }
.eatout2-dish__price { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.eatout2-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
}
.eatout2-cta--primary {
  margin-top: 10px;
  width: 100%; height: 42px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #1a0f05;
  font-weight: 700; font-size: .85rem;
}
.eatout2-cta--primary:active { transform: scale(.98); }
.eatout2-cta__ext { font-size: .7rem; font-weight: 500; opacity: .7; }
.eatout2-cta--mini {
  flex: 0 0 auto; align-self: center;
  height: 32px; padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 140, 66, .4);
  color: var(--accent-light);
  font-size: .74rem; font-weight: 600;
  white-space: nowrap;
  display: inline-flex; align-items: center;
}
.eatout2-reroll {
  width: 100%; height: 44px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: .85rem; font-weight: 600;
  transition: background var(--transition-fast);
}
.eatout2-reroll:hover { background: var(--glass-bg-hover); }
.eatout2-note {
  text-align: center;
  font-size: .7rem;
  color: var(--text-muted);
  margin: 0;
  padding: 0 12px;
}

/* ── Chip «Bữa» & «Số người» bấm được (v3.12) ── */
.eatout2-chip--tap {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: inherit; cursor: pointer;
  border-color: var(--accent); border-width: 1.5px;
  background: rgba(255, 140, 66, .1);
  color: var(--accent-light); font-weight: 700;
}
.eatout2-chip--tap.is-open { background: rgba(255, 140, 66, .22); }
.eatout2-chip__caret { font-size: .6rem; opacity: .8; transition: transform var(--transition-fast); }
.eatout2-chip--tap.is-open .eatout2-chip__caret { transform: rotate(180deg); }
.eatout2-chip--tap:focus-visible,
.eatout2-pick:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }

/* ── Picker inline (mở ngay dưới hàng chip) ── */
.eatout2-pickers:empty { display: none; }
.eatout2-picker {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px;
}
.eatout2-picker__row { display: flex; gap: 6px; flex-wrap: wrap; }
.eatout2-pick {
  font-family: inherit; font-size: .78rem; font-weight: 600;
  color: var(--text-secondary);
  background: var(--glass-bg-hover);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 6px 13px; cursor: pointer;
  transition: background var(--transition-fast);
}
.eatout2-pick.is-active {
  color: #1a0f05; border-color: transparent;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}
.eatout2-picker__note { font-size: .68rem; color: var(--text-muted); margin: 8px 2px 0; }

/* ── Dải ngữ cảnh (xem trước / số người) ── */
.eatout2-strips { display: flex; flex-direction: column; gap: 6px; }
.eatout2-strips:empty { display: none; }
.eatout2-strip {
  font-size: .7rem; color: var(--text-secondary);
  background: rgba(255, 140, 66, .08);
  border: 1px dashed rgba(255, 140, 66, .4);
  border-radius: 10px; padding: 6px 10px;
}

/* ── Lối vào «Cả danh sách» (v3.45) ──────────────────────────────────────────
   Cố ý NHẠT hơn nút Đổi gió: 3 thẻ vẫn là mặt tiền, đây chỉ là lối thoát phụ cho
   người muốn tự lướt. Cao 40px cho đủ tầm chạm dù không phải nút chính. */
.eatout2-all {
  width: 100%; min-height: 40px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: .78rem; font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 0;
}
.eatout2-all b { color: var(--accent-light); font-weight: 600; font-variant-numeric: tabular-nums; }
.eatout2-all:active { opacity: .6; }
.eatout2-all:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; border-radius: 10px; }

/* ── Sheet «Cả danh sách» ────────────────────────────────────────────────────
   Panel là KHUNG DỌC: đầu + dải ngữ cảnh + hàng chip đứng yên, chỉ .list cuộn.
   Khác .nickname-sheet (cả panel cuộn) vì ở đây hàng chip phải luôn với tới được —
   cuộn 48 món xuống đáy rồi mà muốn đổi nhóm thì không phải cuộn ngược lên. */
.eatout2-sheet {
  position: fixed; inset: 0; z-index: 310;
  display: none; align-items: flex-end; justify-content: center;
}
.eatout2-sheet.is-open { display: flex; }
.eatout2-sheet__backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 10, 18, .75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.eatout2-sheet__panel {
  position: relative;
  width: 100%; max-width: 480px;
  /* Cùng bài học với .nickname-sheet__panel: neo đáy mà không giới hạn chiều cao thì
     đầu sheet bị đẩy khỏi khung, kéo không tới. dvh bám chiều cao động của Safari,
     vh là fallback máy cũ — phải để vh TRƯỚC dvh mới đúng thứ tự đè. */
  max-height: 94vh;
  max-height: 94dvh;
  display: flex; flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border); border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}
.eatout2-sheet.is-open .eatout2-sheet__panel { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .eatout2-sheet__panel { transition: none; } }

.eatout2-sheet__grab {
  flex: 0 0 auto; width: 40px; height: 4px; margin: 8px auto 2px;
  border-radius: 2px; background: var(--text-muted);
}
.eatout2-sheet__hd {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 8px;
}
.eatout2-sheet__title { flex: 1 1 auto; font-size: .95rem; font-weight: 700; margin: 0; color: var(--text-primary); }
.eatout2-sheet__count { font-size: .72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.eatout2-sheet__close {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: var(--text-secondary); font-family: inherit; font-size: .8rem; cursor: pointer;
}
.eatout2-sheet__ctx {
  flex: 0 0 auto; margin: 0;
  font-size: .7rem; color: var(--text-secondary);
  background: rgba(255, 140, 66, .08);
  border-top: 1px dashed rgba(255, 140, 66, .35);
  border-bottom: 1px dashed rgba(255, 140, 66, .35);
  padding: 5px 14px;
}
.eatout2-sheet__ctx:empty { display: none; }
/* Hàng chip XUỐNG DÒNG, không cuộn ngang. Đo trên 375px: hàng có 343px dùng được mà 7 chip
   cần 618px — rút nhãn hay bỏ emoji vẫn tràn, nên một hàng thì luôn có chip bị khuất, và
   chip khuất coi như không tồn tại. Số chip đổi theo bữa (sáng 4, trưa/tối 7) nên để wrap
   tự lo: sáng vẫn gọn một hàng. */
.eatout2-sheet__chips {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 14px;
}
.eatout2-sheet__chip {
  font-family: inherit; font-size: .74rem; font-weight: 600; cursor: pointer;
  color: var(--text-secondary);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--radius-full); padding: 4px 11px;
  white-space: nowrap;
}
.eatout2-sheet__chip.is-active {
  color: var(--accent-light); border-color: var(--accent);
  background: rgba(255, 140, 66, .14);
}
.eatout2-sheet__chip:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 1px; }

.eatout2-sheet__list {
  flex: 1 1 auto; min-height: 0;      /* min-height:0 — thiếu là flex item không chịu co, panel tràn */
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 14px 16px;
}
/* Cả hàng là <a> mở Maps (chốt qua mockup): không bắt nhắm nút nhỏ. ↗ chỉ còn là dấu hiệu
   «mở ra ngoài», nên là <span> — lồng <button> trong <a> là HTML sai. */
.eatout2-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; margin: 0 -8px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  border-radius: 12px;
  text-decoration: none; color: inherit;
}
.eatout2-row:active { background: var(--glass-bg-hover); }
.eatout2-row:focus-visible { outline: 2px solid var(--accent-light); outline-offset: -2px; }
.eatout2-row--dim { opacity: .55; }
.eatout2-row__emoji {
  flex: 0 0 auto; width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 22px; background: var(--bg-tertiary); border-radius: 11px;
}
/* display khai TƯỜNG MINH: các phần tử này là <span> trong <a>, inline mặc định sẽ vỡ layout */
.eatout2-row__info { flex: 1 1 auto; min-width: 0; display: block; }
.eatout2-row__name { display: flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; }
.eatout2-row__star {
  font-size: .62rem; font-weight: 700; white-space: nowrap;
  color: var(--accent-light); background: rgba(255, 140, 66, .14);
  border-radius: var(--radius-full); padding: 1px 7px;
}
.eatout2-row__meta { display: block; margin-top: 1px; font-size: .7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.eatout2-row__note { color: var(--accent-light); opacity: .85; }
.eatout2-row__go {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 140, 66, .4); color: var(--accent-light); font-size: .8rem;
}
.eatout2-sheet__divider {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 2px;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted);
}
.eatout2-sheet__divider::before, .eatout2-sheet__divider::after {
  content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .08);
}
/* Luật cấm ẩn món thì phải NÓI RA — ẩn câm làm người dùng tưởng app thiếu món */
.eatout2-sheet__hidden { padding: 10px 6px 2px; font-size: .7rem; color: var(--text-muted); text-align: center; }
.eatout2-sheet__hidden b { color: var(--text-secondary); font-weight: 600; }
.eatout2-sheet__empty { padding: 24px 12px; font-size: .82rem; color: var(--text-secondary); text-align: center; }

/* ============================================
   CHỈNH MÂM TẠI CHỖ (v2 Khung mâm) — màn kết quả
   Nút 🔄 đổi từng món + hàng chip Khung mâm.
   Bản B đã duyệt: 🔄 NGOÀI CÙNG mỗi hàng, THAY mũi tên ›
   (một đích chạm mé phải); icon 32px nhưng vùng nhận chạm
   nới 46px bằng ::after — đạt chuẩn 44px iOS, layout không đổi.
   ============================================ */
.mam-com__swap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 140, 66, 0.3);
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
/* Vùng nhận chạm 46px — pseudo trong suốt, không phình layout hàng */
.mam-com__swap::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
}
.mam-com__swap:hover {
  background: rgba(255, 140, 66, 0.14);
  border-color: rgba(255, 140, 66, 0.55);
}
.mam-com__swap:active { transform: rotate(-180deg) scale(0.92); }
.mam-com__swap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mam-com__swap svg { width: 15px; height: 15px; }

/* Flash hàng vừa đổi/thêm — mắt bắt được thay đổi sau re-render */
@keyframes mamRowSwapFlash {
  0%   { background: rgba(255, 140, 66, 0.22); }
  100% { background: transparent; }
}
.mam-com__dish.is-swapped { animation: mamRowSwapFlash 0.8s ease; }
@media (prefers-reduced-motion: reduce) {
  .mam-com__dish.is-swapped { animation: none; }
}

/* Hàng chip Khung mâm — giữa dish-list và footer, tông ấm nhẹ như body an-pick.
   Lề ngang 20px để nhãn "Khung mâm" + chip thẳng cột với hàng món & header. */
.mam-shape {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 11px 20px 13px;
  border-top: 1px dashed rgba(255, 140, 66, 0.22);
  background: linear-gradient(180deg, rgba(255, 140, 66, 0.05), transparent);
}
.mam-shape__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 140, 66, 0.85);
  margin-right: 2px;
  flex-shrink: 0;
}
.mam-shape__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mam-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.mam-chip__ico { font-size: 0.95em; line-height: 1; }
/* Role ĐANG CÓ → chip lặng (glass), hover báo đỏ nhạt = hành động bớt */
.mam-chip--on {
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.mam-chip--on:hover {
  color: var(--coral);
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.08);
}
/* Role VẮNG → viền đứt accent mời thêm (đồng bộ nút ＋ Thêm của form Thêm mâm) */
.mam-chip--off {
  color: var(--accent);
  background: rgba(255, 140, 66, 0.06);
  border: 1px dashed rgba(255, 140, 66, 0.5);
}
.mam-chip--off:hover { background: rgba(255, 140, 66, 0.14); border-style: solid; }
.mam-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* =============================================
   CHUỖI VUỐT MÂM (v4 swipe) — màn cook-results
   Track full-width vuốt ngang thay nút "Đổi mâm khác" + 2 card
   "Hay đổi gió?". Cơ học ở js/meal-swipe.js; DOM app.js dựng.
   ============================================= */
.mam-swiper {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.mam-swiper__viewport {
  overflow: hidden;
  /* pan-y: dọc nhường scroll trang cho trình duyệt, ngang JS lo — không cướp cuộn */
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}
.mam-swiper__viewport.is-drag { cursor: grabbing; }
.mam-swiper__viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xl); }
.mam-swiper__track {
  display: flex;
  will-change: transform;
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.mam-swiper__track.is-drag { transition: none; }
/* min-width:0 — chặn min-content của tên món dài (nowrap) nới slide vượt flex-basis
   (bài học đo được từ mockup: slide lệch bề rộng làm chip wrap lung tung) */
.mam-swiper__slide {
  flex: 0 0 100%;
  min-width: 0;
}
.mam-swiper__slide .dining-table { scroll-margin-top: 0; }

/* Mũi tên mờ — affordance làm quen, neo giữa ảnh (top do JS đo), tự ẩn sau 2 lần vuốt.
   Trái chỉ hiện khi có mâm trước để quay lại (kiêm chỉ báo history). */
.mam-swiper__arr {
  position: absolute;
  top: 40%; /* fallback trước khi JS đo ảnh */
  transform: translateY(-50%);
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 18, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: opacity 0.3s, background 0.15s, color 0.15s;
}
.mam-swiper__arr:hover { background: rgba(10, 10, 18, 0.65); color: rgba(255, 255, 255, 0.85); }
.mam-swiper__arr svg { width: 18px; height: 18px; }
.mam-swiper__arr--l { left: 10px; }
.mam-swiper__arr--r { right: 10px; }
.mam-swiper__arr.is-off { opacity: 0; pointer-events: none; }

.mam-swiper__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 12px 0 2px;
}
.mam-swiper__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: width 0.25s, background 0.25s;
}
.mam-swiper__dot.is-on { width: 20px; background: var(--accent); }
.mam-swiper__dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Badge ✨ + tim ♡ trên ảnh mâm khám phá (ngoài Nhà mình) — badge góc trái
   = thiết bị lòng tin (mâm lạ không nhãn đọc thành bug), tim góc phải = wishlist */
.mam-new-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--coral));
  padding: 6px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.mam-save-heart {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 18, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 107, 107, 0.5);
  color: var(--coral);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.mam-save-heart:hover { background: rgba(255, 107, 107, 0.25); }
.mam-save-heart:active { transform: scale(0.9); }
.mam-save-heart.is-saved { background: var(--coral); border-color: var(--coral); color: #fff; }
.mam-save-heart:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* Metadata ⏱️/👤 — pill overlay góc dưới-phải ảnh (thay dòng header đã gỡ).
   Nền tối tự mang scrim nên đọc rõ trên mọi ảnh; khác tầng với ♡ (trên-phải). */
.dining-table__meta {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: rgba(10, 10, 18, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Card đuôi chuỗi — điểm dừng thành thật + lối thoát sang kho mâm Món ngon */
.chain-tail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 320px;
  height: 100%;
  text-align: center;
  padding: 40px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
}
.chain-tail__emoji { font-size: 44px; line-height: 1; }
.chain-tail__title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.chain-tail__sub { font-size: 0.85rem; color: var(--text-secondary); }
.chain-tail__btn {
  margin-top: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: transform 0.15s, box-shadow 0.3s;
}
.chain-tail__btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); }

/* ===== Chip «thèm gì?» ở card đuôi (v3.49) =====
   Vòng 1 lối ra là LINK chữ (nút cam để dành vòng 2) — chip là câu trả lời chính,
   không nên bị nút đặc hút hết mắt. */
.chain-tail__chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  width: 100%;
  margin-top: 6px;
}
.chain-tail__chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;           /* ngưỡng chạm — chip là hành động chính của card này */
  padding: 11px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.chain-tail__chip:hover { background: var(--glass-bg-hover); border-color: var(--accent-glow); }
.chain-tail__chip:active { transform: scale(0.97); }
/* Chip đã dùng GIỮ CHỖ (mờ + ✓) chứ không biến mất: layout không nhảy dưới ngón tay,
   và người dùng nhớ mình đã thử vị nào rồi. */
.chain-tail__chip.is-used {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}
.chain-tail__link {
  margin-top: 10px;
  padding: 6px 10px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chain-tail__link:hover { color: var(--text-primary); }

/* Lớp chờ khi An lựa mâm mới — phủ kín card đuôi để chip không bị chạm chồng */
.chain-tail { position: relative; }
.chain-tail__loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: rgba(17, 17, 25, 0.94);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
}
.chain-tail.is-loading .chain-tail__loading { display: flex; }

/* ===== Nhãn mood trên ảnh mâm + lối bỏ ngay tại chỗ =====
   Trả lời câu người dùng sẽ hỏi khi mở lại app: "ơ sao hôm nay toàn cá kho?" */
.mam-mood-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 5px 4px 9px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 140, 66, 0.45);
  background: rgba(255, 140, 66, 0.16);
  color: #ffd9b8;
  font-size: 0.7rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.mam-mood-badge__x {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffd9b8;
  font-family: inherit;
  font-size: 0.6rem;
  line-height: 1;
  cursor: pointer;
}
/* Vùng chạm 44px quanh nút vẽ 18px — ngón tay không phải ngắm. Nút nằm trên ảnh,
   quanh nó không có control nào khác nên vùng nới ra không cướp chạm của ai. */
.mam-mood-badge__x::after { content: ''; position: absolute; inset: -13px; }
.mam-mood-badge__x:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* Chấm cam nhắc tab «Món ngon» — dẫn mắt về chỗ mới của "Tự chọn món" vài phiên đầu */
.bnav-tab--hint::after {
  content: '';
  position: absolute;
  top: 5px;
  right: calc(50% - 18px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

@media (prefers-reduced-motion: reduce) {
  .mam-swiper__track { transition: none; }
  .mam-swiper__dot { transition: none; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   ĐI CHỢ HÔM NAY (v3.16) — chip phạm vi trong sheet + nút gold trên Welcome */

.shopping-scope {
  display: flex;
  gap: 8px;
  margin: 2px 0 12px;
}
.shopping-scope__chip {
  flex: 1;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid rgba(240, 240, 245, 0.09);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.shopping-scope__chip.is-active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
  font-weight: 700;
}
.shopping-scope__chip:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Nút gold trên Welcome — nằm giữa dòng phụ và dải tuần mini */
.an-pick-shop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin: 10px 0 2px;
  padding: 12px;
  border-radius: 14px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

/* ===== "🍜 Không nấu" (v3.17) — trạng thái thứ 3 của slot Lịch tuần ===== */
/* Nền LẶNG, KHÔNG viền cam: đã yên tâm (không phải việc cần lo), tách hẳn với mâm đã ghim
   (viền cam) và ô trống "An tự chọn" (dấu ＋). Chỉ đổi giọng chữ/nền, giữ layout slot sẵn có. */
.weekly-slot__nocook { color: var(--text-secondary); font-weight: 600; }
.wgrid__cell.is-nocook { background: rgba(255, 255, 255, 0.03); }
.wgrid__cell.is-nocook .wgrid__label { color: var(--text-muted); }

/* Nút "🍜 Ăn ngoài / không nấu bữa này" trong form ghim — dưới "Bỏ ghim", cùng phong cách ghost. */
.weekly-slot-nocook {
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.weekly-slot-nocook:hover { background: var(--glass-bg-hover); }

/* Trạng thái "đang để không nấu" trong vùng pins của form ghim (thay dòng "Chưa ghim mâm nào"). */
.weekly-slot-pins__nocook { color: var(--text-secondary); }
.weekly-slot-pins__nocook b { color: var(--text-primary); }

/* Thẻ hero "nghỉ bếp" — bữa neo hôm nay để "🍜 không nấu" (an-pick trạng thái C). */
.an-pick-nocook {
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
@media (hover: hover) {
  .an-pick-nocook:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  }
}
.an-pick-nocook:active { transform: scale(0.98); }
.an-pick-nocook__icon { font-size: 1.9rem; flex-shrink: 0; line-height: 1; }
.an-pick-nocook__body { flex: 1; min-width: 0; }
.an-pick-nocook__title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin: 0 0 3px; }
.an-pick-nocook__sub { font-size: 0.78rem; color: var(--text-muted); }
.an-pick-nocook__cta { font-size: 0.8rem; color: var(--accent); font-weight: 600; flex-shrink: 0; white-space: nowrap; }

/* ─────────────────────────────────────────────────────────────────────────────
   CHẶN AUTO-ZOOM iOS SAFARI — gom cuối file để thắng cascade mọi định nghĩa gốc.
   iOS Safari tự PHÓNG TO viewport khi focus <input>/<select>/<textarea> có
   font-size < 16px; với modal/sheet position:fixed thì viewport phóng to làm nội
   dung tràn ngang, cắt nút & mất lề (lỗi "Thêm mâm cơm mới" khi chọn món). Ép ≥16px
   trên thiết bị CẢM ỨNG để chặn hẳn zoom; desktop (pointer:fine) giữ nguyên cỡ chữ.
   Các ô đã width:100% + box-sizing:border-box nên 16px không làm rộng ô, chỉ chữ to hơn. */
@media (pointer: coarse) {
  .household-combo-panel__search,  /* ô "Tìm/gõ tên món" trong dropdown mâm cơm */
  .household-edit-sheet__input,    /* ô "Tên mâm cơm" */
  .combo-search__input,            /* ô tìm ở overlay Danh sách mâm cơm */
  .fridge-search,                  /* ô tìm ở "Có gì nấu nấy" */
  .nickname-custom-input,          /* ô nhập biệt danh */
  .feedback-comment,               /* ô góp ý */
  .notif-time-input {              /* <select> giờ nhắc — select cũng zoom nếu <16px */
    font-size: 16px;
  }
}
