:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --line: #e6e6e2;
  --text: #2b2b2b;
  --muted: #8a8a82;
  --accent: #e8572a;          /* メイン（オレンジ系） */
  --accent-weak: #fdeee8;
  --rakuten: #bf0000;
  --stock: #2a8a5a;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "M PLUS Rounded 1c", system-ui, -apple-system,
    "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;   /* フルブリード(100vw)による横スクロール防止 */
}

/* ---- ヘッダー / タブ ---- */
.header {
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;                 /* スリムに */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
/* タイトルとサブタイトルを横並び（サブをタイトル右に） */
.header__main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 12px;
}
.header h1 { margin: 0; font-size: 20px; letter-spacing: 0.02em; }
.header__by {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  white-space: nowrap;
}
.header__by:hover { text-decoration: underline; color: #fff; }
.header__sub {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.4;
}
.header__right { display: flex; align-items: center; gap: 10px; }
.auth { display: flex; align-items: center; gap: 8px; }
.auth__avatar { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.3); }
.auth__name { font-size: 13px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth__btn {
  font-size: 11px; color: #fff;
  background: rgba(255,255,255,0.18); border: none;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.auth__hint { font-size: 11px; opacity: 0.8; }
.header__help {
  font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 5px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.header__help:hover { background: rgba(255, 255, 255, 0.3); }
.auth__admin {
  font-size: 11px; font-weight: 800; color: var(--accent);
  background: #fff; border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 4px 10px; border-radius: 999px; text-decoration: none;
  white-space: nowrap;
}
.auth__admin:hover { background: #fff; opacity: 0.9; }

.header__count {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);   /* もっと薄く */
  border-radius: 999px;                    /* 横長ピル型 */
  padding: 4px 14px;
  line-height: 1.1;
}
.header__count-num { font-size: 18px; font-weight: 700; }
.header__count-label { font-size: 11px; opacity: 0.85; }
.header__count-unit { font-size: 11px; opacity: 0.85; }

@media (max-width: 480px) {
  .header__sub { display: none; }       /* 狭い画面では説明を省きカウントを確保 */
  .header h1 { font-size: 19px; }
  .header__count { padding: 6px 10px; }
  .header__count-num { font-size: 20px; }
  .auth__name { display: none; }
}

.tabs {
  display: flex;
  gap: 4px;
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.tab {
  flex: 0 0 auto;
  padding: 10px 18px;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.tab.is-active {
  color: var(--accent);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

/* ---- レイアウト ---- */
.container { max-width: 1080px; margin: 0 auto; padding: 16px; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---- ヒーロー（背景画像＋検索窓を下側に） ---- */
.hero {
  position: relative;
  /* コンテンツ枠を飛び出してビューポート全幅(フルブリード) */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -16px;
  margin-bottom: 14px;
  height: calc(100vh - 92px);          /* ヘッダー+タブ分を引いた画面の高さ */
  background: #c9745c;
  overflow: hidden;
}
.hero__img {                           /* 横いっぱいに敷く・スライドはクロスフェード */
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__img.is-active { opacity: 1; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.12), rgba(0,0,0,0.32));
  z-index: 1;
}
.hero__inner {
  position: absolute; left: 0; right: 0; top: calc(50% - 51px);
  transform: translateY(-50%);         /* 検索窓を画面の縦中央に（ヘッダー分を補正） */
  z-index: 2; padding: 16px;
}

/* 検索後：ヒーローを帯状に縮め、画像は上下トリミング（フル幅は維持） */
body.has-searched .hero { aspect-ratio: auto; height: 40vh; }
body.has-searched .hero__catch { display: none; }
.hero__catch {
  position: absolute;                        /* 検索窓の上に重ね、中央寄せに影響させない */
  bottom: 100%;
  left: 0; right: 0;
  margin: 0 0 14px;
  color: #fff;
  font-weight: 400;                         /* 細めに */
  font-size: 34px;                          /* 倍に */
  text-shadow:
    0 0 4px #000, 0 0 9px rgba(0,0,0,0.9),
    0 0 16px rgba(0,0,0,0.6);               /* ぼかした縁取り */
  text-align: center;                       /* 左右中央 */
}
.searchbar--hero {
  width: 50%;                               /* 今の半分 */
  margin: 0 auto;                           /* 中央寄せ */
}
/* 掲載レシピ数：検索窓の下に中央表示（中央寄せに影響させないため絶対配置） */
.hero__count {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  margin: 16px 0 0;
  text-align: center;
  color: #fff;                              /* ラベルは白 */
  font-size: 26px;                          /* さらに倍 */
  font-weight: 400;                         /* 細めに */
  text-shadow:
    0 0 4px #000, 0 0 9px rgba(0,0,0,0.9),
    0 0 16px rgba(0,0,0,0.6);               /* ぼかした縁取り */
}
.hero__count #count-num {
  font-size: 52px;
  font-weight: 500;                         /* 細めに */
  color: var(--accent);                     /* 数字だけブランドのオレンジ */
}

/* 背景は透明。文字は黒い縁取りで透かし表示 */
.hero__hl { background: none; padding: 0; }
.searchbar--hero input { background: rgba(255,255,255,0.96); border-color: transparent; }

@media (max-width: 480px) {
  .hero__catch { font-size: 22px; }
  .hero__count { font-size: 18px; }
  .hero__count #count-num { font-size: 34px; }
  .searchbar--hero { width: 100%; }         /* スマホは全幅 */
}

/* ---- 今日のイチオシ特集 ---- */
.feature {
  background: linear-gradient(135deg, var(--accent-weak), #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin: 4px 0 16px;
  box-shadow: var(--shadow);
  text-align: center;
}
.feature[hidden] { display: none; }
.feature__scene {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 8px;
}
.feature__title { margin: 4px 0; font-size: 22px; color: var(--text); }
.feature__desc { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.feature__chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.feature__chip {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
}
.feature__chip::before { content: "#"; opacity: 0.7; margin-right: 1px; }
.feature__chip:hover { filter: brightness(1.05); }
body.has-searched .feature { display: none; }   /* 検索したら隠す */

/* ---- 日替わりフードエッセイ ---- */
.column {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 4px 0 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.column[hidden] { display: none; }
.column__inner { padding: 20px 22px; }
.column__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-weak);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 8px;
}
.column__title { margin: 4px 0 12px; font-size: 21px; color: var(--text); }
.column__body {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: #4a4a46;
  white-space: pre-wrap;        /* \n を改行として表示 */
}
.column__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;       /* タグを中央寄せ */
  margin: 26px 0;                /* タグの上下にスペース */
}
.column__tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-weak);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.column__tag::before { content: "#"; opacity: 0.7; }
.column__tag:hover { background: var(--accent); color: #fff; }
/* コラムにちなんだレシピ（横一杯に5品） */
.column__perma-wrap { text-align: center; margin: 6px 0 2px; }
.column__perma { font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; }
.column__perma:hover { text-decoration: underline; }
.column__recipe { margin: 18px 0 0; width: 100%; }
.column__recipe[hidden] { display: none; }
.column__recipe-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.column__recipe-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 600px) {
  .column__recipe-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 46%;
    overflow-x: auto;
    padding-bottom: 6px;
  }
}
body.has-searched .column { display: none; }   /* 検索したら隠す */

/* コラム見出し＋お気に入り★ */
.column__date { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.column__fav {
  flex: 0 0 auto;
  font-size: 24px; line-height: 1;
  background: none; border: none; cursor: pointer;
  color: #d6d3cc;                       /* 未お気に入り：グレー */
  transition: transform 0.1s ease;
}
.column__fav.is-fav { color: #f3b50e; } /* お気に入り：金 */
.column__fav:active { transform: scale(1.2); }

/* オレンジのコラムヘッダー（カテゴリ・タイトル・日付＋右に★、中央寄せ） */
.column__header {
  position: relative;
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 16px 52px 14px;             /* 左右は★ぶんの余白 */
}
.column__header .column__cat {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 0 6px;
}
.column__header .column__title,
.column__header .colm__title {
  margin: 0 0 6px;
  color: #fff;
}
.column__header .column__date,
.column__header .colm__date {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}
.column__header .column__fav {
  position: absolute;
  top: 50%; right: 16px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);      /* 未お気に入り：薄白 */
}
.column__header .column__fav.is-fav { color: #ffdc4d; }  /* お気に入り：黄 */
/* モーダル版：閉じる✕と被らないよう全幅＋★は下寄せ */
.column__header--modal {
  margin: -22px -22px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.column__header--modal .column__fav { top: auto; bottom: 12px; transform: none; }
.colm__inner { margin: 0; }

/* 過去ログ（カレンダー＋最近） */
.archive { display: flex; gap: 16px; margin: 4px 0 16px; }
.archive[hidden] { display: none; }
body.has-searched .archive { display: none; }   /* 検索結果ページでは隠す */
.archive__cal {
  flex: 1 1 0; min-width: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  overflow: hidden;
}
.archive__cal-head {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: -12px -12px 10px; padding: 9px 12px; font-weight: 700;
  background: var(--accent); color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.archive__nav { border: none; background: rgba(255, 255, 255, 0.25); color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 16px; }
.archive__nav:hover { background: rgba(255, 255, 255, 0.4); }
.archive__cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal__wd { text-align: center; font-size: 11px; color: var(--muted); padding: 2px 0; }
.cal__day { min-height: 48px; border: 1px solid var(--line); border-radius: 6px; padding: 3px; overflow: hidden; }
.cal__day--has { background: var(--accent-weak); border-color: var(--accent); }
.cal__num { font-size: 11px; color: var(--muted); }
.cal__col {
  display: block; width: 100%; margin-top: 2px;
  border: none; background: none; cursor: pointer; text-align: left;
  font-size: 10px; font-weight: 700; color: var(--accent); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.archive__recent {
  flex: 0 0 260px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  overflow: hidden;
}
.archive__title {
  margin: -14px -16px 12px; padding: 9px 12px; font-size: 14px;
  background: var(--accent); color: #fff; text-align: center;
  border-radius: var(--radius) var(--radius) 0 0;
}
.archive__list { list-style: none; margin: 0; padding: 0; }
.archive__item {
  width: 100%; display: flex; gap: 8px; align-items: baseline;
  border: none; background: none; cursor: pointer; text-align: left;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.archive__item-date { flex: 0 0 auto; font-size: 11px; color: var(--muted); }
.archive__item-title { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive__item:hover .archive__item-title { color: var(--accent); }

/* コラム表示モーダル */
.colm__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-right: 34px; }
.colm__title { margin: 6px 0 4px; font-size: 22px; color: var(--text); }
.colm__date { margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.colm__body { margin: 0; font-size: 15px; line-height: 2; color: #4a4a46; white-space: pre-wrap; }
.colm__tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
/* モーダル内のちなんだレシピは横スクロール */
#colm-recipe .column__recipe-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 140px;
  overflow-x: auto;
  padding-bottom: 6px;
}
#modal { z-index: 60; }   /* レシピ詳細はコラムモーダルより前面に */

/* お気に入りコラム一覧（ストックタブ） */
.favcol-list { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.favcol-item {
  display: flex; align-items: baseline; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer; text-align: left; width: 100%;
}
.favcol-item:hover { border-color: var(--accent); }
.favcol-cat { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-weak); border-radius: 999px; padding: 2px 10px; }
.favcol-date { flex: 0 0 auto; font-size: 11px; color: var(--muted); }
.favcol-title { font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
  .archive { flex-direction: column; }
  .archive__recent { flex-basis: auto; }
}

@media (max-width: 480px) {
  .column__img { height: 180px; }
  .column__recipe { width: 100%; }
}

/* ---- 検索バー ---- */
.searchbar { display: flex; gap: 8px; }
.searchbar input {
  flex: 1;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.searchbar input:focus {
  outline: none;
  border-color: var(--accent);
}
.searchbar button {
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.searchbar button:active { transform: translateY(1px); }

/* 音声入力マイクボタン */
.searchbar button.mic {
  flex: 0 0 auto;
  width: 46px;
  padding: 0;
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.searchbar--hero button.mic { background: rgba(255, 255, 255, 0.96); border-color: transparent; }
.searchbar button.mic { position: relative; }
.searchbar button.mic:active { transform: none; }
/* 録音中：赤＋拡大パルス＋外側に広がるリング（ソナー）ではっきり明示 */
.searchbar button.mic.is-recording {
  color: #fff;
  background: #e02424;
  border-color: #e02424;
  animation: micpulse 0.85s ease-in-out infinite;
}
.searchbar button.mic.is-recording svg { animation: micwave 0.85s ease-in-out infinite; }
.searchbar button.mic.is-recording::after,
.searchbar button.mic.is-recording::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid #e02424;
  pointer-events: none;
  animation: micring 1.3s ease-out infinite;
}
.searchbar button.mic.is-recording::before { animation-delay: 0.65s; }
@keyframes micpulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(224, 36, 36, 0.65); }
  50%  { transform: scale(1.16); box-shadow: 0 0 0 12px rgba(224, 36, 36, 0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(224, 36, 36, 0); }
}
@keyframes micring {
  0%   { transform: scale(1);    opacity: 0.75; }
  100% { transform: scale(2.3);  opacity: 0; }
}
@keyframes micwave {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}

.hint { color: var(--muted); font-size: 13px; margin: 8px 2px; }

/* URLで追加：説明＋取得できたサイト */
.add-help {
  margin: 18px 0 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.add-help__title {
  margin: 14px 0 8px;
  font-size: 14px;
  border-left: 4px solid var(--accent);
  padding-left: 8px;
}
.add-help__title:first-child { margin-top: 0; }
.add-help__text { margin: 0; font-size: 13px; line-height: 1.9; color: #4a4a46; }
.add-help__note { margin: 10px 0 0; font-size: 11px; color: var(--muted); }
.add-sites { display: flex; flex-wrap: wrap; gap: 8px; }
.add-site {
  font-size: 13px;
  background: var(--accent-weak);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 12px;
}
.add-site b { color: var(--accent); margin-left: 2px; }
.add-sites__empty { font-size: 13px; color: var(--muted); }

/* 解析タグ */
.terms { margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.term {
  background: var(--accent-weak);
  color: var(--accent);
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 999px;
}

.status { color: var(--muted); padding: 14px 2px; min-height: 1em; }
.status.error { color: var(--rakuten); }

/* ---- カードグリッド ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.08s ease;
  display: flex;
  flex-direction: column;
}
.card__del {
  position: absolute;
  top: 8px; left: 8px;
  width: 30px; height: 30px;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.card__del:hover { background: var(--rakuten); }
/* マイストック★ボタン（写真の左上に重ねる） */
.card__fav {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  width: 30px; height: 30px;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s ease;
}
.card__fav:hover { background: rgba(0, 0, 0, 0.65); }
.card__fav:active { transform: scale(1.2); }
.card__fav.is-fav { color: #ffd84d; }   /* 保存済み：黄 */
/* 調理時間・カロリーのバッジ（写真の上に重ねる） */
.card__badges {
  position: absolute;
  top: 8px; right: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.card__time, .card__kcal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.card__time svg { display: block; }
.card__time--short  { background: #2a8a5a; }   /* 〜15分: 時短(緑) */
.card__time--medium { background: #f3c211; color: #4a3a00; }   /* 16〜40分: ふつう(黄) */
.card__time--long   { background: #c0392b; }   /* 41分〜: じっくり(赤) */
.card__time--na     { background: rgba(0, 0, 0, 0.62); }
.card__kcal { background: rgba(214, 92, 17, 0.85); }   /* カロリー(オレンジ) */
.card:hover { transform: translateY(-2px); }
.card__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eee;
  display: block;
}
.card__body { padding: 10px 12px; }
.card__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }

.badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  padding: 1px 8px;
  border-radius: 999px;
}
.badge--rakuten { background: var(--rakuten); }
.badge--stock { background: var(--stock); }
.badge--world { background: #2a6dbf; }
.badge--maff { background: #2a8a5a; }
.badge--youtube { background: #c4302b; }

/* ---- サイトフッター ---- */
.site-footer {
  margin-top: 40px;
  background: #2b2b2b;
  color: #d8d5cf;
}
.foot-grid {
  max-width: 980px; margin: 0 auto; padding: 30px 20px 18px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px;
}
.foot-brand { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.foot-about { font-size: 13px; line-height: 1.8; color: #b8b4ac; margin: 0; max-width: 42ch; }
.foot-col h4 { font-size: 13px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.foot-col a { display: block; font-size: 13px; color: #c9c5bd; text-decoration: none; padding: 4px 0; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center; font-size: 12px; color: #9a968f;
  padding: 14px 20px; margin-top: 8px;
}
@media (max-width: 620px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 18px 24px; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}

/* ---- モーダル ---- */
.modal { position: fixed; inset: 0; z-index: 50; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.modal__body {
  position: relative;
  max-width: 640px;
  margin: 5vh auto;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
}
.modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: #f0f0ec; font-size: 16px; cursor: pointer;
}
.detail__img {
  width: 100%; max-height: 320px; object-fit: cover;
  border-radius: var(--radius); background: #eee;
}
.detail__video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;            /* 16:9 */
  margin: 6px 0 4px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.detail__video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.detail__kcal {
  margin: 6px 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  background: var(--accent-weak);
  border-radius: 8px;
  padding: 8px 12px;
}
.detail__kcal[hidden] { display: none; }
.detail__kcal-note { font-size: 11px; font-weight: 400; color: var(--muted); }
.detail__title { font-size: 20px; margin: 14px 0 8px; }
.detail__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0; }
.detail__fav {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--accent); background: #fff;
  color: var(--accent); font-weight: 700; font-size: 13px; cursor: pointer;
  transition: transform 0.1s ease;
}
.detail__fav:hover { background: var(--accent-weak); }
.detail__fav:active { transform: scale(1.05); }
.detail__fav.is-fav { background: var(--accent); color: #fff; }
.detail__link {
  display: inline-block; margin: 4px 0 14px;
  color: var(--accent); font-weight: 700; text-decoration: none;
}
.detail__attr { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.detail h3 {
  font-size: 15px; margin: 18px 0 8px;
  border-left: 4px solid var(--accent); padding-left: 8px;
}
.detail ul, .detail ol { margin: 0; padding-left: 22px; }
.detail li { margin: 4px 0; }
.detail__empty { color: var(--muted); font-size: 14px; }

/* ストックのフィルタchip */
.stock-filter { display: flex; gap: 8px; margin: 4px 0 6px; }
.chip {
  padding: 6px 14px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--muted); cursor: pointer;
}
.chip.is-active {
  background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700;
}

/* マイストックの料理カテゴリー絞り込み */
.mine-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px; }
.mine-cats[hidden] { display: none; }
.mine-cat {
  padding: 5px 13px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--text); cursor: pointer;
}
.mine-cat:hover { border-color: var(--accent); color: var(--accent); }
.mine-cat.is-active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* もっと見る */
.more { text-align: center; padding: 18px 0; }
.more__btn {
  padding: 10px 28px; font-size: 14px; font-weight: 700;
  color: var(--accent); background: var(--card);
  border: 1px solid var(--accent); border-radius: var(--radius); cursor: pointer;
}
.more__btn[hidden] { display: none; }
.more__btn:hover { background: var(--accent-weak); }

@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
