/* 山本ゆりファンサイト。参考: 料理家レシピまとめ型（細い白ヘッダー・中央見出し・枠内ボタン検索・色分け食材チップ・2列カード・下部タブ） */
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --soft: #f3f1ea;
  --text: #2c2a26;
  --muted: #6b665d;
  --line: #e8e5e0;
  --line-strong: #d4d0c8;
  --accent: #a4583a;
  --accent-text: #ffffff;
  --accent-soft: #f6e6dc;
  --veg-bg: #e6eedf; --veg-fg: #4c6540;
  --meat-bg: #f5e1dd; --meat-fg: #94473f;
  --fish-bg: #e0e8f1; --fish-fg: #3c5b7c;
  --other-bg: #f0e9dc; --other-fg: #76603f;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --tap: 44px;
  --header-h: 53px;
  --nav-h: 57px;
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
button { font: inherit; color: inherit; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--accent); color: var(--accent-text); padding: 10px 16px; border-radius: 0 0 var(--r-md) var(--r-md); z-index: 30; }
.skip:focus { top: 0; }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 20; height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 20px; }
.site-name { font-size: 14px; font-weight: 700; color: var(--text); text-decoration: none; }

/* ヒーロー */
.hero { background: var(--surface); padding: 36px 16px 28px; text-align: center; border-bottom: 1px solid var(--line); }
.hero-title { font-size: 28px; line-height: 1.3; margin: 0 0 24px; letter-spacing: .02em; }
.search { display: flex; align-items: center; gap: 4px; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 4px; }
.search:focus-within { border-color: var(--accent); }
.search-icon { width: 20px; height: 20px; margin-left: 10px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { flex: 1; min-width: 0; height: 42px; border: 0; padding: 0 8px; font-size: 16px; background: transparent; color: var(--text); }
.search input:focus { outline: none; }
.search button { height: 42px; padding: 0 24px; border: 0; border-radius: 6px; background: var(--accent); color: var(--accent-text); font-size: 14px; font-weight: 500; flex: none; }
.chips-label { max-width: 560px; margin: 20px auto 10px; text-align: left; font-size: 14px; color: var(--muted); }
.ing-chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; margin: 0 auto; }
.ing { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--r-sm); font-size: 14px; }
.ing .num { font-size: 13px; opacity: 1; }
.g-veg { background: var(--veg-bg); color: var(--veg-fg); }
.g-meat { background: var(--meat-bg); color: var(--meat-fg); }
.g-fish { background: var(--fish-bg); color: var(--fish-fg); }
.g-other { background: var(--other-bg); color: var(--other-fg); }
.ing[aria-pressed="true"] { background: var(--text); color: var(--surface); }
.stats { margin: 18px 0 0; font-size: 12px; color: var(--muted); }
.stats b { color: var(--text); }

/* 結果エリア */
.results-area { background: var(--soft); padding: 20px 16px 32px; scroll-margin-top: var(--header-h); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; max-width: 1080px; margin: 0 auto 16px; }
.selected-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title { font-size: 18px; margin: 0; }
.text-btn { background: none; border: 0; color: var(--accent); font-size: 14px; min-height: var(--tap); padding: 0 4px; text-decoration: underline; }
.selected { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.selected:not(:empty) { margin-top: 10px; }
.sel-label { font-size: 12px; color: var(--muted); }
.cond { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 12px; border: 0; border-radius: 999px; background: var(--text); color: var(--surface); font-size: 13px; }
.filters { margin-top: 12px; display: grid; gap: 10px; }
.filter-row { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 8px; }
.filter-name { font-size: 12px; color: var(--muted); }
.scroll-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.scroll-chips::-webkit-scrollbar { display: none; }
.scroll-chips.wrap { flex-wrap: wrap; overflow: visible; }
.pill { flex: none; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 13px; white-space: nowrap; }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 1080px; margin: 0 auto; }
.cards:focus { outline: none; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card-link { color: var(--text); text-decoration: none; flex: 1; }
.card-link:hover h3 { text-decoration: underline; }
.card-visual { position: relative; aspect-ratio: 16 / 10; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; text-align: center; }
.v-main { font-size: clamp(17px, 4.6vw, 22px); font-weight: 700; line-height: 1.25; }
.v-sub { font-size: 13px; font-weight: 600; margin-top: 2px; }
.v-time, .v-method { position: absolute; bottom: 8px; font-size: 11px; background: var(--surface); color: var(--text); border-radius: 999px; padding: 1px 8px; }
.v-time { right: 8px; }
.v-method { left: 8px; }
.card-body { padding: 10px 12px 4px; }
.media { display: inline-block; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.card h3 { font-size: 14px; line-height: 1.45; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px 4px 4px 12px; }
.card-tags { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.tag { font-size: 12px; background: var(--soft); color: var(--text); padding: 2px 8px; border-radius: var(--r-sm); white-space: nowrap; }
.tag.is-hit { background: var(--accent-soft); font-weight: 600; }
.more-n { font-size: 11px; color: var(--muted); }
.fav { width: var(--tap); height: var(--tap); border: 0; background: none; display: grid; place-items: center; flex: none; border-radius: var(--r-md); }
.fav svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; }
.fav[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
.more-wrap { max-width: 1080px; margin: 20px auto 0; text-align: center; }
.more { min-height: var(--tap); padding: 0 28px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 14px; }
.empty { grid-column: 1 / -1; background: var(--surface); border-radius: var(--r-lg); padding: 20px; font-size: 14px; }

/* 食材一覧 */
.ingredients { margin: 20px 16px; scroll-margin-top: calc(var(--header-h) + 12px); }
@media (min-width: 1112px) { .ingredients { margin: 20px auto; } }
.segment { display: flex; gap: 4px; overflow-x: auto; margin: 12px 0; background: var(--soft); border-radius: var(--r-md); padding: 4px; scrollbar-width: none; }
.segment button { flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; font-size: 13px; color: var(--muted); }
.segment button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 700; }
.ingredients .ing-chips { max-width: none; }

/* フッター・下部タブ */
.site-footer { padding: 24px 20px 32px; font-size: 12px; color: var(--muted); text-align: center; }
.site-footer p { margin: 4px 0; }
.site-footer strong { color: var(--text); font-size: 13px; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); }
.bottom-nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); }
.bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.bottom-nav button[aria-current="true"] { color: var(--accent); font-weight: 700; }
@media (min-width: 1024px) { .bottom-nav { left: 50%; right: auto; width: 420px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; } }

/* 静的ページ（食材別・組み合わせ・調理器具）とトップの一覧リンク */
body.static { padding-bottom: 0; }
a.ing, a.pill { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
a.pill { color: var(--text); }
.crumbs { max-width: 1080px; margin: 0 auto; padding: 10px 16px 0; font-size: 12px; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--muted); }
.static-head { max-width: 1080px; margin: 0 auto; padding: 16px 16px 20px; }
.static-head h1 { font-size: 24px; line-height: 1.35; margin: 0 0 8px; }
.static-lead { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.static-lead b { color: var(--text); }
.primary-link { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 20px; border-radius: var(--r-md); background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: 14px; text-decoration: none; }
.static-head .chips-label { margin: 18px 0 8px; max-width: none; }
.static-group { margin: 0 16px 16px; }
@media (min-width: 1112px) { .static-group { margin: 0 auto 16px; } }
.home-links-wrap { padding: 0 16px; }
.home-links { margin: 20px auto; }
.home-links .ing-chips { max-width: none; margin-top: 12px; }
.home-links-more { margin: 14px 0 0; font-size: 14px; }
.home-links-more a { color: var(--accent); }

/* 入力中の候補 */
.suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 560px; margin: 8px auto 0; text-align: left; }
.suggest:empty { display: none; }
.suggest-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.suggest-item { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 14px; }

/* タップ領域は最小44px（参考サイトの40pxより優先） */
.ing, .pill, .cond, .suggest-item, .segment button, .more { min-height: var(--tap); }

/* 食材ページの集計と、このサイトについて */
.facts dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
.facts a { min-height: var(--tap, 44px); display: inline-flex; align-items: center; }
.facts-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 420px) { .facts dl { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 8px; } }
.about h2 { font-size: 17px; margin: 24px 0 8px; }
.about p, .about li { font-size: 15px; line-height: 1.8; }
.about ul { padding-left: 1.2em; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.facts a { color: var(--accent); }
