/*
 * グレースケール。色に頼らないぶん、意味は記号（▼▲）と文字と
 * 濃淡・塗り／線の違いで表しています。色覚に依存しないので、
 * アクセシビリティ的にはむしろ有利です。
 */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e3e3e3;
  --text: #171717;
  --muted: #6e6e6e;
  --accent: #171717;
  --accent-soft: #f0f0f0;
  /* 反転して置く要素（塗りボタンなど）用 */
  --inverse: #fafafa;
  /* 計算で出した値。実測値と区別できる程度に色を変える */
  --calc: #1d5a7a;
  --radius: 10px;
  --measure: 42rem;
}



* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP',
    'Yu Gothic', Meiryo, sans-serif;
  font-size: 16.5px;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose {
  max-width: var(--measure);
}

/* ---- ヘッダー / フッター ---- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  padding-block: 1rem;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-footer {
  margin-top: 4.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: 2rem 3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.site-footer a {
  color: var(--muted);
}

/* ---- 見出し ---- */

h1,
h2,
h3 {
  line-height: 1.45;
  letter-spacing: 0.01em;
}

h1 {
  font-size: 1.85rem;
  margin: 0 0 0.6rem;
}

h2 {
  font-size: 1.3rem;
  margin: 2.8rem 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent-soft);
}

h3 {
  font-size: 1.08rem;
  margin: 2rem 0 0.6rem;
}

/* ---- 記事一覧カード ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card a {
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  line-height: 1.55;
}

.card a:hover {
  text-decoration: underline;
}

.card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

.meta {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---- 開示文 ---- */

.disclosure {
  margin: 1.5rem 0;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
  border-radius: 0 6px 6px 0;
}

/* ---- ストアのボタン ---- */

/*
 * 価格は載せません。Amazonの価格を掲載できるのは PA-API から取得した
 * ものだけ（しかも24時間以内）で、他社価格との並列比較も規約上の制限に
 * 触れるためです。読者にはリンク先で見てもらいます。
 */
/*
 * 面はグレースケールのまま、ブランド色は識別に要る最小面積だけ使います。
 *   ふだん  … 先頭の丸（約9px）だけがブランド色
 *   ホバー時 … 枠線がブランド色になる
 *   大ボタン … 押してほしい場所なので枠線を常時ブランド色に
 */
.store-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0.4rem 0.4rem 0;
  padding: 0.7rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.store-link::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brand);
}

.store-link:hover {
  background: var(--accent-soft);
  border-color: var(--brand);
}

.store-link.block {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  padding: 0.85rem 1.4rem;
  border-width: 2px;
  border-color: var(--brand);
  font-size: 1rem;
}

.store-link .sub {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
}

.store-link.amazon { --brand: #e08010; }
.store-link.rakuten { --brand: #bf0000; }
.store-link.yahoo { --brand: #d4003c; }



/* 3ストア並べたときに、狭い画面でも崩れないように */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 1.2rem 0;
}

/* ---- 比較表 ---- */

.table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compare {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--surface);
}


.compare th,
.compare td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare thead th {
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.82rem;
  white-space: nowrap;
}

.compare tbody tr:last-child td,
.compare tbody tr:last-child th {
  border-bottom: 0;
}

.compare tbody th {
  font-weight: 700;
  white-space: nowrap;
}

/* 2〜3列の表なら狭い画面でも横スクロールなしで収まる */


/* ---- 記事本文 ---- */

article.prose {
  padding-top: 2.5rem;
}

article.prose > p {
  margin: 1.1rem 0;
}

article.prose ul,
article.prose ol {
  padding-left: 1.4rem;
}

article.prose li {
  margin: 0.4rem 0;
}

article.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

article.prose figure {
  margin: 1.8rem 0;
}

article.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.hero {
  padding: 3rem 0 1rem;
}

.hero p {
  max-width: var(--measure);
  color: var(--muted);
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.callout > :first-child {
  margin-top: 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

/* ---- 価格一覧（表計算ソフト風） ---- */

.sheet-hint {
  margin: 1.2rem 0 0.6rem;
  font-size: 0.83rem;
  color: var(--muted);
}

.sheet-wrap {
  border-radius: 6px;
}

.sheet {
  width: 100%;
  min-width: 60rem;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.85rem;
  /* 桁が縦に揃わないと比較できないので等幅数字にする */
  font-variant-numeric: tabular-nums;
}

.sheet th,
.sheet td {
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.sheet thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sheet thead th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.sheet thead th[data-sort]:hover {
  background: var(--border);
}

.sheet thead th[data-sort]::after {
  content: "";
  margin-left: 0.3rem;
  opacity: 0.35;
  font-size: 0.7em;
}

.sheet thead th[data-sort]:not([aria-sort])::after { content: "⇅"; }
.sheet thead th[aria-sort="ascending"]::after { content: "▲"; opacity: 1; }
.sheet thead th[aria-sort="descending"]::after { content: "▼"; opacity: 1; }

/* 1行おきに薄く敷いて、横に目で追えるようにする。
   color-mix が使えない環境でも縞が消えないよう素の値を先に置く */
.sheet tbody tr:nth-child(even) {
  background: var(--accent-soft);
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}

.sheet tbody tr:hover {
  background: var(--accent-soft);
}

.sheet .num {
  text-align: right;
}

.sheet .cur {
  font-weight: 700;
}

.sheet .name {
  min-width: 18rem;
  max-width: 26rem;
  white-space: normal;
  font-weight: 400;
  line-height: 1.45;
}

.sheet .name a {
  text-decoration: none;
  font-weight: 700;
}

.sheet .name a:hover {
  text-decoration: underline;
}

.sheet .days {
  color: var(--muted);
  font-size: 0.78rem;
}

/* 安い←→高い の位置バー */
.sheet .posbar {
  width: 7rem;
  padding-inline: 0.6rem;
}

.posbar .track {
  position: relative;
  display: block;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--border), var(--muted));
}

.posbar .mark {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 12px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text);
}

.sheet .spark {
  width: 11rem;
  padding: 0.2rem 0.5rem;
}

.sheet .spark .chart {
  display: block;
  height: 34px;
}

.sheet .verdict {
  text-align: center;
}

/* ---- 画面幅に応じた出し分け ----------------------------------------
 * 広い    表計算ソフトそのまま（全10列）
 * 中間    平均・最高値・記録を隠して、比較に要る列だけ残す
 * 狭い    表をやめて1商品=1ブロックに積む（横スクロールさせない）
 * ------------------------------------------------------------------ */





.price-now {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.price-now strong {
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.diff {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 値下がりは濃く、値上がりは薄く。意味は ▼▲ の記号が持っています */
.diff.down { color: var(--text); }
.diff.up { color: var(--muted); }

.signal {
  align-self: flex-start;
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* 買い時＝塗り、高い＝線、平均並み＝控えめ */
.signal.low {
  background: var(--text);
  border-color: var(--text);
  color: var(--inverse);
}

.signal.high {
  background: transparent;
  border-color: var(--muted);
  color: var(--muted);
}

.signal.flat {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--muted);
}

/* グラフ。viewBox で縦横比が決まるので height は auto にする */
.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart .area {
  fill: var(--accent-soft);
  stroke: none;
}

.chart .dot {
  fill: var(--accent);
}

.chart .grid {
  stroke: var(--border);
  stroke-width: 1;
}

.chart .axis {
  fill: var(--muted);
  font-size: 11px;
  font-family: inherit;
}

.price-hero {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.price-hero .price-now strong {
  font-size: 2rem;
}

.price-source {
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  line-height: 1.7;
}

/* 療法食・健康まわりの注意書き。目立たせるが、脅かさない程度に */
.vet-notice {
  margin: 2rem 0;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text);
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.75;
}

.vet-notice p {
  margin: 0 0 0.7rem;
}

.vet-notice p:last-child {
  margin-bottom: 0;
}

.vet-notice strong {
  color: var(--accent);
}

/* ---- 狭い画面全体の調整 ---- */



/* 折り返しに頼れない長い商品名やURLが枠を突き破らないように */
.sheet .name a,
.card a,
article.prose a {
  overflow-wrap: anywhere;
}

/* 短縮しても長い名前が残るので、一覧では2行までに抑える */
.sheet .name a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- 成分比較の絞り込み ---- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1.2rem 0 0.4rem;
}

.filters button {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.filters button:hover {
  background: var(--accent-soft);
}

.filters button.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--inverse);
  font-weight: 700;
}

/* 非公表の項目は控えめに。数字が無いことが分かればよい */
.sheet .none {
  color: var(--muted);
}

.sheet .genre-col {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.sheet thead .sub-h {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--muted);
}




/* ---- 成分で絞り込む ---- */

.nut-search {
  margin: 1.4rem 0 0.6rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ns-title {
  margin: 0 0 0.8rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.ns-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.6rem 1.2rem;
}

.ns-fields label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.ns-fields label > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.ns-fields input {
  flex: 1;
  min-width: 4rem;
  max-width: 7rem;
  margin-left: auto;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ns-fields input:focus {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

.ns-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.ns-clear {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.ns-clear:hover {
  background: var(--accent-soft);
}

.ns-count {
  font-weight: 700;
}

/* 計算で出した値は実測値と見分けられるようにする。
   推測値ではないが、メーカーの公表値そのものでもないため。 */
.sheet .calc,
.calc-mark {
  color: var(--calc);
  font-style: italic;
}

.sheet .calc::after {
  content: "*";
  font-size: 0.7em;
  vertical-align: super;
  opacity: 0.7;
}

.calc-mark {
  font-weight: 700;
  font-style: normal;
}

/* 表のすぐ上に置く凡例。色の意味が表から離れないように */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 1rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.legend .lg b {
  margin-right: 0.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.legend .lg b.calc-mark {
  color: var(--calc);
}

/* ---- スマホ向けの操作 ---- */

/* 並べ替えのセレクトは狭い画面だけ。広い画面では見出しクリックで足りる */
.m-sort {
  display: none;
  margin: 1rem 0 0.4rem;
}

.m-sort label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.m-sort select {
  flex: 1;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.more-wrap {
  margin: 1rem 0;
  text-align: center;
}

.more-btn {
  padding: 0.6rem 1.6rem;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.more-btn:hover {
  background: var(--accent-soft);
}

.more-btn[hidden] {
  display: none;
}



/* ---- 指示から絞り込むボタン ---- */

.presets {
  margin: 1.4rem 0 0.6rem;
  padding: 1.1rem 1.2rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.ps-title {
  margin: 0 0 0.7rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.ps-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.5rem;
}

.ps-btns button {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ps-btns button span {
  font-weight: 400;
  font-size: 0.76rem;
  color: var(--muted);
}

.ps-btns button:hover {
  border-color: var(--text);
}

.ps-btns button.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--inverse);
}

.ps-btns button.on span {
  color: var(--inverse);
  opacity: 0.75;
}

.presets .meta {
  margin: 0.8rem 0 0;
  line-height: 1.7;
}

/* ---- 折りたたみの説明 ---- */

.explain {
  margin: 1rem 0 0.4rem;
  font-size: 0.85rem;
}

.explain > summary,
.inline-note > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  text-underline-offset: 3px;
  text-decoration: underline dotted;
}

.explain > summary:hover,
.inline-note > summary:hover {
  color: var(--text);
}

.explain[open] > summary {
  margin-bottom: 0.6rem;
  color: var(--text);
  font-weight: 700;
}

.explain p {
  margin: 0 0 0.7rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--border);
  color: var(--muted);
  line-height: 1.8;
}

.explain p:last-child {
  margin-bottom: 0;
}

.inline-note {
  display: inline;
}

.inline-note[open] {
  display: block;
  margin-top: 0.4rem;
}

.ps-note {
  margin: 0.8rem 0 0;
}

.ns-title .ns-sub {
  display: block;
  margin-top: 0.15rem;
  font-weight: 400;
  font-size: 0.76rem;
  color: var(--muted);
}

/* ---- 絞り込みの枠 ----
 * 種別・指示ボタン・数値入力は同じ条件を作る3つの入口なので、
 * 1つの枠で囲む。リセットは枠全体に効くのでいちばん下に置く。
 */

.filter-panel {
  margin: 1.3rem 0 0.6rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* 枠の中では、各パネルは自前の箱を持たない */
.filter-panel .presets,
.filter-panel .nut-search {
  margin: 0;
  padding: 0.9rem 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
}

.filter-panel .filters {
  margin: 0 0 0.9rem;
}

.filter-panel .ns-foot {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  justify-content: space-between;
}

.filter-panel .ps-title,
.filter-panel .ns-title {
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
}

.filter-panel .ps-note {
  margin-top: 0.7rem;
}

/* ヘッダーのロゴ。サイト名と縦位置を合わせる */
.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.site-logo {
  display: block;
  flex: none;
}

/* ---- お問い合わせフォーム ---- */

.contact {
  margin: 1.5rem 0;
  max-width: 34rem;
}

.f-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1.3rem;
}

.f-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.f-row .req,
.f-row .opt {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.f-row .req {
  background: var(--text);
  color: var(--inverse);
}

.f-row .opt {
  background: var(--accent-soft);
  color: var(--muted);
}

.contact input[type="text"],
.contact input[type="email"],
.contact textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.7;
}

.contact input:focus,
.contact textarea:focus {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

.contact textarea {
  resize: vertical;
}

.f-row .hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.7;
}

/* 迷惑メール対策の空欄。人には見せないが、読み上げからも外す */
.gotcha {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.f-submit {
  margin: 1.6rem 0 1rem;
}

.contact button[type="submit"] {
  padding: 0.75rem 2.4rem;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--text);
  color: var(--inverse);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.contact button[type="submit"]:hover {
  filter: brightness(1.15);
}

/* 問い合わせ先の1文。囲まずに、本文の一部として見せる */
.contact-lead {
  margin: 1.4rem 0;
  font-size: 1.02rem;
  line-height: 1.9;
}

/* ---- 暗い背景での色。定義はここ1か所にまとめる ---- */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1b1b1b;
    --border: #303030;
    --text: #e9e9e9;
    --muted: #9b9b9b;
    --accent: #e9e9e9;
    --accent-soft: #262626;
    --inverse: #121212;
    --calc: #7fc4e8;
  }
  /* 暗い背景では赤が沈むので、少しだけ明るくする */
  .store-link.amazon { --brand: #f0a33c; }
  .store-link.rakuten { --brand: #e14b4b; }
  .store-link.yahoo { --brand: #f0526e; }
}

/* ---- 中くらいの画面（タブレット）。指定はここ1か所にまとめる ---- */

@media (max-width: 68rem) {
  .sheet {
    min-width: 44rem;
  }
  .sheet .avg-col,
  .sheet .max-col,
  .sheet .days {
    display: none;
  }
  .sheet .name {
    min-width: 13rem;
  }
  .sheet .raw-col,
  .sheet .wat-col,
  .sheet .fib-col {
    display: none;
  }
}

/* ---- 狭い画面（スマホ）。指定はここ1か所にまとめる ---- */

@media (max-width: 46rem) {
  .compare {
    min-width: 0;
    font-size: 0.82rem;
  }

  .compare th,
  .compare td {
    padding: 0.55rem 0.6rem;
    white-space: normal;
  }

  .compare thead th {
    white-space: normal;
  }
  /*
   * 表は表のまま横スクロールさせます。
   * 縦積みのカードにすると列が揃わなくなり、商品同士を見比べられません。
   * 比較表の値は「縦に並んでいること」そのものが機能なので、
   * 崩さずに、商品名の列だけ左に固定してどの行か分かるようにします。
   */
  .sheet {
    min-width: 0;
    font-size: 0.78rem;
  }

  .sheet th,
  .sheet td {
    padding: 0.4rem 0.5rem;
  }

  /* 商品名は横スクロールしても残す */
  .sheet .name {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 9.5rem;
    min-width: 9.5rem;
    max-width: 9.5rem;
    background: var(--surface);
    border-right: 2px solid var(--border);
    white-space: normal;
    font-size: 0.78rem;
  }

  .sheet tbody tr:nth-child(even) .name {
    background: var(--accent-soft);
  }

  .sheet thead .name {
    z-index: 3;
    background: var(--accent-soft);
  }

  .sheet .name a {
    -webkit-line-clamp: 3;
  }

  /* 一覧で見るのは要点だけ。全項目は商品ページの表にあります */
  .sheet .raw-col,
  .sheet .ash-col,
  .sheet .fib-col,
  .sheet .wat-col,
  .sheet .size-col,
  .sheet .mag-col,
  .sheet .genre-col,
  .sheet .days,
  .sheet .spark {
    display: none;
  }

  .sheet .posbar {
    width: 4.5rem;
  }
  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 1rem;
  }

  .hero {
    padding: 2rem 0 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.15rem;
    margin-top: 2.2rem;
  }

  article.prose {
    padding-top: 1.8rem;
  }

  /* 見出しとナビが1行に収まらないので分ける */
  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .site-nav {
    margin-left: 0;
    gap: 1rem;
    font-size: 0.85rem;
  }

  .price-hero {
    padding: 1rem;
    gap: 0.6rem;
  }

  .price-hero .price-now strong {
    font-size: 1.6rem;
  }

  /* ボタンは指で押せる幅にする */
  .store-link {
    width: 100%;
    justify-content: center;
    margin: 0.35rem 0;
  }

  .store-row {
    flex-direction: column;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
  .m-sort {
    display: block;
  }

  /* 絞り込みは畳んでおく。開くまで場所を取らない */
  .nut-search .ns-fields {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .nut-search {
    padding: 0.9rem 1rem;
  }

  .filters {
    gap: 0.4rem;
  }

  .filters button {
    flex: 1;
    min-width: 4.5rem;
    padding: 0.45rem 0.5rem;
  }

  .legend {
    font-size: 0.75rem;
    gap: 0.2rem 1rem;
  }
}
