/* ============================================================
   家族の献立システム — style.css v2（ミーニューアプリ準拠デザイン）
   ============================================================ */

/* ── CSS 変数 ── */
:root {
  /* カラーパレット */
  --bg:           #FFFFFF;
  --sub-bg:       #F5F5F5;
  --accent:       #E8734A;
  --accent-light: #FFF3EE;
  --badge-main:   #E8734A;
  --badge-side:   #6DB36D;
  --badge-staple: #C4A84F;
  --badge-soup:   #7BAFD4;
  --text:         #333333;
  --text-sub:     #999999;
  --divider:      #EEEEEE;
  --tab-sel:      #8B7355;   /* 曜日タブ選択色（ダークブラウン） */

  /* ショッピングリスト カテゴリ背景 */
  --cat-veg:      #E8F5E9;
  --cat-fish:     #EDE7F6;
  --cat-meat:     #FFF3E0;
  --cat-egg:      #FFFDE7;
  --cat-season:   #F3E5F5;
  --cat-other:    #F5F5F5;

  /* 寸法 */
  --header-h:   52px;
  --week-nav-h: 44px;
  --daytab-h:   62px;
  --nav-h:      62px;
  --safe-b:     env(safe-area-inset-bottom, 0px);

  /* 形状・影 */
  --radius-sm:    4px;
  --radius:       8px;
  --radius-lg:    16px;
  --shadow-card:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.12);
}

/* ── リセット ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  background: var(--sub-bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }

/* ============================================================
   認証オーバーレイ
   ============================================================ */
.auth-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  z-index: 9999; padding: 24px;
}
.auth-card {
  background: var(--bg); border-radius: var(--radius-lg);
  padding: 40px 32px; width: 100%; max-width: 360px;
  box-shadow: var(--shadow-md); text-align: center;
}
.auth-logo  { font-size: 56px; margin-bottom: 12px; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 28px; color: var(--text); }
.auth-input {
  width: 100%; height: 52px;
  border: 2px solid var(--divider); border-radius: var(--radius);
  padding: 0 16px; font-size: 18px; text-align: center;
  letter-spacing: 4px; outline: none; margin-bottom: 16px;
  transition: border-color .2s;
}
.auth-input:focus { border-color: var(--accent); }
.auth-btn {
  width: 100%; height: 52px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius); font-size: 17px; font-weight: 600;
  transition: opacity .15s;
}
.auth-btn:active { opacity: .85; }
.auth-error { margin-top: 12px; color: #E53935; font-size: 14px; min-height: 20px; }

/* ============================================================
   アプリシェル
   ============================================================ */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.hidden { display: none !important; }

/* ── ヘッダー ── */
.header {
  position: sticky; top: 0; z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 16px;
}
.header-title {
  flex: 1; text-align: center;
  font-size: 16px; font-weight: 700; color: var(--text);
}
.header-menu-btn {
  font-size: 24px; color: var(--text-sub);
  padding: 4px 8px; line-height: 1;
  flex-shrink: 0;
}
.header-back-btn {
  display: flex; align-items: center; gap: 2px;
  color: var(--accent); font-size: 14px; font-weight: 600;
  padding: 4px 0; flex-shrink: 0;
}

/* ── 週ナビゲーションバー ── */
.week-nav-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  height: var(--week-nav-h);
  display: flex; align-items: center;
  padding: 0 12px; gap: 8px;
  position: sticky; top: var(--header-h); z-index: 190;
}
.week-prev-btn, .week-next-btn {
  color: var(--accent); font-size: 13px; font-weight: 600;
  padding: 6px 4px; white-space: nowrap; flex-shrink: 0;
}
.week-label-center {
  flex: 1; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap;
}

/* ── 曜日タブバー ── */
.day-tabs-bar {
  display: flex;
  background: var(--sub-bg);
  border-bottom: 1px solid var(--divider);
  position: sticky; top: calc(var(--header-h) + var(--week-nav-h)); z-index: 180;
  overflow-x: auto; scrollbar-width: none;
}
.day-tabs-bar::-webkit-scrollbar { display: none; }
.day-tab {
  flex: 1; min-width: 46px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; padding: 8px 4px 10px;
  cursor: pointer; position: relative;
  background: var(--sub-bg);
  border-right: 1px solid var(--divider);
  transition: background .15s;
}
.day-tab:last-child { border-right: none; }
.day-tab-date { font-size: 11px; color: var(--text-sub); line-height: 1; }
.day-tab-dow  { font-size: 13px; font-weight: 700; color: var(--text-sub); line-height: 1; }
/* 選択状態 */
.day-tab.active { background: var(--tab-sel); }
.day-tab.active .day-tab-date,
.day-tab.active .day-tab-dow { color: #fff; }
/* 三角ポインター */
.day-tab.active::after {
  content: '';
  position: absolute; bottom: -7px; left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid var(--tab-sel);
  z-index: 2;
}
/* 今日ハイライト（非選択時） */
.day-tab.today:not(.active) .day-tab-dow { color: var(--accent); }

/* ── メインコンテンツエリア ── */
main.main {
  flex: 1;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  background: var(--sub-bg);
}

/* ── ボトムナビ ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--bg);
  border-top: 1px solid var(--divider);
  display: flex; z-index: 300;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; color: #AAAAAA;
  text-decoration: none; min-height: 44px;
  transition: color .15s;
}
.nav-item.active { color: var(--accent); }
.nav-icon  { font-size: 22px; line-height: 1; }
.nav-label { font-size: 10px; font-weight: 500; white-space: nowrap; }

/* ============================================================
   カテゴリバッジ
   ============================================================ */
.cat-badge {
  display: inline-block !important;
  flex: none !important;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  font-weight: 700;
  color: #fff;
  width: auto !important;
  max-width: 50px;
  box-sizing: border-box;
}
.cat-badge.main   { background: var(--badge-main); }
.cat-badge.side   { background: var(--badge-side); }
.cat-badge.staple { background: var(--badge-staple); }
.cat-badge.soup   { background: var(--badge-soup); }

/* ============================================================
   料理カード（写真スタイル）
   ============================================================ */
.dish-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: #EBEBEB;
}
.dish-card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 写真なし */
.dish-card-nophoto {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #EBEBEB;
}
.dish-card-nophoto-circle {
  width: 52%; aspect-ratio: 1; border-radius: 50%;
  background: rgba(255,255,255,.55);
}
/* カード上の要素 */
.dish-card-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
}
.dish-card-name {
  position: absolute; bottom: 8px; left: 8px; right: 8px; z-index: 2;
  font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0,0,0,.65);
}
.dish-card-close {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-sub); line-height: 1;
}
.dish-card-heart {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  font-size: 16px; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
/* 空スロット */
.dish-card-empty {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background: repeating-conic-gradient(#E0E0E0 0% 25%, #EAEAEA 0% 50%)
    0 0 / 16px 16px;
  cursor: pointer;
}
.dish-card-add {
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: rgba(255,255,255,.9);
  padding: 4px 12px; border-radius: 20px;
}

/* ============================================================
   index.html — 今日の献立（料理をする）
   ============================================================ */
/* メモ入力行 */
.memo-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); padding: 8px 12px;
  border-bottom: 1px solid var(--divider);
}
.memo-input {
  flex: 1; background: var(--sub-bg);
  border: none; outline: none; border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 14px; color: var(--text);
  min-height: 36px;
}
.memo-edit-btn {
  padding: 5px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--divider);
  font-size: 13px; color: var(--text-sub); background: var(--bg);
  white-space: nowrap; flex-shrink: 0;
}

/* 2×2 グリッド */
.menu-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; background: var(--divider);
}
.menu-grid-cell { background: var(--sub-bg); }

/* 栄養情報バー */
.menu-stats-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; padding: 12px 16px;
  background: var(--bg); border-top: 1px solid var(--divider);
  font-size: 14px; color: var(--text-sub);
}

/* 献立なし状態 */
.empty-day {
  text-align: center; padding: 48px 24px;
  color: var(--text-sub);
}
.empty-day-icon { font-size: 52px; margin-bottom: 12px; }
.empty-day-text { font-size: 15px; line-height: 1.7; }

/* ============================================================
   献立編集（edit.html / index内タブ）
   ============================================================ */
.edit-fav-bar {
  background: var(--bg); padding: 10px 16px;
  border-bottom: 1px solid var(--divider);
  font-size: 14px; font-weight: 600; color: var(--accent);
}
.edit-day-section { margin-bottom: 2px; }
.edit-day-header {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); padding: 10px 16px;
  border-bottom: 1px solid var(--divider);
  font-size: 14px; font-weight: 600; color: var(--text);
}
.edit-day-memo-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text-sub);
}
/* 横スクロールカードリスト */
.edit-card-scroll {
  display: flex; gap: 2px;
  background: var(--divider);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.edit-card-scroll::-webkit-scrollbar { display: none; }
.edit-card-wrap { flex-shrink: 0; width: 160px; }
.edit-card-dish {
  width: 160px; aspect-ratio: 1; position: relative;
}
.edit-change-btn {
  display: block; width: 100%; padding: 8px;
  text-align: center; font-size: 12px; color: var(--accent);
  background: var(--bg); border-top: 1px solid var(--divider);
  cursor: pointer;
}
.edit-day-actions {
  display: flex; gap: 8px; padding: 10px 16px;
  background: var(--bg); border-bottom: 1px solid var(--divider);
}
.edit-day-action-btn {
  flex: 1; padding: 8px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent); color: var(--accent);
  font-size: 13px; font-weight: 600; text-align: center;
  background: var(--bg); cursor: pointer;
}
.edit-day-action-btn:active { background: var(--accent-light); }

/* ============================================================
   cooking.html — 調理ワークフロー
   ============================================================ */
/* 一人/二人切替 */
.cook-mode-bar {
  display: flex; gap: 8px; padding: 12px 12px 10px;
  background: var(--bg); border-bottom: 1px solid var(--divider);
}
.cook-mode-btn {
  flex: 1; height: 40px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--divider); color: var(--text-sub);
  background: var(--bg); transition: all .2s;
}
.cook-mode-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.cook-mode-btn:active:not(.active) { background: var(--sub-bg); }

/* ── 一人作業モード ── */
.cook-solo-section { padding: 10px 12px 0; }
.cook-dish-label {
  font-size: 12px; font-weight: 700; color: var(--text-sub);
  letter-spacing: .5px; padding: 10px 4px 6px;
  display: flex; align-items: center; gap: 8px;
}
.cook-dish-label::after { content: ''; flex: 1; height: 1px; background: var(--divider); }

.cook-step-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg); border-radius: var(--radius);
  padding: 13px 12px; margin-bottom: 8px;
  box-shadow: var(--shadow-card); cursor: pointer;
  transition: opacity .2s;
}
.cook-step-card.done { opacity: .38; }
.step-num-circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.cook-step-card.done .step-num-circle { background: var(--text-sub); }
.step-body { flex: 1; min-width: 0; }
.step-dish-name {
  font-size: 11px; font-weight: 700; color: var(--accent);
  margin-bottom: 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.step-text  { font-size: 15px; line-height: 1.65; color: var(--text); }
.step-eq-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-light); border-radius: 20px;
  padding: 2px 8px; margin-top: 6px;
}
.step-bottom {
  display: flex; align-items: center; justify-content: flex-end;
  margin-top: 8px;
}
.step-timer-btn {
  padding: 5px 12px; border-radius: 20px;
  background: var(--accent-light); color: var(--accent);
  font-size: 13px; font-weight: 600;
}
.step-timer-btn:active { background: #FFE0CC; }
.step-done-mark { font-size: 13px; color: var(--badge-side); font-weight: 700; }

/* ── 二人作業モード ── */
.cook-duo-wrap {
  display: flex;
  background: var(--divider);
  gap: 1px;
  min-height: 400px;
}
.cook-duo-col {
  flex: 1; display: flex; flex-direction: column;
  background: var(--sub-bg);
}
.cook-duo-col-header {
  padding: 10px 8px 8px;
  text-align: center; font-size: 13px; font-weight: 700;
  border-bottom: 1px solid var(--divider);
  position: sticky; top: 0; z-index: 5;
}
.cook-duo-col.col-A .cook-duo-col-header { background: #FFF3EE; color: #E8734A; }
.cook-duo-col.col-B .cook-duo-col-header { background: #E8F4FD; color: #1E88E5; }
.cook-duo-steps { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.duo-step-card {
  background: var(--bg); border-radius: var(--radius);
  padding: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.07);
  cursor: pointer; transition: opacity .2s;
}
.duo-step-card.done { opacity: .38; }
.duo-step-num  { font-size: 11px; color: var(--text-sub); margin-bottom: 4px; }
.duo-step-dish { font-size: 11px; font-weight: 700; margin-bottom: 3px; }
.col-A .duo-step-dish { color: #E8734A; }
.col-B .duo-step-dish { color: #1E88E5; }
.duo-step-text { font-size: 13px; line-height: 1.5; color: var(--text); }
.duo-step-timer {
  display: inline-block; margin-top: 6px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-light);
}

/* 完了バナー */
.all-done-banner {
  margin: 12px; padding: 16px;
  background: #E8F5E9; border: 1px solid #A5D6A7;
  border-radius: var(--radius); text-align: center;
  font-size: 16px; font-weight: 700; color: #2E7D32;
}

/* ============================================================
   タイマーモーダル（共通）
   ============================================================ */
.timer-modal {
  position: fixed; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.45); z-index: 400;
}
.timer-modal.hidden { display: none; }
.timer-sheet {
  width: 100%; max-width: 480px;
  background: var(--bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 24px calc(24px + var(--safe-b));
  text-align: center;
}
.timer-handle {
  width: 40px; height: 4px; background: var(--divider);
  border-radius: 2px; margin: 0 auto 16px;
}
.timer-step-label {
  font-size: 13px; color: var(--text-sub);
  margin-bottom: 4px; line-height: 1.4; min-height: 18px;
}
.timer-display {
  font-size: 80px; font-weight: 200;
  letter-spacing: -3px; font-variant-numeric: tabular-nums;
  color: var(--text); line-height: 1; margin: 8px 0;
  transition: color .3s;
}
.timer-display.running { color: var(--accent); }
.timer-display.done    { color: var(--badge-side); }
.timer-display.done-anim { animation: pulse .5s ease; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }
.timer-preset-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.preset-btn {
  padding: 6px 14px; border-radius: 20px;
  background: var(--sub-bg); color: var(--accent);
  font-size: 14px; font-weight: 600; border: 1px solid var(--divider);
}
.preset-btn:active { background: var(--accent-light); }
.timer-controls { display: flex; gap: 10px; }
.timer-ctrl { flex: 1; height: 52px; border-radius: var(--radius); font-size: 16px; font-weight: 700; }
.btn-start  { background: var(--accent); color: #fff; }
.btn-start:active { opacity: .85; }
.btn-reset  { background: var(--sub-bg); color: var(--text); }
.btn-reset:active { background: var(--divider); }
.timer-vibrate-tip { margin-top: 12px; font-size: 12px; color: var(--text-sub); }
.timer-close-btn { display: block; width: 100%; margin-top: 10px; padding: 12px; color: var(--text-sub); font-size: 15px; }

/* ============================================================
   shopping.html — 買い物リスト
   ============================================================ */
/* タブ */
.shop-tab-bar {
  display: flex; background: var(--bg);
  border-bottom: 2px solid var(--divider);
  position: sticky; top: calc(var(--header-h) + var(--week-nav-h) + var(--daytab-h)); z-index: 100;
}
.shop-tab {
  flex: 1; text-align: center; padding: 12px;
  font-size: 14px; font-weight: 600; color: var(--text-sub);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.shop-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* フィルター */
.shop-filter-wrap { padding: 10px 12px 6px; background: var(--sub-bg); }
.filter-all-btn {
  width: 100%; padding: 10px; border-radius: var(--radius-sm);
  background: var(--divider); color: var(--text-sub);
  font-size: 14px; font-weight: 600; text-align: center;
  cursor: pointer; margin-bottom: 8px; transition: all .15s;
}
.filter-all-btn.active { background: var(--accent); color: #fff; }
.filter-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.filter-btn {
  padding: 9px 4px; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text-sub);
  font-size: 13px; font-weight: 600; text-align: center;
  cursor: pointer; border: 1.5px solid var(--divider);
  transition: all .15s;
}
.filter-btn.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.filter-btn:active { background: var(--accent-light); }

.shop-note {
  padding: 6px 16px 8px; font-size: 11px; color: var(--text-sub); line-height: 1.5;
  background: var(--sub-bg);
}

/* カテゴリセクション */
.shop-cat-section { margin-bottom: 2px; }
.shop-cat-header {
  padding: 8px 16px 6px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.shop-cat-header.cat-veg    { background: var(--cat-veg); }
.shop-cat-header.cat-fish   { background: var(--cat-fish); }
.shop-cat-header.cat-meat   { background: var(--cat-meat); }
.shop-cat-header.cat-egg    { background: var(--cat-egg); }
.shop-cat-header.cat-season { background: var(--cat-season); }
.shop-cat-header.cat-other  { background: var(--cat-other); }

/* アイテム行 */
.shop-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); padding: 13px 16px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer; min-height: 52px; transition: background .15s;
}
.shop-item:active { background: var(--sub-bg); }
.shop-item.checked { background: var(--bg); }
.shop-check {
  width: 22px; height: 22px; border-radius: 4px;
  border: 2px solid var(--divider); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); font-size: 13px; color: transparent;
  transition: all .2s;
}
.shop-item.checked .shop-check {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.shop-item-name { flex: 1; font-size: 15px; color: var(--text); }
.shop-item.checked .shop-item-name { text-decoration: line-through; color: var(--text-sub); }
.shop-item-dots {
  flex: 1; border-bottom: 1px dotted var(--divider); margin: 0 6px;
  min-width: 20px;
}
.shop-item-amount { font-size: 14px; color: var(--text-sub); white-space: nowrap; flex-shrink: 0; }
.shop-item-recipe-btn {
  padding: 3px 8px; border-radius: 4px;
  background: var(--sub-bg); color: var(--text-sub);
  font-size: 11px; flex-shrink: 0; margin-left: 6px;
}
.shop-memo-add {
  text-align: center; padding: 10px 16px;
  font-size: 13px; color: var(--text-sub);
  cursor: pointer; background: var(--bg);
  border-bottom: 1px solid var(--divider);
}

/* ============================================================
   favorites.html — レシピ一覧
   ============================================================ */
.fav-search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--sub-bg); margin: 10px 12px;
  border-radius: var(--radius); padding: 0 12px;
}
.fav-search-icon { font-size: 16px; color: var(--text-sub); flex-shrink: 0; }
.fav-search-input {
  flex: 1; height: 40px; border: none; outline: none;
  background: transparent; font-size: 14px; color: var(--text);
}

.fav-cat-tabs {
  display: flex; background: var(--bg);
  border-bottom: 1px solid var(--divider);
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: var(--header-h); z-index: 100;
}
.fav-cat-tabs::-webkit-scrollbar { display: none; }
.fav-cat-tab {
  padding: 10px 18px; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--text-sub);
  cursor: pointer; border-bottom: 2px solid transparent;
  flex-shrink: 0;
}
.fav-cat-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.fav-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; background: var(--divider);
  margin-top: 0;
}
.fav-card {
  position: relative; aspect-ratio: 1;
  overflow: hidden; cursor: pointer; background: #EBEBEB;
}
.fav-card-nophoto {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #F0F0F0; gap: 8px; padding: 12px;
}
.fav-card-nophoto-icon  { font-size: 28px; opacity: .3; }
.fav-card-nophoto-name  {
  font-size: 13px; font-weight: 600; color: var(--text);
  text-align: center; line-height: 1.4;
}
.fav-card-source {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  font-size: 18px; line-height: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.fav-section-hdr {
  font-size: 12px; font-weight: 700; color: var(--text-sub);
  letter-spacing: .5px; padding: 10px 16px 6px;
  background: var(--sub-bg); grid-column: 1 / -1;
}

/* ============================================================
   共通 — 空状態・ローディング
   ============================================================ */
.no-data {
  text-align: center; padding: 60px 24px; color: var(--text-sub);
}
.no-data-icon { font-size: 52px; margin-bottom: 16px; }
.no-data-text { font-size: 15px; line-height: 1.7; }

/* ============================================================
   レシピピッカーモーダル（recipe-picker.js に追記済みだが共通化）
   ============================================================ */
.progress-bar-wrap {
  height: 4px; background: var(--divider);
  border-radius: 2px; overflow: hidden;
}
.progress-bar {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width .3s;
}

/* ── トースト通知 ── */
.toast-msg {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%;
  transform: translateX(-50%);
  background: rgba(50,50,50,.9); color: #fff;
  padding: 10px 20px; border-radius: 20px;
  font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .3s; z-index: 500;
  white-space: nowrap;
}
.toast-msg.show { opacity: 1; }
