@charset "UTF-8";

/* ==========================================================================
   カラダにいいこと｜食品・栄養素ガイド
   色・形・タイポグラフィの基準は docs/top-concept.md 第10節に従う
   ========================================================================== */

:root {
  --bg: #f7f4ea;
  --surface: #fffdf7;
  --heading: #2f5d50;
  --heading-sub: #527665;
  --guide-bg: #e3ece4;
  --text: #2f3833;
  --text-quiet: #5d6862;
  --accent: #c98263;
  --line: #d9d4c4;
  --line-soft: #e7e2d4;

  --font-heading: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
  --font-body: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", system-ui, -apple-system, sans-serif;

  --radius-card: 24px;
  --radius-image: 32px;
  --sheet-bar-height: 76px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
}

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

button { font: inherit; color: inherit; }

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

:focus-visible {
  outline: 3px solid var(--heading-sub);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  z-index: 50;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- layout */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr);
  gap: 0;
  align-items: start;
  min-height: 100vh;
}

.panel {
  padding: 56px 64px 72px;
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
  min-width: 0;
}

.sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px 28px 24px;
}

/* ------------------------------------------------------------------- TOP */

.top__label {
  margin: 0 0 12px;
  color: var(--heading-sub);
  font-size: 14px;
  letter-spacing: 0.14em;
}

.top__title {
  margin: 0 0 20px;
  font-family: var(--font-heading);
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading);
}

.top__lead {
  margin: 0 0 40px;
  font-family: var(--font-heading);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.7;
  color: var(--heading-sub);
}

.top__body { max-width: 34em; }
.top__body p { margin: 0 0 1.1em; }

/* コラージュ。CSS Grid を基本にし、絶対配置へ依存しない */
.collage {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  margin: 0 0 48px;
}

.collage__cell {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-image);
  background: var(--line-soft);
}

.collage__cell:empty { display: none; }

.collage__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
 * #6 が採用した4点を「主画像＋補助3点の横並び」として組む。
 * 主画像に幅を与え、補助3点は同じ大きさで並べる。
 * 縦長の画像が細い枠に入らないよう、補助はすべて同じ比率にする。
 */
.collage__cell--main      { grid-column: 1 / 7; grid-row: 1 / 2; aspect-ratio: 16 / 9; }
.collage__cell--food      { grid-column: 1 / 3; grid-row: 2 / 3; aspect-ratio: 4 / 3; }
.collage__cell--botanical { grid-column: 3 / 5; grid-row: 2 / 3; aspect-ratio: 4 / 3; }
.collage__cell--quiet     { grid-column: 5 / 7; grid-row: 2 / 3; aspect-ratio: 4 / 3; }

.guide-box {
  margin: 40px 0 0;
  padding: 28px 32px;
  background: var(--guide-bg);
  border-radius: var(--radius-card);
  max-width: 40em;
}

.guide-box__title {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 21px;
  color: var(--heading);
}

.guide-box__text { margin: 0 0 20px; }
.guide-box__text--sp { display: none; }

/* ------------------------------------------------------ 独立TOP（#78） */

.top-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: 18px;
}

.shape-switch {
  display: flex;
  align-items: center;
  gap: 16px;
}

.shape-switch__button {
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--text-quiet);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.shape-switch__button:hover { color: var(--heading); }
.shape-switch__button[aria-pressed="true"] {
  color: var(--heading);
  border-bottom-color: var(--heading);
}

.top-page main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.top-hero { padding: 40px 0 56px; }

.top-hero__label,
.product-guide__eyebrow {
  margin: 0 0 14px;
  color: var(--heading-sub);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.top-hero__label { font-size: 20px; }

.top-hero__image {
  display: block;
  width: 100%;
  height: min(40vw, 480px);
  object-fit: cover;
  border-radius: var(--radius-image);
  box-shadow: 0 18px 46px rgb(47 56 51 / 10%);
}

.top-hero__copy {
  max-width: 760px;
  margin: 36px auto 0;
  text-align: center;
}

.top-hero__title {
  margin: 0 0 10px;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.25;
}

.top-hero__lead {
  margin: 0;
  color: var(--heading-sub);
  font-family: var(--font-heading);
  font-size: clamp(19px, 2.3vw, 28px);
}

.top-intro {
  padding: 24px 0 72px;
}

.top-intro__text {
  max-width: 42em;
  margin: 0 auto 42px;
  text-align: center;
}

.top-intro__text p { margin: 0 0 0.8em; }

.top-intro__images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.top-intro__images img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 20px;
}

.product-guide {
  margin-bottom: 72px;
  padding: 56px 48px 64px;
  border-radius: 32px;
  background: var(--surface);
}

.product-guide__head {
  max-width: 44em;
  margin: 0 auto 30px;
  text-align: center;
}

.product-guide__title {
  margin: 0 0 14px;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 600;
  line-height: 1.4;
}

.product-guide__lead { margin: 0; }

.product-guide__status {
  margin: 0 0 18px;
  color: var(--text-quiet);
  font-size: 14px;
  text-align: right;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.product-card:hover {
  border-color: var(--line);
  background: var(--bg);
  transform: translateY(-2px);
}

.product-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: contain;
  transition: border-radius 0.18s ease;
}

/* square のときは、TOPのカード・詳細の枠・一覧のサムネイルをまとめて四角にする。
   ptn3 の .item__figure はもとから角丸なしなので、より詳細度の高い既存指定が勝つ */
body[data-card-shape="square"] .product-card__image { border-radius: 12px; }
body[data-card-shape="square"] .item__figure { border-radius: 12px; }
body[data-card-shape="square"] .item-list__thumb { border-radius: 6px; }

.product-card__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

/* ---------------------------------------------------------------- detail */

.item__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 28px;
}

.back-link {
  margin: 0;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--heading-sub);
  cursor: pointer;
  font-size: 16px;
}
.back-link:hover { color: var(--heading); text-decoration: underline; }

/* -------------------------------------------- レイアウトパターン（#59） */

/* 詳細ページ上部。レイアウト切り替えを左、画像の形の切り替えを右に並べる */
.panel-switches {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.panel-switches .shape-switch { margin-left: auto; }

.layout-switch {
  display: flex;
  align-items: center;
  gap: 16px;
}
.layout-switch[hidden] { display: none; }

.layout-switch__button {
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--text-quiet);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.layout-switch__button:hover { color: var(--heading); }
.layout-switch__button[aria-pressed="true"] {
  color: var(--heading);
  border-bottom-color: var(--heading);
}

/* Ptn.1 では、まとめ用の div が無かったときと同じ並びに戻す */
.item__side { display: contents; }
.item__side[hidden] { display: none; }

/*
 * Ptn.2: 画像の下に名称、画像の右に食品・摂取方法・実践例。
 * 残りのブロックは全幅のまま、DOM順で下へ流す。
 */
.item[data-layout="ptn2"] {
  display: grid;
  grid-template-columns: clamp(180px, 22vw, 260px) minmax(0, 1fr);
  column-gap: 48px;
  align-items: start;
}
.item[data-layout="ptn2"] > * { grid-column: 1 / -1; }

.item[data-layout="ptn2"] .item__head {
  grid-column: 1;
  grid-row: 2;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}
.item[data-layout="ptn2"] .item__figure { width: 100%; }
.item[data-layout="ptn2"] .item__name { font-size: clamp(24px, 2.2vw, 32px); }

.item[data-layout="ptn2"] .item__side {
  display: block;
  grid-column: 2;
  grid-row: 2;
}
.item[data-layout="ptn2"] .item__side .block:last-child { margin-bottom: 0; }

/* Ptn.3: references/detail-layout-sample.png の紙面構成と配色 */
.ptn3-masthead,
.ptn3-number,
.ptn3-description,
.ptn3-english-name,
.ptn3-only { display: none; }

body[data-detail-layout="ptn3"],
body[data-detail-layout="ptn3"] .sidebar { background: #fff; }

.item[data-layout="ptn3"] {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  padding: 0 14px 28px;
  border-radius: 18px;
  background: #f0f5f3;
  color: #343b39;
}
.item[data-layout="ptn3"] > * { grid-column: 1 / -1; }
.item[data-layout="ptn3"] .item__bar {
  margin: 0 -14px;
  padding: 10px 0 16px;
  background: #fff;
}
.item[data-layout="ptn3"] .ptn3-masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0 -14px;
  padding: 8px 0 26px;
  background: #fff;
}
.ptn3-masthead p { margin: 0; }
.ptn3-masthead__copy { min-width: 0; }
.ptn3-masthead__meta {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 16px;
  white-space: nowrap;
}
.item[data-layout="ptn3"] .ptn3-masthead .back-link {
  padding: 0;
  font-size: 14px;
}
.ptn3-masthead__title {
  color: #2d3b39;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.35;
}
.ptn3-masthead__sub { color: #77a3aa; font-size: 14px; }
.ptn3-masthead__index {
  color: #65a092;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.ptn3-masthead__index span { margin-left: 3px; }

.item[data-layout="ptn3"] .item__head {
  grid-row: 2;
  display: grid;
  grid-template-columns: 112px minmax(280px, 5fr) minmax(250px, 5fr);
  align-items: start;
  gap: 24px;
  min-height: 330px;
  margin: 0;
  padding: 0 12px 10px 0;
}
.item[data-layout="ptn3"] .ptn3-number {
  display: flex;
  grid-row: 1;
  flex-direction: column;
  align-items: center;
  width: 100px;
  min-height: 176px;
  padding-top: 18px;
  background: #4e8133;
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  line-height: 1;
}
.item[data-layout="ptn3"] .ptn3-number span { font-size: 16px; font-weight: 700; }
.item[data-layout="ptn3"] .ptn3-number strong { margin-top: 8px; font-size: 56px; font-weight: 500; }
.item[data-layout="ptn3"] .item__heading { grid-column: 2; grid-row: 1; padding-top: 32px; }
.item[data-layout="ptn3"] .item__type {
  margin-bottom: 3px;
  color: #70a05d;
  font-size: 15px;
  font-weight: 700;
}
.item[data-layout="ptn3"] .item__name {
  color: #293937;
  font-family: var(--font-body);
  font-size: clamp(34px, 3.4vw, 46px);
  font-weight: 700;
  letter-spacing: .04em;
}
.item[data-layout="ptn3"] .ptn3-english-name {
  display: block;
  margin: 4px 0 0;
  color: #72a05e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.35;
}
.item[data-layout="ptn3"] .ptn3-description {
  display: block;
  grid-column: 1 / 3;
  grid-row: 2;
  margin: 8px clamp(36px, 4vw, 64px) 0 22px;
  color: #343b39;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}
.item[data-layout="ptn3"] .item__figure {
  grid-column: 3;
  grid-row: 1 / 3;
  width: 100%;
  max-width: 430px;
  aspect-ratio: 1;
  justify-self: end;
  margin-top: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.item[data-layout="ptn3"] .block {
  max-width: none;
  margin: 0;
  padding: 16px 20px;
  border: 1px solid #ccd9d5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(50 75 68 / 5%);
}
.item[data-layout="ptn3"] .block__title {
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  color: #548a3d;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
}
.item[data-layout="ptn3"] .block__text,
.item[data-layout="ptn3"] .block__list,
.item[data-layout="ptn3"] .scene-list { font-size: 14px; line-height: 1.75; }
.item[data-layout="ptn3"] .item__side { display: contents; }
.item[data-layout="ptn3"] .item__side[hidden] { display: none; }
.item[data-layout="ptn3"] .ptn3-only { display: block; }
.item[data-layout="ptn3"] .ptn3-only[hidden] { display: none; }
.item[data-layout="ptn3"] #block-description {
  display: none;
}
/* 仕様画像どおり、1段目は「主な成分｜食品・形態」の組み合わせにする */
.item[data-layout="ptn3"] #block-components { grid-column: 1 / 7; grid-row: 3; }
.item[data-layout="ptn3"] #block-foods { grid-column: 7 / -1; grid-row: 3; }
.item[data-layout="ptn3"] #block-examples { grid-column: 1 / -1; grid-row: 4; background: transparent; border: 0; box-shadow: none; padding: 2px 0 0; }
.item[data-layout="ptn3"]:not(:has(#block-components:not([hidden]))) #block-foods { grid-column: 1 / -1; }
.item[data-layout="ptn3"] #block-examples .block__title::before { content: "■ "; }
.item[data-layout="ptn3"] #block-dose { grid-column: 1 / -1; }
.item[data-layout="ptn3"] .dose__text { font-size: 14px; line-height: 1.75; }
.component-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.75;
  list-style: none;
}
.component-list li {
  display: grid;
  grid-template-columns: minmax(9em, auto) 1fr;
  gap: 2px 14px;
}
.component-list__name { color: #34423d; }
.component-list__amount { color: #4f5b57; }
.component-list__note {
  grid-column: 1 / -1;
  color: #78827f;
  font-size: 12px;
  line-height: 1.6;
}
.item[data-layout="ptn3"] .scene-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.item[data-layout="ptn3"] .scene-list > div {
  display: block;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #d4dfdb;
  border-radius: 8px;
  background: #fff;
}
.item[data-layout="ptn3"] .scene-list dt {
  display: inline-block;
  margin-bottom: 5px;
  padding: 1px 16px;
  border-radius: 999px;
  background: #f6eee1;
  color: #896247;
  font-weight: 700;
}
.item[data-layout="ptn3"] .block--note { border-color: #68a0b1; }
.item[data-layout="ptn3"] #block-supplement {
  padding: 20px 22px;
  border: 3px solid #f2aa3b;
  background: #fff2d7;
}
.item[data-layout="ptn3"] #block-supplement .block__title { color: #8c5825; font-size: 18px; }
.item[data-layout="ptn3"] .block--caution {
  margin-top: 10px;
  border: 1px solid #e62924;
  background: #fff9f7;
}
.item[data-layout="ptn3"] .block--caution .block__title { color: #d1201b; font-size: 16px; }
.item[data-layout="ptn3"] .item__actions { margin: 0; }
.item[data-layout="ptn3"] .notice {
  max-width: none;
  padding: 8px 0 0;
  border-radius: 0;
  background: transparent;
  color: #9da7a4;
}
.item[data-layout="ptn3"] .ptn3-references {
  margin-top: 8px;
  padding: 20px 4px 0;
  border-top: 1px solid #cbd7d3;
  color: #65716d;
}
.ptn3-references__title {
  margin: 0 0 12px;
  color: #52645e;
  font-size: 16px;
}
.ptn3-references__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 1.5em;
  font-size: 12px;
  line-height: 1.65;
}
.ptn3-reference { padding-left: 3px; }
.ptn3-reference__title {
  display: inline;
  color: #435d55;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.ptn3-reference__meta,
.ptn3-reference__usage,
.ptn3-reference__checked { display: block; }
.ptn3-reference__checked { color: #89938f; }

.item__head {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0 0 40px;
}

.item__figure {
  flex: 0 0 auto;
  width: clamp(150px, 20vw, 220px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 50%;
  background: var(--guide-bg);
}

.item__image { display: block; width: 100%; height: auto; }
.item__image[hidden] { display: none; }

.item__type {
  margin: 0 0 8px;
  color: var(--heading-sub);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.item__name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading);
}

.block {
  margin: 0 0 40px;
  max-width: 42em;
}

.block[hidden] { display: none; }

.block__title {
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--heading);
}

.block__title--small { font-size: 17px; border-bottom: 0; padding-bottom: 0; }

.block__text { margin: 0; }
.block__text--multiline { white-space: pre-line; }

/* 元データ由来であることを示す小さな注記 */
.block__source {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--text-quiet);
}

.block__list { margin: 0; padding: 0 0 0 1.3em; }
.block__list li { margin: 0 0 0.6em; }
.block__list li:last-child { margin-bottom: 0; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
}

.scene-list { margin: 0; }
.scene-list > div { display: flex; gap: 14px; margin: 0 0 0.7em; }
.scene-list dt {
  flex: 0 0 4.5em;
  color: var(--heading-sub);
  font-weight: 600;
}
.scene-list dd { margin: 0; }

/* 研究摂取量。一段控えた見せ方にする */
.block--note {
  padding: 24px 28px;
  border: 1px solid #cfdcd2;
  border-radius: 18px;
  background: color-mix(in srgb, var(--guide-bg) 45%, var(--surface));
}

.dose__text { margin: 0 0 12px; font-weight: 600; }


.dose__reference { margin: 0 0 12px; }
.dose__reference-title { margin: 0 0 6px; font-size: 15px; color: var(--text-quiet); }

.dose__caveat {
  margin: 0;
  font-size: 14px;
  color: var(--text-quiet);
}

.block--caution {
  padding: 24px 28px;
  border-radius: 18px;
  background: #f6efe7;
  border: 1px solid #e6d8c8;
}
.block--caution .block__title { border-bottom-color: #e6d8c8; }

.item__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 0 0 40px;
}

.item__purchase { display: flex; flex-wrap: wrap; gap: 12px; }

.notice {
  padding: 24px 28px;
  border-radius: var(--radius-card);
  background: var(--guide-bg);
  max-width: 42em;
}
.notice__title {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--heading);
}
.notice p { margin: 0 0 0.6em; font-size: 15px; }
.notice p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- buttons */

.button {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid var(--heading-sub);
  border-radius: 999px;
  background: var(--surface);
  color: var(--heading);
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
}
.button:hover { background: var(--guide-bg); }

.button--primary {
  background: var(--heading);
  border-color: var(--heading);
  color: #fffdf7;
}
.button--primary:hover { background: var(--heading-sub); }

/* ------------------------------------------------------------ list panel */

.sidebar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.sidebar__title {
  margin: 0 0 18px;
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--heading);
}

.search__label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-quiet);
}

.search__input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 16px;
  color: inherit;
}

.search__status {
  margin: 10px 0 6px;
  font-size: 13px;
  color: var(--text-quiet);
}

.search__empty { margin: 12px 0 0; font-size: 15px; color: var(--text-quiet); }

.item-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.item-list__button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  text-align: left;
  line-height: 1.5;
}
.item-list__button:hover { background: var(--guide-bg); }

.item-list__button[aria-current="true"] {
  background: var(--guide-bg);
  box-shadow: inset 3px 0 0 var(--heading);
}

.item-list__thumb {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  object-fit: contain;
}

.item-list__name { flex: 1 1 auto; min-width: 0; }

.item-list__type {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-quiet);
}

/* ---------------------------------------------------------- bottom sheet */

.sheet-bar { display: none; }
.sheet-close { display: none; }

/* ---------------------------------------------------------------- footer */

.footer {
  grid-column: 1 / -1;
  padding: 32px 64px 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-quiet);
}
.footer p { margin: 0 0 8px; }
.footer__disclaimer { max-width: 60em; }

/* ----------------------------------------------------------------- modal */

.modal {
  width: min(760px, 92vw);
  max-height: 84vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
}
.modal::backdrop { background: rgb(35 45 40 / 45%); }

.modal__inner { display: flex; flex-direction: column; max-height: 84vh; }

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line-soft);
}

.modal__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--heading);
}

.modal__close {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 8px;
}
.modal__close:hover { background: var(--guide-bg); }

.modal__body { overflow-y: auto; padding: 24px 28px 32px; }

.evidence-group { margin: 0 0 28px; }
.evidence-group:last-child { margin-bottom: 0; }

.evidence-group__title {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--heading-sub);
}

.evidence-card {
  margin: 0 0 16px;
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
}

.evidence-card__claim { margin: 0 0 10px; font-weight: 600; }

.evidence-card__meta {
  margin: 0;
  font-size: 14px;
  color: var(--text-quiet);
}
.evidence-card__meta > div { margin: 0 0 4px; }
.evidence-card__meta dt { display: inline; font-weight: 600; }
.evidence-card__meta dt::after { content: "："; }
.evidence-card__meta dd { display: inline; margin: 0; }

.evidence-note {
  margin: 0 0 10px;
  padding: 0 0 0 1.2em;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .panel { padding: 40px 40px 64px; }
  .sidebar__inner { padding: 28px 22px 20px; }
  .footer { padding: 28px 40px 36px; }
  .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .item[data-layout="ptn3"] .item__head {
    grid-template-columns: 90px minmax(0, 1fr) minmax(200px, .9fr);
    gap: 16px;
  }
  .item[data-layout="ptn3"] .ptn3-number { width: 82px; min-height: 146px; }
  .item[data-layout="ptn3"] .ptn3-number strong { font-size: 46px; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }

  .top-header { width: min(100% - 32px, 720px); padding-top: 12px; }
  .top-page main { width: min(100% - 32px, 720px); }
  .top-hero { padding: 24px 0 40px; }
  .top-hero__label { font-size: 18px; }
  .top-hero__image { height: 176px; border-radius: 20px; }
  .top-hero__copy { margin-top: 26px; }
  .top-intro { padding: 12px 0 48px; }
  .top-intro__images { grid-template-columns: 1fr; gap: 14px; }
  .product-guide { margin-bottom: 48px; padding: 40px 16px 44px; border-radius: 24px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 6px; }
  .product-card { padding: 8px 4px 10px; }
  .product-card__name { font-size: 13px; }

  .layout { grid-template-columns: 1fr; min-height: 0; }

  .panel { padding: 32px 20px calc(var(--sheet-bar-height) + 32px); }

  /* 一覧はボトムシートとして表示する */
  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    height: min(82vh, 640px);
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 24px 24px 0 0;
    background: var(--surface);
    box-shadow: 0 -8px 28px rgb(47 56 51 / 16%);
    transform: translateY(101%);
    transition: transform 0.22s ease;
    z-index: 30;
  }
  .sidebar[data-open="true"] { transform: translateY(0); }

  .sidebar__inner { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }

  .sheet-close {
    display: inline-block;
    border: 0;
    background: none;
    color: var(--heading-sub);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
  }
  .sheet-close:hover { background: var(--guide-bg); }

  .sheet-bar {
    display: block;
    position: fixed;
    inset: auto 0 0 0;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--line);
    z-index: 20;
  }
  body[data-detail-layout="ptn3"] .sheet-bar { background: rgb(255 255 255 / 88%); }
  .sheet-bar .button { width: 100%; }
  .sheet-bar[hidden] { display: none; }

  .guide-box__text--pc { display: none; }
  .guide-box__text--sp { display: block; }
  .guide-box #focus-search { display: none; }

  .collage { grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 36px; }
  .collage__cell--main { grid-column: 1 / 5; grid-row: 1 / 2; aspect-ratio: 4 / 3; }
  .collage__cell--food { grid-column: 1 / 3; grid-row: 2 / 3; aspect-ratio: 4 / 3; }
  .collage__cell--botanical { grid-column: 3 / 5; grid-row: 2 / 3; aspect-ratio: 4 / 3; }
  /* 小さな画面では情報量を下げるため補助1点を省く */
  .collage__cell--quiet { display: none; }

  .item__head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .item__figure { width: min(200px, 56vw); }

  /* 横に並べる幅がないため、Ptn.2 も1カラムで流す */
  .item[data-layout="ptn2"] { display: block; }
  .item[data-layout="ptn2"] .item__head { align-items: flex-start; gap: 20px; }
  .item[data-layout="ptn2"] .item__figure { width: min(200px, 56vw); }

  .item[data-layout="ptn3"] { display: block; padding: 0 14px 20px; }
  .item[data-layout="ptn3"] > * { margin-bottom: 18px; }
  .item[data-layout="ptn3"] .ptn3-masthead { padding-bottom: 18px; }
  .item[data-layout="ptn3"] .ptn3-masthead__sub { font-size: 12px; }
  .item[data-layout="ptn3"] .ptn3-masthead__index { font-size: 16px; }
  .item[data-layout="ptn3"] .ptn3-masthead__meta { gap: 10px; }
  .item[data-layout="ptn3"] .ptn3-masthead .back-link { font-size: 12px; }
  .item[data-layout="ptn3"] .item__head {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 0;
    gap: 14px;
    padding-right: 0;
  }
  .item[data-layout="ptn3"] .ptn3-number { width: 68px; min-height: 118px; padding-top: 12px; }
  .item[data-layout="ptn3"] .ptn3-number span { font-size: 12px; }
  .item[data-layout="ptn3"] .ptn3-number strong { font-size: 38px; }
  .item[data-layout="ptn3"] .item__heading { padding-top: 14px; }
  .item[data-layout="ptn3"] .ptn3-english-name { font-size: 17px; }
  .item[data-layout="ptn3"] .ptn3-description { grid-column: 1 / -1; grid-row: 2; margin: 4px 16px 0 0; }
  .item[data-layout="ptn3"] .item__figure { grid-column: 1 / -1; grid-row: 3; justify-self: center; }
  .item[data-layout="ptn3"] .item__figure { width: min(260px, 70vw); }
  .item[data-layout="ptn3"] .item__name { font-size: clamp(32px, 11vw, 48px); }
  .item[data-layout="ptn3"] .scene-list { grid-template-columns: 1fr; }
  .item[data-layout="ptn3"] .ptn3-references { padding: 18px 0 0; }
  .component-list li { grid-template-columns: 1fr; }

  .block--note, .block--caution, .notice { padding: 20px; }

  .footer { padding: 28px 20px calc(var(--sheet-bar-height) + 24px); }

  .scene-list > div { flex-direction: column; gap: 2px; }
  .scene-list dt { flex-basis: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
  .product-card,
  .product-card__image { transition: none; }
}

/* ------------------------------------------------------------ utilities */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------- terms.html 用 */

.doc {
  max-width: 44em;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.doc h1 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.2vw, 38px);
  color: var(--heading);
}

.doc h2 {
  margin: 40px 0 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--heading);
}

.doc p, .doc li { margin: 0 0 0.8em; }
.doc ul, .doc ol { padding-left: 1.4em; }

.doc__updated { color: var(--text-quiet); font-size: 14px; }

.todo {
  margin: 0 0 1em;
  padding: 16px 20px;
  border: 1px dashed var(--accent);
  border-radius: 14px;
  background: #fbf3ee;
}
.todo__label {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.todo p:last-child { margin-bottom: 0; }
