/* 即レシピ 共通スタイル
   方針: 大きい文字・短い行・強いコントラスト。料理中に読めること最優先 */
:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #6b6b6b;
  --line: #e6e1d8;
  --req: #d32f2f;
  --opt: #1976d2;
  --accent: #ff7a1a;
  --radius: 14px;
  --fs: 17px;
}
* { box-sizing: border-box; }
html { font-size: var(--fs); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h2 { font-size: 1.35rem; padding-left: .5em; border-left: 6px solid var(--accent); }
h2 small { font-weight: normal; color: var(--muted); font-size: .8rem; margin-left: .5em; }
h3 { font-size: 1.05rem; }

.site-head {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; text-decoration: none; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 6px; }
.brand img { width: 26px; height: 26px; display: block; }

main { max-width: 720px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 16px 0; }

.hero { padding: 8px 4px 0; }
.hero h1 { font-size: 2rem; }
.catch { color: var(--muted); margin: 0 0 12px; }
.tags span { display: inline-block; font-size: .8rem; background: #eee; border-radius: 999px; padding: 2px 10px; margin-right: 6px; }
.meta { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px; margin: 0; }
.meta div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.meta dt { font-size: .75rem; color: var(--muted); }
.meta dd { margin: 0; font-weight: 700; font-size: 1.1rem; }

/* 必ず / できれば */
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; color: #fff; vertical-align: middle; }
.badge-req { background: var(--req); }
.badge-opt { background: var(--opt); }
.legend { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }

/* 材料 */
.ing-group { margin-bottom: 12px; }
.ing, .tools { list-style: none; padding: 0; margin: 0; }
.ing li { border-bottom: 1px dashed var(--line); }
.ing label { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.ing input { width: 22px; height: 22px; }
.ing-name { flex: 1; }
.ing-name .badge { margin-left: 6px; }
.ing-amt { font-weight: 700; white-space: nowrap; }
.ing li.optional { color: var(--muted); }
.ing input:checked ~ .ing-name, .ing input:checked ~ .ing-amt { text-decoration: line-through; opacity: .5; }
.tools li { display: inline-block; background: #f3f0ea; border-radius: 8px; padding: 4px 10px; margin: 0 6px 6px 0; font-size: .9rem; }

/* 工程 */
.steps-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.toggle { font-size: .9rem; color: var(--muted); cursor: pointer; }
.toggle input { width: 18px; height: 18px; vertical-align: middle; }
.steps { list-style: none; padding: 0; margin: 0; }
.step {
  border: 2px solid var(--line); border-left: 8px solid var(--verb);
  border-radius: 12px; padding: 14px; margin: 14px 0; background: #fff;
}
.step.optional { border-style: dashed; background: #fbfbfb; }
.step-head { display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; align-items: start; }
.verb { display: flex; flex-direction: column; align-items: center; color: var(--verb); grid-row: span 2; }
.verb-icon { width: 48px; height: 48px; }
.verb-label { font-weight: 700; font-size: .85rem; white-space: nowrap; letter-spacing: -.02em; }
.step-title h3 { margin: 2px 0 0; font-size: 1.25rem; }
.step-no { font-weight: 700; font-size: 1.1rem; margin-right: 8px; }
.step-no small { color: var(--muted); font-weight: normal; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: .9rem; border-radius: 999px; padding: 3px 10px; background: #f3f0ea; border: 1px solid var(--line); }
.flame { width: 16px; height: 16px; color: #ddd; }
.flame.on { color: #ff5722; }
/* 入れる先 ← 入れるもの */
.put { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; row-gap: 8px; margin: 12px 0 0; padding: 10px 12px; background: #f3f0ea; border-radius: 10px; }
.where { font-weight: 900; font-size: 1.05rem; white-space: nowrap; }
.where small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.arrow { color: var(--accent); font-weight: 900; font-size: .95rem; }
.add { flex-basis: 100%; }
.add { display: flex; flex-wrap: wrap; gap: 4px; }
.add b { background: #fff; border: 2px solid var(--verb); color: var(--verb); border-radius: 8px; padding: 1px 8px; font-size: .95rem; }
.add .amt { display: inline-block; margin-left: 6px; padding-left: 6px; border-left: 1px solid var(--line); color: var(--text); font-weight: 900; }
.servings-mini { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.servings-mini button { font: inherit; font-size: .85rem; border: 0; background: #fff; padding: 4px 10px; cursor: pointer; color: var(--muted); }
.servings-mini button.on { background: var(--accent); color: #fff; font-weight: 700; }
img.verb-icon, .node img { width: 48px; height: 48px; object-fit: contain; }
.node img { width: 44px; height: 44px; }

.points { margin: 12px 0 0; padding: 0; list-style: none; }
.points li { position: relative; padding: 6px 0 6px 28px; font-size: 1.1rem; border-bottom: 1px dotted var(--line); }
.points li::before { content: "●"; position: absolute; left: 6px; color: var(--verb); }
.tip { margin: 10px 0 0; font-size: .95rem; color: #5d4037; background: #fff8e1; border-radius: 8px; padding: 8px 12px; }
.done { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.done input { width: 22px; height: 22px; }
.done svg { width: 18px; height: 18px; display: none; color: #2e7d32; }
.step:has(.done input:checked) { opacity: .45; }
.step:has(.done input:checked) .done svg { display: inline; }
body.hide-optional .step.optional { display: none; }
body.hide-optional .ing li.optional { display: none; }

/* 料理中モード: 作り方以外を隠す（文字の大きさは変えない。折り返しが増えて読みにくくなるため） */
body.cook .hero, body.cook .ad, body.cook .source, body.cook .crumb, body.cook .guide { display: none; } /* 全体像は料理中モードでも出す */
/* 料理中モードでは、AdSense が自動で差し込む広告（自動広告）も出さない */
body.cook ins.adsbygoogle, body.cook .google-auto-placed { display: none !important; }
body.cook #ingredients, body.cook .others { display: none; }
.to-top { margin: 8px 0 0; text-align: right; font-size: .9rem; }

@keyframes blink { 50% { opacity: .6; } }

/* 広告枠 */
.ad { min-height: 90px; margin: 16px 0; border: 1px dashed #ccc; border-radius: 8px; display: grid; place-items: center; color: #aaa; font-size: .8rem; }

/* トップ */
.home .hero h1 { font-size: clamp(1.3rem, 6vw, 2.2rem); }
.hero-points { list-style: none; padding: 0; margin: 0 0 12px; color: var(--muted); }
.hero-points li { padding-left: 1.3em; position: relative; }
.hero-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.recipe-list { list-style: none; padding: 0; margin: 0; }
.recipe-list a { display: grid; gap: 4px; text-decoration: none; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.recipe-list a:hover { border-color: var(--accent); }
.rl-title { font-weight: 700; font-size: 1.2rem; }
.rl-meta { color: var(--muted); font-size: .9rem; }
/* 時間・難易度・工程数は、それぞれの途中で折り返さない */
.rl-meta { display: flex; flex-wrap: wrap; gap: 0 12px; min-width: 0; }
.rl-meta > span { white-space: nowrap; }
/* 一覧: 左にサムネイル（料理の絵）、右に料理名と時間など */
.recipe-list a:has(.rl-thumb) { grid-template-columns: 120px 1fr; column-gap: 12px; align-content: center; }
.rl-thumb { grid-row: 1 / span 2; width: 120px; height: 72px; object-fit: cover; border-radius: 8px; background: #fff3e0; align-self: center; }

.site-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px; }
.source p { font-size: .9rem; color: var(--muted); margin: 0; }
.guide h3 { font-size: 1rem; margin: 14px 0 4px; }
.guide .g-ic { margin-right: .4em; }
.guide p { font-size: .95rem; line-height: 1.8; margin: 0; }

@media (max-width: 480px) {
  .meta { grid-template-columns: 1fr 1fr; }
  .meta .wide { grid-column: span 2; }
  .step-head { grid-template-columns: 56px 1fr; }
  .verb-icon { width: 40px; height: 40px; }
  .verb-label { font-size: .72rem; }
}

/* ── iPhone風スイッチ（ふつう / 料理中） ── */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-track { width: 52px; height: 32px; border-radius: 999px; background: #d0d0d0; position: relative; transition: background .2s; }
.sw-knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: left .2s; }
.switch input:checked ~ .sw-track { background: var(--accent); }
.switch input:checked ~ .sw-track .sw-knob { left: 23px; }
.sw-label { font-size: .85rem; font-weight: 700; color: #bbb; }
.switch input:not(:checked) ~ .sw-off { color: var(--text); }
.switch input:checked ~ .sw-on { color: var(--accent); }
.switch input:focus-visible ~ .sw-track { outline: 3px solid #90caf9; }

/* ── 料理画像 ── */
/* height: auto が必要。img の height="240" 属性があると高さが240pxに固定され、横に広い画面で上下が切れていた */
.dish { width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; border-radius: var(--radius); margin: 8px 0 12px; display: block; overflow: hidden; }
.dish-art { width: 100%; height: 100%; display: block; }

/* ── 難易度 ── */
.diff { display: flex; justify-content: space-between; gap: 2px; }
.diff span { font-size: .85rem; font-weight: 400; color: #b5b5b5; }
.diff span.on { color: #000; font-weight: 900; font-size: 1.15rem; border-bottom: 3px solid #000; }

/* ── 全体像 ── */
.overview { list-style: none; padding: 4px 0 8px; margin: 0; display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; }
.stage { flex: 0 0 auto; width: 96px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; scroll-snap-align: start; }
.stage + .stage::before { content: "▶"; position: absolute; left: -9px; top: calc(var(--in-rows, 3) * 23px + 15px); color: #bbb; font-size: .75rem; }
/* 材料札の欄の高さは、そのレシピで一番多い段に合わせる（--in-rows は build-site.mjs が入れる）。固定だと4つ以上で上が切れる */
.inputs { height: calc(var(--in-rows, 3) * 23px); display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: flex-end; }
.inputs span { font-size: .72rem; background: #f3f0ea; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.drop { height: 14px; font-size: .6rem; color: #999; line-height: 14px; }
.node { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; }
.node svg { width: 40px; height: 40px; }
.stage.req .node { background: #fff; color: var(--verb); border: 4px solid var(--verb); }
.stage.opt .node { background: #fff; color: var(--verb); border: 3px dashed var(--verb); }
.stage.goal .node { background: #ffe0b2; }
.stage-title { font-weight: 700; font-size: .85rem; margin-top: 4px; line-height: 1.3; }
.stage-time { display: block; font-weight: 400; font-size: .75rem; color: #333; margin-top: 2px; }
.stage.opt .stage-title { color: var(--verb); }
.stage.req .stage-title { color: var(--verb); }
/* 凡例は「見本・名前・説明」の3列にそろえる（説明が折り返しても左端がそろう） */
.legend { display: grid; grid-template-columns: 22px max-content 1fr; gap: 6px 8px; align-items: center; font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.lg { display: contents; }
.lg b { white-space: nowrap; }
/* その料理のポイント（1行だけ）。全体像の上に置く */
.point { margin: 0 0 12px; padding: 2px 0 2px 10px; border-left: 3px solid #f0b27a; line-height: 1.5; }
.point b { display: block; font-size: .75rem; color: #b8641e; }
.ov-hint { font-size: .75rem; color: #999; margin: 0; text-align: right; overflow: hidden; }
/* 横に動かし続けて「スクロールできる」ことに気づかせる（ユーザーの指定で、止めない） */
.ov-hint span { display: inline-block; animation: ov-nudge 1.6s ease-in-out infinite; }
@keyframes ov-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-10px); } }
.lg i { width: 22px; height: 22px; border-radius: 6px; display: inline-block; }
.lg-req { border: 4px solid var(--req); background: #fff; }
/* 小さい四角だと border の dashed は線が長くて実線に見えるので、SVG で細かい点線にする */
.lg-opt { width: 22px; height: 22px; flex: 0 0 auto; color: var(--opt); }

/* ── 分量スライダー ── */
.servings { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; background: #f3f0ea; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }
.servings-label { font-weight: 700; grid-row: span 2; }
.servings input[type=range] { width: 100%; accent-color: var(--accent); height: 32px; margin: 0; }
.servings-ticks { display: flex; justify-content: space-between; font-size: .85rem; color: #999; padding: 0 4px; }
.servings-ticks span.on { color: #000; font-weight: 900; font-size: 1.05rem; }
.ing-note { display: block; font-size: .75rem; color: var(--muted); }

/* ── 用語（タップで解説） ── */
.term { font: inherit; background: none; border: 0; padding: 0; color: #1565c0; cursor: pointer; text-decoration: underline dotted 2px; text-underline-offset: 3px; }
/* 「?」は右上に浮かせず、文字と同じ高さ（行の真ん中）に置く */
.term::after { content: "?"; display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; font-size: .5em; font-weight: 700; line-height: 1; margin-left: 2px; border-radius: 50%; background: #1565c0; color: #fff; vertical-align: 0.45em; }
.glossary { border: 0; border-radius: 16px; padding: 20px; max-width: 340px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.glossary::backdrop { background: rgba(0,0,0,.45); }
.glossary { cursor: pointer; }
.glossary .gl-hint { margin: -6px 0 10px; text-align: center; font-size: .75rem; color: #999; }
.glossary .pic { width: 160px; height: 160px; margin: 0 auto 8px; }
.glossary .pic svg { width: 100%; height: 100%; }
.glossary h3 { text-align: center; font-size: 1.3rem; margin: 0 0 8px; }
.glossary p { margin: 0; font-size: 1rem; }

/* ── ヘッダーのナビ ── */
.site-head { gap: 8px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { position: relative; text-decoration: none; font-size: .8rem; padding: 6px 8px; border-radius: 8px; color: var(--muted); display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.nav a span { font-size: .65rem; }
.nav a:hover { background: #f3f0ea; }
.nav-count { position: absolute; top: 0; right: 0; background: var(--req); color: #fff; font-size: .6rem; font-style: normal; border-radius: 999px; padding: 0 5px; }
.switch { margin-left: 4px; }
@media (max-width: 480px) { .brand { font-size: .95rem; } .switch .sw-label { font-size: .7rem; } .switch { gap: 4px; } .nav a { padding: 4px 5px; } .nav a span { display: none; } }

/* パンくず・アクション */
.crumb { font-size: .8rem; color: var(--muted); margin: 4px 0 8px; }
.crumb a { color: var(--muted); }
.tags a { display: inline-block; font-size: .8rem; background: #eee; border-radius: 999px; padding: 2px 10px; margin-right: 6px; text-decoration: none; }
/* スマホ（幅360px〜）でも3つのボタンが1行に収まる大きさ */
.actions { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0 4px; }
.act { font: inherit; font-size: .78rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 8px; cursor: pointer; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.act svg { width: 16px; height: 16px; }
.share-menu { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; padding: 8px; background: #f6f3ee; border-radius: 12px; }
.share-menu[hidden] { display: none; }
.share-menu a, .share-menu button { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; text-decoration: none; color: var(--text); }
/* 「今日作るに追加」「後で見るに追加」は色を塗って目立たせる（光らせない。ユーザーの指定）。追加したら白地に戻す */
.act-today:not(.on) { background: var(--req); border-color: var(--req); color: #fff; font-weight: 700; }
.act-later:not(.on) { background: var(--opt); border-color: var(--opt); color: #fff; font-weight: 700; }
.act-today.on { border-color: var(--req); color: var(--req); background: #fff5f5; font-weight: 700; }
.act-later.on { border-color: var(--opt); color: var(--opt); background: #f3f8ff; font-weight: 700; }
/* 作り方の一番下にも同じボタン（料理中モードでは出さない） */
.actions-bottom { justify-content: center; margin: 18px 0 4px; }
body.cook .actions-bottom { display: none; }
.btn { display: inline-block; font: inherit; border: 2px solid var(--accent); background: var(--accent); color: #fff; border-radius: 999px; padding: 8px 16px; cursor: pointer; text-decoration: none; font-weight: 700; }

/* 検索 */
.search { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s-field { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--muted); }
.s-main { grid-column: 1 / -1; }
.s-field input, .s-field select, .s-field textarea { font: inherit; font-size: 1rem; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; width: 100%; min-width: 0; box-sizing: border-box; }
.s-field { min-width: 0; }
.s-main input { font-size: 1.1rem; }
/* 検索欄は3行。例を1行に1つずつ、欄の中に収める */
.s-main textarea { font-size: .95rem; line-height: 1.5; resize: none; overflow: hidden; display: block; }
/* 例の文字は入力の文字と同じ大きさにする（小さくすると3行の欄に空きができ、4行に見えるため） */
.s-main textarea::placeholder { color: #aaa; }
.s-field input:focus, .s-field textarea:focus { border-color: var(--accent); outline: none; }
.s-clear { grid-column: 1 / -1; justify-self: end; font: inherit; font-size: .85rem; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.s-result { font-size: .9rem; color: var(--muted); min-height: 1.4em; margin: 6px 0; }
.recipe-list li[hidden] { display: none; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: #f3f0ea; border-radius: 999px; padding: 6px 12px; text-decoration: none; font-size: .95rem; }
.pill small { color: var(--muted); font-size: .75rem; }
/* 料理用語のページ */
.glossary-page h1 { font-size: 1.6rem; margin: 0 0 8px; }
.glossary-page h1 small { font-size: .9rem; color: var(--muted); font-weight: 400; }
.gl-pic { width: 180px; height: 180px; margin: 4px auto 8px; }
.gl-pic svg { width: 100%; height: 100%; }
.gl-text { font-size: 1.1rem; line-height: 1.8; margin: 0; }
.gl-list { margin: 8px 0 0; }
.gl-list > div { padding: 10px 0; border-top: 1px solid var(--line); }
.gl-list dt { font-weight: 700; font-size: 1.05rem; }
.gl-list dd { margin: 2px 0 0; color: var(--text); }
.gl-list dd small { color: var(--muted); }


/* あとで作る・買い物 */
.saved-list li { position: relative; }
.saved-ctl { display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--muted); margin: -4px 0 12px 12px; }
.saved-ctl select, .saved-ctl button { font: inherit; font-size: .85rem; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.shop-recipes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
#shopList h3 { margin-top: 16px; }

/* 法務ページ */
.doc h1 { font-size: 1.5rem; }
.doc h2 { font-size: 1.1rem; margin-top: 24px; }
.doc p { margin: 8px 0; }
.kv { border-collapse: collapse; width: 100%; }
.kv th, .kv td { border: 1px solid var(--line); padding: 8px; text-align: left; }
.kv th { background: #f6f3ee; width: 30%; }
.muted { color: var(--muted); font-size: .9rem; }
.site-foot nav { margin-bottom: 6px; }
.site-foot a { color: var(--muted); }

/* 通知 */
#toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%) translateY(20px); background: #1f1f1f; color: #fff; padding: 8px 16px; border-radius: 999px; font-size: .9rem; opacity: 0; transition: .2s; z-index: 30; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* 印刷: 作り方と材料だけ */
@media print {
  .site-head, .site-foot, .ad, .actions, .share-menu, .others, .glossary, .crumb, .switch, .servings, .servings-mini, .toggle, .done, .ov-hint, #toast { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .card { border: 0; padding: 0; margin: 10px 0; break-inside: avoid; }
  .step { break-inside: avoid; }
  .dish { max-height: 160px; }
}

/* 音声入力・解釈表示 */
.s-row { display: flex; gap: 6px; }
.s-row input { flex: 1; }
.s-parsed { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.s-parsed span { background: #fff8e1; border: 1px solid #f0d78c; border-radius: 999px; padding: 1px 10px; color: var(--text); }

/* 同時に作るバー（画面下に固定） */
.cookbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: center; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #1f1f1f; overflow-x: auto; box-shadow: 0 -4px 16px rgba(0,0,0,.25); }
.cb-label { color: #bbb; font-size: .7rem; white-space: nowrap; flex: 0 0 auto; }
.cookbar a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: #fff; background: #3a3a3a; border-radius: 999px; padding: 8px 14px; font-size: .9rem; white-space: nowrap; }
.cookbar a.on { background: var(--accent); font-weight: 700; }
.cookbar a.tmp { outline: 1px dashed #aaa; opacity: .85; }
.cookbar a small { background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 6px; font-size: .7rem; }
.cookbar .cb-add { background: transparent; border: 1px dashed #777; color: #bbb; padding: 6px 12px; }
body { padding-bottom: 64px; }
.cb-empty { color: #bbb; font-size: .8rem; white-space: nowrap; }
.toggle-btn { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; cursor: pointer; color: var(--muted); }
@media print { .cookbar { display: none !important; } }

/* トップの分類ボタン */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tiles.t3 { grid-template-columns: repeat(3, 1fr); }
.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: #fff; color: inherit; }
.tile:hover { border-color: var(--accent); }
.tile .te { font-size: 1.6rem; line-height: 1; height: 1.6rem; display: flex; align-items: center; }
.tile .te svg { width: 1.75rem; height: 1.75rem; }
.tile b { font-size: .9rem; }
.tile small { color: var(--muted); font-size: .72rem; }
@media (max-width: 480px) { .tiles { gap: 6px; } .tile b { font-size: .8rem; } }
.all-link { text-align: center; margin: 8px 0 24px; }

/* 難易度: 押すたびにオン・オフ（いくつでも選べる） */
.s-diff { grid-column: 1 / -1; }
.s-diff small { font-size: .75rem; }
.diff-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.diff-pick label { position: relative; }
.diff-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.diff-pick span { display: block; text-align: center; font-size: 1rem; white-space: nowrap; color: var(--text); padding: 9px 2px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.diff-pick input:checked + span { border-color: var(--accent); background: #fff3e8; font-weight: 700; }
.diff-pick input:checked + span::before { content: "✓"; color: var(--accent); margin-right: 2px; }
.diff-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 共有メニューのアイコン */
.sh-ic { width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; margin-right: 8px; border-radius: 6px; }

/* 料理中モードだけ出る「文字の大きさ」 */
/* 文字の大きさ: ページの一番上、右寄せの1行。通常・料理中どちらでも出す */
.fs-ctl { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.fs-ctl span { margin-right: 2px; }
.fs-ctl button { font: inherit; font-size: .9rem; padding: 5px 11px; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); cursor: pointer; }
.fs-ctl button.on { border-color: var(--accent); background: #fff3e8; font-weight: 700; }

/* このサイトの使い方（押すと開く） */
.howto { margin: 0 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.howto summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.howto ol { margin: 8px 0 4px; padding-left: 1.4em; font-size: .95rem; }
.howto li { margin: 4px 0; }

/* 入力欄のすぐ下の件数・押した分類 */
.s-live { font-weight: 700; color: var(--accent); margin-left: 6px; }
.s-cat { grid-column: 1 / -1; margin: 0; font-size: .9rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.s-cat b { background: #fff3e8; border: 1px solid var(--accent); border-radius: 999px; padding: 1px 10px; }
.s-cat button { font: inherit; font-size: .8rem; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* 下のバー: 料理中モードでは「タップで切り替え」と出す */
.cb-l2 { display: none; }
body.cook .cb-l1 { display: none; }
body.cook .cb-l2 { display: inline; color: var(--accent); font-weight: 700; }
.share-menu a, .share-menu button { display: inline-flex; align-items: center; }
.nav-ic { width: 1.35em; height: 1.35em; display: block; object-fit: contain; }
h2 .nav-ic { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -0.15em; }
