/* hinshu.jp — 3言語（日本語・英語・繁體中文）で同じ骨格を使う。
   日本語は行間を広めに、ラテン文字は字間を詰めない。 */

:root {
  color-scheme: light dark;

  --ink: #17201c;
  --ink-2: #4b5a51;
  --ink-3: #5c6b61;   /* 補助文字。#fbfaf6 に対して 5.39:1（旧 #77857c は 3.70:1 でAA未達）*/
  --bg: #fbfaf6;
  --bg-2: #ffffff;
  --line: #dfdcd2;
  --line-2: #eceadf;

  --grain: #7a5a3f;      /* 基調 */
  --grain-2: #b08a6a;
  --leaf: #8b2e24;       /* 赤身の色。強調 */
  --warn: #a4551f;

  --node-bg: #ffffff;
  --node-line: #cbc7b8;
  --node-center-bg: #8b2e24;
  --node-center-ink: #ffffff;

  --measure: 34rem;   /* 本文1行の長さ。文字と一緒に伸び縮みしてよい（1行の字数を保つため） */
  --wrap: 1120px;     /* 版面の上限。ここは追随させない。rem のままだと特大で1488pxまで広がった */
  --radius: 10px;

  /* 文字サイズは3段階だけにする。
     --fs-2 は補助（説明・注記）、--fs-3 は最小（ラベル・出典）。
     11px台のものが7段階に散らばっていたのをここに畳んだ。
     最小でも0.8rem＝14px以上になるようにしている。 */
  --fs-2: 0.9rem;
  --fs-3: 0.8rem;
  --fig-scale: 1;   /* 系統図の倍率。文字サイズと連動する */
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eae7dd;
    --ink-2: #b3ac9c;
    --ink-3: #9a9587;   /* ダークでもカード上 5.57:1 を確保 */
    --bg: #141613;
    --bg-2: #1c1f1b;
    --line: #33372f;
    --line-2: #262a24;
    --grain: #c9b479;
    --grain-2: #9a8a5e;
    --leaf: #e79a88;
    --warn: #d9945c;
    --node-bg: #1c1f1b;
    --node-line: #3d4239;
    --node-center-bg: #e79a88;
    --node-center-ink: #10130f;
  }
}

* { box-sizing: border-box; }

/* 既定18px。虫眼鏡なしで読めるところを既定値にする。
   下の data-fs で「大」「特大」に切り替わる。24pxでもレイアウトは崩れないことを確認済み。 */
html {
  -webkit-text-size-adjust: 100%;
  font-size: 18px;
}
html[data-fs="l"] { font-size: 21px; --fig-scale: 1.17; }
html[data-fs="xl"] { font-size: 24px; --fig-scale: 1.33; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "BIZ UDPGothic", Meiryo, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

html[lang="en"] body { line-height: 1.7; letter-spacing: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--leaf); }

.skip {
  position: absolute; left: -9999px;
}
.skip:focus { left: 1rem; top: 1rem; background: var(--bg-2); padding: 0.5rem 0.9rem; z-index: 10; }

/* ── ヘッダー ───────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.site-header__inner {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  align-items: baseline; justify-content: space-between;
  padding-block: 0.9rem;
}
/* ロゴ。マークは「品」の字を系統図として読んだもの。
   口が3つ、上に1つ下に2つ。下の右だけ塗ってあるのが「いま見ている品種」で、
   系統図の中心ノードと同じ扱いにしている。
   currentColor なので、ダークモードでも色指定を書き足さずに追随する。 */
.brand { text-decoration: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; }
.brand__mark { width: 1.65em; height: 1.65em; flex: none; color: var(--leaf); }
/* 大きく出すのは日本語。「hinshu」はローマ字なので、英語が分からない人には
   意味のない7文字にしかならない。ドメインは小さく、正確に残す。 */
.brand__stack { display: flex; flex-direction: column; line-height: 1.2; }
/* ふりがなが読めなければ、振った意味がない。小ささに下限を置く */
.brand__ruby { font-size: max(0.55em, 12px); letter-spacing: 0.32em; color: var(--ink-3); font-weight: 400; }
.brand__name { font-weight: 700; font-size: 1.3rem; letter-spacing: 0.08em; }
html[lang="en"] .brand__name { font-size: 1.15rem; letter-spacing: 0.02em; }
.brand__domain { font-size: var(--fs-3); font-weight: 700; color: var(--ink-3); letter-spacing: 0.03em; }
.brand__dot { color: var(--leaf); }
.brand__tag { color: var(--ink-3); font-size: var(--fs-3); }

/* ヘッダー右側。文字サイズ切り替えと言語切り替えを並べる。
   押せるものは指でもマウスでも外さない大きさにする（最低44px四方）。 */
.site-header__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.4rem; }

.fs-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.fs-switch__label { font-size: var(--fs-2); color: var(--ink-2); margin-right: 0.1rem; }
.fs-switch button {
  font: inherit; font-size: var(--fs-2); line-height: 1;
  min-height: 2.8em; min-width: 3.4em; padding: 0 0.9rem;
  color: var(--ink-2); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.fs-switch button:hover { border-color: var(--leaf); color: var(--ink); }
.fs-switch button:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.fs-switch button[aria-pressed="true"] {
  background: var(--leaf); border-color: var(--leaf); color: var(--bg-2); font-weight: 700;
}
@media (prefers-color-scheme: dark) { .fs-switch button[aria-pressed="true"] { color: #10130f; } }

.langs { display: flex; gap: 0.9rem; font-size: var(--fs-2); }
.langs a { padding-block: 0.45rem; }
.langs a { color: var(--ink-3); text-decoration: none; }
.langs a[aria-current="true"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--leaf); }

/* ── 品種ページ ─────────────────────────── */
.variety { padding-block: 2.5rem 4rem; }
.crumb { font-size: var(--fs-3); color: var(--ink-3); margin: 0 0 1.2rem; }
.crumb a { color: inherit; }

.variety__name {
  font-size: min(clamp(2rem, 6vw, 3.1rem), 9vw);
  overflow-wrap: break-word;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  letter-spacing: 0.01em;
}
.variety__ids { margin: 0; color: var(--ink-2); font-size: var(--fs-2); display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }

.section { margin-top: 3rem; }
.section h2 {
  font-size: 1.05rem; letter-spacing: 0.08em; margin: 0 0 1rem;
  color: var(--grain); text-transform: none;
}
.section h2::before { content: ""; display: inline-block; width: 1.4rem; height: 1px; background: var(--grain-2); vertical-align: 0.35em; margin-right: 0.6rem; }

/* ── 系統図 ─────────────────────────────── */
/* 図を読まずに済ませる道を、図の手前に出しておく。
   図の内容は下の「親／兄弟／子孫」に全部文字で書いてあるので、逃げ道は元からある。
   あることが分からなければ無いのと同じなので、明示する。 */
.skip-figure {
  display: inline-block; margin: 0 0 0.9rem;
  font-size: var(--fs-2); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.4rem 1rem; background: var(--bg-2); text-decoration: none;
}
.skip-figure:hover, .skip-figure:focus-visible { border-color: var(--leaf); color: var(--ink); }

.pedigree { margin: 0; }
.pedigree__scroll {
  overflow-x: auto;
  padding-block: 0.5rem 1rem;
  border-block: 1px solid var(--line-2);
  background: var(--bg-2);
}
.pedigree__scroll:focus-visible { outline: 2px solid var(--leaf); outline-offset: -2px; }
/* 文字サイズを上げたら図も一緒に大きくする。
   SVGの中の字だけ大きくすると箱からはみ出すので、図ごと拡大する。
   canvasの寸法は lib/pedigree.js が --fig-w / --fig-h で渡してくる。 */
.pedigree svg {
  display: block; margin-inline: auto; max-width: none;
  width: calc(var(--fig-w, 0) * var(--fig-scale, 1) * 1px);
  height: calc(var(--fig-h, 0) * var(--fig-scale, 1) * 1px);
}
.pedigree figcaption {
  width: min(100% - 2.5rem, var(--wrap)); margin: 0.75rem auto 0;
  color: var(--ink-3); font-size: var(--fs-3);
}

.edge { fill: none; stroke: var(--node-line); stroke-width: 1.25; }
.edge--pollen { stroke-dasharray: 4 3; }
.edge--mutation, .edge--selection { stroke-dasharray: 1 4; stroke-linecap: round; }
.edge--disputed { stroke: var(--warn); }

.node rect { fill: var(--node-bg); stroke: var(--node-line); stroke-width: 1.25; }
/* このサイトの主役が、いちばん小さい字だった。13px/10px から上げている。
   SVGなので rem ではなく px。図は全体が拡大縮小するので、箱のほうも lib/pedigree.js で広げた。 */
.node__name { font-size: 15px; font-weight: 600; text-anchor: middle; fill: var(--ink); }
.node__sub { font-size: 13px; text-anchor: middle; fill: var(--ink-3); }
.node--center rect { fill: var(--node-center-bg); stroke: var(--node-center-bg); }
.node--center .node__name { fill: var(--node-center-ink); font-size: 17px; }
.node--center .node__sub { fill: var(--node-center-ink); opacity: 0.75; }
.node--sibling rect { stroke-dasharray: 3 3; }
.node--line rect { fill: transparent; stroke: var(--line); }
.node--line .node__name { font-size: 13px; font-weight: 400; fill: var(--ink-3); }

/* ── 関係リスト ─────────────────────────── */
.rel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.rel {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1.1rem; background: var(--bg-2);
}
.rel__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.8rem; }
.rel__name { font-weight: 700; font-size: 1.05rem; }
.rel__role { font-size: var(--fs-3); color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.6rem; }
.rel__share { font-size: var(--fs-3); color: var(--leaf); }
.rel__sub { margin: 0.3rem 0 0; color: var(--ink-2); font-size: var(--fs-2); }
.rel__note { margin: 0.4rem 0 0; color: var(--ink-2); font-size: var(--fs-2); line-height: 1.65; border-left: 2px solid var(--line); padding-left: 0.7rem; }
.rel__sources { margin: 0.45rem 0 0; font-size: var(--fs-3); color: var(--ink-3); }
.rel__sources a { color: var(--ink-2); }

.badge { font-size: var(--fs-3); border-radius: 999px; padding: 0.05rem 0.6rem; border: 1px solid currentColor; }
.badge--warn { color: var(--warn); }

.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 0.5rem 0.85rem; background: var(--bg-2); font-weight: 600;
}
.chip__sub { display: block; font-weight: 400; font-size: var(--fs-3); color: var(--ink-3); }

/* ── 子の一覧 ───────────────────────────── */
/* 121行を読ませる表ではなく、目で追える行にする。
   交配組合せは補助情報なので、名前より小さく、折り返させる。 */
.child-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.child {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem;
  border-bottom: 1px solid var(--line-2); padding-block: 0.55rem;
}
.child__name { font-weight: 700; }
.child__ln { font-size: var(--fs-3); color: var(--ink-3); }
/* 品種として登録されず、系統名までしか出ていないもの。数に入れるが、品種と混ぜない。 */
.child__kind {
  font-size: var(--fs-3);
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.1em 0.6em;
}
.child__cross { font-size: var(--fs-3); color: var(--ink-2); overflow-wrap: anywhere; }

/* ── 諸説あり ───────────────────────────── */
.dispute { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 1.1rem; background: var(--bg-2); margin-bottom: 0.6rem; }
.dispute summary { cursor: pointer; font-weight: 600; }
.dispute ul { margin: 0.7rem 0 0; padding-left: 1.2rem; }
.dispute__handling { color: var(--ink-2); font-size: var(--fs-2); border-left: 2px solid var(--grain-2); padding-left: 0.8rem; margin: 0.8rem 0 0.2rem; }

.source-list { font-size: var(--fs-2); color: var(--ink-2); padding-left: 1.4rem; }
.source-list li { margin-bottom: 0.5rem; }
/* 本文中に並ぶリンクは、字の高さぶんしか押せない（出典リンクは16pxしかなかった）。
   上下に padding を足すと、行の高さは変えずに押せる範囲だけ広がる。
   行間1.9のなかに収まる量にしてあるので、上下の行とは重ならない。 */
.rel__sources a, .source-list a, .crumb a, .prose p a, .prose li a { padding-block: 0.3em; }
/* フッターのリンクは並んだ「ボタン」として押される。こちらは44pxを確保する */
.footer-links a { display: inline-block; padding-block: 0.45rem; }
.brand { padding-block: 0.25rem; }

/* 出典のURLは長い。折り返さないと狭い画面で横にはみ出す（320pxで17px出ていた） */
.source-list a, .rel__sources a, .prose a, .prose code { overflow-wrap: anywhere; }
.prose code { word-break: break-all; }

/* 説明文は本文と同じ行長で止める。1120pxいっぱいに伸ばすと、
   目で行を追いにくくなる（視力が落ちているほど効く）。 */
.muted { color: var(--ink-3); font-size: var(--fs-2); max-width: var(--measure); }

/* ── 本文 ───────────────────────────────── */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.3rem; color: var(--ink); margin-top: 2.2rem; }
.prose h2::before { content: none; }
.prose h3 { font-size: 1.05rem; margin-top: 1.8rem; }
.prose p { margin: 0 0 1.2rem; }
.prose blockquote {
  margin: 1.5rem 0; padding-left: 1rem;
  border-left: 3px solid var(--grain-2); color: var(--ink-2);
}

/* ── トップ ─────────────────────────────── */
.hero { padding-block: 4rem 1rem; }
.hero__title { font-size: min(clamp(1.7rem, 5vw, 2.6rem), 8vw); overflow-wrap: break-word; line-height: 1.45; margin: 0 0 1.5rem; max-width: 24em; }
.hero__lead { color: var(--ink-2); }
.button {
  display: inline-block; text-decoration: none;
  background: var(--leaf); color: var(--bg);
  padding: 0.7rem 1.4rem; border-radius: var(--radius); font-weight: 700;
}
@media (prefers-color-scheme: dark) { .button { color: #10130f; } }

/* ── フッター ───────────────────────────── */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding-block: 2rem 3rem; font-size: var(--fs-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0 0 0.6rem; }
.footer-links a { color: var(--ink-2); }

/* ── 固定ページ・表記についての注 ─────────── */
.page { padding-block: 2.5rem 4rem; }
.page__title { font-size: min(clamp(1.6rem, 4.5vw, 2.3rem), 8vw); overflow-wrap: break-word; line-height: 1.35; margin: 0 0 2rem; }
.name-note { margin: 0.6rem 0 0; font-size: var(--fs-3); color: var(--ink-3); }
.name-note a { color: var(--ink-2); }

.gen-head {
  font-size: var(--fs-2); font-weight: 700; color: var(--ink-2);
  margin: 1.6rem 0 0.7rem; display: flex; align-items: center; gap: 0.5rem;
}
.gen-head:first-of-type { margin-top: 0; }
.gen-head__count {
  font-weight: 400; font-size: var(--fs-3); color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 0.5rem;
}

/* 本文中の表。狭い画面でははみ出さず横スクロールさせる */
.prose table {
  display: block; width: max-content; max-width: 100%;
  overflow-x: auto; border-collapse: collapse;
  margin: 1.5rem 0; font-size: var(--fs-2);
}
.prose th, .prose td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.9rem; text-align: left; vertical-align: top;
}
.prose th { color: var(--ink-2); font-size: var(--fs-3); white-space: nowrap; }
.prose tbody th:first-child, .prose td:first-child { white-space: nowrap; }

/* ---- nikumeikan 追加 ---- */
.brand-page { padding-block: 2.5rem 4rem; }
.brand-page__name { font-size: min(clamp(1.8rem, 5vw, 2.7rem), 9vw); line-height: 1.3; margin: 0 0 0.4rem; overflow-wrap: break-word; }
.brand-page__lead { margin: 1rem 0 0; font-size: 1.04em; line-height: 1.8; color: var(--ink); max-width: 46em; }
.brand-page__sub { margin: 0; color: var(--ink-2); font-size: var(--fs-2); display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: baseline; }
.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 0; }
.badge--gi { color: var(--leaf); font-weight: 700; }
.def { width: 100%; border-collapse: collapse; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.def th, .def td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-top: 1px solid var(--line-2); }
.def tr:first-child th, .def tr:first-child td { border-top: 0; }
.def th { width: 11em; color: var(--ink-2); font-size: var(--fs-2); font-weight: 600; }
.def td p { margin: 0; }
.def td p + p { margin-top: 0.35rem; }
.def .none { color: var(--ink-3); font-size: var(--fs-2); }
.def .src { font-size: var(--fs-3); color: var(--ink-3); margin-top: 0.35rem; }
.def .src a { color: var(--ink-2); }
@media (max-width: 560px) { .def, .def tbody, .def tr, .def th, .def td { display: block; width: auto; } .def th { padding-bottom: 0; border-top: 1px solid var(--line-2); } .def td { border-top: 0; padding-top: 0.25rem; } }
.info { display: grid; gap: 0.4rem; font-size: var(--fs-2); color: var(--ink-2); margin: 0; }
.info dt { font-weight: 600; color: var(--ink); }
.info dd { margin: 0 0 0.6rem; min-width: 0; }
.info a { overflow-wrap: anywhere; }
.note-box { border-left: 3px solid var(--leaf); padding: 0.2rem 0 0.2rem 0.9rem; color: var(--ink-2); font-size: var(--fs-2); max-width: var(--measure); }
.list-table { width: 100%; border-collapse: collapse; font-size: var(--fs-2); }
.list-table th, .list-table td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.list-table th { color: var(--ink-3); font-weight: 600; font-size: var(--fs-3); white-space: nowrap; }
.list-table td a { font-weight: 700; font-size: 1rem; }
.table-scroll { overflow-x: auto; }
.pref-head { font-size: 1.05rem; margin: 2rem 0 0.7rem; color: var(--ink-2); }

/* ---- 図 ---- */
.fam { margin: 0; }
.fam svg { width: 100%; max-width: 640px; height: auto; display: block; }
.fam__outer { fill: var(--bg-2); stroke: var(--grain-2); stroke-width: 1.5; }
.fam__outer--cur { stroke: var(--leaf); stroke-width: 2.5; }
.fam__rootname { font-weight: 700; fill: var(--ink); }
.fam__box { fill: var(--bg); stroke: var(--node-line); stroke-width: 1.25; }
.fam__box--cur { fill: var(--node-center-bg); stroke: var(--node-center-bg); }
.fam__name { text-anchor: middle; fill: var(--ink); font-weight: 600; }
.fam__name--cur { fill: var(--node-center-ink); }
.fam__label { font-size: 13px; fill: var(--ink-3); }
.fam__arrow { stroke: var(--grain-2); stroke-width: 1.5; fill: none; }
.fam__head { fill: none; stroke: var(--grain-2); stroke-width: 1.5; }
.fam a:hover rect, .tilemap a:hover rect { stroke: var(--leaf); stroke-width: 2; }
.tilemap { margin: 0; }
.tilemap__scroll { overflow-x: auto; }
.tilemap svg { width: 100%; min-width: 560px; max-width: 812px; height: auto; display: block; }
.tilemap figcaption { font-size: var(--fs-3); color: var(--ink-3); margin-top: 0.4rem; }
.tile { stroke: var(--line); stroke-width: 1; }
.tile--0 { fill: var(--line-2); }
.tile--1 { fill: #f1d9d3; } .tile--2 { fill: #dba79b; } .tile--3 { fill: #b8604f; } .tile--4 { fill: #8b2e24; }
.tile__name { text-anchor: middle; fill: var(--ink-2); font-weight: 600; }
.tile__n { text-anchor: middle; font-size: 13px; font-weight: 700; }
.tile__name--0 { fill: var(--ink-3); font-weight: 400; }
.tile__name--1, .tile__name--2 { fill: #2a1411; }
.tile__name--3, .tile__name--4 { fill: #ffffff; }
.gg { margin: 0; }
.gg svg { width: 100%; max-width: 560px; min-width: 480px; height: auto; display: block; }
.gg__axis { font-size: 14px; font-weight: 700; fill: var(--ink-2); }
.gg__lbl { font-size: 13px; fill: var(--ink-2); }
.gg__cell { fill: var(--bg-2); stroke: var(--node-line); }
.gg__code { font-size: 15px; font-weight: 700; fill: var(--ink); }
.gg__code--hot { fill: #fff; }
.gg__bms { stroke: none; }
.gg__bms--1 { fill: #f3e6e2; } .gg__bms--2 { fill: #ebcfc7; } .gg__bms--3 { fill: #dba79b; } .gg__bms--4 { fill: #b8604f; } .gg__bms--5 { fill: #8b2e24; }
.gg__brace { stroke: var(--ink-3); stroke-width: 1.2; fill: none; }
.stat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; }
.stat__head { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; }
.stat__bar { height: 8px; border-radius: 4px; background: var(--leaf); margin: 0.5rem 0; }
.stat__items { font-size: var(--fs-2); color: var(--ink-2); margin: 0; }
.stat__items a { color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .tile--1 { fill: #4a2723; } .tile--2 { fill: #6e332b; } .tile--3 { fill: #a0493b; } .tile--4 { fill: #d9796a; }
  .tile__name--1, .tile__name--2, .tile__name--3 { fill: #f3e6e2; } .tile__name--4 { fill: #1a0d0b; }
}
.badge--ad { color: var(--ink-3); font-size: var(--fs-3); font-weight: 400; vertical-align: 0.2em; margin-left: 0.4rem; }
.jas__row { fill: var(--bg-2); stroke: var(--line); }
.jas__key { font-size: 15px; font-weight: 700; fill: var(--ink); }
.jas__val { font-size: 15px; fill: var(--ink-2); }

/* 在来種ページ */
.lead-p { max-width: var(--measure); margin: 1.2rem 0; }
.plain-list { padding-left: 1.2rem; margin: 1rem 0; }
.plain-list li { margin: 0.55rem 0; line-height: 1.7; }
.natives-line { font-size: var(--fs-2); margin: 0.8rem 0; }
.gg--fit svg { min-width: 0; max-width: 460px; }
.native-table td:nth-child(2) { min-width: 8.5em; }
.native-table td:first-child, .native-table td:last-child { white-space: nowrap; }
/* 読みもの */
.guide-list{list-style:none;padding:0;margin:1.5rem 0;display:grid;gap:1rem}
.guide-card{border:1px solid var(--line,#ddd);border-radius:10px;padding:1rem 1.1rem}
.guide-card h2{font-size:1.15rem;margin:0 0 .5rem;line-height:1.45}
.guide-card p{margin:.4rem 0}
.guide-table{width:100%;border-collapse:collapse}
.guide-table th,.guide-table td{border-bottom:1px solid var(--line,#ddd);padding:.5rem .4rem;text-align:left;vertical-align:top}
.guide-table td.num{text-align:right;white-space:nowrap}
.guide-table td:first-child{min-width:7em}
.guide-table .small{font-size:.85em}
.exp-box{border:1px dashed var(--line,#ccc);border-radius:10px;padding:.8rem 1rem;margin-top:1rem}
.exp-box p{margin:.3rem 0}
.guide-table th{white-space:nowrap}
.guide-table td.from{white-space:nowrap}
html:lang(en) .guide-table td.from{white-space:normal;min-width:4.5em}
.guide-table .none{color:var(--ink-3)} .guide-table td p{margin:0 0 .3rem} .guide-table th[scope=row]{font-weight:600;min-width:6.5em}
.guide-table th[scope=row]{white-space:normal;min-width:5.5em;width:30%}
.hero{margin:1.2rem 0 1.8rem}
.hero img{display:block;width:100%;height:auto;aspect-ratio:4/1;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
.hero figcaption{margin-top:.35rem;font-size:.75rem;color:var(--ink-3);text-align:right}
.guide-card__th{display:block;width:100%;height:auto;aspect-ratio:4/1;object-fit:cover;border-radius:6px;margin:0 0 .7rem}
.th-ico{display:inline-flex;align-items:flex-start;gap:.45em}
.ico{width:1.25em;height:1.25em;flex:none;color:var(--grain);margin-top:.05em}
.ico--blank{display:inline-block}
.jas__ico{color:var(--grain)}
.grade-table td:first-child{white-space:nowrap}

.list-table--pork{table-layout:fixed;width:100%}
.list-table--pork th:nth-child(1){width:34%}
.list-table--pork th:nth-child(3){width:20%}
@media (max-width:600px){.list-table--pork th:nth-child(1){width:38%}.list-table--pork th:nth-child(3){width:24%}}
/* 銘柄名の一覧 */
.names-jump{display:flex;flex-wrap:wrap;gap:.3rem .6rem;margin:1rem 0 .5rem;font-weight:700}
.names-jump a{text-decoration:none;padding:.15rem .45rem;border:1px solid var(--line-2);border-radius:6px}
.names-list{list-style:none;margin:0;padding:0}
.names-list li{padding:.7rem 0;border-bottom:1px solid var(--line-2)}
.names-list p{margin:0}
.names-list__main a{font-weight:700;font-size:1.05rem}
.names-list__kind{font-size:var(--fs-3);color:var(--ink-3)}
.names-list__sub{font-size:var(--fs-2);overflow-wrap:anywhere}
.names-list__lab{display:inline-block;min-width:3.2em;color:var(--ink-3);font-size:var(--fs-3)}
.names-list__basis{font-size:var(--fs-3);color:var(--ink-3);margin-left:.3rem}

/* ---- 道具ページ（条件で探す・並べて比べる） ---- */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tool-page select { font: inherit; font-size: var(--fs-2); padding: 0.4rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); color: var(--ink); max-width: 100%; }
.cmp-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.8rem; margin: 1.2rem 0 0.4rem; }
.cmp-pick__slot, .finder__grid label { display: flex; flex-direction: column; gap: 0.25rem; font-size: var(--fs-2); color: var(--ink-2); min-width: 0; }
.cmp { width: 100%; border-collapse: collapse; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 0.8rem; min-width: 34rem; }
.cmp th, .cmp td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-top: 1px solid var(--line-2); }
.cmp thead th { border-top: 0; font-size: 1rem; }
.cmp tbody th { width: 9em; color: var(--ink-2); font-size: var(--fs-2); font-weight: 600; }
.cmp td p { margin: 0; } .cmp td p + p { margin-top: 0.3rem; }
.cmp .none { color: var(--ink-3); font-size: var(--fs-2); }
.finder { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1.2rem 0; }
.finder fieldset { border: 0; padding: 0; margin: 0 0 0.8rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.finder legend { font-size: var(--fs-2); color: var(--ink-2); font-weight: 600; margin-bottom: 0.3rem; }
.finder__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.8rem; }
.finder__gi { display: block; margin-top: 0.8rem; font-size: var(--fs-2); }
.finder__bar { margin: 0.8rem 0 0; display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: var(--fs-2); color: var(--grain); text-decoration: underline; cursor: pointer; }
.find-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.2rem; }
.find-list > li { padding: 0.7rem 0; border-top: 1px solid var(--line-2); }
.find-list p { margin: 0; }
.find-list__head { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: baseline; }
.find-list__cmp { margin-left: auto; font-size: var(--fs-2); color: var(--ink-2); white-space: nowrap; }
.find-list__facts { font-size: var(--fs-2); color: var(--ink-2); margin-top: 0.2rem !important; overflow-wrap: anywhere; }
.cmp-dock { position: sticky; bottom: 0.8rem; margin: 1rem 0; padding: 0.7rem 1rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,.12); display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 0.5rem 1rem; border-radius: 8px; background: var(--leaf); color: #fff; text-decoration: none; font-weight: 600; }
@media (prefers-color-scheme: dark) { .btn { color: #10130f; } }
@media (max-width: 560px) {
  .cmp { min-width: 0; table-layout: fixed; }
  .cmp th, .cmp td { padding: 0.55rem 0.5rem; font-size: var(--fs-2); overflow-wrap: anywhere; }
  .cmp tbody th { width: 5.5em; }
}
