:root{
  --bg:#fffaf1;--card:#fff;--ink:#3a2e28;--muted:#7a6a60;--line:#f0e4d3;
  --accent:#e8590c;--accent-d:#c2410c;--accent-l:#fff0e0;--leaf:#5f9a3c;--leaf-l:#eaf5e0;--link:#b4470d;
  --p:#d9480f;--f:#e8a317;--c:#4f8a3a;--a:#8e3b6b;--radius:16px;--shadow:0 2px 10px rgba(120,80,40,.08)
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:17px/1.85 "Hiragino Maru Gothic ProN","Hiragino Sans","Yu Gothic",system-ui,sans-serif;color:var(--ink);background:var(--bg)}
a{color:var(--link)}
.wrap{max-width:960px;margin:auto;padding:0 18px}
.narrow{max-width:760px;margin:auto}

/* ヘッダー */
header.site{background:var(--card);border-bottom:3px solid var(--accent);position:sticky;top:0;z-index:10}
header.site .bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 18px}
.brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:20px;color:var(--ink);text-decoration:none}
.brand .logo{font-size:26px}
.gnav{display:flex;gap:6px;white-space:nowrap}
.gnav a{color:var(--ink);text-decoration:none;font-size:14px;font-weight:700;padding:6px 12px;border-radius:999px;background:var(--accent-l)}
.gnav a:hover{background:var(--accent);color:#fff}

/* パンくず・見出し */
.crumb{font-size:13px;color:var(--muted);margin:18px 0 6px}.crumb a{color:var(--muted)}
h1{font-size:26px;line-height:1.45;margin:8px 0 12px;font-weight:800}
h2{font-size:20px;margin:40px 0 14px;font-weight:800;display:flex;align-items:center;gap:10px}
h2::before{content:"";width:6px;height:1.2em;background:var(--accent);border-radius:3px;flex:none}
.lead{font-size:17px;background:var(--card);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow)}
.note{font-size:13px;color:var(--muted);line-height:1.7}

/* トップ */
.hero{background:linear-gradient(160deg,#ffe8cc,#fff4e0);border-radius:24px;padding:34px 22px 26px;margin:20px 0 8px;text-align:center}
.hero h1{font-size:28px;margin:0 0 6px}.hero p{margin:0 0 18px;color:var(--muted);font-size:15px}
.search input{width:100%;padding:15px 18px;font-size:17px;border:2px solid var(--accent);border-radius:999px;background:#fff;outline:none;box-shadow:var(--shadow)}
.search input:focus{box-shadow:0 0 0 4px rgba(232,89,12,.18)}
.results{list-style:none;padding:0;margin:10px 0 0;text-align:left;background:#fff;border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}
.results:empty{display:none}
.results a{display:flex;justify-content:space-between;gap:10px;padding:11px 16px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}
.results a:hover{background:var(--accent-l)}.results small{color:var(--muted);white-space:nowrap}
.chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:16px}
.chips a{background:#fff;border:1px solid var(--line);border-radius:999px;padding:5px 14px;font-size:14px;text-decoration:none;color:var(--ink)}
.chips a:hover{border-color:var(--accent);color:var(--accent-d)}
.cards{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.cards a{display:flex;flex-direction:column;align-items:center;gap:2px;background:var(--card);border-radius:var(--radius);padding:16px 8px;text-decoration:none;color:var(--ink);box-shadow:var(--shadow);border:2px solid transparent;text-align:center;line-height:1.5}
.cards a:hover{border-color:var(--accent)}
.cards .ico{font-size:32px;line-height:1.2}.cards b{font-size:15px}.cards small{font-size:12px;color:var(--muted)}
.rows{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.rows a{display:block;background:var(--card);border-radius:12px;padding:12px 16px;text-decoration:none;color:var(--ink);box-shadow:var(--shadow);font-size:15px;line-height:1.5}
.rows a:hover{background:var(--accent-l)}.rows small{display:block;color:var(--muted);font-size:12px}

/* 食品ページ：ヒーローと主要成分のタイル */
.food-head{display:flex;align-items:center;gap:14px;margin:6px 0 14px}
.food-head .ico{font-size:44px;line-height:1;background:var(--accent-l);border-radius:20px;padding:12px}
.food-head h1{margin:0}.food-head .grp{font-size:13px;color:var(--muted)}
.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0}
.tile{background:var(--card);border-radius:var(--radius);padding:14px 8px;text-align:center;box-shadow:var(--shadow);border-top:5px solid var(--line)}
.tile .n{font-size:13px;color:var(--muted)}.tile .v{font-size:28px;font-weight:800;line-height:1.3}.tile .v small{font-size:13px;font-weight:600;margin-left:2px}
.tile .s{font-size:12px;color:var(--muted)}
.tile.e{border-color:var(--accent)}.tile.p{border-color:var(--p)}.tile.f{border-color:var(--f)}.tile.c{border-color:var(--c)}
.pfc{background:var(--card);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow);margin:10px 0}
.pfc .bar2{display:flex;height:18px;border-radius:9px;overflow:hidden;margin:8px 0}
.pfc .bar2 i{display:block}.pfc .leg{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:13px}.pfc .leg b{margin-right:4px}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:4px}
dl.meta{font-size:14px;background:var(--card);border-radius:12px;padding:10px 16px;margin:12px 0;box-shadow:var(--shadow)}
dl.meta dt{float:left;clear:left;width:5em;color:var(--muted)}dl.meta dd{margin:0 0 4px 5em}

/* 表 */
.tbl{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
table{border-collapse:collapse;width:100%;font-size:15px}
th,td{padding:10px 12px;text-align:right;border-bottom:1px solid var(--line)}
tr:last-child th,tr:last-child td{border-bottom:0}
th:first-child,td:first-child{text-align:left}
table.nut th{font-weight:500;text-align:left}
table.nut tr:first-child th,table.list tr:first-child th,table.cmp tr:first-child th{background:var(--accent-l);font-weight:700;font-size:13px;text-align:right}
table.nut tr:first-child th:first-child,table.list tr:first-child th:first-child,table.cmp tr:first-child th:first-child{text-align:left}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}
.kv{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:6px 18px}
.kv{column-count:2;column-gap:40px}.kv div{break-inside:avoid;display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px dashed var(--line);font-size:15px}
.kv div:last-child{border-bottom:0}.kv span:first-child{color:var(--muted)}.kv b{font-weight:700;white-space:nowrap}
table.rank td:nth-child(2),table.rank th:nth-child(2){text-align:left}
table.list td:first-child,table.list th:first-child{width:3.5em;text-align:center}
table.groupl td:first-child,table.groupl th:first-child{text-align:left;width:auto}
table.cmp td.win{background:#fff3cf;font-weight:800}table.cmp th:not(:first-child){font-size:13px}table.cmp td{width:28%}

/* 位置の表示 */
.pos{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:6px 18px}
.pos .row{display:grid;grid-template-columns:130px 1fr 120px;gap:14px;align-items:center;padding:12px 0;border-bottom:1px dashed var(--line)}
.pos .row:last-child{border-bottom:0}
.pos .lab{font-weight:700;font-size:15px}.pos .lab b{display:inline-block;margin-left:6px;font-size:11px;background:var(--leaf-l);color:var(--leaf);border-radius:999px;padding:1px 8px}
.pos .val{text-align:right;font-weight:800}.pos .val small{display:block;font-weight:400;color:var(--muted);font-size:11px}
.track{position:relative;height:12px;background:linear-gradient(90deg,#fde9d3,#f9c58d);border-radius:6px}
.track .mid{position:absolute;left:50%;top:-3px;bottom:-3px;width:2px;background:#b8a595}
.track i{position:absolute;top:-6px;width:24px;height:24px;margin-left:-12px;background:var(--accent);border:3px solid #fff;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.25)}

.btn{display:inline-block;background:var(--accent);color:#fff;padding:12px 24px;border-radius:999px;text-decoration:none;font-weight:700}
.ad{margin:26px 0;min-height:90px;text-align:center}
footer.site{margin-top:60px;padding:26px 0;font-size:13px;color:var(--muted);background:var(--card);border-top:3px solid var(--line)}
footer.site a{color:var(--muted)}

@media(max-width:640px){
  body{font-size:16px}
  h1{font-size:22px}.hero{padding:26px 14px 20px;border-radius:18px}.hero h1{font-size:23px}
  .tiles{grid-template-columns:repeat(2,1fr)}.tile .v{font-size:25px}
  .grid2{grid-template-columns:1fr}.kv{column-count:1}
  .food-head .ico{font-size:34px;padding:9px;border-radius:16px}
  .pos .row{grid-template-columns:1fr auto;gap:6px 10px}.pos .track{grid-column:1/3;order:3;margin:6px 0 8px}
  th,td{padding:9px 7px}table{font-size:14px}
  .gnav a{padding:5px 10px}
  .brand{font-size:18px}
}

.cards.wide{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
h3{font-size:16px;margin:22px 0 8px;color:var(--muted)}
.chips.left{justify-content:flex-start;margin:12px 0 4px}.chips-label{font-size:13px;color:var(--muted);align-self:center}
.chips b.on{background:var(--accent);color:#fff;border-radius:999px;padding:5px 14px;font-size:14px}
