/* ==========================================================================
   Kibble Note — 犬のごはん代の帳面
   紙（生成り）× 墨 × キブルのテラコッタ × 森の緑。数字は Fraunces、和文は Zen Kaku Gothic New。
   ========================================================================== */

:root {
  --paper: #fbf8f2;
  --paper-2: #f4eee3;
  --paper-3: #ebe2d2;
  --ink: #1f1d1a;
  --ink-2: #4a453e;
  --ink-3: #6a6358;
  --rule: #e2d8c6;
  --rule-2: #d3c6af;
  --kibble: #c0622c;
  --kibble-2: #a24f1f;
  --kibble-soft: #f6e3d4;
  --forest: #23402f;
  --forest-2: #2f5540;
  --forest-soft: #e3ece4;
  --butter: #f3c94f;
  --butter-soft: #fbefc6;
  --white: #fffdf9;

  --serif: "Fraunces", "ZKG Head", Georgia, serif; /* 数字と欧文は Fraunces、和文が混じれば見出しの字 */
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif; /* 本文は端末の字 */
  --head: "ZKG Head", var(--sans);                 /* 見出しだけ和文フォント（使う文字だけに絞った自前の woff2） */
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --r-xl: 32px;
  --shadow-1: 0 1px 0 rgba(31, 29, 26, .04), 0 2px 8px -2px rgba(31, 29, 26, .08);
  --shadow-2: 0 1px 0 rgba(31, 29, 26, .05), 0 18px 40px -18px rgba(60, 40, 20, .28);
  --shadow-3: 0 30px 80px -30px rgba(60, 40, 20, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
h1, h2, h3 { font-family: var(--head); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .02em;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 紙の繊維のような、ごく薄いざらつき */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--rule-2); text-underline-offset: .2em; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--kibble-2); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--kibble); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--butter); color: var(--ink); }

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.num { font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; font-optical-sizing: auto; letter-spacing: -.01em; }
.label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-2);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- PR 表記（ステマ規制） ---------- */
.pr-bar {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  padding: 6px var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  letter-spacing: .04em;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); box-shadow: 0 8px 30px -24px rgba(60, 40, 20, .4); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; transition: transform .6s var(--ease); }
.brand:hover svg { transform: rotate(-14deg) scale(1.06); }
.brand-word { font-family: var(--serif); font-size: 23px; font-weight: 600; font-style: italic; letter-spacing: -.02em; line-height: 1; font-variation-settings: "SOFT" 100, "WONK" 1; }
.brand-word b { font-weight: 600; color: #a9531f; font-style: normal; } /* ロゴの「Note」は背景との差 4.5 以上（--kibble だと 3.9）*/
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
}
.site-nav a:hover { background: var(--paper-2); color: var(--ink); }
.site-nav a.is-cta { background: var(--ink); color: var(--paper); }
.site-nav a.is-cta:hover { background: var(--kibble-2); color: var(--white); }
@media (max-width: 720px) {
  .site-nav a:not(.is-cta) { display: none; }
  .brand-word { font-size: 20px; }
}

/* ---------- ヒーロー ---------- */
.hero { padding: clamp(36px, 7vw, 84px) 0 clamp(28px, 5vw, 56px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero h1 {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.22;
  letter-spacing: -.01em;
  margin: 14px 0 22px;
}
.hero h1 .q {
  position: relative;
  z-index: 0;
  white-space: nowrap;
  display: inline-block;
}
.hero h1 .nb { white-space: nowrap; }
.hero h1 .q::after {
  content: "";
  position: absolute;
  left: -.08em;
  right: -.08em;
  bottom: .06em;
  height: .36em;
  background: var(--butter);
  border-radius: .2em;
  z-index: -1;
  transform-origin: left;
  animation: marker 1.1s .35s var(--ease) both;
}
@keyframes marker { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero .lead { font-size: clamp(15px, 1.6vw, 17px); color: var(--ink-2); max-width: 34em; margin: 0 0 26px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.facts li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); }
.facts .num { font-size: 28px; font-weight: 600; color: var(--ink); line-height: 1; }

/* ---------- 計算パネル（はかり） ---------- */
.hero-right { position: relative; }
.hero-art {
  position: absolute; z-index: 0; pointer-events: none;
  width: min(520px, 78%); left: -22%; bottom: -26%;
  mix-blend-mode: multiply; opacity: .95;
  -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
}
.hero-right .scale { z-index: 1; }
@media (max-width: 960px) {
  .hero-art { display: none; }  /* スマホでは数字に重なるので出さない */
}
.scale {
  position: relative;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.scale-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.scale-head .label { color: var(--kibble-2); }
.readout { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 2px; }
.readout output {
  font-family: var(--serif);
  font-size: clamp(64px, 9vw, 92px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums lining-nums;
  min-width: 3.3ch;
  text-align: center;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.readout .unit { font-family: var(--serif); font-size: 24px; color: var(--ink-3); align-self: flex-end; margin-bottom: 14px; margin-left: -6px; }
.step-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--rule-2);
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s, transform .15s, border-color .2s;
}
.step-btn:hover { background: var(--paper-2); border-color: var(--ink-3); }
.step-btn:active { transform: scale(.92); }

/* 目盛り付きスライダー */
.ruler { position: relative; margin: 14px 4px 6px; height: 54px; }
.ruler-ticks {
  position: absolute; inset: 0 0 auto 0; height: 26px;
  background-image:
    repeating-linear-gradient(90deg, var(--rule-2) 0 1px, transparent 1px calc(100% / 39)),
    repeating-linear-gradient(90deg, var(--ink-3) 0 1.5px, transparent 1.5px calc(100% / 7.8));
  background-size: 100% 12px, 100% 22px;
  background-repeat: no-repeat;
  background-position: 0 14px, 0 4px;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.ruler input[type="range"] {
  -webkit-appearance: none; appearance: none;
  position: absolute; inset: 0; width: 100%; height: 54px; margin: 0;
  background: transparent; cursor: grab;
}
.ruler input[type="range"]:active { cursor: grabbing; }
.ruler input[type="range"]::-webkit-slider-runnable-track { height: 54px; background: transparent; }
.ruler input[type="range"]::-moz-range-track { height: 54px; background: transparent; }
.ruler input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 4px; height: 46px; margin-top: 0;
  border-radius: 2px;
  background: var(--kibble);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--kibble) 18%, transparent);
}
.ruler input[type="range"]::-moz-range-thumb {
  width: 4px; height: 46px; border: 0; border-radius: 2px; background: var(--kibble);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--kibble) 18%, transparent);
}
.ruler-labels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--ink-3); padding: 0 2px; margin-top: -4px; }

.field { margin-top: 18px; }
.field-label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; display: flex; justify-content: space-between; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 999px; }
.seg button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 9px 10px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .25s var(--ease), color .25s, box-shadow .25s;
}
.seg button svg { width: 18px; height: 18px; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 700; }
.seg button:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* 子犬のとき: 月齢と今の体重 */
.pup-fields[hidden], [data-act-field][hidden] { display: none; }
.pup-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pup-item { display: block; }
.pup-item select, .pup-now input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--white);
  border: 1px solid var(--rule-2); border-radius: 12px; padding: 10px 12px; min-height: 44px;
}
.pup-now { position: relative; display: block; }
.pup-now input { padding-right: 36px; font-family: var(--mono); appearance: textfield; -moz-appearance: textfield; }
.pup-now input::-webkit-inner-spin-button, .pup-now input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pup-now .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--ink-3); pointer-events: none; }
.pup-item select:focus-visible, .pup-now input:focus-visible { outline: 2px solid var(--kibble); outline-offset: 1px; }
.pup-hint { font-size: 12px; line-height: 1.7; color: var(--ink-3); margin: 10px 0 0; }
.pup-hint b { color: var(--ink-2); }
[data-stage] button { flex-direction: column; gap: 0; padding: 7px 6px; line-height: 1.3; }
[data-stage] button small { font-size: 11px; font-weight: 400; color: var(--ink-3); }

.scale-foot { margin-top: 18px; font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.scale-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: #3f9f6b; box-shadow: 0 0 0 4px #3f9f6b22; flex: none; }

/* ---------- 帳面（結果の一覧） ---------- */
.ledger-sec { padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 7vw, 96px); }
.ledger-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ledger-head h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; margin: 6px 0 0; line-height: 1.35; }
.ledger-head h2 .num { font-size: 1.15em; color: var(--kibble-2); }
.ledger-sub { font-size: 13px; color: var(--ink-3); margin: 4px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none; font: inherit; font-size: 13px; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule-2); background: transparent; color: var(--ink-2);
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--paper); }

.ledger {
  list-style: none; margin: 0; padding: 0;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  position: relative;
}
/* 帳面の罫線と左の赤い縦線 */
.ledger::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 64px; width: 1px;
  background: color-mix(in srgb, var(--kibble) 45%, transparent); z-index: 1; pointer-events: none;
}
@media (max-width: 640px) { .ledger::before { left: 44px; } }
.entry {
  position: relative;
  display: grid;
  grid-template-columns: 64px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 18px;
  padding: 18px 22px 18px 0;
  border-top: 1px solid var(--rule);
  background: var(--white);
  transition: background .25s;
  will-change: transform;
}
.entry:first-child { border-top: 0; }
.entry:hover { background: #fffaf1; }
.entry.is-out { opacity: .45; }
.rank { font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.entry:nth-child(-n+3) .rank { color: var(--kibble-2); font-weight: 700; }
.thumb {
  width: 72px; height: 72px; border-radius: 12px; background: #fff; border: 1px solid var(--rule);
  display: grid; place-items: center; overflow: hidden; flex: none;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; mix-blend-mode: multiply; }
.entry:hover .thumb { transform: rotate(-3deg) scale(1.04); box-shadow: var(--shadow-1); }
.e-main { min-width: 0; }
.e-brand { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .06em; }
.e-name { font-size: 16px; font-weight: 700; line-height: 1.5; margin: 1px 0 6px; }
.e-name a { text-decoration: none; }
.e-name a:hover { text-decoration: underline; }
.e-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.e-meta b { font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar { margin-top: 10px; height: 6px; background: var(--paper-2); border-radius: 999px; overflow: hidden; max-width: 420px; }
.bar i { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--forest-2), var(--kibble)); border-radius: inherit; transition: width .7s var(--ease); }
.e-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cost { line-height: 1; white-space: nowrap; }
.cost .num { font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -.02em; }
.cost small { font-size: 13px; color: var(--ink-3); margin-left: 2px; }
.cost .yen { font-family: var(--serif); font-size: 18px; margin-right: 1px; color: var(--ink-2); }
.buy {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; background: var(--kibble-soft); color: var(--kibble-2);
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.buy:hover { background: var(--kibble); color: var(--white); transform: translateY(-1px); }
.buy svg { width: 12px; height: 12px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); vertical-align: 1px; }
.tag.warn { background: var(--butter-soft); color: #7a5a00; }
.tag.src { background: var(--forest-soft); color: var(--forest); }
.tag.src.pkg { background: var(--kibble-soft); color: var(--kibble-2); }
@media (max-width: 640px) {
  .entry { grid-template-columns: 44px 56px minmax(0, 1fr); padding: 16px 16px 16px 0; gap: 10px 12px; align-items: start; }
  .thumb { width: 56px; height: 56px; border-radius: 10px; }
  .e-side { grid-column: 2 / -1; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .rank { font-size: 18px; }
  .e-name { font-size: 15px; }
}
.ledger-more { display: flex; justify-content: center; margin-top: 18px; }
.btn {
  appearance: none; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--kibble-2); border-color: var(--kibble-2); color: var(--white); }
.out-note { font-size: 13px; color: var(--ink-3); margin: 14px 4px 0; }

/* ---------- 計算のしかた ---------- */
.how { padding: clamp(48px, 8vw, 110px) 0; background: var(--forest); color: var(--paper); position: relative; overflow: hidden; }
.how::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid #ffffff1a; box-shadow: 0 0 0 60px #ffffff08, 0 0 0 120px #ffffff05;
}
.how .eyebrow { color: #c9d8cc; }
.how h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 900; line-height: 1.35; margin: 8px 0 14px; max-width: 18em; }
.how .lead { color: #d6e2d8; max-width: 40em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; counter-reset: s; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { background: #ffffff0d; border: 1px solid #ffffff1f; border-radius: var(--r-l); padding: 26px; position: relative; }
.step-art {
  display: block; width: 116px; height: 116px; object-fit: cover; border-radius: 22px; margin-bottom: 14px;
  box-shadow: 0 16px 30px -16px #000a; transform: rotate(-3deg); transition: transform .5s var(--ease);
}
.step:nth-child(2) .step-art { transform: rotate(2deg); }
.step:hover .step-art { transform: rotate(0) scale(1.04); }
.step .n { position: absolute; top: 22px; right: 26px; font-family: var(--serif); font-style: italic; font-size: 54px; line-height: 1; color: var(--butter); }
.step h3 { font-size: 18px; margin: 14px 0 8px; }
.step p { font-size: 14px; color: #d6e2d8; margin: 0; }
.formula {
  margin-top: 28px; padding: 18px 22px; border-radius: var(--r-m); background: #00000024;
  font-family: var(--serif); font-size: clamp(16px, 2vw, 21px); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
}
.formula span.op { color: var(--butter); font-size: 1.2em; }
.formula small { font-family: var(--sans); font-size: 12px; color: #c9d8cc; display: block; }

/* ---------- 出典の見方・ブランド・FAQ ---------- */
.sec { padding: clamp(48px, 7vw, 96px) 0; }
.sec h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 900; margin: 8px 0 14px; line-height: 1.35; }
.sec .lead { color: var(--ink-2); max-width: 42em; margin: 0 0 28px; }
.sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .sources { grid-template-columns: 1fr; } }
.source { border: 1px solid var(--rule); border-radius: var(--r-m); padding: 20px; background: var(--white); }
.source .tag { margin-bottom: 10px; }
.source p { font-size: 14px; color: var(--ink-2); margin: 0; }
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.brands a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; text-decoration: none;
  padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--r-m); background: var(--white);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.brands a:hover { border-color: var(--ink-3); transform: translateY(-2px); box-shadow: var(--shadow-1); color: var(--ink); }
.brands b { font-weight: 700; font-size: 15px; }
.brands span { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-family: var(--serif); font-size: 26px; color: var(--kibble); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 22px; color: var(--ink-2); font-size: 15px; max-width: 46em; }

/* ---------- 商品ページ ---------- */
.crumbs { font-size: 12px; color: var(--ink-3); padding-top: 22px; }
.crumbs a { text-decoration: none; }
.crumbs span { margin: 0 6px; }
.food-hero { padding: 18px 0 30px; }
.food-hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .food-hero .wrap { grid-template-columns: 1fr; } }
.pack {
  float: right; width: clamp(120px, 22vw, 200px); margin: 0 0 12px 18px;
}
.pack a { display: block; aspect-ratio: 1; background: #fff; border: 1px solid var(--rule); border-radius: var(--r-l); padding: 10px; box-shadow: var(--shadow-2); transform: rotate(2deg); transition: transform .4s var(--ease); }
.pack a:hover { transform: rotate(0) scale(1.02); }
.pack img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pack figcaption { font-size: 10px; color: var(--ink-3); text-align: center; margin-top: 8px; line-height: 1.4; }
@media (max-width: 520px) { .pack { width: 110px; margin-left: 12px; } }
.food-hero h1 { font-size: clamp(26px, 3.8vw, 42px); font-weight: 900; line-height: 1.3; margin: 6px 0 14px; }
.food-hero .brand-link { font-size: 14px; font-weight: 700; color: var(--kibble-2); text-decoration: none; letter-spacing: .04em; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.kpis { clear: both; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-l); overflow: hidden; margin-top: 22px; }
.kpi { background: var(--white); padding: 18px 16px; }
.kpi .label { display: block; margin-bottom: 6px; color: var(--ink-3); }
.kpi .num { font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; line-height: 1.05; }
.kpi small { font-size: 13px; color: var(--ink-3); }
@media (max-width: 520px) {
  .kpi { padding: 14px 12px; }
  .kpi .num { font-size: 26px; }
  .kpi .label { font-size: 11px; }
}
.panel { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-l); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow-1); }
.panel h2 { font-size: 20px; font-weight: 900; margin: 0 0 4px; }
.panel .sub { font-size: 13px; color: var(--ink-3); margin: 0 0 16px; }
.food-body { padding: 10px 0 80px; }
.food-body .wrap { display: grid; gap: 22px; }
/* グリッドの子が中身（表の min-width）で横に広がらないように */
.food-body .wrap > *, .food-hero .wrap > *, .hero .wrap > * { min-width: 0; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--rule); stroke-dasharray: 2 4; }
.chart .axis text { font-family: var(--mono); font-size: 11px; fill: var(--ink-3); }
.chart .line { fill: none; stroke: var(--kibble); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#kn-area); }
.chart .pt { fill: var(--white); stroke: var(--kibble); stroke-width: 2; }
.chart .now { fill: var(--kibble); }
.chart .now-label { font-family: var(--serif); font-size: 14px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--white); stroke-width: 5px; stroke-linejoin: round; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: var(--r-m); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 420px; }
.tbl th, .tbl td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { background: var(--paper-2); font-size: 12px; font-weight: 700; color: var(--ink-2); position: sticky; top: 0; }
.tbl td { font-family: var(--serif); font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.is-now td { background: var(--butter-soft); font-weight: 600; }
.tbl td .buy { font-family: var(--sans); }
.srcbox { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; color: var(--ink-2); }
.srcbox dt { color: var(--ink-3); font-size: 13px; }
.srcbox dd { margin: 0; word-break: break-all; }
.note { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; }

/* ---------- ページ・アーカイブ ---------- */
.page-head { padding: clamp(36px, 6vw, 72px) 0 18px; }
.page-head h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 900; margin: 8px 0 10px; line-height: 1.3; }
.prose { max-width: 46em; font-size: 16px; }
.prose h2 { font-size: 22px; font-weight: 900; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 18px; margin: 1.8em 0 .4em; }
.prose p, .prose li { color: var(--ink-2); }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--paper-2); padding: 1px 6px; border-radius: 4px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding-bottom: 80px; }
.card { display: block; text-decoration: none; padding: 20px; border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--white); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--rule-2); color: var(--ink); }
.card .e-brand { display: block; }
.card-img { display: grid; place-items: center; aspect-ratio: 1; background: #fff; border-radius: var(--r-m); margin-bottom: 14px; border: 1px solid var(--rule); overflow: hidden; }
.card-img img { width: 82%; height: 82%; object-fit: contain; mix-blend-mode: multiply; transition: transform .4s var(--ease); }
.card:hover .card-img img { transform: scale(1.05) rotate(-2deg); }
.card h3 { font-size: 16px; margin: 4px 0 10px; line-height: 1.5; }

/* ---------- フッター ---------- */
.site-footer { background: var(--ink); color: #cfc7b8; padding: 56px 0 40px; font-size: 13px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer .brand { color: var(--paper); }
.site-footer .brand svg rect { fill: #34302a; }
.site-footer .brand-word b { color: #e48a52; }
.site-footer p { margin: 12px 0 0; max-width: 38em; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; align-content: start; }
.site-footer nav a { color: #e9e2d5; text-decoration: none; }
.site-footer nav a:hover { color: var(--butter); }
.site-footer .copy { grid-column: 1 / -1; border-top: 1px solid #ffffff1a; padding-top: 22px; color: #9b9284; }

/* ---------- 出現アニメーション ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

.lost-art { display: block; width: min(440px, 100%); margin: 0 0 8px -10px; mix-blend-mode: multiply; }

/* ---------- 問い合わせフォーム ---------- */
.form { display: grid; gap: 16px; max-width: 720px; }
.form .f { display: grid; gap: 6px; }
.form .label em { font-style: normal; font-size: 11px; color: var(--kibble-2); margin-left: 6px; }
.form input[type="text"], .form input[type="email"], .form select, .form textarea {
  font: inherit; font-size: 16px; color: var(--ink); width: 100%;
  padding: 11px 14px; border: 1px solid var(--rule-2); border-radius: var(--r-s); background: var(--paper);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--kibble); background: var(--white); box-shadow: 0 0 0 4px color-mix(in srgb, var(--kibble) 14%, transparent); }
.form textarea { resize: vertical; min-height: 160px; line-height: 1.7; }
.form .f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form .f2 { grid-template-columns: 1fr; } }
.form .btn { justify-self: start; }
.form-err { margin: 0; padding: 10px 14px; border-radius: var(--r-s); background: var(--kibble-soft); color: var(--kibble-2); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.select {
  appearance: none; -webkit-appearance: none; width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  padding: 11px 40px 11px 14px; border-radius: 999px; border: 0; background: var(--paper-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237a7368' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 16px center;
  cursor: pointer;
}

/* ---------- 絞り込み ---------- */
.filters { margin: 0 0 16px; border: 1px solid var(--rule); border-radius: var(--r-l); background: var(--white); }
.filters summary {
  list-style: none; cursor: pointer; padding: 14px 20px; font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: "+"; margin-left: auto; font-family: var(--serif); font-size: 22px; color: var(--kibble); transition: transform .3s var(--ease); }
.filters[open] summary::after { transform: rotate(45deg); }
.f-ico { font-size: 18px; color: var(--kibble-2); transform: rotate(-45deg); display: inline-block; }
.f-count { font-size: 12px; font-weight: 700; color: var(--paper); background: var(--forest); border-radius: 999px; padding: 1px 9px; }
.f-count:empty { display: none; }
.f-body { padding: 4px 20px 20px; display: grid; gap: 16px; border-top: 1px solid var(--rule); }
.f-group { display: grid; grid-template-columns: 7em 1fr; gap: 10px; align-items: start; padding-top: 14px; }
@media (max-width: 640px) { .f-group { grid-template-columns: 1fr; gap: 6px; } }
.f-title { font-size: 12px; font-weight: 700; color: var(--ink-3); padding-top: 8px; }
.chip .n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-left: 6px; }
.chip[aria-pressed="true"] .n { color: #c9d8cc; }
.chip:disabled { opacity: .35; cursor: default; }
.f-foot { display: flex; justify-content: flex-end; }
.e-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.e-tags span { font-size: 11px; color: var(--forest); background: var(--forest-soft); padding: 0 7px; border-radius: 5px; }

/* ---------- 原材料 ---------- */
.f-title small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.ing-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.ing { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule); }
.ing b { font-size: 11px; }
.ing.in { background: var(--kibble-soft); border-color: transparent; color: var(--kibble-2); }
.ing.out { color: var(--ink-3); }
.ing.out b { color: var(--forest); }
.ing-text { font-size: 14px; line-height: 2; color: var(--ink-2); margin: 0; }
.ing-text mark { background: linear-gradient(transparent 58%, var(--butter-soft) 58%); color: var(--ink); padding: 0 1px; }

/* 犬・猫の切り替え（トップ）・ブランドページの見出し */
.species-switch { display: inline-flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 999px; margin: 0 0 12px; }
.species-switch a { text-decoration: none; font-weight: 700; font-size: 14px; padding: 6px 18px; border-radius: 999px; color: var(--ink-2); }
.species-switch a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.sub-h { font-size: 20px; margin: 28px 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.sub-h small { font-size: 13px; font-weight: 400; color: var(--ink-3); }

/* 読み上げだけに出す文字 */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 一覧の続き（最初は30行だけ出す） */
.more-btn { display: block; width: 100%; margin: 14px 0 0; padding: 14px; border: 1px dashed var(--rule-2, #d8cfbf); border-radius: 14px; background: var(--white, #fff); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s; }
.more-btn:hover { background: var(--paper-2, #f4eee3); border-color: var(--ink); }
.more-btn[hidden] { display: none; }
.perkg td, .perkg th { white-space: nowrap; font-size: 13.5px; vertical-align: middle; }
.perkg .l { text-align: left; white-space: normal; font-family: var(--sans); min-width: 13em; }
.perkg .l small { display: block; font-size: 11px; color: var(--ink-3); }
.perkg .l a { font-weight: 700; text-decoration: none; }
.perkg th.r, .perkg td.r { text-align: right; }

/* ---------- 押しやすさ（指で押す所は高さ 32px 以上。見た目の位置は変えずに押せる範囲だけ広げる） ---------- */
.site-footer nav a { display: block; padding: 6px 0; margin: -3px 0; }
.r-name, .e-name a { padding-block: 5px; margin-block: -5px; }
.e-name a { display: inline-block; }
.brand-link { display: inline-block; padding-block: 8px; margin-block: -8px; }
.sources a { padding-block: 5px; margin-block: -5px; }
/* 楽天の画像が消えていたとき（ui.js が付ける） */
.img-gone { display: none !important; }
/* スマホのブランドページ: 画像を左に小さく（縦に長くならないように） */
@media (max-width: 640px) {
  .grid-cards { grid-template-columns: 1fr; gap: 10px; }
  .card { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 12px 14px; }
  .card-img { grid-row: 1 / span 3; margin: 0; width: 76px; }
  .card h3 { font-size: 15px; margin: 2px 0 6px; }
  .card > :not(.card-img) { grid-column: 2; }
}
.site-header .brand { padding-block: 4px; }
dd a, .facts a { display: inline-block; padding-block: 6px; margin-block: -6px; }
