/* 食品のカロリー・たんぱく質くらべ
   正本: ~/.claude/article-ui-regulation.md・~/.claude/site-layout-regulation.md（確定値は docs/layout-style-guide.md） */
:root {
  --ink: #1d2433;
  --ink2: #333b4c;
  --muted: #4a5263;
  --indigo: #7f3419;
  --indigo-deep: #4f200f;
  --link: #1d5f8a;
  --accent: #a4541a;
  --accent-ink: #8a3810;
  --bg: #ece3db;
  --panel: #ffffff;
  --band: #f4e8df;
  --zebra: #faf6f2;
  --rowhead: #f3ebe4;
  --callout: #fbf0e9;
  --quote: #f7f1ec;
  --warn: #9b2f2f;
  --warn-bg: #fbf1f0;
  --ok: #2c6637;
  --marker: #fbf6af;
  --line: #dccfc4;
  --radius-sm: 4px;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--bg);
}
a { color: var(--link); }
a:hover { color: var(--indigo-deep); }

h1, h2, h3 {
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
  line-height: 1.45;
}
@supports (word-break: auto-phrase) {
  h1, h2, h3 { word-break: auto-phrase; }
}

/* ヘッダー（固定） */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--indigo);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}
header.site nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 24px;
}
header.site .site-name {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  margin-right: auto;
}
header.site .nav-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
header.site .nav-links a { color: #e9eef4; text-decoration: none; font-size: 16px; padding: 2px 0; border-bottom: 2px solid transparent; }
header.site .nav-links a:hover, header.site .nav-links a[aria-current="page"] { color: #fff; border-bottom-color: #d9a86b; }

/* ヘッダー直下の「公式の窓口ではない」の1行（site-standard A13） */
.site-notice { margin: 0; padding: 6px 24px; background: var(--band); color: var(--ink2); font-size: 14px; line-height: 1.6; text-align: center; border-bottom: 1px solid var(--line); }
.site-notice a { color: var(--link); margin-left: 8px; }

/* ヒーロー（小さく。1440px幅で260px以下・390px幅で380px以下） */
.hero {
  background-color: #dde5ee;
  border-bottom: 3px solid var(--indigo);
}
.hero .inner { max-width: 1120px; margin: 0 auto; padding: 18px 24px 20px; }
.hero h1 { font-size: 28px; margin: 6px 0 8px; color: var(--indigo-deep); }
.hero .lead { margin: 0; font-size: 17px; color: var(--ink2); max-width: 900px; }
.hero .meta { margin: 6px 0 0; font-size: 16px; color: var(--muted); }

.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 16px; }
.breadcrumb li + li::before { content: "›"; margin: 0 6px; color: var(--muted); }
.breadcrumb a { color: var(--link); }
.breadcrumb li[aria-current] { color: var(--muted); }

/* 本体 */
main { padding: 24px 16px 48px; }
.panel {
  max-width: 1120px;
  margin: 0 auto 28px;
  background: var(--panel);
  border-radius: 8px;
  padding: 28px 32px 32px;
  border: 1px solid var(--line);
}
.article { max-width: 680px; }
.panel p, .panel li { max-width: 40em; }
.article p, .article li { font-size: 18px; line-height: 2; color: var(--ink2); }
.article p { margin: 0 0 14px; }
.article ul, .article ol:not(.steps) { padding-left: 1.4em; margin: 0 0 16px; }

/* h2 は薄い帯＋左のアクセントバー（真っ黒帯にしない） */
.panel h2 {
  font-size: 24px;
  margin: 34px 0 16px;
  padding: 9px 14px;
  background-color: var(--band);
  border-left: 5px solid var(--indigo);
  border-radius: 0 8px 8px 0;
  color: var(--indigo-deep);
}
.panel h2:first-child { margin-top: 0; }
.panel h3 { font-size: 20px; margin: 26px 0 10px; color: var(--indigo-deep); }

/* 蛍光マーカー（結論文） */
.mk { background-color: var(--marker); font-weight: 700; color: var(--ink); }

/* 表：ヘッダー行は濃色地＋白文字、本文行は縞 */
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.7; }
table.wide { min-width: 960px; }
thead th { background-color: var(--indigo); color: #fff; text-align: left; font-weight: 700; padding: 10px 12px; vertical-align: bottom; }
tbody td, tbody th { padding: 10px 12px; vertical-align: top; border-top: 1px solid var(--line); text-align: left; }
tbody tr:nth-child(even) td { background-color: var(--zebra); }
tbody th { background-color: var(--rowhead); font-weight: 700; color: var(--indigo-deep); white-space: nowrap; }
td .none { color: var(--muted); }
caption { caption-side: top; text-align: left; font-size: 16px; color: var(--muted); padding: 0 0 8px; }

/* 注記・出典（左帯callout。作る側の確認日は載せない） */
.callout { background: var(--callout); border-left: 5px solid var(--accent); border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 0 0 18px; }
.callout p { margin: 0 0 6px; font-size: 17px; line-height: 1.9; color: var(--ink2); }
.callout p:last-child { margin-bottom: 0; }
.callout .label { font-weight: 700; color: var(--accent-ink); }

/* 注意（警告色の左帯＋×）と対処（成功色の→） */
.warn { background: var(--warn-bg); border-left: 5px solid var(--warn); border-radius: 0 8px 8px 0; padding: 12px 18px; margin: 0 0 18px; }
.warn p { margin: 0; font-size: 17px; line-height: 1.9; }
.warn p::before { content: "× "; color: var(--warn); font-weight: 700; }
.fix, .warn p.fix { margin: 6px 0 0; font-size: 17px; }
.fix::before, .warn p.fix::before { content: "→ "; color: var(--ok); font-weight: 700; }

/* 原文の引用 */
.quote { margin: 0 0 14px; padding: 10px 16px; background: var(--quote); border-left: 3px solid #8aa2bd; border-radius: 0 8px 8px 0; }
.quote p { margin: 0; font-size: 16px; line-height: 1.8; color: var(--ink2); }
.quote .from { display: block; margin-top: 4px; color: var(--muted); font-size: 16px; }

/* 要点（大きな番号の編集的リスト） */
.points { list-style: none; padding: 0; margin: 0 0 20px; counter-reset: pt; }
.points li { counter-increment: pt; position: relative; padding: 4px 0 12px 58px; font-size: 18px; line-height: 1.9; color: var(--ink2); }
.points li::before { content: counter(pt, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: "Zen Kaku Gothic New", sans-serif; font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.2; }

/* 手順（番号サークル＋縦線） */
ol.steps { list-style: none; margin: 0 0 20px; padding: 0; counter-reset: st; }
ol.steps li { counter-increment: st; position: relative; padding: 0 0 18px 50px; }
ol.steps li::before { content: counter(st); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--indigo); color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; }
ol.steps li::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: #b9c6d4; }
ol.steps li:last-child::after { display: none; }
ol.steps .step-title { font-weight: 700; margin: 0 0 4px; font-size: 18px; color: var(--indigo-deep); }
ol.steps p { margin: 0; }

/* よくある質問 */
.faq-item { margin: 0 0 16px; }
.faq-q, .faq-a { position: relative; margin: 0; padding: 10px 14px 10px 52px; font-size: 17px; line-height: 1.9; }
.faq-q { font-weight: 700; color: var(--ink); }
.faq-a { background: #eef3f8; border-radius: 8px; color: var(--ink2); }
.faq-q::before, .faq-a::before { position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.faq-q::before { content: "Q"; background: var(--indigo); color: #fff; }
.faq-a::before { content: "A"; background: #c9d6e4; color: var(--indigo-deep); }

/* ブランド別の詳細 */
.brand-detail { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.brand-detail h3 { margin-top: 0; }
.brand-detail dl { margin: 0 0 10px; display: grid; grid-template-columns: 8em 1fr; gap: 6px 14px; font-size: 17px; line-height: 1.8; }
.brand-detail dt { font-weight: 700; color: var(--indigo-deep); }
.brand-detail dd { margin: 0; color: var(--ink2); }

/* トップのカテゴリ */
.wide-page { max-width: 1400px; margin: 0 auto; }
.wide-page .panel { max-width: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 0 0 8px; }
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--ink); }
.card .band { height: 10px; background: var(--indigo); }
.card.labels .band { background: var(--accent); }
.card.water .band { background: #2f6e7a; }
.card .body { padding: 14px 18px 16px; }
.card .kind { font-size: 16px; color: var(--muted); margin: 0 0 4px; }
.card .title { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 20px; font-weight: 700; color: var(--indigo-deep); margin: 0 0 8px; line-height: 1.5; }
.card .title::after { content: " →"; color: var(--accent); }
.card .desc { font-size: 16px; color: var(--ink2); margin: 0; line-height: 1.8; }
.card:hover { border-color: var(--indigo); }

.brand-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.brand-list li { background: var(--zebra); border: 1px solid var(--line); border-radius: 4px; padding: 4px 14px; font-size: 16px; }

/* フッター */
footer { background: var(--indigo-deep); color: #dfe6ee; margin-top: 12px; }
footer .foot-inner { max-width: 1400px; margin: 0 auto; padding: 22px 24px 28px; }
footer p { margin: 0 0 8px; font-size: 16px; }
footer .foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer a { color: #e9eef4; }

@media (max-width: 700px) {
  .hero .inner { padding: 14px 16px 16px; }
  .hero h1 { font-size: 24px; }
  .panel { padding: 20px 16px 24px; border-radius: 8px; }
  .panel h2 { font-size: 21px; }
  .panel h3 { font-size: 19px; }
  header.site nav { padding: 8px 16px; }
  .cards { grid-template-columns: 1fr; }
  .brand-detail dl { grid-template-columns: 1fr; gap: 2px; }
  .brand-detail dd { margin-bottom: 8px; }
  main { padding: 16px 10px 36px; }
}
.meta-note { font-size: 16px; color: var(--muted); margin: 0 0 8px; }

/* 本文＋補足欄の2列（本文は680px以内のまま、右の空白を目次・関連ページで埋める） */
.split { display: grid; grid-template-columns: minmax(0, 680px) minmax(240px, 1fr); gap: 40px; align-items: start; }
.split .article { max-width: none; min-width: 0; }
.side { position: sticky; top: 76px; }
.side-box { background: var(--zebra); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; padding: 14px 16px; margin: 0 0 14px; }
.side-box .side-title { margin: 0 0 6px; font-weight: 700; font-size: 16px; color: var(--accent-ink); }
.side-box ul { list-style: none; margin: 0; padding: 0; }
.side-box li { font-size: 16px; line-height: 1.7; padding: 6px 0; border-top: 1px dashed var(--line); }
.side-box li:first-child { border-top: 0; }
.side .brand-list { margin: 0; }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; }
.panel.narrow { max-width: 820px; }
.hero.wide .inner { max-width: 1400px; }
.card .title { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
@supports (word-break: auto-phrase) { .card .title { word-break: auto-phrase; } }
.cards.featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.featured .card:first-child { grid-column: span 2; }
.cards.featured .card:first-child .title { font-size: 24px; }
@media (max-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .side { position: static; }
  .details-grid { grid-template-columns: 1fr; }
  .cards.featured { grid-template-columns: 1fr; }
  .cards.featured .card:first-child { grid-column: auto; }
}
@media (max-width: 700px) {
  header.site .nav-links { flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: 16px; }
  header.site .nav-links a { white-space: nowrap; }
}
.side-box .brand-list li { padding: 3px 12px; border: 1px solid var(--line); background: #fff; }

/* スマホでは比較表を1ブランドずつの縦並びにする（横スクロールで読ませない） */
@media (max-width: 700px) {
  table.wide { min-width: 0; }
  table.wide thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.wide, table.wide tbody, table.wide tr, table.wide th, table.wide td { display: block; width: 100%; }
  table.wide tr { border-top: 3px solid var(--indigo); }
  table.wide tbody th { white-space: normal; border-top: 0; padding: 10px 12px 6px; }
  table.wide tbody td { border-top: 1px solid var(--line); background: #fff; }
  table.wide tbody tr:nth-child(even) td { background: #fff; }
  table.wide td[data-label]::before { content: attr(data-label); display: block; font-weight: 700; color: var(--indigo-deep); font-size: 16px; }
}
.kind-tag { display: inline-block; font-size: 16px; padding: 1px 10px; border-radius: 4px; background: var(--band); color: var(--indigo-deep); border: 1px solid #b9cfdc; white-space: nowrap; }
td.yes { color: var(--ok); font-weight: 700; }

/* 比較表の列幅（船の列を折り返し、等級・鍵の列が1文字幅に潰れないようにする） */
@media (min-width: 701px) {
  table.wide tbody th { white-space: normal; width: 200px; }
  table.wide td { min-width: 96px; }
  table.wide td[data-label="等級"] { min-width: 120px; }
  table.wide td[data-label="鍵"], table.wide td[data-label="設備・備品"] { min-width: 150px; }
}

/* 表の見出し列の補足（対象の機種・資料） */
.checked { display: inline-block; margin-top: 2px; font-weight: 400; color: var(--muted); font-size: 16px; line-height: 1.6; }
td.no { color: var(--warn); font-weight: 700; }

/* 確認した公式資料の一覧 */
.src-list { margin: 0 0 12px; padding-left: 1.2em; font-size: 16px; line-height: 1.8; columns: 2; column-gap: 36px; }
.src-list li { break-inside: avoid; margin-bottom: 4px; }
@media (max-width: 1000px) { .src-list { columns: 1; } }

/* 見本（2026-09-28）: 結論の箱・メーカーへの飛び先・メーカーごとのカード・原文の折りたたみ・図 */
.answer { background: #fff8ec; border: 2px solid var(--accent); border-radius: 8px; padding: 18px 22px 10px; margin: 0 0 18px; }
.answer-label { display: inline-block; margin: 0 0 8px; padding: 2px 12px; border-radius: 4px; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; }
.answer ol { margin: 0; padding-left: 1.4em; }
.answer li { font-size: 18px; line-height: 1.9; margin: 0 0 10px; color: var(--ink2); }
.answer li strong { color: var(--ink); background-color: var(--marker); }
.jump-label { margin: 6px 0 8px; font-weight: 700; color: var(--indigo-deep); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 8px 16px; border-radius: 4px; background: var(--indigo); color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; }
.chip:hover { background: var(--indigo-deep); color: #fff; }
.maker-group { scroll-margin-top: 70px; margin: 0 0 22px; }
.maker-group:last-of-type { margin-bottom: 8px; }
.panel h2.mg-title { margin-top: 0; }
.mg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.maker-card { border: 1px solid var(--line); border-top: 6px solid var(--indigo); border-radius: 8px; padding: 12px 16px 10px; background: #fff; }
.maker-card.oxygen { border-top-color: var(--accent); background: #fffaf3; }
.mc-kind { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--indigo); }
.maker-card.oxygen .mc-kind { color: var(--accent-ink); }
.maker-card h3 { margin: 0 0 8px; font-size: 20px; color: var(--indigo-deep); }
.maker-card h3 span { display: block; font-size: 16px; font-weight: 400; color: var(--muted); font-family: "Noto Sans JP", sans-serif; }
.maker-card dl { margin: 0; }
.maker-card .kv { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; padding: 5px 0; border-top: 1px dashed var(--line); }
.maker-card dt { font-weight: 700; color: var(--indigo-deep); font-size: 16px; }
.maker-card dd { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink2); }
details.src { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
details.src summary { cursor: pointer; font-size: 16px; color: var(--link); }
details.src ul { margin: 6px 0; padding-left: 1.2em; }
details.src li, details.src p { font-size: 16px; line-height: 1.7; color: var(--muted); }
.flow-fig { margin: 0 0 16px; }
.flow-fig svg { width: 100%; max-width: 720px; height: auto; display: block; }
.flow-fig figcaption { font-size: 16px; color: var(--ink2); margin-top: 6px; }
@media (max-width: 700px) {
  .answer { padding: 14px 14px 6px; }
  .mg-cards { grid-template-columns: 1fr; }
  .maker-card .kv { grid-template-columns: 1fr; gap: 2px; }
}
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.flow li { position: relative; background: var(--band); border: 2px solid var(--indigo); border-radius: 8px; padding: 12px 12px 14px; text-align: center; }
.flow li:not(:last-child)::after { content: "▶"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 16px; }
.flow .fn { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--indigo); color: #fff; font-weight: 700; align-items: center; justify-content: center; font-size: 18px; }
.flow strong { display: block; margin: 8px 0 2px; font-size: 18px; color: var(--ink); }
.flow .fs { display: block; font-size: 16px; color: var(--ink2); line-height: 1.6; }
@media (max-width: 700px) {
  .flow { grid-template-columns: 1fr 1fr; }
  .flow li:not(:last-child)::after { display: none; }
}
.maker-card { scroll-margin-top: 70px; }
/* 短いラベル類も語の途中で折らない（2026-09-30 実測で「クエ／ン酸」「決め／る」「に／おい」を検出） */
.answer li strong, .flow strong, .flow .fs, .faq-q, .mc-kind, .chip, .jump-label, .maker-card dt, details.src summary {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
@supports (word-break: auto-phrase) {
  .answer li strong, .flow strong, .flow .fs, .faq-q, .mc-kind, .chip, .jump-label, .maker-card dt, details.src summary { word-break: auto-phrase; }
}
.nw { white-space: nowrap; }
@media (max-width: 360px) { .flow { grid-template-columns: 1fr; } }
/* 結論の箱・トップの説明も、対応ブラウザでは文節で折り返す（「日／立」「アルコー／ル」を避ける） */
@supports (word-break: auto-phrase) {
  .task-list .td, .answer li { word-break: auto-phrase; }
}

/* 固定ヘッダーにページ内リンクの飛び先が隠れないようにする */
.panel[id] { scroll-margin-top: 70px; }
@media (max-width: 700px) { .panel[id] { scroll-margin-top: 100px; } }

/* 表の数字（右揃え・等幅）と割合の棒、合計行（2026-10-22。データ表で県・区分どうしの比較を一目で見る） */
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total th, tr.total td { border-top: 2px solid var(--indigo); font-weight: 700; background-color: var(--band); }
.bar { display: inline-block; vertical-align: middle; width: 96px; height: 10px; margin-left: 10px; background-color: var(--band); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background-color: var(--indigo); }
.table-wrap.scroll-y { max-height: 640px; overflow-y: auto; }
.table-wrap.scroll-y thead th { position: sticky; top: 0; z-index: 1; }
@media (max-width: 700px) { .bar { width: 56px; } }
/* 本文中の定義の並び（名前と意味） */
dl.terms { margin: 0 0 18px; display: grid; grid-template-columns: 9em 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
dl.terms dt, dl.terms dd { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.7; }
dl.terms dt:first-of-type, dl.terms dd:first-of-type { border-top: 0; }
dl.terms dt { background-color: var(--rowhead); font-weight: 700; color: var(--indigo-deep); }
dl.terms dd { background-color: #fff; color: var(--ink2); }
@media (max-width: 700px) { dl.terms { grid-template-columns: 1fr; } dl.terms dd { border-top: 0; } }
.panel .meta-line { font-size: 16px; color: var(--muted); margin: 0 0 14px; }

/* トップの要点（01〜03）を横に並べ、右の空白を埋める（2026-10-22） */
.wide-page .points { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 32px; }
.wide-page .points li { max-width: none; padding: 40px 0 8px 0; }

/* 免責文の1行が長くなりすぎない幅にする（ui-smell-check の measure。2026-10-24） */
footer .foot-note { max-width: 960px; }

/* 収益の導線の枠（scripts/parts.mjs の affiliateSlot。2026-10-24）と「PR」の札（ui-foundation-regulation §10-5c）。
   札は常に見える小さな文字、詳しい文はホバー・フォーカス（スマホはタップ）で出す。主ボタン・見出しより目立たせない */
.aff-slot { max-width: 680px; }
.aff-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.aff-title { font-weight: 700; color: var(--indigo-deep); }
.aff-slot ul { list-style: none; margin: 0; padding: 0; }
.aff-slot li { max-width: none; padding: 8px 0; border-top: 1px solid var(--line); }
.aff-slot li:first-child { border-top: 0; }
.aff-slot a { font-weight: 700; }
.aff-note { display: block; font-size: 16px; color: var(--muted); }
.pr-tag { position: relative; display: inline-block; padding: 1px 7px; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--muted); background: var(--zebra); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: help; }
.pr-tag:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.pr-tag::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; display: none; width: max-content; max-width: min(280px, 80vw); padding: 6px 10px; font-size: 16px; font-weight: 400; line-height: 1.5; color: #fff; background: var(--ink); border-radius: var(--radius-sm); white-space: normal; }
.pr-tag:hover::after, .pr-tag:focus::after { display: block; }

/* ===== このサイトの部品（docs/layout-style-guide.md §6） ===== */
/* 規約のトークン名との対応（ui-foundation-regulation §3。値はこのサイトの値） */
:root {
  --color-bg-page: var(--bg); --color-bg-surface: var(--panel); --color-bg-subtle: var(--zebra);
  --color-border: var(--line); --color-text-primary: var(--ink); --color-text-secondary: var(--muted);
  --color-primary: var(--indigo); --color-success: var(--ok); --color-danger: var(--warn);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --radius-md: 8px;
  --c-water: #d3dade; --c-prot: #7f3419; --c-fat: #b8775a; --c-carb: #e3c3ae; --c-rest: #efe9e4;
}
.site-notice { font-size: 16px; }
@media (max-width: 760px) { .site-notice { text-align: left; } }
:root { --accent: #7f3419; --accent-ink: #6a2b14; }
.hero { background-color: var(--band); }
.hero .meta { display: none; }
/* h2 は濃い帯＋白い太字（article-ui-regulation §4。2026-11-15 の標準） */
.panel h2 { background-color: var(--ink); color: #fff; border-left: 0; border-radius: 4px; padding: 10px 16px; }
.card .title::after { content: none; }
.hero.has-img .inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.hero-img { display: block; width: 440px; max-width: 100%; height: auto; max-height: 160px; }
@media (max-width: 760px) {
  .hero.has-img .inner { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero-img { width: 100%; max-height: 64px; object-fit: contain; object-position: left; }
}
td .sub, th .sub { display: block; font-size: 16px; font-weight: 400; color: var(--muted); }
tbody th:has(a) { font-weight: 400; white-space: normal; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { display: inline-block; width: 80px; height: 10px; background: var(--zebra); border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.bar > span { display: block; height: 100%; background: var(--indigo); border-radius: 2px; }
/* 食品群のカード（トップ） */
.group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 0 0 24px; }
.group-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-decoration: none; color: var(--ink); }
.group-card:hover { border-color: var(--indigo); }
.group-card svg.thumb { grid-row: 1 / span 2; width: 120px; height: 48px; background: var(--zebra); border-radius: 4px; }
.group-card .g-name { font-size: 18px; font-weight: 700; color: var(--link); align-self: end; }
.group-card .g-num { font-size: 16px; color: var(--muted); align-self: start; line-height: 1.5; }
svg.thumb rect { fill: var(--indigo); }
/* 2列（食品群のページの上位10の表） */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.two-col h2 { font-size: 20px; }
/* 成分の帯（食品のページ） */
figure.comp { margin: 0 0 16px; }
figure.comp svg { display: block; width: 100%; height: 22px; border-radius: 4px; overflow: hidden; }
.c-water { fill: var(--c-water); background: var(--c-water); } .c-prot { fill: var(--c-prot); background: var(--c-prot); }
.c-fat { fill: var(--c-fat); background: var(--c-fat); } .c-carb { fill: var(--c-carb); background: var(--c-carb); } .c-rest { fill: var(--c-rest); background: var(--c-rest); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0; margin: 8px 0 0; }
.article .legend li { font-size: 16px; line-height: 1.6; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
/* 多い順の一覧の入口 */
.rank-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 0 0 20px; }
.rank-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-decoration: none; color: var(--ink); }
.rank-card:hover { border-color: var(--indigo); }
.rank-card .rank-title { font-size: 18px; font-weight: 700; color: var(--link); }
.rank-card .rank-top { font-size: 16px; color: var(--muted); }
.rank-card img { width: 100%; height: auto; max-height: 96px; object-fit: contain; object-position: left; }
.link-list { margin: 0 0 20px; padding-left: 1.4em; }
.link-list li { font-size: 17px; line-height: 1.9; }
@media (max-width: 760px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .group-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .group-card { grid-template-columns: 96px minmax(0, 1fr); padding: 10px; }
  .group-card svg.thumb { width: 96px; height: 40px; }
  .bar { display: none; }
  .table-wrap th, .table-wrap td { padding-left: 8px; padding-right: 8px; }
  .panel { padding: 18px 14px 22px; }
}
.group-card .g-name { word-break: keep-all; overflow-wrap: anywhere; }
@supports (word-break: auto-phrase) { .group-card .g-name { word-break: auto-phrase; } }
.group-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.group-card { grid-template-columns: 96px minmax(0, 1fr); }
.group-card svg.thumb { width: 96px; height: 44px; }
thead th.num { white-space: normal; }
tbody th:has(a) { min-width: 9em; }
@media (max-width: 760px) {
  tbody th:has(a) { min-width: 8em; }
  table { font-size: 16px; }
  thead th { padding: 8px 6px; }
}
/* 表をスマホの幅に収める（2026-11-30。390px で数値の列が画面の外に出ていた: 行の見出しが折り返さず、5列の表が枠より広かった） */
table.nutr tbody th { white-space: normal; overflow-wrap: anywhere; }
table.cmp tbody th { word-break: keep-all; overflow-wrap: anywhere; }
table.nutr td.num { white-space: nowrap; width: 1%; }
/* 2列の表の見出し「可食部100gあたり」は1行に（2026-11-30。数字の列が狭く、1440px で1〜2文字ずつ、390px で「あた／り」と折れていた） */
table.nutr thead th.num { white-space: nowrap; }
@media (min-width: 701px) { table.cmp td.num { white-space: nowrap; } table.cmp tbody th { white-space: normal; } }
.table-wrap th .sub, .table-wrap td .sub { display: block; white-space: normal; min-width: 14em; font-weight: 400; font-size: 16px; color: var(--muted); line-height: 1.5; }
@media (max-width: 700px) {
  /* 数字の列が2つ以上ある表: 1行を「名前の行」と「数字の段（列の名前つき）」に組み替える */
  table.cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.cmp, table.cmp tbody { display: block; width: 100%; }
  /* 7回目（2026-11-30。評価の課題1）: 表を display:block にすると、表の見出し（caption）が幅の無い列になり、390px で1〜3文字ずつ縦に並んでいた（300ページ中270ページ）。
     見出しも横いっぱいの段にする。tools/check_squash.mjs が「幅90px未満・高さ120px超の文字の箱」を数えて止める */
  table.cmp caption { display: block; width: 100%; box-sizing: border-box; padding: 0 10px 8px; }
  table.cmp tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; padding: 0 10px 6px; border-top: 1px solid var(--line); }
  table.cmp tbody tr:first-child { border-top: 0; }
  table.cmp tbody th { grid-column: 1 / -1; white-space: normal; min-width: 0; border-top: 0; padding: 8px 0 2px; background: transparent; }
  table.cmp tbody td { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-top: 0; padding: 2px 0; text-align: right; min-width: 0; background: transparent; }
  table.cmp tbody tr:nth-child(even) { background-color: var(--zebra); }
  table.cmp tbody tr:nth-child(even) td, table.cmp tbody tr:nth-child(even) th { background-color: transparent; }
  table.cmp td[data-label]::before { content: attr(data-label); font-size: 16px; color: var(--muted); text-align: left; white-space: nowrap; }
  /* 11回目（2026-12-01。評価の課題1・14）: 列の名前（::before）を折り返さずに置いていたため、「パントテン酸（mg）」のような長い名前で数字がマスの右へ押し出され、
     隣のマスの列の名前に重なっていた（35ページ）。数字は折らずに縮めず、列の名前のほうを縮めて折り返す。列の名前は語の途中で折らない（「ビタミン／C」にしない。
     折れるのは「（」の前など）。tools/check_cells.mjs がマスのはみ出し・文字の外出・重なりを数えて止める */
  table.cmp tbody td.num { white-space: nowrap; }
  /* 文字の値（食品群の名前など）は折り返す。横棒のある値は段いっぱいに置く（横棒と数字と列の名前が半分の幅に入らない） */
  table.cmp tbody td:not(.num) { white-space: normal; overflow-wrap: anywhere; }
  table.cmp tbody td:has(.bar) { grid-column: 1 / -1; }
  table.cmp:not(.pos) tbody td:has(.bar) ~ td { border-left: 0; padding-left: 0; }
  table.cmp:not(.pos) tbody td:has(.bar) ~ td ~ td { border-left: 1px solid var(--line); padding-left: 10px; }
  table.cmp td[data-label]::before { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; flex: 1 1 auto; min-width: 0; }
  /* 10回目の直し（2026-12-01。評価の課題11）: 2列に並んだ項目どうしの境目が見えず「たんぱく質（g） 87.6 食品群 肉類」と続いて読めていた。
     右の列の項目に左の縦線を引き、左右の項目（名前と値の組）を分ける（行の区切りは今の縞と線のまま。§9-4 の線を重ねない。位置の表 .pos は1列なので引かない） */
  table.cmp:not(.pos) tbody td:nth-of-type(2n) { border-left: 1px solid var(--line); padding-left: 10px; }
}
/* 出典などの長い URL を折り返す（スマホで枠からはみ出して切れていた） */
.meta-note a, .src-ol a, .article p a { overflow-wrap: anywhere; word-break: break-all; }
.src-ol { margin: 0 0 18px; padding-left: 1.6em; }
.article .src-ol li { font-size: 16px; line-height: 1.7; }
/* 五十音の索引の入口（トップ）と、行のページの頭文字への移動 */
.kana-rows { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 16px; }
.kana-rows li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.kana-rows .g-num { color: var(--muted); font-size: 16px; white-space: nowrap; }
.kana-jump { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 16px; padding: 0; }
.kana-jump a { font-size: 17px; }
/* 2026-11-30 3回目（評価の課題）
   ・390px でヘッダーのナビの4つ目が右で切れ、横に送れることが分からなかった → 折り返して全部見せる
   ・1440px で本文の列が680pxと狭く、表の見出しが「たんぱく／質（g）」と語の途中で折れた → 列を720px（§10-3 の文章の上限）にし、見出しは語の途中で折らない（折るなら「（」の前） */
@media (max-width: 700px) {
  header.site .nav-links { flex-wrap: wrap; overflow-x: visible; gap: 4px 16px; }
}
.split { grid-template-columns: minmax(0, 720px) minmax(240px, 1fr); }
@media (max-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr); } }
thead th { word-break: keep-all; overflow-wrap: normal; }
/* 主な成分の表の糖質の行の補足は、スマホで表の幅を広げない（2026-11-30 3回目） */
.table-wrap table.nutr th .sub { min-width: 0; }
/* 題名を語の途中で折らない（ui-smell-check の midbreak。「たんぱく／質」と折れていた） */
.hero h1 { word-break: auto-phrase; }

/* 2026-11-30 6回目（評価の課題）: 390px の最初の画面で答えの箱が y=660 まで押し下げられていた（01057）。
   ・パンくずは1行にし、長い最後の項目（このページの名前。h1 と同じ）は「…」で切る
   ・ヒーローの上下の余白を詰める */
@media (max-width: 700px) {
  .hero .inner { padding: 10px 16px 12px; }
  .hero h1 { margin: 4px 0 6px; }
  /* 7回目（評価の課題12）: 最後の項目を「…」で切っていた（仲間の一覧で名前が読めなかった）。折り返す */
  .breadcrumb ol { flex-wrap: wrap; }
  .breadcrumb li[aria-current] { min-width: 0; overflow-wrap: anywhere; }
}
/* 6回目: 食品群の中での位置の表は「413食品中267番目」が長いので、390px では値を1つずつ横いっぱいに並べる */
@media (max-width: 700px) { table.cmp.pos tbody td { grid-column: 1 / -1; } }
/* 7回目: 位置の表の糖質の順位の補足（母数から除いた食品）が、390px で右に切れていた。補足は次の行に折り返す */
/* 7回目: 文字の列が3つある表（読み方の解説の「2種類ずつある理由」）は、390px で「違い」の列が幅79pxに潰れていた（tools/check_squash.mjs が見つけた）。1行を縦に積む */
@media (max-width: 700px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack tbody th, table.stack tbody td { display: block; width: 100%; box-sizing: border-box; }
  table.stack tbody td::before { content: attr(data-label); display: block; font-size: 16px; color: var(--muted); }
  table.stack tbody th { min-width: 0; }
}
@media (max-width: 700px) { table.cmp.pos tbody td { flex-wrap: wrap; } table.cmp.pos td .sub { flex-basis: 100%; min-width: 0; text-align: right; } }
/* 8回目（評価の課題1）: 食品ページの「そのほかの無機質・ビタミン」の表は折りたたむ（主な成分の表を長くしない） */
details.more { margin: 8px 0 12px; border-top: 1px solid var(--line); padding-top: 8px; }
details.more summary { cursor: pointer; font-size: 17px; color: var(--link); font-weight: 700; }
details.more[open] summary { margin-bottom: 8px; }

/* 10回目の直し（2026-12-01。評価の課題8）: 仲間の一覧の表に目立つ成分の列を足して7列になり、1440px で表が枠を最大93px超えた。成分表の食品名の補足の最小幅を狭める */
@media (min-width: 701px) { table.col7 th .sub { min-width: 8em; } table.col7 tbody th { min-width: 10em; } }
/* 11回目: 列を足した比べ表で、1440px の食品名が「塩化マグネシウ／ム」と折れていた。名前の列を10文字分は取る */
/* 11回目: 行の終わりの全角の閉じ括弧「）」を半分の幅とみなして詰める（text-spacing-trim の既定）と、表のマスの中で文字の箱がマスの右端を数px越えた（/hikaku/shushoku/）。表の中では詰めない */
table th, table td { text-spacing-trim: space-all; }
/* 11回目（2026-12-01）: 列が7つ以上の表（col7。仲間の一覧・比べ表・普段の量の表・生と調理後の差）が、PC の本文の列（720px）を最大169px超えて横に送らないと読めなかった
   （tools/check_cells.mjs の「表が枠を超える」）。その表のあるページだけ、PC で本文の列を960pxまで広げる。段落の幅は 40em のまま（.panel p） */
@media (min-width: 1001px) { .split:has(table.col7) { grid-template-columns: minmax(0, 960px) minmax(240px, 1fr); } }
/* 列が7つ以上の表のあるページは、1280px までは補足欄を本文の下に回す（1100px で本文の列が772pxになり、表が枠を超えた） */
@media (min-width: 1001px) and (max-width: 1280px) { .split:has(table.col7) { grid-template-columns: minmax(0, 1fr); } }
/* 数字の列が2つ以上の表（cmp）の行の名前の補足は、PC で 8em まで縮める（14em だと6列の表が枠を数px超えた） */
@media (min-width: 701px) { table.cmp th .sub { min-width: 8em; } }
/* 12回目（2026-12-01。評価の課題8）: 列が3つまでの表（成分の表・多い順の表など。fit）は、PC で表と枠の幅を中身に合わせる（本文の列いっぱいに広げると、1440px で値の列が行の名前から500px以上右に離れていた）。
   狭くなりすぎないよう 32em を下限に、本文の列の幅を上限にする */
@media (min-width: 701px) { .table-wrap:has(> table.fit) { width: fit-content; max-width: 100%; } table.fit { width: auto; min-width: min(32em, 100%); } table.fit caption, table.fit .sub { contain: inline-size; } }
/* 13回目の直し（2026-12-01。評価の課題14）: スマホの最初の画面で答えが半分より下だった。注意書きの帯の上下の余白と行の高さを詰める（文言・文字の大きさは変えない） */
@media (max-width: 760px) { .site-notice { padding: 2px 16px; line-height: 1.4; } }
