/* ============================================
   食材库 v5.0 — iOS Native Design System
   ============================================ */

:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-secondary: #f8f8fa;
  --brand: #007aff;
  --brand-light: #e8f4fd;
  --green: #34c759;
  --green-light: #e8faf0;
  --red: #ff3b30;
  --red-light: #ffebea;
  --orange: #ff9500;
  --orange-light: #fff5e6;
  --purple: #af52de;
  --purple-light: #f5eafa;
  --blue: #007aff;
  --blue-light: #e8f4fd;
  --teal: #5ac8fa;
  --teal-light: #e8f8ff;
  --yellow: #ffcc00;
  --yellow-light: #fffbe6;
  --text: #1c1c1e;
  --text-secondary: #8e8e93;
  --text-tertiary: #aeaeb2;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --safe-top: env(safe-area-inset-top, 20px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-h: 82px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100%; min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.app { position: relative; min-height: 100dvh; }

/* === SPLASH === */
.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; transition: opacity 0.5s ease, transform 0.5s ease;
}
.splash-screen.hide { opacity: 0; transform: scale(1.1); pointer-events: none; }
.splash-icon {
  width: 80px; height: 80px; background: rgba(255,255,255,0.2);
  border-radius: 22px; backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.3);
  font-size: 36px;
  animation: splashBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.splash-icon::after { content: '🥗'; }
.splash-title { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; animation: fadeUp 0.5s ease 0.1s both; }
.splash-sub { font-size: 12px; opacity: 0.5; margin-top: 8px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; animation: fadeUp 0.5s ease 0.2s both; }
@keyframes splashBounce { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* === PAGES === */
.app-main { position: relative; }
.page { display: none; padding-bottom: 16px; }
.page.active { display: block; animation: pageIn 0.3s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* === iOS HEADER === */
.ios-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(242,242,247,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 12px 16px 8px;
  padding-top: calc(var(--safe-top) + 12px);
  border-bottom: 0.5px solid var(--border);
}
.ios-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ios-title { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; }
.ios-header-btns { display: flex; gap: 8px; }
.hdr-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: all 0.15s ease; position: relative;
}
.hdr-btn:active { transform: scale(0.88); background: var(--surface-secondary); }
.hdr-btn svg { width: 18px; height: 18px; }
.notify-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); display: none;
  box-shadow: 0 0 0 2px var(--surface);
}
.notify-dot.show { display: block; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* === SEARCH === */
.search-wrap {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,122,255,0.12); }
.search-icon { width: 18px; height: 18px; color: var(--text-tertiary); flex-shrink: 0; }
.search-input { flex: 1; border: none; outline: none; font-size: 15px; font-family: var(--font); background: transparent; color: var(--text); }
.search-input::placeholder { color: var(--text-tertiary); }
.search-clear {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--text-tertiary); color: white;
  border: none; font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* === SECTIONS === */
.section { padding: 0 16px; margin-top: 16px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }

/* === NUTRITION CARD === */
.nutrition-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.nc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.nc-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.nc-fire { width: 16px; height: 16px; color: var(--orange); }
.nc-cal { font-size: 13px; color: var(--text-secondary); }
.nc-cal strong { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.nc-bar { height: 6px; background: #f0f0f5; border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.nc-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--green), #30d158); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); width: 0%; }
.nc-tags { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nc-tag { font-size: 12px; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.nc-tag b { color: var(--text); font-weight: 700; }
.nc-pct { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--green); background: var(--green-light); padding: 2px 8px; border-radius: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.blue { background: var(--blue); }
.dot.orange { background: var(--orange); }
.dot.purple { background: var(--purple); }

/* === QUICK ACTIONS === */
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qa-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; background: var(--surface); border-radius: var(--radius-md);
  border: 1px solid var(--border); cursor: pointer; transition: all 0.15s ease;
}
.qa-item:active { transform: scale(0.92); background: var(--surface-secondary); }
.qa-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.qa-icon svg { width: 20px; height: 20px; }
.qa-icon.indigo { background: var(--blue-light); color: var(--brand); }
.qa-icon.green { background: var(--green-light); color: var(--green); }
.qa-icon.orange { background: var(--orange-light); color: var(--orange); }
.qa-icon.teal { background: var(--teal-light); color: var(--teal); }
.qa-item span { font-size: 11px; font-weight: 600; color: var(--text-secondary); }

/* === CATEGORY TABS === */
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s ease; font-family: var(--font);
  white-space: nowrap;
}
.cat-tab.active { background: var(--brand); color: white; border-color: var(--brand); }
.cat-tab:active { transform: scale(0.93); }

/* === INGREDIENT CARDS === */
.ing-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--radius-md);
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--border); transition: all 0.15s ease;
  cursor: pointer; position: relative; overflow: hidden;
}
.ing-card:active { transform: scale(0.98); background: var(--surface-secondary); }
.ing-card.expiring { border-left: 3px solid var(--orange); }
.ing-card.expired { border-left: 3px solid var(--red); }
.ing-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: #f5f5f7;
}
.ing-icon svg { width: 30px; height: 30px; }
.ing-info { flex: 1; min-width: 0; }
.ing-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.ing-meta { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.ing-right { text-align: right; flex-shrink: 0; }
.ing-qty { font-size: 18px; font-weight: 800; color: var(--text); }
.ing-unit { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.ing-cal-badge {
  font-size: 10px; font-weight: 700; color: var(--orange);
  background: var(--orange-light); padding: 1px 6px; border-radius: 6px;
  margin-top: 4px; display: inline-block;
}

/* === RECIPE CARDS === */
.recipe-card {
  background: var(--surface); border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 10px;
  border: 1px solid var(--border); cursor: pointer;
  transition: all 0.15s ease;
}
.recipe-card:active { transform: scale(0.98); }
.recipe-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.recipe-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.recipe-info { flex: 1; }
.recipe-name { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.recipe-meta { font-size: 12px; color: var(--text-secondary); }
.recipe-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.recipe-tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 6px; background: var(--surface-secondary); color: var(--text-secondary);
}
.recipe-tag.match { background: var(--green-light); color: var(--green); }
.recipe-tag.can-cook { background: var(--brand); color: white; }

/* Match Bar */
.match-bar { height: 24px; background: #f0f0f5; border-radius: 12px; overflow: hidden; margin-top: 8px; position: relative; }
.match-fill { height: 100%; border-radius: 12px; transition: width 0.8s ease; }
.match-fill.full { background: var(--green); }
.match-fill.partial { background: var(--orange); }
.match-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text); }

/* === SUGGEST CARDS === */
.suggest-grid { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.suggest-grid::-webkit-scrollbar { display: none; }
.suggest-card {
  flex-shrink: 0; width: 160px; padding: 14px;
  background: var(--surface); border-radius: var(--radius-md);
  border: 1px solid var(--border); cursor: pointer;
  transition: all 0.15s ease;
}
.suggest-card:active { transform: scale(0.95); }
.suggest-card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.suggest-card-info { font-size: 11px; color: var(--text-secondary); }

/* === SHOPPING === */
.shop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface);
  border-radius: var(--radius-md); margin-bottom: 6px;
  border: 1px solid var(--border); transition: all 0.15s ease;
}
.shop-check {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.shop-check.checked { background: var(--green); border-color: var(--green); }
.shop-check.checked::after { content: '✓'; color: white; font-size: 12px; font-weight: 700; }
.shop-text { flex: 1; font-size: 15px; font-weight: 500; }
.shop-text.done { text-decoration: line-through; color: var(--text-tertiary); }
.shop-del {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--red-light); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--red); font-size: 14px; font-weight: 700;
  transition: all 0.15s ease;
}
.shop-del:active { transform: scale(0.85); }

/* === SETTINGS === */
.settings-group {
  background: var(--surface); border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 10px;
  border: 1px solid var(--border);
}
.settings-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.settings-row { display: flex; align-items: center; gap: 10px; }
.settings-input {
  flex: 1; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: 16px; font-weight: 600;
  font-family: var(--font); background: var(--surface-secondary);
  transition: border-color 0.2s;
}
.settings-input:focus { border-color: var(--brand); outline: none; }
.settings-unit { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.settings-btn {
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-secondary);
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: var(--font); color: var(--text); transition: all 0.15s;
}
.settings-btn:active { transform: scale(0.93); }
.settings-btn.danger { color: var(--red); border-color: rgba(255,59,48,0.2); background: var(--red-light); }
.settings-actions { display: flex; gap: 8px; }
.family-code {
  flex: 1; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-secondary); font-size: 16px; font-weight: 700;
  font-family: 'SF Mono', monospace; letter-spacing: 2px; text-align: center;
  color: var(--brand);
}
.settings-about { font-size: 13px; color: var(--text-tertiary); }

/* === TAB BAR === */
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--tab-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 0.5px solid var(--border);
  display: flex; align-items: flex-start;
  padding-top: 6px; padding-bottom: var(--safe-bottom);
  z-index: 200;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 0; background: none; border: none;
  color: var(--text-tertiary); cursor: pointer;
  transition: color 0.2s; font-family: var(--font);
}
.tab-item svg { width: 24px; height: 24px; }
.tab-item span { font-size: 10px; font-weight: 600; }
.tab-item.active { color: var(--brand); }
.tab-item:active { opacity: 0.6; }

/* === FAB === */
.fab {
  position: fixed; bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
  right: 20px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--brand); color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,122,255,0.4);
  cursor: pointer; z-index: 150;
  transition: all 0.2s ease;
}
.fab:active { transform: scale(0.88); }
.fab svg { width: 24px; height: 24px; }

/* === OVERLAY & MODALS === */
.overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: overlayIn 0.2s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  width: 100%; max-width: 500px;
  max-height: 85vh; overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 12px 16px calc(var(--safe-bottom) + 16px);
  animation: sheetUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.modal-tall { max-height: 92vh; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: #d1d1d6; margin: 0 auto 12px;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal-header h3 { font-size: 20px; font-weight: 800; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-secondary); border: none;
  font-size: 16px; color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* === QUICK ADD TABS === */
.quick-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.qtab {
  flex: 1; padding: 8px; border-radius: var(--radius-sm);
  background: var(--surface-secondary); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; text-align: center; font-family: var(--font);
  transition: all 0.2s;
}
.qtab.active { background: var(--brand); color: white; border-color: var(--brand); }

/* Chips Grid */
.chips-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 60vh; overflow-y: auto; }
.chip-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; background: var(--surface-secondary);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.15s ease;
}
.chip-item:active { transform: scale(0.9); background: var(--brand-light); border-color: var(--brand); }
.chip-item.has { opacity: 0.5; }
.chip-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.chip-icon svg { width: 32px; height: 32px; }
.chip-name { font-size: 11px; font-weight: 600; color: var(--text); text-align: center; }
.chip-badge { font-size: 9px; font-weight: 700; color: var(--green); background: var(--green-light); padding: 1px 4px; border-radius: 4px; }

/* Voice */
.voice-area { text-align: center; padding: 20px 0; }
.voice-btn {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green-light); border: 2px solid var(--green);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; margin: 0 auto;
}
.voice-btn svg { width: 28px; height: 28px; color: var(--green); }
.voice-btn.recording { background: var(--red-light); border-color: var(--red); animation: pulse 1s infinite; }
.voice-btn.recording svg { color: var(--red); }
.voice-status { font-size: 13px; color: var(--text-secondary); margin-top: 10px; font-weight: 500; }
.voice-examples { margin-top: 12px; }
.voice-ex { font-size: 12px; color: var(--text-secondary); background: var(--surface-secondary); padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 6px; }

/* Paste & Batch */
.btn-paste {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  background: var(--brand); color: white; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: var(--font); margin-bottom: 12px;
  transition: all 0.15s;
}
.btn-paste:active { transform: scale(0.97); opacity: 0.9; }
textarea {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: 14px; font-family: var(--font);
  background: var(--surface-secondary); resize: none;
  transition: border-color 0.2s; line-height: 1.5;
}
textarea:focus { border-color: var(--brand); outline: none; }

/* === FORMS === */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: 15px; font-family: var(--font);
  background: var(--surface-secondary); transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--brand); outline: none; }
.form-row { display: flex; gap: 10px; }
.form-group.half { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }
.btn-primary {
  flex: 1; padding: 12px; border-radius: var(--radius-sm);
  background: var(--brand); color: white; border: none;
  font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: var(--font); transition: all 0.15s;
}
.btn-primary:active { transform: scale(0.97); opacity: 0.9; }
.btn-secondary {
  flex: 1; padding: 12px; border-radius: var(--radius-sm);
  background: var(--surface-secondary); color: var(--text); border: 1px solid var(--border);
  font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: var(--font); transition: all 0.15s;
}
.btn-secondary:active { transform: scale(0.97); }

/* Quick result items */
.qr-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--green-light); border-radius: var(--radius-sm); margin-top: 8px; }
.qr-name { flex: 1; font-size: 14px; font-weight: 600; }
.qr-qty { font-size: 13px; color: var(--text-secondary); }
.qr-add { padding: 4px 12px; border-radius: 8px; background: var(--green); color: white; border: none; font-size: 13px; font-weight: 700; cursor: pointer; }
.qr-hint { font-size: 12px; color: var(--text-tertiary); text-align: center; padding: 12px; }

/* === ACTION SHEET === */
.action-backdrop {
  position: fixed; inset: 0; z-index: 350;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(4px);
}
.action-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 12px 16px calc(var(--safe-bottom) + 16px);
  z-index: 400; transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 60vh; overflow-y: auto;
  max-width: 500px; margin: 0 auto;
}
.action-sheet.show { transform: translateY(0); }
.action-handle { width: 36px; height: 4px; border-radius: 2px; background: #d1d1d6; margin: 0 auto 12px; }
.action-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px; border: none; background: none;
  font-size: 16px; font-weight: 500; cursor: pointer;
  font-family: var(--font); color: var(--text);
  border-bottom: 0.5px solid var(--border); transition: background 0.15s;
}
.action-btn:last-child { border-bottom: none; }
.action-btn:active { background: var(--surface-secondary); }
.action-btn.danger { color: var(--red); }

/* === TOAST === */
.toast {
  position: fixed; top: calc(var(--safe-top) + 16px);
  left: 50%; transform: translateX(-50%) translateY(-80px);
  background: var(--text); color: white; padding: 10px 20px;
  border-radius: 20px; font-size: 14px; font-weight: 600;
  z-index: 500; opacity: 0;
  transition: all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  white-space: nowrap; box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* === EMPTY STATE === */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.empty-desc { font-size: 13px; color: var(--text-secondary); }

/* === RECIPE DETAIL === */
.rd-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.rd-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.rd-title { font-size: 22px; font-weight: 800; }
.rd-meta { display: flex; gap: 12px; margin-top: 4px; }
.rd-meta span { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.rd-section { margin-top: 16px; }
.rd-section h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.rd-ing { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-secondary); border-radius: var(--radius-sm); margin-bottom: 4px; font-size: 14px; }
.rd-ing.missing { opacity: 0.4; text-decoration: line-through; }
.rd-steps { list-style: none; counter-reset: step; }
.rd-steps li { counter-increment: step; display: flex; gap: 10px; font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 8px; }
.rd-steps li::before {
  content: counter(step); min-width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
}
.rd-cook-btn {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  background: var(--green); color: white; border: none;
  font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 14px; font-family: var(--font);
}
.rd-cook-btn:active { transform: scale(0.97); }
.rd-missing-btn {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  border: 1px dashed var(--orange); background: var(--orange-light);
  color: var(--orange); font-size: 13px; font-weight: 700;
  cursor: pointer; margin-top: 10px; font-family: var(--font);
}
.rd-missing-btn:active { transform: scale(0.97); }

/* === UTILITY === */
.hidden { display: none !important; }
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
